|
|
@@ -2344,11 +2344,12 @@ static void* sensor_thread(void* arg)
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
- #if (CHIP_TYPE != CHIP_T113s)
|
|
|
+#if (CHIP_TYPE != CHIP_T113s)
|
|
|
case SENSOR_TYPE_SMOKE: // 烟雾
|
|
|
case SENSOR_TYPE_WATER: // 水浸
|
|
|
case SENSOR_TYPE_ACCESS: // 门禁 IO信号
|
|
|
{
|
|
|
+#if DRY_NONE
|
|
|
if (_globalSensorMangerTemp->sensor_interface_type==2)//干节点传感器
|
|
|
{
|
|
|
int nStatus=-1;
|
|
|
@@ -2403,6 +2404,8 @@ static void* sensor_thread(void* arg)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+#endif
|
|
|
}
|
|
|
break;
|
|
|
#endif
|
|
|
@@ -2650,7 +2653,18 @@ static void* sensor_thread(void* arg)
|
|
|
{
|
|
|
_globalSensorMangerTemp->Cur_sensor_info.product_log_time = now;
|
|
|
// 插入数据库
|
|
|
- ret = dev_insert_sensor_info(_globalDeviceManager->db, &_globalSensorMangerTemp->Cur_sensor_info, &nSaveIndex);
|
|
|
+#if DRY_NONE
|
|
|
+ if(_globalSensorMangerTemp->sensor_interface_type!=2)
|
|
|
+ {
|
|
|
+ ret = dev_insert_sensor_info(_globalDeviceManager->db, &_globalSensorMangerTemp->Cur_sensor_info, &nSaveIndex);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ ret = 0;
|
|
|
+ }
|
|
|
+#else
|
|
|
+ ret = dev_insert_sensor_info(_globalDeviceManager->db, &_globalSensorMangerTemp->Cur_sensor_info, &nSaveIndex);
|
|
|
+#endif
|
|
|
+
|
|
|
if (ret != 0)
|
|
|
{
|
|
|
log_e("sensor_temp_write database error.");
|
|
|
@@ -2658,10 +2672,21 @@ static void* sensor_thread(void* arg)
|
|
|
}
|
|
|
if (_globalSensorMangerTemp->sensor_status == 0)
|
|
|
{
|
|
|
+#if (defined DRY_NONE)
|
|
|
+ if(_globalSensorMangerTemp->sensor_interface_type!=2)
|
|
|
+ {
|
|
|
+ sensor_alarm(_globalSensorMangerTemp, SENSOR_VAL1_UPPER,&nSaveIndex);
|
|
|
+ sensor_alarm(_globalSensorMangerTemp, SENSOR_VAL1_LOWER,&nSaveIndex);
|
|
|
+ sensor_alarm(_globalSensorMangerTemp, SENSOR_VAL2_UPPER,&nSaveIndex);
|
|
|
+ sensor_alarm(_globalSensorMangerTemp, SENSOR_VAL2_LOWER,&nSaveIndex);
|
|
|
+ }
|
|
|
+
|
|
|
+#else
|
|
|
sensor_alarm(_globalSensorMangerTemp, SENSOR_VAL1_UPPER,&nSaveIndex);
|
|
|
sensor_alarm(_globalSensorMangerTemp, SENSOR_VAL1_LOWER,&nSaveIndex);
|
|
|
sensor_alarm(_globalSensorMangerTemp, SENSOR_VAL2_UPPER,&nSaveIndex);
|
|
|
sensor_alarm(_globalSensorMangerTemp, SENSOR_VAL2_LOWER,&nSaveIndex);
|
|
|
+#endif
|
|
|
}
|
|
|
if (_globalSensorMangerTemp->sensor_interface_type == 1) // 485 类型传感器
|
|
|
{
|