|
|
@ -148,7 +148,7 @@ void DisinfectionCtrlService::initContext(DisinfectionContext& context, |
|
|
|
context.injection_pump_speed = injection_pump_speed; |
|
|
|
context.injection_pump_speed_changed = true; |
|
|
|
|
|
|
|
logger->info("startDisinfection {} {}", m_context.m_loglevel, m_context.m_disinfectionID); |
|
|
|
logger->info("startDisinfection {} {}", m_context.m_targetLoglevel, m_context.m_disinfectionID); |
|
|
|
logger->info(" stoped_gs {}", context.stoped_gs); |
|
|
|
logger->info(" continued_gs {}", context.continued_gs); |
|
|
|
logger->info(" stoped_satur {}", context.stoped_satur); |
|
|
@ -163,7 +163,6 @@ void DisinfectionCtrlService::initContext(DisinfectionContext& context, |
|
|
|
m_disinfectionWorkState = 1; |
|
|
|
context.m_targetLoglevel = loglevel; |
|
|
|
context.m_nowLoglevel = 0; |
|
|
|
context.m_loglevel = loglevel; |
|
|
|
// m_context.m_preheatFlag = true;
|
|
|
|
m_context.dvalue = 0; |
|
|
|
// m_context.stopedflag = false;
|
|
|
@ -194,11 +193,10 @@ void DisinfectionCtrlService::initContext(DisinfectionContext& context, |
|
|
|
"dvalue,loglevel,targetloglevel," //
|
|
|
|
"heating,blower,compressor,pump," //
|
|
|
|
// "disinfectantVolume," //
|
|
|
|
"remaintime\n" //
|
|
|
|
"remaintime\n" //
|
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void DisinfectionCtrlService::dumpDisinfectionLogsToCSV(DisinfectionContext& context) { |
|
|
|
auto* sensors = &m_context.h2o2data.h2o2sensor_data[0]; |
|
|
|
auto ds = m_deviceIoControlService; |
|
|
@ -247,7 +245,7 @@ void DisinfectionCtrlService::processPreheatState(DisinfectionContext& context) |
|
|
|
int hasstarttime = zsteady_clock().elapsedTimeS(context.m_starttp); |
|
|
|
|
|
|
|
// logger->info("preheat {}", context.m_disinfectionID);
|
|
|
|
if ((context.m_state == kpreheat && hasstarttime > m_context.pre_heat_time_s) ) { |
|
|
|
if ((context.m_state == kpreheat && hasstarttime > m_context.pre_heat_time_s)) { |
|
|
|
logger->info("preheat finished {}", context.m_disinfectionID); |
|
|
|
// blower_setPower(true);
|
|
|
|
m_deviceIoControlService->airBlower_setState(true); |
|
|
@ -377,9 +375,9 @@ void DisinfectionCtrlService::disinfectionLoop(bool& breakflag) { |
|
|
|
*/ |
|
|
|
processDisinfectionState(m_context); |
|
|
|
//
|
|
|
|
if (m_context.m_remaintime <= 0) { |
|
|
|
if (m_context.m_remaintime <= 0 && m_context.m_nowLoglevel > (m_context.m_targetLoglevel + 0.01)) { |
|
|
|
m_context.m_remaintime = 0; |
|
|
|
m_context.m_loglevel = m_context.m_targetLoglevel; |
|
|
|
m_context.m_nowLoglevel = m_context.m_targetLoglevel + 0.01; |
|
|
|
logger->info("disinfection finished {},but waitting for h2o2 to safe", m_context.m_disinfectionID); |
|
|
|
m_deviceIoControlService->sprayLiquidPump_close(); |
|
|
|
usleep(1000 * 1000); |
|
|
|