diff --git a/Core/Src/yunhorn_sts_presence_rss.c b/Core/Src/yunhorn_sts_presence_rss.c index 5299007..14e8c95 100644 --- a/Core/Src/yunhorn_sts_presence_rss.c +++ b/Core/Src/yunhorn_sts_presence_rss.c @@ -149,7 +149,7 @@ volatile uint16_t sts_fall_rising_pattern_factor1=0, sts_fall_rising_pattern_fac volatile uint16_t sts_roc_acc_standard_variance=0; extern volatile uint8_t sts_presence_fall_detection; static uint8_t sts_rss_init_ok=0; -volatile uint8_t sts_presence_singularity=1; +volatile uint8_t sts_presence_singularity=0; extern uint8_t sts_lamp_bar_color; /* USER CODE END Includes */ @@ -381,6 +381,8 @@ static void sts_rss_set_current_configuration_simple(acc_detector_presence_confi static void print_current_configuration(acc_detector_presence_configuration_t presence_configuration) { + static uint32_t cnt_0=0; + if (cnt_0++%200 !=0) return; float sts_run_start = acc_detector_presence_configuration_start_get(presence_configuration); float sts_run_length = acc_detector_presence_configuration_length_get(presence_configuration); float sts_run_threshold = acc_detector_presence_configuration_detection_threshold_get(presence_configuration); @@ -632,7 +634,7 @@ int sts_presence_rss_fall_rise_detection(void) } bool deactivated = false; bool success = true; - const int iterations = (DEFAULT_UPDATE_RATE_PRESENCE); + const int iterations = 10; //(DEFAULT_UPDATE_RATE_PRESENCE); acc_detector_presence_result_t result; uint8_t average_result = 0; float average_distance =0.0f; @@ -697,7 +699,8 @@ int sts_presence_rss_fall_rise_detection(void) //acc_integration_sleep_ms(1000 / DEFAULT_UPDATE_RATE_PRESENCE); // 15ms, DEFAULT_UPDATE_RATE); //acc_integration_sleep_ms(10); // --- around 1500 ms in total - acc_integration_sleep_ms(2); //--- around 1000ms in total + //acc_integration_sleep_ms(2); //--- around 1000ms in total + acc_integration_sleep_ms(1000 / 10); } deactivated = acc_detector_presence_deactivate(handle); @@ -814,7 +817,7 @@ int sts_presence_rss_fall_rise_detection(void) sts_presence_rss_distance = average_distance; sts_presence_rss_score = average_score; - STS_Yunhorn_DistanceStandardDeviation(); + //STS_Yunhorn_DistanceStandardDeviation(); // APP_LOG(TS_OFF, VLEVEL_H, "\r\nAverage Distance: %d (mm) Score: %d Singularity: %d \r\n",(int)average_distance, (int)average_score, sts_presence_singularity); // uint8_t pre_sts_rss_result = (average_result > (DEFAULT_UPDATE_RATE_PRESENCE/5))? 1: 0; diff --git a/STM32CubeIDE/Release/STS_O7.bin b/STM32CubeIDE/Release/STS_O7.bin index 368a5b4..ac433d0 100644 Binary files a/STM32CubeIDE/Release/STS_O7.bin and b/STM32CubeIDE/Release/STS_O7.bin differ