|
|
@@ -2630,7 +2630,12 @@ static void alarmProtect(void *conn)
|
|
|
{
|
|
|
case SENSOR_TYPE_TEMPERATURE:
|
|
|
case SENSOR_TYPE_DoubleT:
|
|
|
- if (strcmp(_alarm_request_info._sensor_info.thresholdType, language_temperature[__globalDeviceManage._globalDevInfo.product_language]) == 0)
|
|
|
+ {
|
|
|
+ char strName1[100]={0};
|
|
|
+ char strName2[100]={0};
|
|
|
+ sprintf(strName1, "%s%d", language_temperature[__globalDeviceManage._globalDevInfo.product_language], 1);
|
|
|
+ sprintf(strName2, "%s%d", language_temperature[__globalDeviceManage._globalDevInfo.product_language], 2);
|
|
|
+ if (strcmp(_alarm_request_info._sensor_info.thresholdType, language_temperature[__globalDeviceManage._globalDevInfo.product_language]) == 0||strcmp(_alarm_request_info._sensor_info.thresholdType, strName1) == 0)
|
|
|
{
|
|
|
_globalSensorMangerSaveTemp->over_manager->sensor_val1_upper_threshold = atof(_alarm_request_info._sensor_info.thresholdUpperValue);
|
|
|
_globalSensorMangerSaveTemp->over_manager->sensor_val1_lower_threshold = atof(_alarm_request_info._sensor_info.thresholdDownValue);
|
|
|
@@ -2654,7 +2659,7 @@ static void alarmProtect(void *conn)
|
|
|
_globalSensorMangerSaveTemp->over_manager->sensor_val1_lower_threshold_ctrl = ALARM_CTRL_ALARM_ONLY;
|
|
|
|
|
|
}
|
|
|
- else if (strcmp(_alarm_request_info._sensor_info.thresholdType, language_humidity[__globalDeviceManage._globalDevInfo.product_language]) == 0)
|
|
|
+ else if (strcmp(_alarm_request_info._sensor_info.thresholdType, language_humidity[__globalDeviceManage._globalDevInfo.product_language]) == 0||strcmp(_alarm_request_info._sensor_info.thresholdType, strName2) == 0)
|
|
|
{
|
|
|
_globalSensorMangerSaveTemp->over_manager->sensor_val2_upper_threshold = atof(_alarm_request_info._sensor_info.thresholdUpperValue);
|
|
|
_globalSensorMangerSaveTemp->over_manager->sensor_val2_lower_threshold = atof(_alarm_request_info._sensor_info.thresholdDownValue);
|
|
|
@@ -2676,7 +2681,7 @@ static void alarmProtect(void *conn)
|
|
|
else
|
|
|
_globalSensorMangerSaveTemp->over_manager->sensor_val2_lower_threshold_ctrl = ALARM_CTRL_ALARM_ONLY;
|
|
|
}
|
|
|
-
|
|
|
+ }
|
|
|
break;
|
|
|
case SENSOR_TYPE_SMOKE:
|
|
|
case SENSOR_TYPE_WATER:
|