From adfc7e798b9cbdd022bf8df971843436912a0fe5 Mon Sep 17 00:00:00 2001 From: chen <15335560115@163.com> Date: 星期日, 20 七月 2025 16:58:30 +0800 Subject: [PATCH] 成功移植g_com_map表逻辑,初步测试能读能写,并且TDOA效果和官方一致 --- keil/include/components/app/inc/uwb_radar.h | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/keil/include/components/app/inc/uwb_radar.h b/keil/include/components/app/inc/uwb_radar.h index 1b548d4..dbda00c 100644 --- a/keil/include/components/app/inc/uwb_radar.h +++ b/keil/include/components/app/inc/uwb_radar.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2023 Beijing Hanwei Innovation Technology Ltd. Co. and + * Copyright (c) 2019-2025 Beijing Hanwei Innovation Technology Ltd. Co. and * its subsidiaries and affiliates (collectly called MKSEMI). * * All rights reserved. @@ -43,6 +43,9 @@ #include "mk_common.h" #include "uwb_radar_task.h" +// The Complier have influence on radar data processing speed +#if defined(__ARMCC_VERSION) + #if UWB_RADAR_DETECT_PROCESS_EN // If it is a local calculation, it depends on the running time of the algorithm #define UWB_RADAR_SLOT_DURATION (MS_TO_PHY_TIMER_COUNT(40)) @@ -50,12 +53,26 @@ #define UWB_RADAR_SLOT_DURATION (MS_TO_PHY_TIMER_COUNT(20)) #endif +#elif defined(__GNUC__) || defined(__ICCARM__) + +#if UWB_RADAR_DETECT_PROCESS_EN +// If it is a local calculation, it depends on the running time of the algorithm +#define UWB_RADAR_SLOT_DURATION (MS_TO_PHY_TIMER_COUNT(50)) +#else +#define UWB_RADAR_SLOT_DURATION (MS_TO_PHY_TIMER_COUNT(30)) +#endif + +#endif + +// Ranging IDLE duration needs to substract post-processing time (includes result reporting and printing) for radar frame num calculation +#define RANGING_POST_PROCESSING_TIME (MS_TO_PHY_TIMER_COUNT(15)) + /* Main control block of the uwb radar task */ struct UWB_RADAR_CB_T { wsfQueue_t msg_queue; wsfHandlerId_t handle_id; - wsfTimer_t radar_alone_timer; + mk_timer_t radar_alone_timer; }; struct UWB_RADAR_ENV_T -- Gitblit v1.9.3