|
|
@@ -344,7 +344,7 @@ void* power_thread(void* arg)
|
|
|
|
|
|
memcpy(&_globalPowerWarningInfo,
|
|
|
&_globalDeviceManager->_all_ctrl_board[(int)_globalPowerMangerTemp->product_saddr]._PowerWarninginfo[(int)_globalPowerMangerTemp->product_ch_addr-1],
|
|
|
- sizeof(PowerInfo));
|
|
|
+ sizeof(PowerWarningInfo));
|
|
|
switch (_globalPowerMangerTemp->product_ch_type)
|
|
|
{
|
|
|
case AC_SINGLE_S_TYPE:
|
|
|
@@ -1108,8 +1108,7 @@ void* power_thread(void* arg)
|
|
|
//动作
|
|
|
|
|
|
//1ms
|
|
|
- //sleep(1);
|
|
|
- ///usleep(500*1000);
|
|
|
+ usleep(5*1000);
|
|
|
//延时
|
|
|
//usleep(samp_time*1000);
|
|
|
}
|
|
|
@@ -1534,9 +1533,21 @@ void* sensor_thread(void* arg)
|
|
|
break;
|
|
|
case SENSOR_TYPE_GAS: // 气体
|
|
|
{
|
|
|
- _globalSensorInfo.val1=0;
|
|
|
- _globalSensorInfo.val2=0;
|
|
|
- _globalSensorMangerTemp->Cur_sensor_info=_globalSensorInfo;
|
|
|
+ float CO2 = 0.0;
|
|
|
+ ret = _g_sensor_get_CO2_value((void *)&_globalDeviceManager->sensor_modbus_manager,
|
|
|
+ _globalSensorMangerTemp->sensor_addr,
|
|
|
+ &CO2);
|
|
|
+ if (ret == -1)
|
|
|
+ {
|
|
|
+ _globalSensorMangerTemp->sensor_status = 1;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _globalSensorMangerTemp->sensor_status = 0;
|
|
|
+ }
|
|
|
+ _globalSensorInfo.val1 = CO2;
|
|
|
+ _globalSensorInfo.val2 = 0;
|
|
|
+ _globalSensorMangerTemp->Cur_sensor_info = _globalSensorInfo;
|
|
|
}
|
|
|
break;
|
|
|
case SENSOR_TYPE_AIR_PRESS: // 气流
|