diff --git a/Core/Src/sts_lamp_bar.c b/Core/Src/sts_lamp_bar.c index 289c521..af42d28 100644 --- a/Core/Src/sts_lamp_bar.c +++ b/Core/Src/sts_lamp_bar.c @@ -252,7 +252,7 @@ void STS_Combined_Status_Processing(void) event_start_time = 0; - APP_LOG(TS_OFF, VLEVEL_H, "\r\n Event Stop at %6u Seconds \r\n", event_stop_time); + APP_LOG(TS_OFF, VLEVEL_H, "\r\n Event Stop at %6u Seconds, Duration = %6u Seconds\r\n", event_stop_time, (event_stop_time-event_start_time)); } } @@ -282,6 +282,12 @@ void STS_Combined_Status_Processing(void) } break; case STS_DUAL_MODE: + uint8_t flapping_flag=0; + if ((event_stop_time - event_start_time)<=4) { + flapping_flag=1; + } + if (!flapping_flag) { + if ((sts_rss_result == STS_RESULT_NO_MOTION) && (sts_reed_hall_1_result == STS_Status_Door_Open )&& (sts_reed_hall_2_result == STS_Status_SOS_Release )) { sts_status_color = STS_GREEN; @@ -304,6 +310,8 @@ void STS_Combined_Status_Processing(void) sts_status_color = STS_RED_BLUE; } } + } + break; case STS_REMOTE_REED_RSS_MODE: if ((sts_rss_result == STS_RESULT_NO_MOTION) && (sts_reed_hall_result == STS_Status_Door_Open )) diff --git a/Core/Src/yunhorn_sts_presence_rss.c b/Core/Src/yunhorn_sts_presence_rss.c index 73f432f..57a09b9 100644 --- a/Core/Src/yunhorn_sts_presence_rss.c +++ b/Core/Src/yunhorn_sts_presence_rss.c @@ -474,6 +474,7 @@ int sts_presence_rss_fall_rise_detection(void) APP_LOG(TS_OFF, VLEVEL_H,"Fall Rise Detection, Motion Count = %u \r\n", (int)motion_count); sts_rss_result = (average_result > 3)? 1: 0; + APP_LOG(TS_OFF, VLEVEL_H,"Average Motion Result = %u OUTPUT RSS RESULT=%u \r\n", (int)average_result, sts_rss_result); for (k=0; k<10; k++) { if (motion_in_zone[k]>0)