diff --git a/Core/Inc/sys_conf.h b/Core/Inc/sys_conf.h index 241072d..c8e4d0f 100644 --- a/Core/Inc/sys_conf.h +++ b/Core/Inc/sys_conf.h @@ -47,12 +47,12 @@ extern "C" { /** * @brief Verbose level for all trace logs */ -#define VERBOSE_LEVEL VLEVEL_OFF +#define VERBOSE_LEVEL VLEVEL_L /** * @brief Enable trace logs */ -#define APP_LOG_ENABLED 0 +#define APP_LOG_ENABLED 1 /** * @brief Activate monitoring (probes) of some internal RF signals for debug purpose @@ -75,7 +75,7 @@ extern "C" { * @brief Enable/Disable MCU Debugger pins (dbg serial wires) * @note by HW serial wires are ON by default, need to put them OFF to save power */ -#define DEBUGGER_ENABLED 0 +#define DEBUGGER_ENABLED 1 /** * @brief Disable Low Power mode diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin index e0a10aa..575b956 100644 Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin differ diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf index e96e9ef..308c983 100644 Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf differ diff --git a/STS/TOF/App/app_tof.c b/STS/TOF/App/app_tof.c index 60132d9..5d5c4d9 100644 --- a/STS/TOF/App/app_tof.c +++ b/STS/TOF/App/app_tof.c @@ -42,7 +42,7 @@ volatile uint32_t sts_low_threshold=1500, sts_high_threshold=2800, sts_occupancy extern volatile uint8_t sts_head_level_low; volatile sts_fhmos_sensor_config_t fhmos_cfg={70,4,4,8,20,80,20,25}; volatile sts_fhmos_sensor_cmd_t fhmos_cmd={0x0}; -volatile sts_fhmos_sensor_ambient_height_t fhmos_bg={0x0}, fhmos_gesture={0x0}, fhmos_net={0x0}; +volatile sts_fhmos_sensor_ambient_height_t fhmos_bg, fhmos_gesture, fhmos_net; volatile sts_fhmos_sensor_data_t fhmos_data={0}; extern volatile uint8_t sts_fhmos_result; volatile uint8_t sts_mask_bitmap[8]={0x0}, fhmos_gesture_bitmap[8]={0x0}; @@ -193,6 +193,8 @@ void STS_LMZ_Ambient_Height_Scan_Process(void) for (i=0;i<8;i++) sts_mask_bitmap[i] =0x0; + uint8_t rio_edge[34]={0,1,2,3,4,5,6,7,8,15,16,23,24,31,32,39,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; + // printf("sts sensor install height = %4d \r\n", (int)sts_sensor_install_height); @@ -223,12 +225,12 @@ void STS_LMZ_Ambient_Height_Scan_Process(void) APP_LOG(TS_OFF, VLEVEL_L, "\r\n ----------------------" - "\r\n------Threshold %d cm--\r\n", fhmos_cfg.th_gesture_mask_off_height_cm); + "\r\n------Gesture Mask off above Threshold %d cm--\r\n", fhmos_cfg.th_gesture_mask_off_height_cm); for (uint8_t i = 0; i < 64; i++) { /* Print distance and status */ - if (i%8==0) APP_LOG(TS_OFF, VLEVEL_L, "\r\nPosition from Floor [cm]| "); + if (i%8==0) APP_LOG(TS_OFF, VLEVEL_L, "\r\n[cm]|"); if ((Result.ZoneResult[i].NumberOfTargets > 0)) { range_distance = (uint32_t)Result.ZoneResult[i].Distance[0]; @@ -242,8 +244,9 @@ void STS_LMZ_Ambient_Height_Scan_Process(void) { fhmos_bg.maskoff[i] = 1; } + //sts_mask_bitmap[(uint8_t)(i/8)] |= (fhmos_bg.maskoff[i])<<(7-i%8); - sts_mask_bitmap[(uint8_t)(i/8)] |= (fhmos_bg.maskoff[i])<<(7-i%8); // 2025-JAN-03 update + // sts_mask_bitmap[(uint8_t)(i/8)] |= (fhmos_bg.maskoff[i])<<(7-i%8); // 2025-JAN-03 update // if (i%8==0) APP_LOG(TS_OFF, VLEVEL_M, "\r\n"); APP_LOG(TS_OFF, VLEVEL_L, "|%3d ", fhmos_bg.h2cm[i]*2); @@ -257,28 +260,28 @@ void STS_LMZ_Ambient_Height_Scan_Process(void) APP_LOG(TS_OFF, VLEVEL_L, "\r\n Thresholds: Headlevel=%4d cm, Gesture Mask off=%d cm, Min body height=%d cm\r\n", (uint8_t)fhmos_cfg.th_head_level_height_cm, (uint8_t)fhmos_cfg.th_gesture_mask_off_height_cm, (uint8_t)(fhmos_cfg.th_fall_body_min_height_cm)); - APP_LOG(TS_OFF, VLEVEL_L, "\r\n\n ------- Mask off matrix \r\n"); -/* - for (i=0; i<64; i++) - { + APP_LOG(TS_OFF, VLEVEL_L, "\r\n\n ------- Mask off matrix before remove edge \r\n"); + + for (i=0; i<64; i++) + { + sts_mask_bitmap[(uint8_t)(i/8)] |= (fhmos_bg.maskoff[i])<<(7-i%8); // 2025-JAN-03 update if (i%8==0) APP_LOG(TS_OFF, VLEVEL_L, "\r\n"); APP_LOG(TS_OFF, VLEVEL_L, "|%d ", (uint8_t)fhmos_bg.maskoff[i]); - } -*/ - APP_LOG(TS_OFF, VLEVEL_L, "\r\n\n ------- Remove Edge \r\n"); + } - uint8_t rio_edge[34]={0,1,2,3,4,5,6,7,8,15,16,23,24,31,32,39,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; - - for (i=0; i