Browse Source

update

master
zhaohe 1 year ago
parent
commit
7f1e91f6a1
  1. 3
      src/api/cmds/disinfection_cmd_impl.cpp
  2. 1
      src/configs/project_setting.hpp
  3. 5
      src/service/device_alert_dectector_service.cpp

3
src/api/cmds/disinfection_cmd_impl.cpp

@ -79,7 +79,6 @@ void DisinfectionCmdImpl::getDehumidifyAfterDisinfectionThreshold(json& cmd, jso
void DisinfectionCmdImpl::startDisinfection(json& cmd, json& receipt) {
auto dfs = m_disinfectionCtrlService->getDisinfectionService();
int disinfectantVolumeG = m_deviceIoControlService->getDisinfectantVolume_g();
#if (defined PROJECT_TYPE_LARGE_SPACE_DISINFECTION) || (defined PROJECT_TYPE_SMALL_SPACE_DISINFECTION) || (defined PROJECT_TYPE_PIPE_DISINFECTION)
if (m_deviceIoControlService->getDeviceBottomWaterDetectionSensor()) {
@ -96,7 +95,7 @@ void DisinfectionCmdImpl::startDisinfection(json& cmd, json& receipt) {
receipt["ackDisplayInfo"] = "蒸发仓有积水,请排水后再进行消毒";
return;
}
int disinfectantVolumeG = m_deviceIoControlService->getDisinfectantVolume_g();
if (disinfectantVolumeG < MIN_DISINFECTANT_VOLUME) {
logger->error("start disinfection failed, disinfectant volume not enough {} < {}", disinfectantVolumeG, MIN_DISINFECTANT_VOLUME);
receipt["ackcode"] = err::zecode(err::kce_disinfectant_insufficient);

1
src/configs/project_setting.hpp

@ -48,6 +48,7 @@
#define DISINFECTANT_BUCKET_CAPACITY 0
#define PROJECT_NAME "draw_bar_box_disinfection"
#define MAX_H2O2_SENSOR_NUM (1)
#define MIN_DISINFECTANT_VOLUME 0
#define DEVICE_IP "192.168.8.13"
#endif

5
src/service/device_alert_dectector_service.cpp

@ -27,6 +27,7 @@ shared_ptr<AlertWarningContext> DeviceAlertDetectorService::getAlertWarningConte
}
void DeviceAlertDetectorService::detectAndProcessDeviceBottomWaterDetectAlert() {
#if (defined PROJECT_TYPE_LARGE_SPACE_DISINFECTION) || (defined PROJECT_TYPE_SMALL_SPACE_DISINFECTION) || (defined PROJECT_TYPE_PIPE_DISINFECTION)
auto context = getAlertWarningContext(kDeviceBottomWaterDetectAlert);
if (!context->getTriggerFlag()) {
if (m_deviceIoControlService->getDeviceBottomWaterDetectionSensor()) {
@ -50,8 +51,11 @@ void DeviceAlertDetectorService::detectAndProcessDeviceBottomWaterDetectAlert()
context->setTriggerFlag(false);
}
}
#endif
}
void DeviceAlertDetectorService::detectAndProcessDeviceEvaporationBinWaterDetectAlert() {
#if (defined PROJECT_TYPE_LARGE_SPACE_DISINFECTION) || (defined PROJECT_TYPE_SMALL_SPACE_DISINFECTION) || (defined PROJECT_TYPE_PIPE_DISINFECTION)
auto context = getAlertWarningContext(kDeviceEvaporationBinWaterDetectAlert);
if (!context->getTriggerFlag()) {
if (m_deviceIoControlService->getEvaporationBinWaterDetection()) {
@ -74,6 +78,7 @@ void DeviceAlertDetectorService::detectAndProcessDeviceEvaporationBinWaterDetect
context->setTriggerFlag(false);
}
}
#endif
}
void DeviceAlertDetectorService::tryTriggerEvent() {

Loading…
Cancel
Save