---- test in progress
This commit is contained in:
parent
76eec8577a
commit
96aa9d199a
|
@ -82,6 +82,7 @@ void MX_TOF_Init(void);
|
||||||
#define LED1_GPIO_Port GPIOB
|
#define LED1_GPIO_Port GPIOB
|
||||||
#define LED_ON HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, GPIO_PIN_SET )
|
#define LED_ON HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, GPIO_PIN_SET )
|
||||||
#define LED_OFF HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, GPIO_PIN_RESET )
|
#define LED_OFF HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, GPIO_PIN_RESET )
|
||||||
|
#define LED_TOGGLE HAL_GPIO_TogglePin(LED1_GPIO_Port, LED1_Pin)
|
||||||
#define BSP_BUTTON_EXTI_IRQn EXTI0_IRQn
|
#define BSP_BUTTON_EXTI_IRQn EXTI0_IRQn
|
||||||
|
|
||||||
#define LED2_Pin LED1_Pin
|
#define LED2_Pin LED1_Pin
|
||||||
|
|
|
@ -145,8 +145,8 @@ uint16_t SYS_GetBatteryLevel(void)
|
||||||
uint16_t batteryLevelmV = 0;
|
uint16_t batteryLevelmV = 0;
|
||||||
uint32_t measuredLevel = 0;
|
uint32_t measuredLevel = 0;
|
||||||
|
|
||||||
measuredLevel = ADC_ReadChannels(ADC_CHANNEL_VREFINT);
|
//measuredLevel = ADC_ReadChannels(ADC_CHANNEL_VREFINT);
|
||||||
|
measuredLevel = ADC_ReadChannels(ADC_CHANNEL_5); //ADC5, PA15 for VBAT measure 2024-07-04
|
||||||
|
|
||||||
if (measuredLevel == 0)
|
if (measuredLevel == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,7 +79,7 @@ void MX_DMA_Init(void)
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
/* DMA1_Channel7_IRQn interrupt configuration */
|
/* DMA1_Channel7_IRQn interrupt configuration */
|
||||||
HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 0, 0);
|
HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 2, 0);
|
||||||
HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn);
|
HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn);
|
||||||
// **** USART2
|
// **** USART2
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -54,7 +54,7 @@ void MX_GPIO_Init(void)
|
||||||
GPIO_InitStruct.Pin = GPIO_PIN_All;
|
GPIO_InitStruct.Pin = GPIO_PIN_All;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
//HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
@ -62,22 +62,32 @@ void MX_GPIO_Init(void)
|
||||||
__HAL_RCC_GPIOB_CLK_DISABLE();
|
__HAL_RCC_GPIOB_CLK_DISABLE();
|
||||||
__HAL_RCC_GPIOC_CLK_DISABLE();
|
__HAL_RCC_GPIOC_CLK_DISABLE();
|
||||||
#endif
|
#endif
|
||||||
|
#if 1
|
||||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
__HAL_RCC_GPIOC_CLK_ENABLE();
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
//0b0000 0000 0000 0000
|
//0b0000 0000 0000 0000
|
||||||
//0b0001 1010 0000 0000 INCLUDE PA9 PA11 PA12 --> 0x1A00
|
//0b0001 1010 0000 0000 INCLUDE PA9 PA11 PA12 --> 0x1A00
|
||||||
//0b1110 0101 1111 1111 exclude PA9 PA11 PA12 --> 0xE5FF
|
//0b1110 0101 1111 1111 exclude PA9 PA11 PA12 --> 0xE5FF
|
||||||
GPIO_InitStruct.Pin = 0xE5FF; // or ~0x1A00;
|
//GPIO_InitStruct.Pin = 0xE5FF; // or ~0x1A00;
|
||||||
|
|
||||||
|
//0b1001 1010 0000 0000 INCLUDE PA9 PA11 PA12 PA15--> 0x9A00
|
||||||
|
//0b0110 0101 1111 1111 exclude PA9 PA11 PA12 PA15--> 0x65FF
|
||||||
|
GPIO_InitStruct.Pin = 0x65FF; // or ~0x1A00;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
GPIO_InitStruct.Pin = GPIO_PIN_15; // PA15 ADC-5, BAT LEVEL INPUT
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
//0b0000 0001 0011 1000 INCLUDE PB3 PB4 PB5 PB8 --> 0x0138
|
|
||||||
//0b1111 1110 1100 0111 exclude PB3 PB4 PB5 PB8 --> 0xFEC7
|
//0b0000 0001 0011 1100 INCLUDE PB2 PB3 PB4 PB5 PB8 --> 0x013C
|
||||||
GPIO_InitStruct.Pin = 0xFEC7; // or ~0x0138;
|
//0b1111 1110 1100 0011 exclude PB2 PB3 PB4 PB5 PB8 --> 0xFEC3
|
||||||
|
GPIO_InitStruct.Pin = 0xFEC3; // or ~0x013C;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
@ -92,7 +102,7 @@ void MX_GPIO_Init(void)
|
||||||
//__HAL_RCC_GPIOA_CLK_DISABLE();
|
//__HAL_RCC_GPIOA_CLK_DISABLE();
|
||||||
//__HAL_RCC_GPIOB_CLK_DISABLE();
|
//__HAL_RCC_GPIOB_CLK_DISABLE();
|
||||||
__HAL_RCC_GPIOC_CLK_DISABLE();
|
__HAL_RCC_GPIOC_CLK_DISABLE();
|
||||||
|
#endif
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
#if defined(STM32WL55xx)
|
#if defined(STM32WL55xx)
|
||||||
HAL_GPIO_WritePin(GPIOB, LED1_Pin|LED2_Pin|PROB2_Pin|PROB1_Pin
|
HAL_GPIO_WritePin(GPIOB, LED1_Pin|LED2_Pin|PROB2_Pin|PROB1_Pin
|
||||||
|
@ -103,13 +113,14 @@ void MX_GPIO_Init(void)
|
||||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||||
//HAL_GPIO_WritePin(MEMS_POWER_GPIO_Port, MEMS_POWER_Pin, GPIO_PIN_RESET);
|
//HAL_GPIO_WritePin(MEMS_POWER_GPIO_Port, MEMS_POWER_Pin, GPIO_PIN_RESET);
|
||||||
|
#if 0
|
||||||
#if defined(TOF_1)
|
#if defined(TOF_1)
|
||||||
HAL_GPIO_WritePin(TOF_C_XSHUT_GPIO_Port, TOF_C_XSHUT_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(TOF_C_XSHUT_GPIO_Port, TOF_C_XSHUT_Pin, GPIO_PIN_SET);
|
||||||
#endif
|
#endif
|
||||||
#if defined(TOF_2)
|
#if defined(TOF_2)
|
||||||
HAL_GPIO_WritePin(TOF_L_XSHUT_GPIO_Port, TOF_L_XSHUT_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(TOF_L_XSHUT_GPIO_Port, TOF_L_XSHUT_Pin, GPIO_PIN_SET);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#if defined(STM32WL55xx)
|
#if defined(STM32WL55xx)
|
||||||
/*Configure GPIO pins : PBPin PBPin PBPin */
|
/*Configure GPIO pins : PBPin PBPin PBPin */
|
||||||
GPIO_InitStruct.Pin = LED1_Pin|LED2_Pin|LED3_Pin;
|
GPIO_InitStruct.Pin = LED1_Pin|LED2_Pin|LED3_Pin;
|
||||||
|
@ -203,7 +214,7 @@ void MX_GPIO_Init(void)
|
||||||
HAL_GPIO_Init(LED1_GPIO_Port, &GPIO_InitStruct);
|
HAL_GPIO_Init(LED1_GPIO_Port, &GPIO_InitStruct);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GPIO_InitStruct.Pin = MEMS_POWER_Pin;
|
GPIO_InitStruct.Pin = MEMS_POWER_Pin|LED1_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_PULLDOWN; // PULL DOWN TO DISABLE TPS
|
GPIO_InitStruct.Pull = GPIO_PULLDOWN; // PULL DOWN TO DISABLE TPS
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
@ -217,10 +228,10 @@ void MX_GPIO_Init(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
HAL_GPIO_WritePin(MEMS_POWER_GPIO_Port, MEMS_POWER_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(MEMS_POWER_GPIO_Port, MEMS_POWER_Pin, GPIO_PIN_SET);
|
||||||
|
#if 0
|
||||||
__HAL_RCC_GPIOB_CLK_DISABLE();
|
__HAL_RCC_GPIOB_CLK_DISABLE();
|
||||||
__HAL_RCC_GPIOA_CLK_DISABLE();
|
__HAL_RCC_GPIOA_CLK_DISABLE();
|
||||||
|
#endif
|
||||||
#if defined(SOAP_LEVEL_SENSOR)
|
#if defined(SOAP_LEVEL_SENSOR)
|
||||||
/* ============== SOAP LEVEL DETECTION ========================= */
|
/* ============== SOAP LEVEL DETECTION ========================= */
|
||||||
|
|
||||||
|
|
|
@ -108,12 +108,30 @@ int main(void)
|
||||||
|
|
||||||
/* Initialize all configured peripherals */
|
/* Initialize all configured peripherals */
|
||||||
MX_GPIO_Init();
|
MX_GPIO_Init();
|
||||||
|
HAL_UART_DeInit(&huart2);
|
||||||
MX_DMA_Init();
|
MX_DMA_Init();
|
||||||
|
|
||||||
MX_I2C2_Init();
|
MX_I2C2_Init();
|
||||||
|
|
||||||
MX_LoRaWAN_Init();
|
MX_LoRaWAN_Init();
|
||||||
|
LED_ON;
|
||||||
|
HAL_Delay(200);
|
||||||
|
LED_OFF;
|
||||||
|
#if 0
|
||||||
|
if(__HAL_PWR_GET_FLAG(PWR_FLAG_SB) == RESET)
|
||||||
|
{
|
||||||
|
//LED_ON;
|
||||||
|
MX_LoRaWAN_Init();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LED_ON;
|
||||||
|
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
|
||||||
|
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
|
||||||
|
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WPVD);
|
||||||
|
HAL_Delay(1000);
|
||||||
|
SystemApp_Init();
|
||||||
|
LED_OFF;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/* USER CODE BEGIN 2 */
|
/* USER CODE BEGIN 2 */
|
||||||
|
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
@ -126,7 +144,7 @@ int main(void)
|
||||||
/* USER CODE END WHILE */
|
/* USER CODE END WHILE */
|
||||||
|
|
||||||
MX_LoRaWAN_Process();
|
MX_LoRaWAN_Process();
|
||||||
|
LED_TOGGLE;
|
||||||
/* USER CODE BEGIN 3 */
|
/* USER CODE BEGIN 3 */
|
||||||
}
|
}
|
||||||
/* USER CODE END 3 */
|
/* USER CODE END 3 */
|
||||||
|
|
|
@ -145,12 +145,12 @@ void PWR_ExitStopMode(void)
|
||||||
SRAM ctrls, DMAx, DMAMux, AES, RNG, HSEM */
|
SRAM ctrls, DMAx, DMAMux, AES, RNG, HSEM */
|
||||||
|
|
||||||
/* Resume not retained USARTx and DMA */
|
/* Resume not retained USARTx and DMA */
|
||||||
//vcom_Resume(); //DON'T REMOVE THIS, KKEP LOW POWER
|
vcom_Resume(); //DON'T REMOVE THIS, KKEP LOW POWER
|
||||||
/* USER CODE BEGIN ExitStopMode_2 */
|
/* USER CODE BEGIN ExitStopMode_2 */
|
||||||
MX_GPIO_Init();
|
MX_GPIO_Init();
|
||||||
MX_DMA_Init();
|
MX_DMA_Init();
|
||||||
MX_I2C2_Init();
|
MX_I2C2_Init();
|
||||||
PME_ON;
|
|
||||||
/* USER CODE END ExitStopMode_2 */
|
/* USER CODE END ExitStopMode_2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -358,20 +358,20 @@ void DMA1_Channel7_IRQHandler(void)
|
||||||
/* USER CODE END DMA1_Channel7_IRQn 1 */
|
/* USER CODE END DMA1_Channel7_IRQn 1 */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if 0
|
||||||
void EXTI3_IRQHandler(void)
|
void EXTI3_IRQHandler(void)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN EXTI3_IRQn 0 */
|
/* USER CODE BEGIN EXTI3_IRQn 0 */
|
||||||
|
|
||||||
/* USER CODE END EXTI3_IRQn 0 */
|
/* USER CODE END EXTI3_IRQn 0 */
|
||||||
#ifdef STM32WLE5xx
|
#ifdef STM32WLE5xx
|
||||||
HAL_GPIO_EXTI_IRQHandler(TOF_INT_EXTI_PIN);
|
//HAL_GPIO_EXTI_IRQHandler(TOF_INT_EXTI_PIN);
|
||||||
#endif
|
#endif
|
||||||
/* USER CODE BEGIN EXTI3_IRQn 1 */
|
/* USER CODE BEGIN EXTI3_IRQn 1 */
|
||||||
|
|
||||||
/* USER CODE END EXTI3_IRQn 1 */
|
/* USER CODE END EXTI3_IRQn 1 */
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
/**
|
/**
|
||||||
* @brief This function handles EXTI Lines [4] Interrupt.
|
* @brief This function handles EXTI Lines [4] Interrupt.
|
||||||
|
@ -426,7 +426,7 @@ void EXTI15_10_IRQHandler(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
/**
|
/**
|
||||||
* @brief This function handles USART2 Interrupt.
|
* @brief This function handles USART2 Interrupt.
|
||||||
*/
|
*/
|
||||||
|
@ -440,7 +440,7 @@ void USART2_IRQHandler(void)
|
||||||
|
|
||||||
/* USER CODE END USART2_IRQn 1 */
|
/* USER CODE END USART2_IRQn 1 */
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* @brief This function handles RTC Alarms (A and B) Interrupt.
|
* @brief This function handles RTC Alarms (A and B) Interrupt.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -116,8 +116,8 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
|
||||||
GPIO_InitStruct.Pin = USARTx_RX_Pin;
|
GPIO_InitStruct.Pin = USARTx_RX_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
|
//GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
|
||||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ void STS_YunhornSTSEventP3_Process(void)
|
||||||
*/
|
*/
|
||||||
void STS_YunhornSTSEventP4_Process(void)
|
void STS_YunhornSTSEventP4_Process(void)
|
||||||
{
|
{
|
||||||
STS_SENSOR_Power_ON(0);
|
//STS_SENSOR_Power_ON(0);
|
||||||
//HAL_Delay(10);
|
//HAL_Delay(10);
|
||||||
#ifdef LED_ONBOARD
|
#ifdef LED_ONBOARD
|
||||||
LED_ON;
|
LED_ON;
|
||||||
|
@ -319,7 +319,7 @@ void STS_YunhornSTSEventP4_Process(void)
|
||||||
STS_TOF250_Range_Process();
|
STS_TOF250_Range_Process();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
STS_SENSOR_Power_OFF(0);
|
//STS_SENSOR_Power_OFF(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -806,10 +806,13 @@ static void SendTxData(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(YUNHORN_STS_R0_ENABLED)||defined(YUNHORN_STS_R5_ENABLED)
|
#if defined(YUNHORN_STS_R0_ENABLED)||defined(YUNHORN_STS_R5_ENABLED)
|
||||||
|
STS_SENSOR_Power_ON(1);
|
||||||
|
HAL_Delay(1000);
|
||||||
MX_TOF_Init();
|
MX_TOF_Init();
|
||||||
MX_TOF_Process();
|
MX_TOF_Process();
|
||||||
STS_R0_SENSOR_Read(&r0_data);
|
STS_R0_SENSOR_Read(&r0_data);
|
||||||
|
HAL_Delay(1000);
|
||||||
|
STS_SENSOR_Power_OFF(1);
|
||||||
r0_data.battery_Pct = (uint8_t)(99*batteryLevel/254);
|
r0_data.battery_Pct = (uint8_t)(99*batteryLevel/254);
|
||||||
#endif
|
#endif
|
||||||
// EnvSensors_Read(&sensor_data);
|
// EnvSensors_Read(&sensor_data);
|
||||||
|
@ -1010,9 +1013,11 @@ static void OnJoinRequest(LmHandlerJoinParams_t *joinParams)
|
||||||
|
|
||||||
APP_LOG(TS_OFF, VLEVEL_M, "###### U/L FRAME:JOIN | DR:%d | PWR:%d\r\n", joinParams->Datarate, joinParams->TxPower);
|
APP_LOG(TS_OFF, VLEVEL_M, "###### U/L FRAME:JOIN | DR:%d | PWR:%d\r\n", joinParams->Datarate, joinParams->TxPower);
|
||||||
}
|
}
|
||||||
//heart_beat_timer = 1;
|
heart_beat_timer = 1;
|
||||||
//UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0);
|
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0);
|
||||||
//STS_SENSOR_Upload_Message(LORAWAN_USER_HTBT_PORT, 12,"Yunhorn88STS");
|
//STS_SENSOR_Upload_Message(LORAWAN_USER_HTBT_PORT, 12,"Yunhorn88STS");
|
||||||
|
//STS_SENSOR_Upload_Message(LORAWAN_USER_HTBT_PORT, 12,"Yunhorn88STS");
|
||||||
|
|
||||||
/* USER CODE END OnJoinRequest_1 */
|
/* USER CODE END OnJoinRequest_1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,8 +102,9 @@ void MX_TOF_Process(void)
|
||||||
STS_TOF_VL53L1X_Range_Process();
|
STS_TOF_VL53L1X_Range_Process();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STS_USE_TOF_VL53L0X
|
|
||||||
STS_SENSOR_Power_ON(1);
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(TOF_1)||defined(TOF_2)
|
#if defined(TOF_1)||defined(TOF_2)
|
||||||
STS_TOF_VL53L0X_Range_Process();
|
STS_TOF_VL53L0X_Range_Process();
|
||||||
|
@ -111,8 +112,10 @@ void MX_TOF_Process(void)
|
||||||
#ifdef TOF_3
|
#ifdef TOF_3
|
||||||
STS_TOF250_Range_Process();
|
STS_TOF250_Range_Process();
|
||||||
#endif
|
#endif
|
||||||
STS_SENSOR_Power_OFF(1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(STS_TOF_VL53L1X_PeopleCount) && defined(STS_USE_TOF_VL53L1X)
|
#if defined(STS_TOF_VL53L1X_PeopleCount) && defined(STS_USE_TOF_VL53L1X)
|
||||||
//STS_TOF_VL53LX_PeopleCounting_Process();
|
//STS_TOF_VL53LX_PeopleCounting_Process();
|
||||||
|
|
Loading…
Reference in New Issue