diff --git a/Core/Src/sys_app.c b/Core/Src/sys_app.c index 4bbdabf..bf2fad1 100644 --- a/Core/Src/sys_app.c +++ b/Core/Src/sys_app.c @@ -136,6 +136,8 @@ void SystemApp_Init(void) //STS_TOF_VL53LX_PresenceDetection_Process_Init(); //STS_Lamp_Bar_Self_Test_Simple(); STS_Lamp_Bar_Self_Test(); +#endif + LED_GREEN_ON;HAL_Delay(50); LED_RED_ON;HAL_Delay(50); LED_GREEN_OFF;HAL_Delay(50); @@ -149,8 +151,6 @@ void SystemApp_Init(void) LED_GREEN_OFF;HAL_Delay(50); LED_RED_OFF;HAL_Delay(50); -#endif - /*Init low power manager*/ UTIL_LPM_Init(); /* Disable Stand-by mode */ diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 9f0507f..2141de0 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -1706,7 +1706,7 @@ void STS_Get_Date_Time_Stamp(void) UnixEpoch.Seconds -= 18; /*removing leap seconds*/ SysTimeLocalTime(UnixEpoch.Seconds, &sts_localtime); - APP_LOG(TS_OFF, VLEVEL_L, "UTC TIME:%02dh%02dm%02ds on %02d/%02d/%04d wday:yday=%02d:%02d\r\n", + APP_LOG(TS_OFF, VLEVEL_M, "UTC TIME:%02dh%02dm%02ds on %02d/%02d/%04d wday:yday=%02d:%02d\r\n", sts_localtime.tm_hour, sts_localtime.tm_min, sts_localtime.tm_sec, sts_localtime.tm_mday, sts_localtime.tm_mon + 1, sts_localtime.tm_year + 1900, sts_localtime.tm_wday, sts_localtime.tm_yday); diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf index bd17d1e..7549bb7 100644 Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf differ diff --git a/STS/TOF/App/app_tof_peoplecount.c b/STS/TOF/App/app_tof_peoplecount.c index 3bc5d1d..ca03cbf 100644 --- a/STS/TOF/App/app_tof_peoplecount.c +++ b/STS/TOF/App/app_tof_peoplecount.c @@ -468,11 +468,11 @@ void STS_tof_presence_detection_sensor_Read(sts_tof_presence_detection_sensor_da #if defined(STS_P2) void STS_people_count_sensor_Read(sts_people_count_sensor_data_t *sts_p2_sensor_data) { - +#if 0 APP_LOG(TS_OFF, VLEVEL_L, "\n (1) In=%04d Out=%04d Around=%04d Day_in=%04d Day_out=%04d Day_around=%04d\n", sts_people_count_sensor_data.Walk_In_People_Count,sts_people_count_sensor_data.Walk_Out_People_Count,sts_people_count_sensor_data.Walk_Around_People_Count, sts_people_count_sensor_data.Sum_Day_Walk_In_People_Count,sts_people_count_sensor_data.Sum_Day_Walk_Out_People_Count,sts_people_count_sensor_data.Sum_Day_Walk_Around_People_Count); - +#endif sts_p2_sensor_data->Count_Valid = sts_people_count_sensor_data.Count_Valid; sum_count_changed = ((sts_people_count_sensor_data.Walk_In_People_Count + sts_people_count_sensor_data.Walk_Out_People_Count + sts_people_count_sensor_data.Walk_Around_People_Count)==0)? 0:1; @@ -495,10 +495,11 @@ void STS_people_count_sensor_Read(sts_people_count_sensor_data_t *sts_p2_sensor_ if (sum_count_changed) { +#if 0 APP_LOG(TS_OFF, VLEVEL_L, "\n (3) In=%04d Out=%04d Around=%04d Day_in=%04d Day_out=%04d Day_around=%04d\n", sts_people_count_sensor_data.Walk_In_People_Count,sts_people_count_sensor_data.Walk_Out_People_Count,sts_people_count_sensor_data.Walk_Around_People_Count, sts_people_count_sensor_data.Sum_Day_Walk_In_People_Count,sts_people_count_sensor_data.Sum_Day_Walk_Out_People_Count,sts_people_count_sensor_data.Sum_Day_Walk_Around_People_Count); - +#endif STS_Get_Date_Time_Stamp(); // else reset day counter @@ -661,7 +662,7 @@ void STS_people_count_sensor_Read(sts_people_count_sensor_data_t *sts_p2_sensor_ sts_p2_data_to_nvm[pp++] = (uint8_t)sts_people_count_sensor_data.Sum_LifeCycle_Walk_Around_People_Count<<16; sts_p2_data_to_nvm[pp++] = (uint8_t)sts_people_count_sensor_data.Sum_LifeCycle_Walk_Around_People_Count<<8; sts_p2_data_to_nvm[pp++] = (uint8_t)sts_people_count_sensor_data.Sum_LifeCycle_Walk_Around_People_Count; - +#if 0 APP_LOG(TS_OFF, VLEVEL_L, "\n (5) In=%04d Out=%04d Around=%04d Day_in=%04d Day_out=%04d Day_around=%04d\n", sts_people_count_sensor_data.Walk_In_People_Count,sts_people_count_sensor_data.Walk_Out_People_Count,sts_people_count_sensor_data.Walk_Around_People_Count, sts_people_count_sensor_data.Sum_Day_Walk_In_People_Count,sts_people_count_sensor_data.Sum_Day_Walk_Out_People_Count,sts_people_count_sensor_data.Sum_Day_Walk_Around_People_Count); @@ -676,7 +677,7 @@ void STS_people_count_sensor_Read(sts_people_count_sensor_data_t *sts_p2_sensor_ } APP_LOG(TS_OFF, VLEVEL_L, "\n\r"); APP_LOG(TS_OFF, VLEVEL_L, "\n###############################################\n\r"); - +#endif if (FLASH_IF_Erase(STS_SENSOR_DATA_NVM_BASE_ADDRESS, FLASH_PAGE_SIZE) == FLASH_IF_OK) { FLASH_IF_Write(STS_SENSOR_DATA_NVM_BASE_ADDRESS, (const void *)sts_p2_data_to_nvm, 64); @@ -696,7 +697,7 @@ void STS_people_count_sensor_Read(sts_people_count_sensor_data_t *sts_p2_sensor_ #if (defined(STS_P2)) void STS_TOF_VL53LX_PeopleCounting_Process_Init(void) { - APP_LOG(TS_OFF, VLEVEL_L,"\n\n# YUNHORN STS-P2 PEOPLE COUNTING PROCESS #\r\n"); + APP_LOG(TS_OFF, VLEVEL_M,"\n\n# YUNHORN STS-P2 PEOPLE COUNTING PROCESS #\r\n"); sts_tof_vl53lx_peoplecount_init(); sts_people_count_sensor_data.Count_Period = sts_cfg_nvm.periodicity; @@ -736,8 +737,8 @@ void STS_TOF_VL53LX_PeopleCounting_Process_Init(void) sts_people_count_sensor_data.Sum_LifeCycle_Walk_Out_People_Count = (uint32_t)((log_in_nvm[28]<<28) | log_in_nvm[29]<<16 | log_in_nvm[30]<<8 | log_in_nvm[31]); sts_people_count_sensor_data.Sum_LifeCycle_Walk_Around_People_Count = (uint32_t)((log_in_nvm[32]<<24) | log_in_nvm[33]<<16 | log_in_nvm[34]<<8 | log_in_nvm[35]); } - - APP_LOG(TS_OFF, VLEVEL_L, "\r\n ************* Restore sum data from NVM *********** \r\n"); +#if 0 + APP_LOG(TS_OFF, VLEVEL_M, "\r\n ************* Restore sum data from NVM *********** \r\n"); for (uint8_t i=0; i<64; i++) { @@ -746,6 +747,7 @@ void STS_TOF_VL53LX_PeopleCounting_Process_Init(void) APP_LOG(TS_OFF, VLEVEL_L, "|0x%02x ", (uint8_t)log_in_nvm[i]); } +#endif } void STS_TOF_VL53LX_PeopleCounting_Process_Start(void) @@ -764,16 +766,6 @@ void STS_TOF_VL53LX_PeopleCounting_Process_Start(void) sts_people_count_sensor_data.Count_Valid = 0; //APP_LOG(TS_OFF, VLEVEL_M,"# Counting time out... \r\n"); } -#if 0 - else { - // add up counting value since begin of day till now - - sts_people_count_sensor_data.Sum_Day_Walk_In_People_Count += sts_people_count_sensor_data.Walk_In_People_Count; - sts_people_count_sensor_data.Sum_Day_Walk_Out_People_Count += sts_people_count_sensor_data.Walk_Out_People_Count; - sts_people_count_sensor_data.Sum_Day_Walk_Around_People_Count += sts_people_count_sensor_data.Walk_Around_People_Count; - - } -#endif } }