|
@ -213,7 +213,7 @@ void DisinfectionCtrlService::checkBeforeStart() { |
|
|
|
|
|
|
|
|
void DisinfectionCtrlService::startWorkThread() { |
|
|
void DisinfectionCtrlService::startWorkThread() { |
|
|
resetState(); |
|
|
resetState(); |
|
|
|
|
|
|
|
|
|
|
|
handlePumpStopFlag = false; |
|
|
m_thread.reset(new Thread("DisinfectionStateMachineThread", [this]() { |
|
|
m_thread.reset(new Thread("DisinfectionStateMachineThread", [this]() { |
|
|
DS->setDeviceState(DeviceState::Disinfection); |
|
|
DS->setDeviceState(DeviceState::Disinfection); |
|
|
logger->info("DisinfectionStateMachineThread start"); |
|
|
logger->info("DisinfectionStateMachineThread start"); |
|
@ -549,8 +549,10 @@ void DisinfectionCtrlService::processStateDisinfection(DisinfectionEvent* event) |
|
|
} else { |
|
|
} else { |
|
|
if (isTimeToResumeDisinfection()) { |
|
|
if (isTimeToResumeDisinfection()) { |
|
|
logger->info("resumeDisinfection"); |
|
|
logger->info("resumeDisinfection"); |
|
|
dics->AC_ctrl(1); |
|
|
|
|
|
dics->SprayPump_start(getSettingAsInt(SettingId::injection_pump_speed)); |
|
|
|
|
|
|
|
|
if (!handlePumpStopFlag) { |
|
|
|
|
|
dics->AC_ctrl(1); |
|
|
|
|
|
dics->SprayPump_start(getSettingAsInt(SettingId::injection_pump_speed)); |
|
|
|
|
|
} |
|
|
s_isDisinfectionTakeBreak = false; |
|
|
s_isDisinfectionTakeBreak = false; |
|
|
tryLogState(true); |
|
|
tryLogState(true); |
|
|
} |
|
|
} |
|
@ -595,11 +597,26 @@ void DisinfectionCtrlService::processStateDisinfection(DisinfectionEvent* event) |
|
|
|
|
|
|
|
|
// 检查是否消毒完成
|
|
|
// 检查是否消毒完成
|
|
|
} else if (event->event == kevent_update_cfg) { |
|
|
} else if (event->event == kevent_update_cfg) { |
|
|
if (!s_isDisinfectionTakeBreak) { |
|
|
|
|
|
|
|
|
if (!s_isDisinfectionTakeBreak && !handlePumpStopFlag) { |
|
|
|
|
|
dics->AC_ctrl(1); |
|
|
dics->SprayPump_start(getSettingAsInt(SettingId::injection_pump_speed)); |
|
|
dics->SprayPump_start(getSettingAsInt(SettingId::injection_pump_speed)); |
|
|
} |
|
|
} |
|
|
|
|
|
if (handlePumpStopFlag) { |
|
|
|
|
|
dics->SprayPump_stop(); |
|
|
|
|
|
dics->AC_close(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void DisinfectionCtrlService::setHandleStopPumpInjectionFlag() { |
|
|
|
|
|
handlePumpStopFlag = true; |
|
|
|
|
|
updateCfg(); |
|
|
|
|
|
} |
|
|
|
|
|
void DisinfectionCtrlService::clearHandleStopPumpInjectionFlag() { |
|
|
|
|
|
handlePumpStopFlag = false; |
|
|
|
|
|
updateCfg(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void DisinfectionCtrlService::processStateEmpytLiquidFromTheLine(DisinfectionEvent* event) { |
|
|
void DisinfectionCtrlService::processStateEmpytLiquidFromTheLine(DisinfectionEvent* event) { |
|
|
if (event->event == kevent_enter_state) { |
|
|
if (event->event == kevent_enter_state) { |
|
|
tryLogState(true); |
|
|
tryLogState(true); |
|
|