Skip to content

Commit 5c79ba5

Browse files
committed
lorawan: fix coding style
1 parent bfb8b72 commit 5c79ba5

File tree

2 files changed

+26
-27
lines changed

2 files changed

+26
-27
lines changed

features/lorawan/LoRaRadio.h

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ typedef struct radio_events {
166166
*/
167167
mbed::Callback<void()> rx_error;
168168

169-
/**
170-
* FHSS Change Channel callback prototype.
171-
*
172-
* @param current_channel The index number of the current channel.
173-
*/
169+
/**
170+
* FHSS Change Channel callback prototype.
171+
*
172+
* @param current_channel The index number of the current channel.
173+
*/
174174
mbed::Callback<void(uint8_t current_channel)> fhss_change_channel;
175175

176176
/**
@@ -184,8 +184,7 @@ typedef struct radio_events {
184184
/**
185185
* Interface for the radios, contains the main functions that a radio needs, and five callback functions.
186186
*/
187-
class LoRaRadio
188-
{
187+
class LoRaRadio {
189188

190189
public:
191190

@@ -246,7 +245,7 @@ class LoRaRadio
246245
* @param rx_continuous Sets the reception in continuous mode.
247246
* [false: single mode, true: continuous mode]
248247
*/
249-
virtual void set_rx_config (radio_modems_t modem, uint32_t bandwidth,
248+
virtual void set_rx_config(radio_modems_t modem, uint32_t bandwidth,
250249
uint32_t datarate, uint8_t coderate,
251250
uint32_t bandwidth_afc, uint16_t preamble_len,
252251
uint16_t symb_timeout, bool fix_len,
@@ -284,10 +283,10 @@ class LoRaRadio
284283
* @param timeout The transmission timeout [ms].
285284
*/
286285
virtual void set_tx_config(radio_modems_t modem, int8_t power, uint32_t fdev,
287-
uint32_t bandwidth, uint32_t datarate,
288-
uint8_t coderate, uint16_t preamble_len,
289-
bool fix_len, bool crc_on, bool freq_hop_on,
290-
uint8_t hop_period, bool iq_inverted, uint32_t timeout) = 0;
286+
uint32_t bandwidth, uint32_t datarate,
287+
uint8_t coderate, uint16_t preamble_len,
288+
bool fix_len, bool crc_on, bool freq_hop_on,
289+
uint8_t hop_period, bool iq_inverted, uint32_t timeout) = 0;
291290

292291
/**
293292
* Sends the buffer of size

features/lorawan/LoRaWANStack.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ bool LoRaWANStack::is_port_valid(const uint8_t port, bool allow_port_0)
800800
//Application should not use reserved and illegal port numbers.
801801
if (port == 0) {
802802
return allow_port_0;
803-
} else if (port == COMPLIANCE_TESTING_PORT){
803+
} else if (port == COMPLIANCE_TESTING_PORT) {
804804
#if !defined(LORAWAN_COMPLIANCE_TEST)
805805
return false;
806806
#endif
@@ -943,9 +943,9 @@ void LoRaWANStack::mlme_confirm_handler()
943943

944944
if (_callbacks.link_check_resp) {
945945
const int ret = _queue->call(
946-
_callbacks.link_check_resp,
947-
_loramac.get_mlme_confirmation()->demod_margin,
948-
_loramac.get_mlme_confirmation()->nb_gateways);
946+
_callbacks.link_check_resp,
947+
_loramac.get_mlme_confirmation()->demod_margin,
948+
_loramac.get_mlme_confirmation()->nb_gateways);
949949
MBED_ASSERT(ret != 0);
950950
(void) ret;
951951
}
@@ -1057,17 +1057,17 @@ void LoRaWANStack::mcps_indication_handler()
10571057
if ((_loramac.get_device_class() != CLASS_C
10581058
&& mcps_indication->fpending_status)
10591059
|| (_loramac.get_device_class() == CLASS_C
1060-
&& mcps_indication->type == MCPS_CONFIRMED)) {
1060+
&& mcps_indication->type == MCPS_CONFIRMED)) {
10611061
#if (MBED_CONF_LORA_AUTOMATIC_UPLINK_MESSAGE)
1062-
// Do not queue an automatic uplink of there is one already outgoing
1063-
// This means we have not received an ack for the previous automatic uplink
1064-
if (!_automatic_uplink_ongoing) {
1065-
tr_debug("Sending empty uplink message...");
1066-
_automatic_uplink_ongoing = true;
1067-
const int ret = _queue->call(this, &LoRaWANStack::send_automatic_uplink_message, mcps_indication->port);
1068-
MBED_ASSERT(ret != 0);
1069-
(void)ret;
1070-
}
1062+
// Do not queue an automatic uplink of there is one already outgoing
1063+
// This means we have not received an ack for the previous automatic uplink
1064+
if (!_automatic_uplink_ongoing) {
1065+
tr_debug("Sending empty uplink message...");
1066+
_automatic_uplink_ongoing = true;
1067+
const int ret = _queue->call(this, &LoRaWANStack::send_automatic_uplink_message, mcps_indication->port);
1068+
MBED_ASSERT(ret != 0);
1069+
(void)ret;
1070+
}
10711071
#else
10721072
send_event_to_application(UPLINK_REQUIRED);
10731073
#endif
@@ -1193,7 +1193,7 @@ void LoRaWANStack::process_joining_state(lorawan_status_t &op_status)
11931193
}
11941194

11951195
if (_device_current_state == DEVICE_STATE_AWAITING_JOIN_ACCEPT &&
1196-
_loramac.get_current_slot() != RX_SLOT_WIN_1) {
1196+
_loramac.get_current_slot() != RX_SLOT_WIN_1) {
11971197
_device_current_state = DEVICE_STATE_JOINING;
11981198
// retry join
11991199
bool can_continue = _loramac.continue_joining_process();

0 commit comments

Comments
 (0)