From 16ff1b4b60cad9864b209468437d7436e3dbca62 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Tue, 12 Jun 2018 19:50:58 +0200 Subject: [PATCH] clang-format: loraconf.sample.h, lorawan.cpp, lorawan.h --- src/loraconf.sample.h | 23 +++++++++++++---------- src/lorawan.cpp | 6 ++---- src/lorawan.h | 6 +++--- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/loraconf.sample.h b/src/loraconf.sample.h index ec816959..b4538238 100644 --- a/src/loraconf.sample.h +++ b/src/loraconf.sample.h @@ -1,28 +1,31 @@ /************************************************************ * LMIC LoRaWAN configuration - * + * * Read the values from TTN console (or whatever applies), insert them here, * and rename this file to src/loraconf.h - * + * * Note that DEVEUI, APPEUI and APPKEY should all be specified in MSB format. - * (This is different from standard LMIC-Arduino which expects DEVEUI and APPEUI in LSB format.) + * (This is different from standard LMIC-Arduino which expects DEVEUI and APPEUI + * in LSB format.) - * Set your DEVEUI here, if you have one. You can leave this untouched, + * Set your DEVEUI here, if you have one. You can leave this untouched, * then the DEVEUI will be generated during runtime from device's MAC adress * and will be displayed on device's screen as well as on serial console. - * - * NOTE: Use MSB format (as displayed in TTN console, so you can cut & paste from there) + * + * NOTE: Use MSB format (as displayed in TTN console, so you can cut & paste + * from there) * For TTN, APPEUI in MSB format always starts with 0x70, 0xB3, 0xD5 * * Note: If using a board with Microchip 24AA02E64 Uinique ID for deveui, * the DEVEUI will be overwriten by the one contained in the Microchip module - * + * ************************************************************/ #include -static const u1_t DEVEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static const u1_t DEVEUI[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -static const u1_t APPEUI[8]={ 0x70, 0xB3, 0xD5, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static const u1_t APPEUI[8] = {0x70, 0xB3, 0xD5, 0x00, 0x00, 0x00, 0x00, 0x00}; -static const u1_t APPKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; \ No newline at end of file +static const u1_t APPKEY[16] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; \ No newline at end of file diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 05661981..ed07f19e 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -211,8 +211,7 @@ void onEvent(ev_t ev) { case EV_JOINED: strcpy_P(buff, PSTR("JOINED")); - sprintf(display_lora, - " "); // clear previous lmic status message from display + sprintf(display_lora, " "); // clear previous lmic status // set data rate adaptation LMIC_setAdrMode(cfg.adrmode); @@ -229,8 +228,7 @@ void onEvent(ev_t ev) { strcpy_P(buff, (LMIC.txrxFlags & TXRX_ACK) ? PSTR("RECEIVED ACK") : PSTR("TX COMPLETE")); - sprintf(display_lora, - " "); // clear previous lmic status message from display + sprintf(display_lora, " "); // clear previous lmic status if (LMIC.dataLen) { ESP_LOGI(TAG, "Received %d bytes of payload, RSSI %d SNR %d", diff --git a/src/lorawan.h b/src/lorawan.h index de54b6e8..eda04be7 100644 --- a/src/lorawan.h +++ b/src/lorawan.h @@ -2,9 +2,9 @@ #define LORAWAN_H void onEvent(ev_t ev); -void do_send(osjob_t* j); -void gen_lora_deveui(uint8_t * pdeveui); -void RevBytes(unsigned char* b, size_t c); +void do_send(osjob_t *j); +void gen_lora_deveui(uint8_t *pdeveui); +void RevBytes(unsigned char *b, size_t c); void get_hard_deveui(uint8_t *pdeveui); #endif \ No newline at end of file