From d1c92185a660f4779d6eca2154d7234b6bf61325 Mon Sep 17 00:00:00 2001 From: chen <15335560115@163.com> Date: 星期二, 26 十一月 2024 17:50:59 +0800 Subject: [PATCH] 成功和2个标签测距并且加入只删除出车的id和num逻辑,距离修复两者一直同一个距离相差不多的问题 --- keil/include/main/main.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/keil/include/main/main.c b/keil/include/main/main.c index 136c273..521a520 100644 --- a/keil/include/main/main.c +++ b/keil/include/main/main.c @@ -208,6 +208,7 @@ uint8_t gps_enable_flag,motor_open_air_flag,moter_open_uwb_flag,flag_fenli_alarm = 0,fenli_alarm_count,delaysleep_count,enbale_blink_flag; int need_open_gps_count; uint32_t keystarttime,keystarttime2; +extern uint32_t get_in_num,get_out_num; void MotorPoll(void) { if(UWB_work_state==UN_BIND) { @@ -321,6 +322,8 @@ second_count = 0; MinuteTask(); } + TagListUpdate_person_num(); + LOG_INFO(TRACE_MODULE_APP,"车内:%d 人,车外: %d 人\r\n",get_in_num,get_out_num); // if(!power_low_flag) // Gps_change(); // else{ @@ -589,8 +592,8 @@ power_init(); //AIR780E_Reset(); //4G模块重启,耗时1.5秒,这个是无法同步的关键 sleep_timer_open(true, SLEEP_TIMER_MODE_RELOAD, sleep_timer_callback); - //sleep_timer_start(__MS_TO_32K_CNT(g_com_map[COM_INTERVAL]));//测试 -// sleep_timer_start(__MS_TO_32K_CNT(SLEEP_TIMER_NUM));//测试 + sleep_timer_start(__MS_TO_32K_CNT(g_com_map[COM_INTERVAL]));//测试 + sleep_timer_start(__MS_TO_32K_CNT(SLEEP_TIMER_NUM));//测试 // board_5V_input_init(voltage_input_handler); adc_get(&sample[0], NUM_SAMPLES, adc_callback);//adc采样 board_acceleration_detection_init(move_handler); -- Gitblit v1.9.3