update for self function test result 16 to 18

This commit is contained in:
Yunhorn 2025-04-24 20:36:09 +08:00
parent a18a4ed4b7
commit 7dd5e395ec
5 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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();

Binary file not shown.