diff --git a/Core/Inc/sys_conf.h b/Core/Inc/sys_conf.h index 2661f50..6059cf0 100644 --- a/Core/Inc/sys_conf.h +++ b/Core/Inc/sys_conf.h @@ -50,12 +50,12 @@ extern "C" { * #define VLEVEL_M 2 functional traces * #define VLEVEL_H 3 all traces */ -#define VERBOSE_LEVEL VLEVEL_OFF +#define VERBOSE_LEVEL VLEVEL_M /** * @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 @@ -78,7 +78,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/Core/Src/yunhorn_sts_process.c b/Core/Src/yunhorn_sts_process.c index 340830d..70ed0e2 100644 --- a/Core/Src/yunhorn_sts_process.c +++ b/Core/Src/yunhorn_sts_process.c @@ -1097,7 +1097,7 @@ void STS_PRESENCE_SENSOR_Background_Measure_Process(uint16_t *bg_distance, uint1 void STS_PRESENCE_SENSOR_Function_Test_Process(uint8_t *self_test_result, uint8_t count) { - uint8_t bring_up_result[16]; + uint8_t bring_up_result[18]={0}; uint8_t previous_lamp_bar_color=sts_lamp_bar_color; uint16_t bg_range=0, bg_noise=0; PME_ON; @@ -1117,16 +1117,16 @@ void STS_PRESENCE_SENSOR_Function_Test_Process(uint8_t *self_test_result, uint8_ HAL_Delay(200); sts_lamp_bar_color = STS_CYAN; STS_PRESENCE_SENSOR_Distance_Measure_Process(); - bring_up_result[10]=sts_sensor_install_height>>8&0xff; - bring_up_result[11]=sts_sensor_install_height&0xff; + bring_up_result[12]=sts_sensor_install_height>>8&0xff; + bring_up_result[13]=sts_sensor_install_height&0xff; HAL_Delay(200); STS_PRESENCE_SENSOR_Background_Measure_Process(&bg_range, &bg_noise); - bring_up_result[12]=bg_range>>8&0xff; - bring_up_result[13]=bg_range&0xff; - bring_up_result[14]=bg_noise>>8&0xff; - bring_up_result[15]=bg_noise&0xff; + bring_up_result[14]=bg_range>>8&0xff; + bring_up_result[15]=bg_range&0xff; + bring_up_result[16]=bg_noise>>8&0xff; + bring_up_result[17]=bg_noise&0xff; } diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 9453e10..51abfdf 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -3146,13 +3146,13 @@ void STS_SENSOR_Function_Test_Process(void) } else { - tstbuf[i++] = (uint8_t)16; //length of following data 16 bytes + tstbuf[i++] = (uint8_t)18; //length of following data 16 bytes #if defined(STS_O7)||defined(STS_O6) - uint8_t self_test_result[16]={0x0}; + uint8_t self_test_result[18]={0x0}; STS_PRESENCE_SENSOR_Function_Test_Process(self_test_result, count); - for (uint8_t j=0; j < 16; j++) + for (uint8_t j=0; j < 18; j++) tstbuf[i++] = (uint8_t) (self_test_result[j])&0xff; //STS_PRESENCE_SENSOR_Distance_Measure_Process(); diff --git a/STM32CubeIDE/Release/STS_O7.bin b/STM32CubeIDE/Release/STS_O7.bin index c82a5f9..368a5b4 100644 Binary files a/STM32CubeIDE/Release/STS_O7.bin and b/STM32CubeIDE/Release/STS_O7.bin differ diff --git a/STM32CubeIDE/Release/sts_o6_pixel_rm2_1_debug_20250424_r2.bin b/STM32CubeIDE/Release/sts_o6_pixel_rm2_1_debug_20250424_r2.bin new file mode 100644 index 0000000..368a5b4 Binary files /dev/null and b/STM32CubeIDE/Release/sts_o6_pixel_rm2_1_debug_20250424_r2.bin differ