---revised for height output format

This commit is contained in:
Yunhorn 2024-08-19 13:50:46 +08:00
parent ba41fdbc61
commit 1532f4a1f4
1 changed files with 15 additions and 10 deletions

View File

@ -618,18 +618,23 @@ int sts_presence_rss_fall_rise_detection(void)
OnSensorRSS3CStateChanged(); OnSensorRSS3CStateChanged();
} }
#ifdef LOG_RSS //#ifdef LOG_RSS
APP_LOG(TS_OFF, VLEVEL_H,"\r\nSensor at Ceiling Height: %u mm\r\n",(uint16_t)sts_sensor_install_height); APP_LOG(TS_OFF, VLEVEL_M,"\r\nSensor at Ceiling Height: %u cm\r\n",(uint16_t)sts_sensor_install_height/10);
APP_LOG(TS_OFF, VLEVEL_H,"\r\n|Motion Distance Zone| ##### |Height cm|\r\n"); APP_LOG(TS_OFF, VLEVEL_M,"\r\n|Motion Distance Zone| ##### |Height cm|\r\n");
uint8_t kk = (uint8_t)(sts_sensor_install_height/400+1); uint8_t kk = (uint8_t)((uint16_t)(sts_sensor_install_height/1000)/(DEFAULT_ZONE_LENGTH));
APP_LOG(TS_OFF, VLEVEL_L,"\r\n|-----------Ceiling-------Sensor---V-----|\r\n"); APP_LOG(TS_OFF, VLEVEL_M,"\r\n|-----------Ceiling-------Sensor---V-----|\r\n");
for (uint8_t k=0; k<=kk; k++) for (uint8_t k=0; k <=kk; k++)
{ {
if (motion_in_hs_zone[kk-k][thiscnt]>0) APP_LOG(TS_OFF, VLEVEL_L,"\r\n| %2u | %4u | %4u |\r\n", kk-k, (uint8_t)motion_in_hs_zone[kk-k][thiscnt], (int)(kk-k+1)*40); if (motion_in_hs_zone[kk - k][thiscnt] > 0)
else APP_LOG(TS_OFF, VLEVEL_L,"\r\n| %2u | | |\r\n", kk-k); {
APP_LOG(TS_OFF, VLEVEL_M,"\r\n| %2u | %4u | %4u |\r\n",
(kk-k), (uint8_t)motion_in_hs_zone[kk-k][thiscnt], (int)(kk-k)*40);
} else {
APP_LOG(TS_OFF, VLEVEL_M,"\r\n| %2u | | |\r\n", kk-k);
}
} }
APP_LOG(TS_OFF, VLEVEL_L,"\r\n|-----------Floor Ground-----------^-----|\r\n"); APP_LOG(TS_OFF, VLEVEL_M,"\r\n|-----------Floor Ground-----------^-----|\r\n");
#endif //#endif
if (deactivated && success) if (deactivated && success)