** L8 ** prototype workable & stable
This commit is contained in:
parent
903a5f823b
commit
18870b41f2
|
@ -94,12 +94,13 @@ int main(void)
|
||||||
/* Initialize all configured peripherals */
|
/* Initialize all configured peripherals */
|
||||||
MX_I2C2_Init();
|
MX_I2C2_Init();
|
||||||
MX_GPIO_Init();
|
MX_GPIO_Init();
|
||||||
MX_USART2_UART_Init();
|
|
||||||
|
|
||||||
|
|
||||||
MX_LoRaWAN_Init();
|
MX_LoRaWAN_Init();
|
||||||
/* USER CODE BEGIN 2 */
|
/* USER CODE BEGIN 2 */
|
||||||
MX_TOF_Init();
|
MX_USART2_UART_Init();
|
||||||
|
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
|
|
|
@ -120,7 +120,7 @@ void SystemApp_Init(void)
|
||||||
|
|
||||||
/*Initialize the Sensors */
|
/*Initialize the Sensors */
|
||||||
EnvSensors_Init();
|
EnvSensors_Init();
|
||||||
//MX_TOF_Init();
|
MX_TOF_Init();
|
||||||
#ifdef STS_WS
|
#ifdef STS_WS
|
||||||
sts_weight_scale_init();
|
sts_weight_scale_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "stm32_seq.h"
|
#include "stm32_seq.h"
|
||||||
|
|
||||||
/* USER CODE BEGIN Includes */
|
/* USER CODE BEGIN Includes */
|
||||||
|
#include "app_tof.h"
|
||||||
/* USER CODE END Includes */
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
/* External variables ---------------------------------------------------------*/
|
/* External variables ---------------------------------------------------------*/
|
||||||
|
@ -73,7 +73,7 @@ void MX_LoRaWAN_Init(void)
|
||||||
/* USER CODE END MX_LoRaWAN_Init_2 */
|
/* USER CODE END MX_LoRaWAN_Init_2 */
|
||||||
LoRaWAN_Init();
|
LoRaWAN_Init();
|
||||||
/* USER CODE BEGIN MX_LoRaWAN_Init_3 */
|
/* USER CODE BEGIN MX_LoRaWAN_Init_3 */
|
||||||
|
//MX_TOF_Init();
|
||||||
/* USER CODE END MX_LoRaWAN_Init_3 */
|
/* USER CODE END MX_LoRaWAN_Init_3 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,6 +136,7 @@ static void MX_53L8A1_ThresholdDetection_Init(void)
|
||||||
printf("VL53L8A1_RANGING_SENSOR_Init failed\n");
|
printf("VL53L8A1_RANGING_SENSOR_Init failed\n");
|
||||||
while (1);
|
while (1);
|
||||||
}
|
}
|
||||||
|
printf("\r\nVL53L8A1_RANGING_SENSOR_Init Success\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MX_53L8A1_ThresholdDetection_Process(void)
|
static void MX_53L8A1_ThresholdDetection_Process(void)
|
||||||
|
@ -147,7 +148,7 @@ static void MX_53L8A1_ThresholdDetection_Process(void)
|
||||||
VL53L8A1_RANGING_SENSOR_ReadID(VL53L8A1_DEV_CENTER, &Id);
|
VL53L8A1_RANGING_SENSOR_ReadID(VL53L8A1_DEV_CENTER, &Id);
|
||||||
VL53L8A1_RANGING_SENSOR_GetCapabilities(VL53L8A1_DEV_CENTER, &Cap);
|
VL53L8A1_RANGING_SENSOR_GetCapabilities(VL53L8A1_DEV_CENTER, &Cap);
|
||||||
|
|
||||||
Profile.RangingProfile = RS_PROFILE_8x8_CONTINUOUS;
|
Profile.RangingProfile = RS_PROFILE_8x8_AUTONOMOUS;
|
||||||
Profile.TimingBudget = TIMING_BUDGET;
|
Profile.TimingBudget = TIMING_BUDGET;
|
||||||
Profile.Frequency = RANGING_FREQUENCY; /* Ranging frequency Hz (shall be consistent with TimingBudget value) */
|
Profile.Frequency = RANGING_FREQUENCY; /* Ranging frequency Hz (shall be consistent with TimingBudget value) */
|
||||||
Profile.EnableAmbient = 0; /* Enable: 1, Disable: 0 */
|
Profile.EnableAmbient = 0; /* Enable: 1, Disable: 0 */
|
||||||
|
|
Loading…
Reference in New Issue