sensor data ready OVERWRITE heart-beat message

This commit is contained in:
Yunhorn 2024-05-12 11:15:59 +08:00
parent a10ec2dde2
commit 0d537d423f
2 changed files with 7 additions and 3 deletions

View File

@ -905,13 +905,15 @@ 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);
if (LmHandlerIsBusy() == false)
{
AppData.Port = LORAWAN_USER_APP_PORT;
//AppData.Buffer[i++] = AppLedStateOn; //#01
if (heart_beat_timer != 0L)
if ((heart_beat_timer != 0L)&&(sensor_data_ready==0)) // sensor data OVERWRITE heart-beat message, 2024-05-12
{
heart_beat_timer = 0U;
AppData.Port = sts_sendhtbtport; //LORAWAN_USER_APP_PORT+1;
@ -924,6 +926,8 @@ static void SendTxData(void)
upload_message_timer =0;
//AppData.Buffer[i++] = AppLedStateOn;
//i = PrepareSendTxData();
STS_PRESENCE_SENSOR_Prepare_Send_Data();
AppData.Buffer[i++] = (uint8_t)(sts_o7_sensorData.lamp_bar_color)&0xff; //01
AppData.Buffer[i++] = (uint8_t)(sts_o7_sensorData.workmode)&0xff; //02 WORK MODE

Binary file not shown.