Browse Source

修复多传感器情况下计算极限值错误的情况

master
zhaohe 1 year ago
parent
commit
f09530f337
  1. 5
      src/service/disfection_ctl/disinfection_service.cpp

5
src/service/disfection_ctl/disinfection_service.cpp

@ -15,7 +15,6 @@ using namespace std;
#define DUMP_LOG_PERIOD (5 * 60.0) #define DUMP_LOG_PERIOD (5 * 60.0)
// #define DUMP_LOG_PERIOD (10.0) // #define DUMP_LOG_PERIOD (10.0)
namespace iflytop { namespace iflytop {
extern bool g_in_test; extern bool g_in_test;
@ -468,6 +467,10 @@ void DisinfectionService::updateH2O2SensorData() {
cx.max_saturation = cx.saturation[0]; cx.max_saturation = cx.saturation[0];
for (size_t i = 0; i < MAX_H2O2_SENSOR_NUM; i++) { for (size_t i = 0; i < MAX_H2O2_SENSOR_NUM; i++) {
if (!m_deviceIoControlService->H2O2Sensor_readSensorState(i)) {
continue;
}
if (cx.h2o2[i] < cx.min_h2o2) { if (cx.h2o2[i] < cx.min_h2o2) {
cx.min_h2o2 = cx.h2o2[i]; cx.min_h2o2 = cx.h2o2[i];
} }

Loading…
Cancel
Save