|
|
@ -189,6 +189,14 @@ void DisinfectionCtrlService::checkBeforeStart() { |
|
|
|
if (m_thread->isWaitingForJoin()) { |
|
|
|
THROW_APP_EXCEPTION(err::kappe_disinfection_state_is_wrong, ""); |
|
|
|
} |
|
|
|
|
|
|
|
if (dics->WaterSensor_readDeviceBottom()) { |
|
|
|
THROW_APP_EXCEPTION(err::kappe_the_bottom_of_the_device_has_water, ""); |
|
|
|
} |
|
|
|
|
|
|
|
if (dics->WaterSensor_readEvaporationBin()) { |
|
|
|
THROW_APP_EXCEPTION(err::kappe_the_evaporation_bin_has_water, ""); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void DisinfectionCtrlService::startWorkThread() { |
|
|
@ -475,6 +483,15 @@ void DisinfectionCtrlService::processStateDisinfection(DisinfectionEvent* event) |
|
|
|
*/ |
|
|
|
changeToNextState(); |
|
|
|
} |
|
|
|
// AppEventBus
|
|
|
|
if (PORT.isHasDisinfectantBucket()) { |
|
|
|
if (dwus->getWeight() < 10) { |
|
|
|
logger->error("DisinfectantBucket is empty"); |
|
|
|
AppEventBus::ins()->push(make_shared<AppWarningPromoptEvent>(err::kappe_disinfectant_insufficient)); |
|
|
|
changeToNextState(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
tryLogState(false); |
|
|
|
|
|
|
|
// 检查是否消毒完成
|
|
|
|