@@ -289,7 +289,7 @@ void LoRaMac::handle_join_accept_frame(const uint8_t *payload, uint16_t size)
289
289
void LoRaMac::check_frame_size (uint16_t size)
290
290
{
291
291
uint8_t value = _lora_phy->get_max_payload (_mcps_indication.rx_datarate ,
292
- _params.is_repeater_supported );
292
+ _params.is_repeater_supported );
293
293
294
294
if (MAX (0 , (int16_t )((int16_t )size - (int16_t )LORA_MAC_FRMPAYLOAD_OVERHEAD))
295
295
> (int32_t ) value) {
@@ -319,7 +319,7 @@ bool LoRaMac::message_integrity_check(const uint8_t *const payload,
319
319
mic_rx |= ((uint32_t ) payload[size - LORAMAC_MFR_LEN + 2 ] << 16 );
320
320
mic_rx |= ((uint32_t ) payload[size - LORAMAC_MFR_LEN + 3 ] << 24 );
321
321
322
- sequence_counter_prev = (uint16_t )* downlink_counter;
322
+ sequence_counter_prev = (uint16_t ) * downlink_counter;
323
323
sequence_counter_diff = sequence_counter - sequence_counter_prev;
324
324
*downlink_counter += sequence_counter_diff;
325
325
if (sequence_counter < sequence_counter_prev) {
@@ -600,8 +600,8 @@ void LoRaMac::handle_data_frame(const uint8_t *const payload,
600
600
}
601
601
602
602
if (_device_class == CLASS_C) {
603
- _lora_time.stop (_rx2_closure_timer_for_class_c);
604
- }
603
+ _lora_time.stop (_rx2_closure_timer_for_class_c);
604
+ }
605
605
606
606
if (_params.is_node_ack_requested && fctrl.bits .ack ) {
607
607
_mcps_confirmation.ack_received = fctrl.bits .ack ;
@@ -699,7 +699,7 @@ void LoRaMac::on_radio_rx_done(const uint8_t *const payload, uint16_t size,
699
699
if (_device_class == CLASS_C && !_continuous_rx2_window_open) {
700
700
_lora_time.stop (_rx2_closure_timer_for_class_c);
701
701
open_rx2_window ();
702
- } else if (_device_class != CLASS_C){
702
+ } else if (_device_class != CLASS_C) {
703
703
_lora_time.stop (_params.timers .rx_window1_timer );
704
704
_lora_phy->put_radio_to_sleep ();
705
705
}
@@ -1118,9 +1118,9 @@ lorawan_status_t LoRaMac::schedule_tx()
1118
1118
next_channel.last_aggregate_tx_time = _params.timers .aggregated_last_tx_time ;
1119
1119
1120
1120
lorawan_status_t status = _lora_phy->set_next_channel (&next_channel,
1121
- &_params.channel ,
1122
- &backoff_time,
1123
- &_params.timers .aggregated_timeoff );
1121
+ &_params.channel ,
1122
+ &backoff_time,
1123
+ &_params.timers .aggregated_timeoff );
1124
1124
1125
1125
switch (status) {
1126
1126
case LORAWAN_STATUS_NO_CHANNEL_FOUND:
@@ -1139,20 +1139,20 @@ lorawan_status_t LoRaMac::schedule_tx()
1139
1139
}
1140
1140
1141
1141
uint8_t rx1_dr = _lora_phy->apply_DR_offset (_params.sys_params .channel_data_rate ,
1142
- _params.sys_params .rx1_dr_offset );
1142
+ _params.sys_params .rx1_dr_offset );
1143
1143
1144
1144
tr_debug (" TX: Channel=%d, TX DR=%d, RX1 DR=%d" ,
1145
1145
_params.channel , _params.sys_params .channel_data_rate , rx1_dr);
1146
1146
1147
1147
1148
1148
_lora_phy->compute_rx_win_params (rx1_dr, MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH,
1149
- MBED_CONF_LORA_MAX_SYS_RX_ERROR,
1150
- &_params.rx_window1_config );
1149
+ MBED_CONF_LORA_MAX_SYS_RX_ERROR,
1150
+ &_params.rx_window1_config );
1151
1151
1152
1152
_lora_phy->compute_rx_win_params (_params.sys_params .rx2_channel .datarate ,
1153
- MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH,
1154
- MBED_CONF_LORA_MAX_SYS_RX_ERROR,
1155
- &_params.rx_window2_config );
1153
+ MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH,
1154
+ MBED_CONF_LORA_MAX_SYS_RX_ERROR,
1155
+ &_params.rx_window2_config );
1156
1156
1157
1157
if (!_is_nwk_joined) {
1158
1158
_params.rx_window1_delay = _params.sys_params .join_accept_delay1
@@ -1177,8 +1177,8 @@ lorawan_status_t LoRaMac::schedule_tx()
1177
1177
fopts_len) == false ) {
1178
1178
tr_error (" Allowed FRMPayload = %d, FRMPayload = %d, MAC commands pending = %d" ,
1179
1179
_lora_phy->get_max_payload (_params.sys_params .channel_data_rate ,
1180
- _params.is_repeater_supported ),
1181
- _ongoing_tx_msg.f_buffer_size , fopts_len);
1180
+ _params.is_repeater_supported ),
1181
+ _ongoing_tx_msg.f_buffer_size , fopts_len);
1182
1182
return LORAWAN_STATUS_LENGTH_ERROR;
1183
1183
}
1184
1184
_params.rx_window1_delay = _params.sys_params .recv_delay1
@@ -1201,7 +1201,7 @@ void LoRaMac::calculate_backOff(uint8_t channel)
1201
1201
{
1202
1202
lorawan_time_t elapsed_time = _lora_time.get_elapsed_time (_params.timers .mac_init_time );
1203
1203
_lora_phy->calculate_backoff (_is_nwk_joined, _params.is_last_tx_join_request , _params.is_dutycycle_on ,
1204
- channel, elapsed_time, _params.timers .tx_toa );
1204
+ channel, elapsed_time, _params.timers .tx_toa );
1205
1205
1206
1206
// Update aggregated time-off. This must be an assignment and no incremental
1207
1207
// update as we do only calculate the time-off based on the last transmission
@@ -1301,7 +1301,7 @@ int16_t LoRaMac::prepare_ongoing_tx(const uint8_t port,
1301
1301
_ongoing_tx_msg.port = port;
1302
1302
uint8_t max_possible_size = 0 ;
1303
1303
uint8_t fopts_len = _mac_commands.get_mac_cmd_length ()
1304
- + _mac_commands.get_repeat_commands_length ();
1304
+ + _mac_commands.get_repeat_commands_length ();
1305
1305
1306
1306
// Handles unconfirmed messages
1307
1307
if (flags & MSG_UNCONFIRMED_FLAG) {
@@ -1420,9 +1420,9 @@ void LoRaMac::set_device_class(const device_class_t &device_class,
1420
1420
_params.is_node_ack_requested = false ;
1421
1421
_lora_phy->put_radio_to_sleep ();
1422
1422
_lora_phy->compute_rx_win_params (_params.sys_params .rx2_channel .datarate ,
1423
- MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH,
1424
- MBED_CONF_LORA_MAX_SYS_RX_ERROR,
1425
- &_params.rx_window2_config );
1423
+ MBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH,
1424
+ MBED_CONF_LORA_MAX_SYS_RX_ERROR,
1425
+ &_params.rx_window2_config );
1426
1426
}
1427
1427
1428
1428
if (CLASS_C == _device_class) {
@@ -1607,9 +1607,9 @@ lorawan_status_t LoRaMac::prepare_frame(loramac_mhdr_t *machdr,
1607
1607
1608
1608
if (_params.sys_params .adr_on ) {
1609
1609
if (_lora_phy->get_next_ADR (true ,
1610
- _params.sys_params .channel_data_rate ,
1611
- _params.sys_params .channel_tx_power ,
1612
- _params.adr_ack_counter )) {
1610
+ _params.sys_params .channel_data_rate ,
1611
+ _params.sys_params .channel_tx_power ,
1612
+ _params.adr_ack_counter )) {
1613
1613
fctrl->bits .adr_ack_req = 1 ;
1614
1614
}
1615
1615
}
@@ -1696,7 +1696,7 @@ lorawan_status_t LoRaMac::prepare_frame(loramac_mhdr_t *machdr,
1696
1696
1697
1697
_params.tx_buffer_len += LORAMAC_MFR_LEN;
1698
1698
}
1699
- break ;
1699
+ break ;
1700
1700
case FRAME_TYPE_PROPRIETARY:
1701
1701
if ((fbuffer != NULL ) && (_params.tx_buffer_len > 0 )) {
1702
1702
memcpy (_params.tx_buffer + pkt_header_len, (uint8_t *) fbuffer,
0 commit comments