|
|
@@ -14,6 +14,7 @@
|
|
|
#include <hmi.h>
|
|
|
#include <dtu_uart2.h>
|
|
|
#include <sht30_collect.h>
|
|
|
+#include <beep.h>
|
|
|
#define DBG_ENABLE
|
|
|
#define DBG_COLOR
|
|
|
#define DBG_TAG "selfcheck"
|
|
|
@@ -37,13 +38,12 @@ static int calculate_average(int arr[], int n) {
|
|
|
|
|
|
static void t_takephoto_callback(void *parameter)
|
|
|
{
|
|
|
- rt_timer_delete(timer_takephoto);
|
|
|
LOG_E("t_takephoto_callback");
|
|
|
- device_status.C01 |= (1<<2);
|
|
|
- device_status.C01 |= (1<<3);
|
|
|
- HMI_WRITE("selfcheck.t4.bco=63488");
|
|
|
- HMI_WRITE("selfcheck.t3.bco=63488");
|
|
|
- HMI_WRITE("sysSet.va0.txt=\"拍照超时\"");
|
|
|
+ //关闭补光灯
|
|
|
+ ctr_led(OFF);
|
|
|
+ //关闭滑台驱动
|
|
|
+ slidelock();
|
|
|
+ Beep_Tip(5000);
|
|
|
}
|
|
|
|
|
|
int selfcheck(uint8_t type)
|
|
|
@@ -289,7 +289,7 @@ int selfcheck(uint8_t type)
|
|
|
int rt_software_timer_init(void)
|
|
|
{
|
|
|
//启动拍照超时定时器
|
|
|
- timer_takephoto = rt_timer_create("t_takephoto",t_takephoto_callback,RT_NULL, 100000, RT_TIMER_FLAG_ONE_SHOT|RT_TIMER_FLAG_HARD_TIMER);
|
|
|
+ timer_takephoto = rt_timer_create("t_takephoto",t_takephoto_callback,RT_NULL, 20000, RT_TIMER_FLAG_ONE_SHOT|RT_TIMER_FLAG_HARD_TIMER);
|
|
|
if(timer_takephoto==RT_NULL)
|
|
|
{
|
|
|
LOG_E("rt_timer_create t_takephoto failed!");
|