good for motion detection............

This commit is contained in:
Yunhorn 2024-05-17 10:01:26 +08:00
parent 69de27499f
commit 3982be3636
4 changed files with 12 additions and 8 deletions

View File

@ -616,7 +616,7 @@ void STS_YunhornCheckStandardDeviation(void)
#endif #endif
if (standard_variance_presence_score <= DEFAULT_UNCONCIOUS_THRESHOLD) { if (standard_variance_presence_score <= DEFAULT_UNCONCIOUS_THRESHOLD) {
sts_fall_rising_detected_result = STS_PRESENCE_STAYSTILL; sts_fall_rising_detected_result = STS_PRESENCE_UNCONCIOUS;
} }
if ( sts_fall_rising_pattern_factor1 > (uint16_t)sts_fall_detection_acc_threshold) if ( sts_fall_rising_pattern_factor1 > (uint16_t)sts_fall_detection_acc_threshold)

View File

@ -550,9 +550,12 @@ void STS_PRESENCE_SENSOR_Prepare_Send_Data(void)
sts_o7_sensorData.unconcious_state=(sts_fall_rising_detected_result == STS_PRESENCE_UNCONCIOUS)? 1:0; sts_o7_sensorData.unconcious_state=(sts_fall_rising_detected_result == STS_PRESENCE_UNCONCIOUS)? 1:0;
sts_o7_sensorData.fall_state = sts_fall_rising_detected_result; sts_o7_sensorData.fall_state = sts_fall_rising_detected_result;
if (sts_fall_rising_detected_result != STS_PRESENCE_NONE) if (sts_fall_rising_detected_result != STS_PRESENCE_NONE)
{ {
#ifdef STS_O7
APP_LOG(TS_OFF, VLEVEL_M, "\r\n......FALL RISING DETECTION RESULT: %25s............\r\n",sts_presence_fall_detection_message[sts_fall_rising_detected_result] ); APP_LOG(TS_OFF, VLEVEL_M, "\r\n......FALL RISING DETECTION RESULT: %25s............\r\n",sts_presence_fall_detection_message[sts_fall_rising_detected_result] );
#endif
sts_o7_sensorData.fall_speed = (uint8_t)sts_fall_rising_pattern_factor1; sts_o7_sensorData.fall_speed = (uint8_t)sts_fall_rising_pattern_factor1;
sts_o7_sensorData.fall_gravity = (uint8_t)sts_roc_acc_standard_variance; sts_o7_sensorData.fall_gravity = (uint8_t)sts_roc_acc_standard_variance;
} }

View File

@ -857,13 +857,14 @@ static void SendTxData(void)
#endif #endif
#if 1 #if 1
APP_LOG(TS_OFF, VLEVEL_L, APP_LOG(TS_OFF, VLEVEL_L,
"\r\n######| Color | Mode |\r\n######| %4s | %5s |\r\n",(char *)sts_lamp_color_code[(uint8_t)(AppData.Buffer[0])], (char*)sts_work_mode_code[AppData.Buffer[1]]); "\r\n######| Color | Mode |\r\n######| %6s | %5s |\r\n",(char *)sts_lamp_color_code[(uint8_t)(AppData.Buffer[0])], (char*)sts_work_mode_code[AppData.Buffer[1]]);
APP_LOG(TS_OFF, VLEVEL_L,
"\r\n######| S1-DoorOpen | S2-Motion | S3-No_Emergency | S4 |Distance(mm) | MotionScore| Unconcious | Over_Stay| Fall Detected|" APP_LOG(TS_OFF, VLEVEL_L,"\r\n######| S1-DoorOpen | S2-Motion | S3-No_Emergency | S4 | Distance(mm) | MotionScore|\r\n######| %6u | %6u | %6u | %6u | %6u | %6u |\r\n",
"\r\n######| %1d | %1d | %1d | %1d | %04d | %04d | %1d | %1d | %1d |\r\n", AppData.Buffer[2], AppData.Buffer[3],AppData.Buffer[4],AppData.Buffer[5],AppData.Buffer[6]<<8|AppData.Buffer[7],AppData.Buffer[8]<<8|AppData.Buffer[9]);
AppData.Buffer[2], AppData.Buffer[3],AppData.Buffer[4], AppData.Buffer[5],
(uint16_t)sts_o7_sensorData.rss_presence_distance,(uint16_t)sts_o7_sensorData.rss_presence_score, APP_LOG(TS_OFF, VLEVEL_L,"\r\n######| Unconcious | Fall state | Over_Stay state| Over stay duration |\r\n######| %1d | %1d | %1d | %4d |",
sts_o7_sensorData.unconcious_state, sts_o7_sensorData.unconcious_duration, sts_o7_sensorData.fall_state ); sts_o7_sensorData.unconcious_state, sts_o7_sensorData.fall_state, sts_o7_sensorData.over_stay_duration, sts_o7_sensorData.unconcious_duration );
#endif #endif
} }

Binary file not shown.