diff --git a/Core/Src/yunhorn_sts_process.c b/Core/Src/yunhorn_sts_process.c index 1b17098..c14d1db 100644 --- a/Core/Src/yunhorn_sts_process.c +++ b/Core/Src/yunhorn_sts_process.c @@ -730,10 +730,10 @@ void STS_PRESENCE_SENSOR_Prepare_Send_Data(void) STS_Lamp_Bar_Refresh(); } - } else - { - sts_occupancy_overtime_state = 0U; - } + }// else + //{ + // sts_occupancy_overtime_state = 0U; + // } } #if 0 diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 4383709..5942324 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -905,8 +905,8 @@ static void SendTxData(void) UTIL_TIMER_Time_t nextTxIn = 0; uint8_t i = 0; - APP_LOG(TS_OFF, VLEVEL_L, "\r\n\n\n**** heart_beat timer =%2u \r\n**** upload message_timer=%2u\r\n**** sensor_data_ready=%2u\r\n", - heart_beat_timer, upload_message_timer, sensor_data_ready); + APP_LOG(TS_OFF, VLEVEL_L, "\r\n\n\n**** heart_beat timer =%2u \r\n**** sensor_data_ready=%2u\r\n", + heart_beat_timer, sensor_data_ready); if (LmHandlerIsBusy() == false) { @@ -924,6 +924,7 @@ static void SendTxData(void) { sensor_data_ready =0; upload_message_timer =0; + //AppData.Buffer[i++] = AppLedStateOn; //i = PrepareSendTxData(); STS_PRESENCE_SENSOR_Prepare_Send_Data(); @@ -974,6 +975,11 @@ static void SendTxData(void) sts_o7_sensorData.unconcious_state, sts_o7_sensorData.unconcious_duration, sts_o7_sensorData.fall_state ); #endif } + heart_beat_timer=0; + sensor_data_ready =0; + upload_message_timer =0; + + AppData.BufferSize = (sts_service_mask > STS_SERVICE_MASK_L1? 0:i); APP_LOG(TS_OFF, VLEVEL_L, "\r\n\n\n** ** AppData.PORT =%3d ** ** AppData.BufferSize=%3d ** Count Size=%3d\r\n", AppData.Port, AppData.BufferSize, i); diff --git a/STM32CubeIDE/Release/STS_O7.bin b/STM32CubeIDE/Release/STS_O7.bin index 79ec110..8401f88 100644 Binary files a/STM32CubeIDE/Release/STS_O7.bin and b/STM32CubeIDE/Release/STS_O7.bin differ