good start up and measure

This commit is contained in:
Yunhorn 2025-04-18 13:10:00 +08:00
parent 0359d7acac
commit e2b65dd0c0
4 changed files with 8 additions and 6 deletions

View File

@ -529,6 +529,7 @@ void STS_YunhornSTSEventP4_Process(void)
*/ */
void STS_YunhornSTSEventP5_Process(void) void STS_YunhornSTSEventP5_Process(void)
{ {
#ifdef STS_P2 #ifdef STS_P2
STS_TOF_VL53LX_PeopleCounting_Process_Start(); STS_TOF_VL53LX_PeopleCounting_Process_Start();
#elif defined(STS_T6) #elif defined(STS_T6)
@ -1933,6 +1934,7 @@ void STS_FHMOS_sensor_config_init(void)
sts_high_threshold = sts_cfg_nvm.sensor_install_height_in_10cm*100; sts_high_threshold = sts_cfg_nvm.sensor_install_height_in_10cm*100;
sts_low_threshold = sts_high_threshold - 1400; sts_low_threshold = sts_high_threshold - 1400;
APP_LOG(TS_OFF, VLEVEL_M, "\r\n FHMOS cfg high= %4d low= %4d \r\n", sts_high_threshold, sts_low_threshold);
} }
void STS_FHMOS_sensor_config_update() void STS_FHMOS_sensor_config_update()

View File

@ -159,11 +159,11 @@ void MX_TOF_Init(void)
//STS_TOF_VL53LX_PeopleCounting_Process(); //STS_TOF_VL53LX_PeopleCounting_Process();
#ifdef L8 #ifdef L8
MX_53L8A1_ThresholdDetection_Init(); MX_53L8A1_ThresholdDetection_Init();
//MX_53L8A1_ThresholdDetection_Process(); MX_53L8A1_ThresholdDetection_Process();
//STS_FHMOS_sensor_config_init(); STS_FHMOS_sensor_config_init();
//sts_high_threshold = sts_cfg_nvm.sensor_install_height_in_10cm ; //sts_high_threshold = sts_cfg_nvm.sensor_install_height_in_10cm ;
//sts_low_threshold = sts_cfg_nvm.sensor_install_height_in_10cm -1400; //sts_low_threshold = sts_cfg_nvm.sensor_install_height_in_10cm -1400;
//STS_TOF_L8_Reconfig(); STS_TOF_L8_Reconfig();
#elif defined(STS_R1D) #elif defined(STS_R1D)
XWL55_WLE5_53L0X_Init(); XWL55_WLE5_53L0X_Init();
@ -593,7 +593,7 @@ static void MX_53L8A1_ThresholdDetection_Process(void)
sts_high_threshold = sts_sensor_install_height+ 400; sts_high_threshold = sts_sensor_install_height+ 400;
sts_low_threshold = sts_high_threshold - 1400; sts_low_threshold = sts_high_threshold - 1400;
APP_LOG(TS_OFF, VLEVEL_H, "\r\n Threshold High=%4d, Low=%4d \r\n", sts_high_threshold, sts_low_threshold); APP_LOG(TS_OFF, VLEVEL_M, "\r\n Threshold High=%4d, Low=%4d \r\n", sts_high_threshold, sts_low_threshold);
ITConfig.LowThreshold = sts_low_threshold; ITConfig.LowThreshold = sts_low_threshold;
ITConfig.HighThreshold = sts_high_threshold; ITConfig.HighThreshold = sts_high_threshold;
@ -671,13 +671,13 @@ static void print_result(RANGING_SENSOR_Result_t *Result)
sts_head_level_low = 0; sts_head_level_low = 0;
/* //*
//APP_LOG(TS_OFF, VLEVEL_M, "\r\n Eliminate edge \r\n"); //APP_LOG(TS_OFF, VLEVEL_M, "\r\n Eliminate edge \r\n");
uint8_t rio_edge[36]={0,1,2,3,4,5,6,7,8,15,16,23,24,31,32,39,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63}; uint8_t rio_edge[36]={0,1,2,3,4,5,6,7,8,15,16,23,24,31,32,39,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};
for (i=0; i<36; i++) for (i=0; i<36; i++)
fhmos_bg.maskoff[rio_edge[i]] = 1; fhmos_bg.maskoff[rio_edge[i]] = 1;
*/ //*/
for (i=0; i<64; i++) for (i=0; i<64; i++)
{ {
if (0 == fhmos_bg.maskoff[i]) // only within the non-mask-off blocks if (0 == fhmos_bg.maskoff[i]) // only within the non-mask-off blocks