diff --git a/Core/Src/main.c b/Core/Src/main.c index 11d5a42..f07468c 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -126,7 +126,7 @@ int main(void) /* USER CODE BEGIN 2 */ STS_Sensor_Init(); /* USER CODE END 2 */ - + STS_SENSOR_Distance_Test_Process(); /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin index 0c888b1..2a17682 100644 Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin differ diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf index e73da25..e466a26 100644 Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf differ diff --git a/STS/Core/Inc/yunhorn_sts_sensors.h b/STS/Core/Inc/yunhorn_sts_sensors.h index 5de4710..126b14a 100644 --- a/STS/Core/Inc/yunhorn_sts_sensors.h +++ b/STS/Core/Inc/yunhorn_sts_sensors.h @@ -534,6 +534,7 @@ void STS_SENSOR_Function_Test_Process(void); void STS_SENSOR_Distance_Test_Process(void); void STS_PRESENCE_SENSOR_Function_Test_Process(uint8_t *self_test_result, uint8_t count); void STS_PRESENCE_SENSOR_Distance_Measure_Process(void); +void STS_TOF_L8_Init(void); void STS_TOF_L8_Process(void); void STS_TOF_L8_Reconfig(void); void MX_53L8A1_ThresholdDetection_ConfigIT(uint32_t sts_low_threshold, uint32_t sts_high_threshold); diff --git a/STS/Core/Src/yunhorn_sts_process.c b/STS/Core/Src/yunhorn_sts_process.c index 4706904..90c703d 100644 --- a/STS/Core/Src/yunhorn_sts_process.c +++ b/STS/Core/Src/yunhorn_sts_process.c @@ -543,6 +543,7 @@ void STS_YunhornSTSEventP5_Process(void) #elif defined(L8) //STS_TOF_VL53L8X_Process(); //printf("\r\n P5 process \r\n"); + STSWakeupScanTimerStop(); STS_TOF_L8_Process(); @@ -565,7 +566,7 @@ void STS_YunhornSTSEventP5_Process(void) } #endif - + STSWakeupScanTimerStart(); #endif } diff --git a/STS/TOF/App/app_tof.c b/STS/TOF/App/app_tof.c index e101665..1a6ebf0 100644 --- a/STS/TOF/App/app_tof.c +++ b/STS/TOF/App/app_tof.c @@ -164,7 +164,7 @@ void MX_TOF_Init(void) //sts_high_threshold = sts_cfg_nvm.sensor_install_height_in_10cm ; //sts_low_threshold = sts_cfg_nvm.sensor_install_height_in_10cm -1400; STS_TOF_L8_Reconfig(); - + //int range=MX_TOF_Ranging_Process(); #elif defined(STS_R1D) XWL55_WLE5_53L0X_Init(); #endif @@ -489,6 +489,9 @@ void STS_TOF_L8_Init(void) void STS_TOF_L8_Process(void) { + + + //while (1) { /* interrupt mode */ @@ -593,7 +596,7 @@ static void MX_53L8A1_ThresholdDetection_Process(void) sts_high_threshold = sts_sensor_install_height+ 400; sts_low_threshold = sts_high_threshold - 1400; - APP_LOG(TS_OFF, VLEVEL_M, "\r\n Threshold High=%4d, Low=%4d \r\n", sts_high_threshold, sts_low_threshold); + APP_LOG(TS_OFF, VLEVEL_H, "\r\n Threshold High=%4d, Low=%4d \r\n", sts_high_threshold, sts_low_threshold); ITConfig.LowThreshold = sts_low_threshold; ITConfig.HighThreshold = sts_high_threshold;