---- good counting and sending
This commit is contained in:
parent
b2d8ca5592
commit
625deb8796
Core/Src
LoRaWAN/App
STM32CubeIDE
Application/User/TOF/App
Release
TOF/App
|
@ -28,7 +28,8 @@
|
|||
#include "app_tof_peoplecount.h"
|
||||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
|
||||
volatile uint8_t sts_lorawan_joined=0;
|
||||
extern volatile _Bool sts_people_count_number_changed;
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
|
@ -103,7 +104,11 @@ int main(void)
|
|||
APP_LOG(TS_OFF, VLEVEL_M,"\r\n Before TOF ...................\r\n");
|
||||
//STS_TOF_VL53LX_PeopleCounting_Process();
|
||||
|
||||
MX_TOF_Init();
|
||||
//MX_TOF_Init();
|
||||
|
||||
STS_TOF_VL53LX_PeopleCounting_Process_Init();
|
||||
|
||||
|
||||
#if 0
|
||||
while(1)
|
||||
{
|
||||
|
@ -119,8 +124,17 @@ int main(void)
|
|||
while (1)
|
||||
{
|
||||
/* USER CODE END WHILE */
|
||||
MX_TOF_Process();
|
||||
|
||||
MX_LoRaWAN_Process();
|
||||
if (sts_lorawan_joined !=0)
|
||||
{
|
||||
//APP_LOG(TS_OFF, VLEVEL_M,"############### SUB-PROCESS running .... \r\n");
|
||||
do
|
||||
{
|
||||
STS_TOF_VL53LX_PeopleCounting_Process_Start();
|
||||
|
||||
} while(sts_people_count_number_changed==0);
|
||||
}
|
||||
//STS_TOF_VL53LX_PeopleCounting_Process();
|
||||
|
||||
/* USER CODE BEGIN 3 */
|
||||
|
|
|
@ -37,6 +37,9 @@
|
|||
|
||||
/* USER CODE BEGIN Includes */
|
||||
#include "app_tof_pin_conf.h"
|
||||
#include "app_tof_peoplecount.h"
|
||||
extern volatile bool sts_people_count_number_changed;
|
||||
extern volatile uint8_t sts_lorawan_joined;
|
||||
/* USER CODE END Includes */
|
||||
|
||||
/* External variables ---------------------------------------------------------*/
|
||||
|
@ -562,7 +565,7 @@ static void SendTxData(void)
|
|||
uint8_t batteryLevel = GetBatteryLevel();
|
||||
sensor_t sensor_data;
|
||||
UTIL_TIMER_Time_t nextTxIn = 0;
|
||||
|
||||
sts_people_count_sensor_data_t sts_p2_sensor_data;
|
||||
if (LmHandlerIsBusy() == false)
|
||||
{
|
||||
#ifdef CAYENNE_LPP
|
||||
|
@ -578,12 +581,12 @@ static void SendTxData(void)
|
|||
#endif /* CAYENNE_LPP */
|
||||
|
||||
EnvSensors_Read(&sensor_data);
|
||||
|
||||
STS_people_count_sensor_Read(&sts_p2_sensor_data);
|
||||
APP_LOG(TS_ON, VLEVEL_M, "VDDA: %d\r\n", batteryLevel);
|
||||
APP_LOG(TS_ON, VLEVEL_M, "temp: %d\r\n", (int16_t)(sensor_data.temperature));
|
||||
|
||||
AppData.Port = LORAWAN_USER_APP_PORT;
|
||||
|
||||
//AppData.Port = LORAWAN_USER_APP_PORT;
|
||||
AppData.Port = 106; //STS-P2
|
||||
#ifdef CAYENNE_LPP
|
||||
CayenneLppReset();
|
||||
CayenneLppAddBarometricPressure(channel++, sensor_data.pressure);
|
||||
|
@ -635,9 +638,22 @@ static void SendTxData(void)
|
|||
AppData.Buffer[i++] = (uint8_t)(altitudeGps & 0xFF);
|
||||
}
|
||||
|
||||
AppData.BufferSize = i;
|
||||
#endif /* CAYENNE_LPP */
|
||||
|
||||
AppData.Buffer[i++] = (uint8_t)((sts_p2_sensor_data.Walk_In_People_Count>>8) & 0xFF);
|
||||
AppData.Buffer[i++] = (uint8_t)(sts_p2_sensor_data.Walk_In_People_Count & 0xFF);
|
||||
|
||||
AppData.Buffer[i++] = (uint8_t)((sts_p2_sensor_data.Walk_Out_People_Count>>8) & 0xFF);
|
||||
AppData.Buffer[i++] = (uint8_t)(sts_p2_sensor_data.Walk_Out_People_Count & 0xFF);
|
||||
|
||||
AppData.Buffer[i++] = (uint8_t)((sts_p2_sensor_data.Walk_Around_People_Count>>8) & 0xFF);
|
||||
AppData.Buffer[i++] = (uint8_t)(sts_p2_sensor_data.Walk_Around_People_Count & 0xFF);
|
||||
|
||||
AppData.Buffer[i++] = (uint8_t)((sts_p2_sensor_data.Count_Period) & 0xFF);
|
||||
AppData.Buffer[i++] = (uint8_t)((sts_p2_sensor_data.Count_Period_Unit) & 0xFF);
|
||||
|
||||
AppData.BufferSize = i;
|
||||
|
||||
if ((JoinLedTimer.IsRunning) && (LmHandlerJoinStatus() == LORAMAC_HANDLER_SET))
|
||||
{
|
||||
UTIL_TIMER_Stop(&JoinLedTimer);
|
||||
|
@ -674,10 +690,14 @@ static void OnTxTimerEvent(void *context)
|
|||
/* USER CODE BEGIN OnTxTimerEvent_1 */
|
||||
|
||||
/* USER CODE END OnTxTimerEvent_1 */
|
||||
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0);
|
||||
sts_people_count_number_changed == 1;
|
||||
{
|
||||
UTIL_SEQ_SetTask((1 << CFG_SEQ_Task_LoRaSendOnTxTimerOrButtonEvent), CFG_SEQ_Prio_0);
|
||||
|
||||
/*Wait for next tx slot*/
|
||||
UTIL_TIMER_Start(&TxTimer);
|
||||
/*Wait for next tx slot*/
|
||||
UTIL_TIMER_Start(&TxTimer);
|
||||
sts_people_count_number_changed = 0;
|
||||
}
|
||||
/* USER CODE BEGIN OnTxTimerEvent_2 */
|
||||
|
||||
/* USER CODE END OnTxTimerEvent_2 */
|
||||
|
@ -749,6 +769,7 @@ static void OnJoinRequest(LmHandlerJoinParams_t *joinParams)
|
|||
{
|
||||
APP_LOG(TS_OFF, VLEVEL_M, "OTAA =====================\r\n");
|
||||
}
|
||||
sts_lorawan_joined = joinParams->Mode;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -38,6 +38,7 @@ void STS_TOF_VL53LX_PeopleCounting_Process(void);
|
|||
int sts_tof_vl53lx_peoplecount_subprocess(void);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:62:5:_write 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:135:6:SystemClock_Config 3
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:74:5:main 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:187:6:Error_Handler 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:63:5:_write 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:149:6:SystemClock_Config 3
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:75:5:main 3
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:201:6:Error_Handler 1
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:62:5:_write 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:135:6:SystemClock_Config 112 static,ignoring_inline_asm
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:74:5:main 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:187:6:Error_Handler 0 static,ignoring_inline_asm
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:63:5:_write 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:149:6:SystemClock_Config 112 static,ignoring_inline_asm
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:75:5:main 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/Core/Src/main.c:201:6:Error_Handler 0 static,ignoring_inline_asm
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:798:13:OnSysTimeUpdate 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:846:13:OnTxFrameCtrlChanged 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:857:13:OnPingSlotPeriodicityChanged 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:805:13:OnClassChange 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:672:13:OnTxTimerEvent 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:812:13:OnMacProcessNotify 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:824:13:OnTxPeriodicityChanged 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:733:13:OnJoinRequest 4
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:919:13:OnStopJoinTimerEvent 2
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:692:13:OnRxTimerLedEvent 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:687:13:OnTxTimerLedEvent 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:990:13:OnRestoreContextRequest 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:882:13:StopJoin 2
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:558:13:SendTxData 9
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:697:13:OnJoinTimerLedEvent 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:763:13:OnBeaconStatusChange 4
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:957:13:OnNvmDataChange 2
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:868:13:OnSystemReset 3
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:704:13:OnTxData 4
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:478:13:OnRxData 14
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:975:13:OnStoreContextRequest 2
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:935:13:StoreContext 3
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:348:6:LoRaWAN_Init 2
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:443:6:HAL_GPIO_EXTI_Callback 4
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:819:13:OnSysTimeUpdate 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:867:13:OnTxFrameCtrlChanged 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:878:13:OnPingSlotPeriodicityChanged 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:826:13:OnClassChange 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:688:13:OnTxTimerEvent 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:833:13:OnMacProcessNotify 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:845:13:OnTxPeriodicityChanged 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:753:13:OnJoinRequest 4
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:940:13:OnStopJoinTimerEvent 2
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:712:13:OnRxTimerLedEvent 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:707:13:OnTxTimerLedEvent 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:1011:13:OnRestoreContextRequest 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:903:13:StopJoin 2
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:561:13:SendTxData 9
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:717:13:OnJoinTimerLedEvent 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:784:13:OnBeaconStatusChange 4
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:978:13:OnNvmDataChange 2
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:889:13:OnSystemReset 3
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:724:13:OnTxData 4
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:481:13:OnRxData 14
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:996:13:OnStoreContextRequest 2
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:956:13:StoreContext 3
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:351:6:LoRaWAN_Init 2
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:446:6:HAL_GPIO_EXTI_Callback 4
|
||||
|
|
|
@ -82,7 +82,7 @@ Application/User/LoRaWAN/App/lora_app.o: \
|
|||
../../Core/Inc/adc_if.h ../../Core/Inc/adc.h ../../Core/Inc/platform.h \
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/CayenneLpp.h \
|
||||
../../Core/Inc/sys_sensors.h ../../Core/Inc/flash_if.h \
|
||||
../../TOF/Target/app_tof_pin_conf.h
|
||||
../../TOF/Target/app_tof_pin_conf.h ../../TOF/App/app_tof_peoplecount.h
|
||||
../../Core/Inc/platform.h:
|
||||
../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wlxx.h:
|
||||
../../../../../../../Drivers/CMSIS/Device/ST/STM32WLxx/Include/stm32wl55xx.h:
|
||||
|
@ -172,3 +172,4 @@ D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1
|
|||
../../Core/Inc/sys_sensors.h:
|
||||
../../Core/Inc/flash_if.h:
|
||||
../../TOF/Target/app_tof_pin_conf.h:
|
||||
../../TOF/App/app_tof_peoplecount.h:
|
||||
|
|
Binary file not shown.
|
@ -1,24 +1,24 @@
|
|||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:798:13:OnSysTimeUpdate 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:846:13:OnTxFrameCtrlChanged 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:857:13:OnPingSlotPeriodicityChanged 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:805:13:OnClassChange 16 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:672:13:OnTxTimerEvent 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:812:13:OnMacProcessNotify 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:824:13:OnTxPeriodicityChanged 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:733:13:OnJoinRequest 24 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:919:13:OnStopJoinTimerEvent 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:692:13:OnRxTimerLedEvent 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:687:13:OnTxTimerLedEvent 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:990:13:OnRestoreContextRequest 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:882:13:StopJoin 16 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:558:13:SendTxData 64 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:697:13:OnJoinTimerLedEvent 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:763:13:OnBeaconStatusChange 56 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:957:13:OnNvmDataChange 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:868:13:OnSystemReset 8 static,ignoring_inline_asm
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:704:13:OnTxData 24 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:478:13:OnRxData 48 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:975:13:OnStoreContextRequest 16 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:935:13:StoreContext 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:348:6:LoRaWAN_Init 48 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:443:6:HAL_GPIO_EXTI_Callback 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:819:13:OnSysTimeUpdate 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:867:13:OnTxFrameCtrlChanged 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:878:13:OnPingSlotPeriodicityChanged 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:826:13:OnClassChange 16 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:688:13:OnTxTimerEvent 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:833:13:OnMacProcessNotify 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:845:13:OnTxPeriodicityChanged 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:753:13:OnJoinRequest 24 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:940:13:OnStopJoinTimerEvent 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:712:13:OnRxTimerLedEvent 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:707:13:OnTxTimerLedEvent 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:1011:13:OnRestoreContextRequest 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:903:13:StopJoin 16 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:561:13:SendTxData 80 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:717:13:OnJoinTimerLedEvent 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:784:13:OnBeaconStatusChange 56 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:978:13:OnNvmDataChange 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:889:13:OnSystemReset 8 static,ignoring_inline_asm
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:724:13:OnTxData 24 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:481:13:OnRxData 48 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:996:13:OnStoreContextRequest 16 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:956:13:StoreContext 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:351:6:LoRaWAN_Init 48 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/LoRaWAN/App/lora_app.c:446:6:HAL_GPIO_EXTI_Callback 0 static
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:43:5:ProcessPeopleCountingData 22
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:210:5:sts_tof_vl53lx_peoplecount 3
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:203:6:STS_TOF_VL53LX_PeopleCounting_Process 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:315:5:sts_tof_vl53lx_peoplecount_subprocess 7
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:55:5:ProcessPeopleCountingData 23
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:224:6:STS_people_count_sensor_Read 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:249:6:sts_tof_vl53lx_peoplecount 4
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:233:6:STS_TOF_VL53LX_PeopleCounting_Process_Init 1
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:358:6:sts_tof_vl53lx_peoplecount_subprocess 7
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:240:6:STS_TOF_VL53LX_PeopleCounting_Process_Start 1
|
||||
|
|
|
@ -57,7 +57,8 @@ Application/User/TOF/App/app_tof_peoplecount.o: \
|
|||
../../vl53lx_uld/vl53l1_platform_log.h ../../vl53lx_uld/vl53l1_types.h \
|
||||
../../vl53lx_uld/vl53l1_error_codes.h \
|
||||
../../vl53lx_uld/VL53l1X_calibration.h \
|
||||
../../vl53lx_uld/X-NUCLEO-53L1A1.h
|
||||
../../vl53lx_uld/X-NUCLEO-53L1A1.h \
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof.h
|
||||
../../Core/Inc/main.h:
|
||||
../../../../../../../Drivers/STM32WLxx_HAL_Driver/Inc/stm32wlxx_hal.h:
|
||||
../../Core/Inc/stm32wlxx_hal_conf.h:
|
||||
|
@ -121,3 +122,4 @@ D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1
|
|||
../../vl53lx_uld/vl53l1_error_codes.h:
|
||||
../../vl53lx_uld/VL53l1X_calibration.h:
|
||||
../../vl53lx_uld/X-NUCLEO-53L1A1.h:
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof.h:
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,6 @@
|
|||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:43:5:ProcessPeopleCountingData 32 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:210:5:sts_tof_vl53lx_peoplecount 32 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:203:6:STS_TOF_VL53LX_PeopleCounting_Process 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:315:5:sts_tof_vl53lx_peoplecount_subprocess 48 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:55:5:ProcessPeopleCountingData 40 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:224:6:STS_people_count_sensor_Read 0 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:249:6:sts_tof_vl53lx_peoplecount 32 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:233:6:STS_TOF_VL53LX_PeopleCounting_Process_Init 8 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:358:6:sts_tof_vl53lx_peoplecount_subprocess 32 static
|
||||
D:/ONEDRIVE/STM32WLV13/Projects/NUCLEO-WL55JC/Applications/LoRaWAN/STS_P2_VL53L1/TOF/App/app_tof_peoplecount.c:240:6:STS_TOF_VL53LX_PeopleCounting_Process_Start 0 static
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -7,25 +7,37 @@
|
|||
#include "VL53L1X_API.h"
|
||||
#include "VL53l1X_calibration.h"
|
||||
#include "X-NUCLEO-53L1A1.h"
|
||||
#include "app_tof.h"
|
||||
/* USER CODE END Includes */
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/* USER CODE BEGIN PV */
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
extern I2C_HandleTypeDef hi2c2;
|
||||
|
||||
volatile sts_people_count_sensor_data_t sts_people_count_sensor_data={0,0,0,2,'M'};
|
||||
volatile _Bool sts_people_count_number_changed = 0;
|
||||
uint16_t dev=0x52;
|
||||
int status = 0;
|
||||
volatile int IntCount;
|
||||
#define isInterrupt 1 /* If isInterrupt = 1 then device working in interrupt mode, else device working in polling mode */
|
||||
/* USER CODE END PV */
|
||||
static int PplCounter;
|
||||
static int center[2] = {FRONT_ZONE_CENTER, BACK_ZONE_CENTER}; /* these are the spad center of the 2 4*16 zones */
|
||||
static int Zone = 0;
|
||||
static int PathTrack[] = {0,0,0,0};
|
||||
static int PathTrackFillingSize = 1; // init this to 1 as we start from state where nobody is any of the zones
|
||||
static int LeftPreviousStatus = NOBODY;
|
||||
static int RightPreviousStatus = NOBODY;
|
||||
static int PeopleCount = 0;
|
||||
static uint16_t Distances[2][DISTANCES_ARRAY_SIZE];
|
||||
static uint8_t DistancesTableSize[2] = {0,0};
|
||||
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
/* USER CODE BEGIN PFP */
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
|
||||
/* USER CODE END PFP */
|
||||
int sts_tof_vl53lx_peoplecount(void);
|
||||
int sts_tof_vl53lx_peoplecount_subprocess(void);
|
||||
//void sts_tof_vl53lx_peoplecount(void);
|
||||
//int sts_tof_vl53lx_peoplecount_subprocess(void);
|
||||
/* USER CODE BEGIN 0 */
|
||||
|
||||
#define VL53L1X_INT_Pin (GPIO_PIN_3) // WL55JC GPIO_PIN_10, F401xE ==>(GPIO_PIN_4)
|
||||
|
@ -41,6 +53,7 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
|
|||
/* USER CODE END 0 */
|
||||
|
||||
int ProcessPeopleCountingData(int16_t Distance, uint8_t zone, uint8_t RangeStatus) {
|
||||
#if 0
|
||||
static int PathTrack[] = {0,0,0,0};
|
||||
static int PathTrackFillingSize = 1; // init this to 1 as we start from state where nobody is any of the zones
|
||||
static int LeftPreviousStatus = NOBODY;
|
||||
|
@ -48,7 +61,7 @@ int ProcessPeopleCountingData(int16_t Distance, uint8_t zone, uint8_t RangeStatu
|
|||
static int PeopleCount = 0;
|
||||
static uint16_t Distances[2][DISTANCES_ARRAY_SIZE];
|
||||
static uint8_t DistancesTableSize[2] = {0,0};
|
||||
|
||||
#endif
|
||||
uint16_t MinDistance;
|
||||
uint8_t i;
|
||||
|
||||
|
@ -154,19 +167,27 @@ int ProcessPeopleCountingData(int16_t Distance, uint8_t zone, uint8_t RangeStatu
|
|||
// reset the table filling size in case an entry or exit just found
|
||||
DistancesTableSize[0] = 0;
|
||||
DistancesTableSize[1] = 0;
|
||||
APP_LOG(TS_OFF, VLEVEL_L,"Walk In, People Count=%d\n", PeopleCount);
|
||||
APP_LOG(TS_OFF, VLEVEL_M,"Walk In, People Count=%d\n", PeopleCount);
|
||||
printf ("Walk In = %d\n", PeopleCount);
|
||||
sts_people_count_sensor_data.Walk_In_People_Count ++;
|
||||
sts_people_count_number_changed = 1;
|
||||
} else if ((PathTrack[1] == 2) && (PathTrack[2] == 3) && (PathTrack[3] == 1)) {
|
||||
// This an exit
|
||||
PeopleCount --;
|
||||
// reset the table filling size in case an entry or exit just found
|
||||
DistancesTableSize[0] = 0;
|
||||
DistancesTableSize[1] = 0;
|
||||
APP_LOG(TS_OFF, VLEVEL_L,"Walk Out, People Count=%d\n", PeopleCount);
|
||||
APP_LOG(TS_OFF, VLEVEL_M,"Walk Out, People Count=%d\n", PeopleCount);
|
||||
printf ("Walk Out = %d\n", PeopleCount);
|
||||
sts_people_count_sensor_data.Walk_Out_People_Count ++;
|
||||
sts_people_count_number_changed = 1;
|
||||
} else {
|
||||
// reset the table filling size also in case of unexpected path
|
||||
DistancesTableSize[0] = 0;
|
||||
DistancesTableSize[1] = 0;
|
||||
APP_LOG(TS_OFF, VLEVEL_L,"Wrong path\n");
|
||||
APP_LOG(TS_OFF, VLEVEL_M,"Wrong path\n");
|
||||
printf ("Walk Around = %d\n", PeopleCount);
|
||||
sts_people_count_sensor_data.Walk_Around_People_Count ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -184,7 +205,7 @@ int ProcessPeopleCountingData(int16_t Distance, uint8_t zone, uint8_t RangeStatu
|
|||
PathTrack[PathTrackFillingSize-1] = AllZonesCurrentStatus;
|
||||
}
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
#ifdef TRACE_PPC
|
||||
if (AnEventHasOccured) {
|
||||
for (int j=0; j<PathTrackFillingSize; j++)
|
||||
|
@ -194,20 +215,38 @@ int ProcessPeopleCountingData(int16_t Distance, uint8_t zone, uint8_t RangeStatu
|
|||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
//printf ("Inside PeopleCount = %d , returned\n", PeopleCount);
|
||||
// output debug data to main host machine
|
||||
return(PeopleCount);
|
||||
}
|
||||
|
||||
|
||||
void STS_TOF_VL53LX_PeopleCounting_Process(void)
|
||||
void STS_people_count_sensor_Read(sts_people_count_sensor_data_t *sts_p2_sensor_data)
|
||||
{
|
||||
APP_LOG(TS_OFF, VLEVEL_L,"############### TOF VL53LX_ PEOPLE COUNTING PROCESS \r\n");
|
||||
sts_p2_sensor_data->Walk_In_People_Count = sts_people_count_sensor_data.Walk_In_People_Count;
|
||||
sts_p2_sensor_data->Walk_Out_People_Count = sts_people_count_sensor_data.Walk_Out_People_Count;
|
||||
sts_p2_sensor_data->Walk_Around_People_Count = sts_people_count_sensor_data.Walk_Around_People_Count;
|
||||
sts_p2_sensor_data->Count_Period = sts_people_count_sensor_data.Count_Period;
|
||||
sts_p2_sensor_data->Count_Period_Unit = sts_people_count_sensor_data.Count_Period_Unit;
|
||||
}
|
||||
|
||||
void STS_TOF_VL53LX_PeopleCounting_Process_Init(void)
|
||||
{
|
||||
APP_LOG(TS_OFF, VLEVEL_M,"############### TOF VL53LX_ PEOPLE COUNTING PROCESS INITIALIZATION\r\n");
|
||||
sts_tof_vl53lx_peoplecount();
|
||||
|
||||
}
|
||||
|
||||
int sts_tof_vl53lx_peoplecount(void)
|
||||
void STS_TOF_VL53LX_PeopleCounting_Process_Start(void)
|
||||
{
|
||||
//APP_LOG(TS_OFF, VLEVEL_M,"############### TOF VL53LX_ PEOPLE COUNTING SUB-PROCESS \r\n");
|
||||
{
|
||||
sts_tof_vl53lx_peoplecount_subprocess();
|
||||
//APP_LOG(TS_OFF, VLEVEL_M,"############### SUB-PROCESS running .... \r\n");
|
||||
}
|
||||
}
|
||||
|
||||
void sts_tof_vl53lx_peoplecount(void)
|
||||
{
|
||||
//int8_t error;
|
||||
uint8_t byteData, sensorState=0;
|
||||
|
@ -311,8 +350,12 @@ int sts_tof_vl53lx_peoplecount(void)
|
|||
Zone = Zone%2;
|
||||
}
|
||||
#endif
|
||||
if (status != 0) {
|
||||
APP_LOG(TS_OFF, VLEVEL_L,"Error in start ranging\n");
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
int sts_tof_vl53lx_peoplecount_subprocess(void)
|
||||
void sts_tof_vl53lx_peoplecount_subprocess(void)
|
||||
{
|
||||
uint8_t byteData, sensorState=0;
|
||||
uint16_t wordData;
|
||||
|
@ -320,10 +363,11 @@ int sts_tof_vl53lx_peoplecount_subprocess(void)
|
|||
uint8_t RangeStatus;
|
||||
uint8_t dataReady;
|
||||
char DisplayStr[5];
|
||||
#if 0
|
||||
int PplCounter;
|
||||
int center[2] = {FRONT_ZONE_CENTER, BACK_ZONE_CENTER}; /* these are the spad center of the 2 4*16 zones */
|
||||
int Zone = 0;
|
||||
|
||||
#endif
|
||||
/* read and display data */
|
||||
|
||||
while (dataReady == 0) {
|
||||
|
@ -363,9 +407,10 @@ int sts_tof_vl53lx_peoplecount_subprocess(void)
|
|||
Distance = MAX_DISTANCE;
|
||||
// inject the new ranged distance in the people counting algorithm
|
||||
PplCounter = ProcessPeopleCountingData(Distance, Zone, RangeStatus);
|
||||
//printf("\PplCounter =%d \n\r", PplCounter);
|
||||
//sprintf(DisplayStr, "%4d", PplCounter); // only use for special EVK with display
|
||||
//XNUCLEO53L1A1_SetDisplayString(DisplayStr);
|
||||
APP_LOG(TS_OFF, VLEVEL_H,"%d,%d,%d\n", Zone, Distance, Signal);
|
||||
//APP_LOG(TS_OFF, VLEVEL_H,"%d,%d,%d\n", Zone, Distance, Signal);
|
||||
Zone++;
|
||||
Zone = Zone%2;
|
||||
|
||||
|
|
|
@ -73,11 +73,22 @@
|
|||
#endif
|
||||
|
||||
/* Exported functions --------------------------------------------------------*/
|
||||
typedef struct STS_People_Count_Sensor_Data_Type {
|
||||
int Walk_In_People_Count;
|
||||
int Walk_Out_People_Count;
|
||||
int Walk_Around_People_Count;
|
||||
uint8_t Count_Period;
|
||||
uint8_t Count_Period_Unit
|
||||
} sts_people_count_sensor_data_t;
|
||||
|
||||
void STS_TOF_VL53LX_PeopleCounting_Process(void);
|
||||
void STS_TOF_VL53LX_PeopleCounting_Process_Init(void);
|
||||
void STS_TOF_VL53LX_PeopleCounting_Process_Start(void);
|
||||
void sts_tof_vl53lx_peoplecount(void);
|
||||
|
||||
int sts_tof_vl53lx_peoplecount(void);
|
||||
//int sts_tof_vl53lx_peoplecount(void);
|
||||
int ProcessPeopleCountingData(int16_t Distance, uint8_t zone, uint8_t RangeStatus);
|
||||
void STS_people_count_sensor_Read(sts_people_count_sensor_data_t *sts_p2_sensor_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue