good for motion detection............
This commit is contained in:
parent
69de27499f
commit
3982be3636
|
@ -616,7 +616,7 @@ void STS_YunhornCheckStandardDeviation(void)
|
|||
#endif
|
||||
|
||||
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)
|
||||
|
|
|
@ -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.fall_state = sts_fall_rising_detected_result;
|
||||
|
||||
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] );
|
||||
#endif
|
||||
sts_o7_sensorData.fall_speed = (uint8_t)sts_fall_rising_pattern_factor1;
|
||||
sts_o7_sensorData.fall_gravity = (uint8_t)sts_roc_acc_standard_variance;
|
||||
}
|
||||
|
|
|
@ -857,13 +857,14 @@ static void SendTxData(void)
|
|||
#endif
|
||||
#if 1
|
||||
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]]);
|
||||
APP_LOG(TS_OFF, VLEVEL_L,
|
||||
"\r\n######| S1-DoorOpen | S2-Motion | S3-No_Emergency | S4 |Distance(mm) | MotionScore| Unconcious | Over_Stay| Fall Detected|"
|
||||
"\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],
|
||||
(uint16_t)sts_o7_sensorData.rss_presence_distance,(uint16_t)sts_o7_sensorData.rss_presence_score,
|
||||
sts_o7_sensorData.unconcious_state, sts_o7_sensorData.unconcious_duration, sts_o7_sensorData.fall_state );
|
||||
"\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|\r\n######| %6u | %6u | %6u | %6u | %6u | %6u |\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]);
|
||||
|
||||
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.fall_state, sts_o7_sensorData.over_stay_duration, sts_o7_sensorData.unconcious_duration );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue