|
14 | 14 |
|
15 | 15 | #include "sfeIoTNodeLoRaWAN.h"
|
16 | 16 | #include <Flux/flxClock.h>
|
| 17 | +#include <Flux/flxPlatform.h> |
17 | 18 | #include <Flux/flxSerial.h>
|
18 | 19 |
|
19 | 20 | void sfeIoTNodeLoRaWAN::_displayAboutObjHelper(char pre_ch, const char *szName, bool enabled)
|
@@ -132,22 +133,17 @@ void sfeIoTNodeLoRaWAN::displayAppStatus(bool useInfo)
|
132 | 133 | // else
|
133 | 134 | // flxLog__(logLevel, "%cSD card not available", pre_ch);
|
134 | 135 |
|
135 |
| - // // show heap level |
136 |
| - // flxLog__(logLevel, "%cSystem Heap - Total: %dB Free: %dB (%.1f%%)", pre_ch, ESP.getHeapSize(), |
137 |
| - // ESP.getFreeHeap(), |
138 |
| - // (float)ESP.getFreeHeap() / (float)ESP.getHeapSize() * 100.); |
| 136 | + // show heap level |
| 137 | + flxLog__(logLevel, "%cSystem Heap - Total: %dB Free: %dB (%.1f%%)", pre_ch, flxPlatform::heap_size(), |
| 138 | + flxPlatform::heap_free(), (float)flxPlatform::heap_free() / (float)flxPlatform::heap_size() * 100.); |
139 | 139 |
|
140 | 140 | // Battery fuel gauge available?
|
141 | 141 | if (_fuelGauge != nullptr)
|
142 | 142 | {
|
143 |
| - // Output if a) we have a batter connected, and if so the % charge, and if it's charging |
144 |
| - float batterySOC = _fuelGauge->getSOC(); |
145 |
| - // Is a battery connected - look at SOC |
146 |
| - if (batterySOC < kBatteryNoBatterySOC) |
147 |
| - flxLog__(logLevel, "%cBattery - Level: %c%.1f%%", pre_ch, _fuelGauge->getChangeRate() > 0 ? '+' : ' ', |
148 |
| - batterySOC); |
149 |
| - else |
150 |
| - flxLog__(logLevel, "%cBattery - Not Connected", pre_ch); |
| 143 | + // There is no way to detect if a batter is connected using the fuel gauge. Sad... |
| 144 | + // So we just output the state of charge ... |
| 145 | + flxLog__(logLevel, "%cFuel Gauge - State of Charge: %c%.1f%%", pre_ch, |
| 146 | + _fuelGauge->getChangeRate() > 0 ? '+' : ' ', _fuelGauge->getSOC()); |
151 | 147 | }
|
152 | 148 | // flxLog__(logLevel, "%cSystem Deep Sleep: %s", pre_ch, sleepEnabled() ? "enabled" : "disabled");
|
153 | 149 | // flxLog_N("%c Sleep Interval: %d seconds", pre_ch, sleepInterval());
|
|
0 commit comments