|
@@ -235,14 +235,14 @@ static void dtu_thread_entry_recv(void *parameter)
|
|
|
rx_length = rt_device_read(msg.dev, 0, &rx_buffer[0], rx_length);
|
|
rx_length = rt_device_read(msg.dev, 0, &rx_buffer[0], rx_length);
|
|
|
rx_buffer[rx_length] = '\0';
|
|
rx_buffer[rx_length] = '\0';
|
|
|
LOG_D("recv data:%s",rx_buffer);
|
|
LOG_D("recv data:%s",rx_buffer);
|
|
|
- if(strstr(rx_buffer,"{")==RT_NULL||strstr(rx_buffer,"}")==RT_NULL)
|
|
|
|
|
- {
|
|
|
|
|
- if(device_status.dtype==3)
|
|
|
|
|
- {
|
|
|
|
|
- HMI_WRITE("sysSet.va0.txt=\"%s\"",rx_buffer);
|
|
|
|
|
- rt_timer_stop(timer_uart2);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if(strstr(rx_buffer,"{")==RT_NULL||strstr(rx_buffer,"}")==RT_NULL)
|
|
|
|
|
+// {
|
|
|
|
|
+// if(device_status.dtype==3)
|
|
|
|
|
+// {
|
|
|
|
|
+// HMI_WRITE("sysSet.va0.txt=\"%s\"",rx_buffer);
|
|
|
|
|
+// rt_timer_stop(timer_uart2);
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
device_status.C01 &= ~(1<<13); //通信 正常
|
|
device_status.C01 &= ~(1<<13); //通信 正常
|
|
|
//过滤异常数据
|
|
//过滤异常数据
|
|
|
char str_check_head[2];
|
|
char str_check_head[2];
|
|
@@ -1864,17 +1864,7 @@ int parseDtu(char *json_string)
|
|
|
cJSON *tfcard_sta = cJSON_GetObjectItem(item_ext,"tfcard_sta");
|
|
cJSON *tfcard_sta = cJSON_GetObjectItem(item_ext,"tfcard_sta");
|
|
|
//如果DTU的IMEI和FLash中的不一样,保存到FLASH
|
|
//如果DTU的IMEI和FLash中的不一样,保存到FLASH
|
|
|
value_commn = cJSON_GetObjectItem(item_ext,"photo_sta");
|
|
value_commn = cJSON_GetObjectItem(item_ext,"photo_sta");
|
|
|
- if(tfcard_sta!=NULL)
|
|
|
|
|
- {
|
|
|
|
|
- if(atoi(tfcard_sta->valuestring)==0){
|
|
|
|
|
- HMI_WRITE("menu.t0.txt=\"TF卡在位\"");
|
|
|
|
|
- }else if(atoi(tfcard_sta->valuestring)==1){
|
|
|
|
|
- HMI_WRITE("menu.t0.txt=\"TF卡未识别\"");
|
|
|
|
|
- }else if(atoi(tfcard_sta->valuestring)==2){
|
|
|
|
|
- HMI_WRITE("menu.t0.txt=\"TF卡异常\"");
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
if(photo_sta!=NULL){
|
|
if(photo_sta!=NULL){
|
|
|
device_status.camsta = photo_sta->valueint;
|
|
device_status.camsta = photo_sta->valueint;
|
|
|
LOG_I("相机状态:%d",device_status.camsta);
|
|
LOG_I("相机状态:%d",device_status.camsta);
|