|
@@ -1526,6 +1526,13 @@ static void HMI_Decode(void)
|
|
|
device_status.work_mode = !device_status.work_mode;
|
|
device_status.work_mode = !device_status.work_mode;
|
|
|
ef_set_env_blob("work_mode", &device_status.work_mode, sizeof(device_status.work_mode));
|
|
ef_set_env_blob("work_mode", &device_status.work_mode, sizeof(device_status.work_mode));
|
|
|
LOG_W("修改工作模式:%d",device_status.work_mode);
|
|
LOG_W("修改工作模式:%d",device_status.work_mode);
|
|
|
|
|
+#if MATCH_DEVICE == 1
|
|
|
|
|
+ if(device_status.work_mode == 0){
|
|
|
|
|
+ ctr_router(OFF);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ ctr_router(ON);
|
|
|
|
|
+ }
|
|
|
|
|
+#endif
|
|
|
}else if(strstr(rx_buffer,"DeleteUimage")!=NULL){
|
|
}else if(strstr(rx_buffer,"DeleteUimage")!=NULL){
|
|
|
char* temp = makeJsonRpc2_0("upan_delete_image", NULL, 1);
|
|
char* temp = makeJsonRpc2_0("upan_delete_image", NULL, 1);
|
|
|
if(temp){
|
|
if(temp){
|
|
@@ -2011,6 +2018,7 @@ void Check_ParamConfig(void)
|
|
|
LOG_I("handle_bugger:%d",device_status.handle_bugger);
|
|
LOG_I("handle_bugger:%d",device_status.handle_bugger);
|
|
|
LOG_I("alarm_tg:%s",device_status.alarm_tg);
|
|
LOG_I("alarm_tg:%s",device_status.alarm_tg);
|
|
|
LOG_I("motor_active:%d",device_status.motor_active);
|
|
LOG_I("motor_active:%d",device_status.motor_active);
|
|
|
|
|
+ LOG_I("work_mode:%d",device_status.work_mode);
|
|
|
}
|
|
}
|
|
|
//RTC时间判断,如果当前年份小于2020,提示需要设置时间,切换为光控
|
|
//RTC时间判断,如果当前年份小于2020,提示需要设置时间,切换为光控
|
|
|
if(device_status.update_flag==1)
|
|
if(device_status.update_flag==1)
|
|
@@ -2026,7 +2034,15 @@ void Check_ParamConfig(void)
|
|
|
rt_sprintf(device_status.csq,"0");
|
|
rt_sprintf(device_status.csq,"0");
|
|
|
rt_sprintf(device_status.sim,"1");
|
|
rt_sprintf(device_status.sim,"1");
|
|
|
Sys_Motor_Task();
|
|
Sys_Motor_Task();
|
|
|
|
|
+#if MATCH_DEVICE == 1
|
|
|
|
|
+ if(device_status.work_mode==0){
|
|
|
|
|
+ ctr_router(OFF);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ ctr_router(ON);
|
|
|
|
|
+ }
|
|
|
|
|
+#else
|
|
|
ctr_router(ON);
|
|
ctr_router(ON);
|
|
|
|
|
+#endif
|
|
|
Hmi_Fresh();
|
|
Hmi_Fresh();
|
|
|
Control_clear();
|
|
Control_clear();
|
|
|
Control_Check(); //自检
|
|
Control_Check(); //自检
|