Browse Source

update

master
zhaohe 1 year ago
parent
commit
ccb463925e
  1. 3
      src/service/device_io_control_service.cpp

3
src/service/device_io_control_service.cpp

@ -263,6 +263,7 @@ int32_t fake_sensor_val_saturation[10];
bool fake_sensor_val_sensorstate[10];
bool DeviceIoControlService::H2O2Sensor_updateFakeVal(int32_t sensorid, bool enable, int32_t h2o2, int32_t humid, int32_t temp, int32_t saturation) {
logger->info("H2O2Sensor_updateFakeVal sensorid:{} enable:{} h2o2:{} humid:{} temp:{} saturation:{}", sensorid, enable, h2o2, humid, temp, saturation);
if (sensorid >= MAX_H2O2_SENSOR_NUM) return false;
fake_sensor_val_enable[sensorid] = enable;
fake_sensor_val_h2o2[sensorid] = h2o2;
@ -458,6 +459,8 @@ int DeviceIoControlService::getPressureSensorData(int index) {
logger->error("DBDB__readPressureSensor failed {}", ecode);
return 0;
}
// TODO:临时代码,目前气压计小于0的情况属于异常情况 原因未知,认为是0
if (ackcontent < 0) ackcontent = 0;
return ackcontent;
#endif
}

Loading…
Cancel
Save