---- with debug message, release to HACTL 202406070918AM
This commit is contained in:
parent
c76171b461
commit
fb67997139
|
@ -413,7 +413,7 @@ int sts_presence_rss_fall_rise_detection(void)
|
||||||
APP_LOG(TS_OFF, VLEVEL_H,"First Half Presence Detection, Motion Count = %u \r\n", (int)motion_count);
|
APP_LOG(TS_OFF, VLEVEL_H,"First Half Presence Detection, Motion Count = %u \r\n", (int)motion_count);
|
||||||
#endif
|
#endif
|
||||||
// ******** Second Half detection of fall down and rise up
|
// ******** Second Half detection of fall down and rise up
|
||||||
if (sts_presence_fall_detection == 1)
|
//if (sts_presence_fall_detection == 1)
|
||||||
{
|
{
|
||||||
set_default_fall_rise_configuration(presence_configuration);
|
set_default_fall_rise_configuration(presence_configuration);
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ extern volatile uint16_t sts_fall_rising_pattern_factor1;
|
||||||
extern volatile uint16_t sts_roc_acc_standard_variance;
|
extern volatile uint16_t sts_roc_acc_standard_variance;
|
||||||
extern uint8_t luminance_level;
|
extern uint8_t luminance_level;
|
||||||
SysTime_t mems_event_time;
|
SysTime_t mems_event_time;
|
||||||
|
volatile uint32_t last_sts_rss_time_stamp=0;
|
||||||
extern volatile uint8_t sts_reed_hall_ext_int;
|
extern volatile uint8_t sts_reed_hall_ext_int;
|
||||||
volatile uint8_t sts_occupancy_status;
|
volatile uint8_t sts_occupancy_status;
|
||||||
volatile uint8_t sts_hall1_changed_flag=0, sts_hall2_changed_flag=0, last_sts_hall1_result=0, last_sts_hall2_result=0;
|
volatile uint8_t sts_hall1_changed_flag=0, sts_hall2_changed_flag=0, last_sts_hall1_result=0, last_sts_hall2_result=0;
|
||||||
|
@ -864,11 +864,17 @@ void OnSensor2StateChanged(void)
|
||||||
void OnSensor3StateChanged(void)
|
void OnSensor3StateChanged(void)
|
||||||
{
|
{
|
||||||
SysTime_t sensor_event_time = SysTimeGetMcuTime();
|
SysTime_t sensor_event_time = SysTimeGetMcuTime();
|
||||||
|
if ((sensor_event_time.Seconds - last_sts_rss_time_stamp) < 3 ) //less than 3 seconds ... return for flipping filter
|
||||||
|
{
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
if (sts_rss_result == STS_RESULT_MOTION)
|
if (sts_rss_result == STS_RESULT_MOTION)
|
||||||
{
|
{
|
||||||
sts_o7_sensorData.event_sensor3_start_time = sensor_event_time.Seconds;
|
sts_o7_sensorData.event_sensor3_start_time = sensor_event_time.Seconds;
|
||||||
sts_o7_sensorData.event_sensor3_duration = 0;
|
sts_o7_sensorData.event_sensor3_duration = 0;
|
||||||
}
|
}
|
||||||
|
last_sts_rss_time_stamp = sensor_event_time.Seconds;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnSensor4StateChanged(void)
|
void OnSensor4StateChanged(void)
|
||||||
|
|
Loading…
Reference in New Issue