diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf index abeb33a..c927508 100644 Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf differ diff --git a/STS/Core/Src/yunhorn_sts_process.c b/STS/Core/Src/yunhorn_sts_process.c index c2840c2..8e8bb2d 100644 --- a/STS/Core/Src/yunhorn_sts_process.c +++ b/STS/Core/Src/yunhorn_sts_process.c @@ -640,27 +640,35 @@ void USER_APP_Parse_CMD_P(uint8_t *parse_buffer, uint8_t parse_buffer_size) { uint8_t sts_fhmos_cfg_index = (uint8_t)(parse_buffer[CFG_CMD5]-0x30); uint8_t sts_fhmos_cfg_value = (parse_buffer[CFG_CMD6]-0x30)*100+(parse_buffer[CFG_CMD7]-0x30)*10+(parse_buffer[CFG_CMD8]-0x30); + APP_LOG(TS_OFF, VLEVEL_M, "\r\nCFG_CMD VALUE =0X%02X =%d \r\n", sts_fhmos_cfg_value,sts_fhmos_cfg_value); switch (sts_fhmos_cfg_index) { case 1: // head level height threshold sts_fhmos_cfg.sts_head_level_height_threshold_cm = sts_fhmos_cfg_value; + sts_cfg_nvm.fhmos_cfg_1 = sts_fhmos_cfg.sts_head_level_height_threshold_cm; break; case 2: sts_fhmos_cfg.sts_fall_duration_threshold_potential_15sec = sts_fhmos_cfg_value; + sts_cfg_nvm.fhmos_cfg_2 =sts_fhmos_cfg.sts_fall_duration_threshold_potential_15sec; break; case 3: sts_fhmos_cfg.sts_fall_duration_threshold_confirm_15sec = sts_fhmos_cfg_value; + sts_cfg_nvm.fhmos_cfg_3 = sts_fhmos_cfg.sts_fall_duration_threshold_confirm_15sec; break; case 4: sts_fhmos_cfg.sts_motionless_threshold_short_15sec = sts_fhmos_cfg_value; + sts_cfg_nvm.fhmos_cfg_4 = sts_fhmos_cfg.sts_motionless_threshold_short_15sec; break; case 5: sts_fhmos_cfg.sts_motionless_threshold_long_15sec = sts_fhmos_cfg_value; + sts_cfg_nvm.fhmos_cfg_5 = sts_fhmos_cfg.sts_motionless_threshold_long_15sec; break; case 6: sts_fhmos_cfg.sts_occupancy_threshold_overstay_15sec = sts_fhmos_cfg_value; + sts_cfg_nvm.fhmos_cfg_6 = sts_fhmos_cfg.sts_occupancy_threshold_overstay_15sec; break; } + OnStoreSTSCFGContextRequest(); // 2024-11-18 UTIL_MEM_set_8((void*)outbuf, 0x0, sizeof(outbuf));