From bdbf2db409cf6694572a1d2de516a6d94c6076e8 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Mon, 22 Jul 2019 22:00:39 +0200 Subject: [PATCH] code sanitzations --- src/display.cpp | 2 ++ src/hal/generic.h | 2 -- src/lorawan.cpp | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/display.cpp b/src/display.cpp index 0c1a9422..260686fe 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -165,7 +165,9 @@ void draw_page(time_t t, uint8_t page) { char timeState, buff[16]; uint8_t msgWaiting; +#if (HAS_GPS) static bool wasnofix = true; +#endif // update counter (lines 0-1) snprintf( diff --git a/src/hal/generic.h b/src/hal/generic.h index 280a68ad..9d1d0b4e 100644 --- a/src/hal/generic.h +++ b/src/hal/generic.h @@ -53,8 +53,6 @@ #define HAS_BUTTON (39) // on board button #define HAS_RGB_LED (0) // WS2812B RGB LED on GPIO0 -#define BOARD_HAS_PSRAM // use extra 4MB extern RAM - // GPS settings #define HAS_GPS 1 // use on board GPS #define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_12, GPIO_NUM_15 // UBlox NEO 6M diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 5507e12b..12cae030 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -306,7 +306,7 @@ void onEvent(ev_t ev) { break; case EV_TXSTART: - if (!(LMIC.opmode & OP_JOINING)) + if (!(LMIC.opmode & OP_JOINING)) { #if (TIME_SYNC_LORASERVER) // if last packet sent was a timesync request, store TX time if (LMIC.pendTxPort == TIMEPORT) @@ -314,6 +314,7 @@ void onEvent(ev_t ev) { else #endif strcpy_P(buff, PSTR("TX START")); + } break; case EV_TXCANCELED: