From ffa6c2cb1be518fd6c6c94c5ec45e96b439ea501 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sun, 22 Jul 2018 00:01:43 +0200 Subject: [PATCH] battery display disabled (RAM issue) --- src/display.cpp | 10 ++++++---- src/globals.h | 4 ++-- src/main.cpp | 7 +------ 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/display.cpp b/src/display.cpp index 697dc34e..a5116041 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -109,22 +109,24 @@ void refreshDisplay() { u8x8.draw2x2String(0, 0, buff); // display number on unique macs total Wifi + BLE +/* // update Battery status (line 2) #ifdef HAS_BATTERY_PROBE u8x8.setCursor(0, 2); - u8x8.printf("B:%.1fV", batt_volt / 1000.0); + u8x8.printf("B:%.1fV", read_voltage() / 1000.0); #endif +*/ // update GPS status (line 2) #ifdef HAS_GPS - u8x8.setCursor(8, 2); + u8x8.setCursor(9, 2); if (!gps.location.isValid()) // if no fix then display Sats value inverse { u8x8.setInverseFont(1); - u8x8.printf("Sat:%.3d", gps.satellites.value()); + u8x8.printf("Sats:%.2d", gps.satellites.value()); u8x8.setInverseFont(0); } else - u8x8.printf("Sat:%.3d", gps.satellites.value()); + u8x8.printf("Sats:%.d", gps.satellites.value()); #endif // update bluetooth counter + LoRa SF (line 3) diff --git a/src/globals.h b/src/globals.h index 91d26f19..b02bc37a 100644 --- a/src/globals.h +++ b/src/globals.h @@ -40,8 +40,8 @@ typedef struct { extern configData_t cfg; // current device configuration extern char display_line6[], display_line7[]; // screen buffers extern uint8_t channel; // wifi channel rotation counter -extern uint16_t macs_total, macs_wifi, macs_ble, batt_volt; // display values -extern std::set macs; // temp storage for MACs +extern uint16_t macs_total, macs_wifi, macs_ble; // display values +extern std::set macs; // temp storage for MACs extern hw_timer_t *channelSwitch, *sendCycle; extern portMUX_TYPE timerMux; diff --git a/src/main.cpp b/src/main.cpp index b4f82d22..55ba10d2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,8 +30,7 @@ licenses. Refer to LICENSE.txt file in repository for more details. configData_t cfg; // struct holds current device configuration char display_line6[16], display_line7[16]; // display buffers uint8_t channel = 0; // channel rotation counter -uint16_t macs_total = 0, macs_wifi = 0, macs_ble = 0, - batt_volt = 0; // globals for display +uint16_t macs_total = 0, macs_wifi = 0, macs_ble = 0; // globals for display hw_timer_t *channelSwitch = NULL, *displaytimer = NULL, *sendCycle = NULL; // configure hardware timer for cyclic tasks @@ -432,10 +431,6 @@ void loop() { readButton(); #endif -#ifdef HAS_BATTERY_PROBE - batt_volt = read_voltage(); -#endif - #ifdef HAS_DISPLAY updateDisplay(); #endif