|
|
@@ -434,9 +434,15 @@ static void HMI_Decode(void)
|
|
|
//拍照
|
|
|
else if(strstr(rx_buffer,"putTest.switchPhoto=1")!=NULL) {
|
|
|
device_status.photo_ws = 1;
|
|
|
+ char *photo = makeJson_Warn("takephoto","control");
|
|
|
+ DTU_Write("%s",photo);
|
|
|
+ rt_free(photo);
|
|
|
}
|
|
|
else if (strstr(rx_buffer,"putTest.switchPic=1")!=NULL) {
|
|
|
device_status.photo_ws = 1;
|
|
|
+ char *photo = makeJson_Warn("takephoto","control");
|
|
|
+ DTU_Write("%s",photo);
|
|
|
+ rt_free(photo);
|
|
|
}
|
|
|
//转盘复位
|
|
|
else if (strstr(rx_buffer,"turn_init")!=NULL) {
|
|
|
@@ -1424,7 +1430,7 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
ctr_Color_board(OPEN, 1000);
|
|
|
}
|
|
|
#endif
|
|
|
- #if 0
|
|
|
+ #if 1
|
|
|
time_t time_reset12V;
|
|
|
time(&time_reset12V);
|
|
|
static struct tm alarm_reset12V;
|
|
|
@@ -1560,30 +1566,31 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
struct timeval tv;
|
|
|
gettimeofday(&tv, NULL);
|
|
|
device_status.photo_stamp = tv.tv_sec-8*3600;
|
|
|
- ctr_led(ON);
|
|
|
+ if(photo_led_sec==900)
|
|
|
+ ctr_led(ON);
|
|
|
+ DTU_Write("takephoto.mp3");
|
|
|
//打开补光灯
|
|
|
- if(photo_led_sec==300&&device_status.version_type==48)
|
|
|
+ if(device_status.version_type==4&&photo_led_sec==800)
|
|
|
{
|
|
|
- DTU_Write("takephoto.mp3");
|
|
|
- //延时
|
|
|
- rt_thread_delay(1000);
|
|
|
LOG_I("测试拍照!");
|
|
|
- Hk_Take_io();
|
|
|
+ #if 1
|
|
|
char *takephotojson = makeJson_takephoto();
|
|
|
DTU_Write("%s",takephotojson);
|
|
|
rt_free(takephotojson);
|
|
|
+ #endif
|
|
|
+ rt_thread_delay(5000); //延时
|
|
|
+
|
|
|
}
|
|
|
//15S后执行拍照
|
|
|
- else if (photo_led_sec==750&&device_status.version_type!=48)
|
|
|
+ else if (photo_led_sec==750)
|
|
|
{
|
|
|
- DTU_Write("takephoto.mp3");
|
|
|
//延时
|
|
|
rt_thread_delay(1000);
|
|
|
LOG_I("测试拍照!");
|
|
|
Hk_Take_io();
|
|
|
- char *takephotojson = makeJson_takephoto();
|
|
|
- DTU_Write("%s",takephotojson);
|
|
|
- rt_free(takephotojson);
|
|
|
+// char *takephotojson = makeJson_takephoto();
|
|
|
+// DTU_Write("%s",takephotojson);
|
|
|
+// rt_free(takephotojson);
|
|
|
}
|
|
|
photo_led_sec--;
|
|
|
if(photo_led_sec==300) //
|
|
|
@@ -1601,6 +1608,8 @@ static void Ctr_Mortor_entry(void* parameter)
|
|
|
// HMI_WRITE("sysTest.switchPhoto.val=0");
|
|
|
// HMI_WRITE("sysTest.switchFill.val=0");
|
|
|
// }
|
|
|
+ }else{
|
|
|
+ photo_led_sec = 900;
|
|
|
}
|
|
|
/*对焦拍照*/
|
|
|
if(device_status.autotakepic==1)
|
|
|
@@ -2209,7 +2218,7 @@ void ResetParamDefault(void)
|
|
|
device_status.sunBar = 8;
|
|
|
#endif
|
|
|
device_status.tph = 70; //高温保护阈值
|
|
|
- device_status.tpl = -5; //低温保护阈值
|
|
|
+ device_status.tpl = 5; //低温保护阈值
|
|
|
device_status.timeSwitch = 0; //定时模式:光控
|
|
|
device_status.heatvalue=100; //加热温度
|
|
|
ef_set_env_blob("stime", &device_status.clt_time, sizeof(device_status.clt_time));
|
|
|
@@ -2263,7 +2272,7 @@ void ResetParamDefault_DC(void)
|
|
|
device_status.sunBar = 4;
|
|
|
#endif
|
|
|
device_status.tph = 70; //高温保护阈值
|
|
|
- device_status.tpl = -5; //低温保护阈值
|
|
|
+ device_status.tpl = 5; //低温保护阈值
|
|
|
device_status.timeSwitch = 0; //定时模式
|
|
|
device_status.heatvalue=100;
|
|
|
device_status.ds = 1; //设备状态开机
|