diff --git a/Core/Inc/main.h b/Core/Inc/main.h index 8d33239..11b7966 100644 --- a/Core/Inc/main.h +++ b/Core/Inc/main.h @@ -113,7 +113,7 @@ void Error_Handler(void); #if (defined(TOF_1)||defined(TOF_2)||defined(STS_R1)||defined(STS_R5)||defined(STS_R1D)) #define VL53L0 -#elif defined(STS_P2) +#elif (defined(STS_P2)||defined(STS_T6)) #define VL53LX 1 #endif diff --git a/Core/Inc/utilities_def.h b/Core/Inc/utilities_def.h index c0fe858..32a810d 100644 --- a/Core/Inc/utilities_def.h +++ b/Core/Inc/utilities_def.h @@ -92,7 +92,7 @@ typedef enum #if defined(STS_R1)||defined(STS_R1D)||defined(STS_R5)||defined(STS_R2) CFG_SEQ_Task_YunhornSTSEventP4, /* TOF RANGE */ #endif -#ifdef STS_P2 +#if defined(STS_P2)||defined(STS_T6) CFG_SEQ_Task_YunhornSTSEventP5, /* TOF IN-OUT */ #endif #ifdef STS_R4 diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 4c96e8b..9cb3d5c 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -752,6 +752,8 @@ static void SendTxData(void) UTIL_TIMER_Time_t nextTxIn = 0; #ifdef STS_P2 sts_people_count_sensor_data_t sts_p2_sensor_data={0x0}; +#elif defined(STS_T6) + sts_tof_presence_detection_sensor_data_t sts_t6_sensor_data={0x0}; #elif defined(STS_R1)||defined(STS_R1D)||defined(STS_R2)||defined(STS_R5) sts_tof_range_data_t sts_rr_sensor_data={0x0,0x0,0x0}; #elif defined(STS_R4) @@ -792,7 +794,11 @@ static void SendTxData(void) #ifdef VL53LX +#ifdef STS_P2 STS_people_count_sensor_Read(&sts_p2_sensor_data); +#elif defined(STS_T6) + STS_tof_presence_detection_sensor_Read(&sts_t6_sensor_data); +#endif #endif #ifdef VL53L0 diff --git a/STM32CubeIDE/.cproject b/STM32CubeIDE/.cproject index dc1d683..5434398 100644 --- a/STM32CubeIDE/.cproject +++ b/STM32CubeIDE/.cproject @@ -133,7 +133,7 @@