fix #49: make debug screen show real data

* Break out debug screen to a separate class and make it thread-safe.
* Break out power state to a separate class.
* Show battery voltage, charging & USB status on debug screen.
* Show GPS lock / no lock
* Fix an off-by-one that I introduced earlier in `drawRows`.
This commit is contained in:
Girts Folkmanis
2020-03-26 09:24:53 -07:00
parent 4c35d1f207
commit 54cd082bfe
6 changed files with 196 additions and 52 deletions

View File

@@ -45,8 +45,13 @@ class GPS : public PeriodicTask, public Observable
/// Restart our lock attempt - try to get and broadcast a GPS reading ASAP
void startLock();
/// Returns ture if we have acquired GPS lock.
bool hasLock() const { return hasValidLocation; }
private:
void readFromRTC();
bool hasValidLocation = false; // default to false, until we complete our first read
};
extern GPS gps;