diff --git a/Core/Src/sys_app.c b/Core/Src/sys_app.c index 8b99d65..4a1eeab 100644 --- a/Core/Src/sys_app.c +++ b/Core/Src/sys_app.c @@ -131,6 +131,9 @@ void SystemApp_Init(void) #if defined(STS_P2) STS_TOF_VL53LX_PeopleCounting_Process_Init(); #endif +#if defined(STS_T6) + STS_TOF_VL53LX_PresenceDetection_Process_Init(); +#endif /*Init low power manager*/ UTIL_LPM_Init(); diff --git a/Core/Src/usart.c b/Core/Src/usart.c index 29a8855..0275f76 100644 --- a/Core/Src/usart.c +++ b/Core/Src/usart.c @@ -41,7 +41,7 @@ void MX_USART2_UART_Init(void) /* USER CODE END USART2_Init 1 */ huart2.Instance = USART2; -#if defined(L8)||defined(STS_P2) +#if defined(L8)||defined(STS_P2)||defined(STS_T6) huart2.Init.BaudRate = 460800; #else huart2.Init.BaudRate = 115200; diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 2d04230..90ec24d 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -537,15 +537,17 @@ void LoRaWAN_Init(void) UTIL_SEQ_RegTask((1 << CFG_SEQ_Task_YunhornSTSEventP4), UTIL_SEQ_RFU, STS_YunhornSTSEventP4_Process); #endif -#if defined(STS_P2)||defined(STS_T6)||defined(L8) - //UTIL_TIMER_Create(&YunhornSTSWakeUpScanTimer, STS_TOFScanPeriod_msec, UTIL_TIMER_PERIODIC, (void*)OnYunhornSTSWakeUpScanTimerEvent, NULL); +#if defined(STS_T6)||defined(L8) + UTIL_TIMER_Create(&YunhornSTSWakeUpScanTimer, STS_TOFScanPeriod_msec, UTIL_TIMER_PERIODIC, (void*)OnYunhornSTSWakeUpScanTimerEvent, NULL); + UTIL_TIMER_Start(&YunhornSTSWakeUpScanTimer); +#elif defined(STS_P2) UTIL_TIMER_Create(&YunhornSTSWakeUpScanTimer, STS_TOFScanPeriod_msec, UTIL_TIMER_PERIODIC, (void*)STS_TOF_VL53LX_PeopleCounting_Process_Start, NULL); UTIL_TIMER_Start(&YunhornSTSWakeUpScanTimer); #endif - //UTIL_TIMER_Create(&YunhornSTSHeartBeatTimer, 1000*STS_HeartBeatTimerPeriod_sec, UTIL_TIMER_PERIODIC, OnYunhornSTSHeartBeatTimerEvent, NULL); -// UTIL_TIMER_Create(&YunhornSTSHeartBeatTimer, 1000*STS_HeartBeatTimerPeriod_sec, UTIL_TIMER_ONESHOT, OnYunhornSTSHeartBeatTimerEvent, NULL); - //UTIL_TIMER_Start(&YunhornSTSHeartBeatTimer); + // UTIL_TIMER_Create(&YunhornSTSHeartBeatTimer, 1000*STS_HeartBeatTimerPeriod_sec, UTIL_TIMER_PERIODIC, OnYunhornSTSHeartBeatTimerEvent, NULL); + // UTIL_TIMER_Create(&YunhornSTSHeartBeatTimer, 1000*STS_HeartBeatTimerPeriod_sec, UTIL_TIMER_ONESHOT, OnYunhornSTSHeartBeatTimerEvent, NULL); + // UTIL_TIMER_Start(&YunhornSTSHeartBeatTimer); /* USER CODE END LoRaWAN_Init_Last */ } diff --git a/STM32CubeIDE/.cproject b/STM32CubeIDE/.cproject index 61e853c..8648789 100644 --- a/STM32CubeIDE/.cproject +++ b/STM32CubeIDE/.cproject @@ -136,7 +136,7 @@