@@ -293,6 +293,7 @@ void LoRaMac::on_radio_rx_done(uint8_t *payload, uint16_t size, int16_t rssi,
293
293
_mcps_indication.is_ack_recvd = false ;
294
294
_mcps_indication.dl_frame_counter = 0 ;
295
295
_mcps_indication.type = MCPS_UNCONFIRMED;
296
+ _mcps_indication.status = LORAMAC_EVENT_INFO_STATUS_OK;
296
297
297
298
if (_device_class != CLASS_C) {
298
299
_lora_phy.put_radio_to_sleep ();
@@ -1102,7 +1103,6 @@ lorawan_status_t LoRaMac::schedule_tx(void)
1102
1103
{
1103
1104
lorawan_time_t dutyCycleTimeOff = 0 ;
1104
1105
channel_selection_params_t nextChan;
1105
- lorawan_status_t status = LORAWAN_STATUS_PARAMETER_INVALID;
1106
1106
1107
1107
if (_params.sys_params .max_duty_cycle == 255 ) {
1108
1108
return LORAWAN_STATUS_DEVICE_OFF;
@@ -1121,9 +1121,10 @@ lorawan_status_t LoRaMac::schedule_tx(void)
1121
1121
nextChan.joined = _is_nwk_joined;
1122
1122
nextChan.last_aggregate_tx_time = _params.timers .aggregated_last_tx_time ;
1123
1123
1124
- status = _lora_phy.set_next_channel (&nextChan, &_params.channel ,
1125
- &dutyCycleTimeOff,
1126
- &_params.timers .aggregated_timeoff );
1124
+ lorawan_status_t status = _lora_phy.set_next_channel (&nextChan,
1125
+ &_params.channel ,
1126
+ &dutyCycleTimeOff,
1127
+ &_params.timers .aggregated_timeoff );
1127
1128
switch (status) {
1128
1129
case LORAWAN_STATUS_NO_CHANNEL_FOUND:
1129
1130
case LORAWAN_STATUS_NO_FREE_CHANNEL_FOUND:
0 commit comments