diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index aa5ebc6..0e76cc3 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -1022,7 +1022,7 @@ void STS_SENSOR_Upload_AppData_Message(LmHandlerAppData_t stsAppdata) } -void STS_SENSOR_Upload_Message(uint8_t appDataPort, uint8_t appBufferSize, uint8_t *appDataBuffer) +int STS_SENSOR_Upload_Message(uint8_t appDataPort, uint8_t appBufferSize, uint8_t *appDataBuffer) { LmHandlerErrorStatus_t status = LORAMAC_HANDLER_ERROR; UTIL_TIMER_Time_t nextTxIn = 0; @@ -1056,7 +1056,7 @@ void STS_SENSOR_Upload_Message(uint8_t appDataPort, uint8_t appBufferSize, uint8 } } - + return status; } static void SendTxData(void) diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin index 988e770..bf8942c 100644 Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.bin differ diff --git a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf index feecb9b..d22cf79 100644 Binary files a/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf and b/STM32CubeIDE/Release/WLE5CC_NODE_STS.elf differ diff --git a/STS/Core/Inc/yunhorn_sts_sensors.h b/STS/Core/Inc/yunhorn_sts_sensors.h index 126b14a..ce311be 100644 --- a/STS/Core/Inc/yunhorn_sts_sensors.h +++ b/STS/Core/Inc/yunhorn_sts_sensors.h @@ -520,7 +520,7 @@ void STS_ClockSync_process(void); void STS_Reed_Hall_Presence_Detection(void); void STS_SENSOR_Upload_Config_Invalid_Message(void); -void STS_SENSOR_Upload_Message(uint8_t appDataPort, uint8_t appBufferSize, uint8_t *appDataBuffer); +int STS_SENSOR_Upload_Message(uint8_t appDataPort, uint8_t appBufferSize, uint8_t *appDataBuffer); void STS_SENSOR_Upload_AppData_Message(LmHandlerAppData_t stsAppdata); void STS_SENSOR_MEMS_Get_ID(uint16_t *devID); void STS_RR_Sensor_read(sts_tof_range_data_t *sts_rr_sensor_data); diff --git a/STS/Core/Src/yunhorn_sts_process.c b/STS/Core/Src/yunhorn_sts_process.c index be8e0e4..829003e 100644 --- a/STS/Core/Src/yunhorn_sts_process.c +++ b/STS/Core/Src/yunhorn_sts_process.c @@ -2040,9 +2040,11 @@ void STS_FHMOS_sensor_upload_map(uint8_t map_index) } APP_LOG(TS_OFF, VLEVEL_M, "\r\n Bitmap uploading, size=%02x\r\n", i); - STS_SENSOR_Upload_Message(YUNHORN_STS_L8_LORA_APP_DATA_PORT, i, (uint8_t *)tstbuf); - - sts_fhmos_bitmap_pending = FHMOS_BITMAP_FINISHED; // 2; + int status=STS_SENSOR_Upload_Message(YUNHORN_STS_L8_LORA_APP_DATA_PORT, i, (uint8_t *)tstbuf); + if ((map_index ==0x02)&& (status ==0)) + { + sts_fhmos_bitmap_pending = FHMOS_BITMAP_FINISHED; // 2; + } APP_LOG(TS_OFF, VLEVEL_M, "\r\n +++++++++++++++++++++++ \r\nBitmap Pending uploaded, fhmos_bitmap_statue=%d\r\n", sts_fhmos_bitmap_pending); } #endif