diff --git a/include/globals.h b/include/globals.h index c8755412..adddd3ab 100644 --- a/include/globals.h +++ b/include/globals.h @@ -22,24 +22,14 @@ #define _bitl(b) (1UL << (b)) // bits in payloadmask for filtering payload data -#define COUNT_DATA _bit(1) -#define ALARM_DATA _bit(2) -#define MEMS_DATA _bit(3) -#define GPS_DATA _bit(4) -#define SENSOR1_DATA _bit(5) -#define SENSOR2_DATA _bit(6) -#define SENSOR3_DATA _bit(7) -#define BATT_DATA _bit(8) - -// bits in configmask for device runmode control -#define GPS_MODE _bit(1) -#define ALARM_MODE _bit(2) -#define BEACON_MODE _bit(3) -#define UPDATE_MODE _bit(4) -#define FILTER_MODE _bit(5) -#define ANTENNA_MODE _bit(6) -#define BLE_MODE _bit(7) -#define SCREEN_MODE _bit(8) +#define COUNT_DATA _bit(0) +#define ALARM_DATA _bit(1) +#define MEMS_DATA _bit(2) +#define GPS_DATA _bit(3) +#define SENSOR1_DATA _bit(4) +#define SENSOR2_DATA _bit(5) +#define SENSOR3_DATA _bit(6) +#define BATT_DATA _bit(7) // length of display buffer for lmic event messages #define LMIC_EVENTMSG_LEN 17 diff --git a/include/irqhandler.h b/include/irqhandler.h index 9e52ccbf..5d40c63c 100644 --- a/include/irqhandler.h +++ b/include/irqhandler.h @@ -1,16 +1,16 @@ #ifndef _IRQHANDLER_H #define _IRQHANDLER_H -#define DISPLAY_IRQ _bitl(1) -#define BUTTON_IRQ _bitl(2) -#define SENDCYCLE_IRQ _bitl(3) -#define CYCLIC_IRQ _bitl(4) -#define TIMESYNC_IRQ _bitl(5) -#define MASK_IRQ _bitl(6) -#define UNMASK_IRQ _bitl(7) -#define BME_IRQ _bitl(8) -#define MATRIX_DISPLAY_IRQ _bitl(9) -#define PMU_IRQ _bitl(10) +#define DISPLAY_IRQ _bitl(0) +#define BUTTON_IRQ _bitl(1) +#define SENDCYCLE_IRQ _bitl(2) +#define CYCLIC_IRQ _bitl(3) +#define TIMESYNC_IRQ _bitl(4) +#define MASK_IRQ _bitl(5) +#define UNMASK_IRQ _bitl(6) +#define BME_IRQ _bitl(7) +#define MATRIX_DISPLAY_IRQ _bitl(8) +#define PMU_IRQ _bitl(9) #include "globals.h" #include "button.h" diff --git a/src/TTN/packed_decoder.js b/src/TTN/packed_decoder.js index ee61706e..e8666a02 100644 --- a/src/TTN/packed_decoder.js +++ b/src/TTN/packed_decoder.js @@ -262,7 +262,7 @@ var bitmap2 = function (byte) { } var i = bytesToInt(byte); var bm = ('00000000' + Number(i).toString(2)).substr(-8).split('').map(Number).map(Boolean); - return ['battery', 'sensor3', 'sensor2', 'sensor1', 'counter', 'bme', 'alarm', 'gps'] + return ['battery', 'sensor3', 'sensor2', 'sensor1', 'gps', 'bme', 'alarm', 'counter'] .reduce(function (obj, pos, index) { obj[pos] = +bm[index]; return obj; diff --git a/src/display.cpp b/src/display.cpp index 3b7bb01b..b8f4c9cc 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -345,10 +345,10 @@ void dp_drawPage(time_t t, bool nextpage) { #if (HAS_LORA) // LMiC event display - dp_printf("%-16s", lmic_event_msg); + dp_printf("%-16s ", lmic_event_msg); // LORA datarate, display inverse if ADR disabled dp_setFont(MY_FONT_SMALL, !cfg.adrmode); - dp_printf(" %-4s", getSfName(updr2rps(LMIC.datarate))); + dp_printf("%-4s", getSfName(updr2rps(LMIC.datarate))); dp_setFont(MY_FONT_SMALL, 0); dp_println(); #endif // HAS_LORA