Add battery voltage reading to web UI, apply fixed VBAT multiplier, closes #3
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "ble_config.h"
|
||||
#include "tap.h"
|
||||
#include "battery.h"
|
||||
#include <Adafruit_LittleFS.h>
|
||||
#include <InternalFileSystem.h>
|
||||
|
||||
@@ -200,6 +201,9 @@ void pushTelemetry(unsigned long now) {
|
||||
telem.leftClicks = statLeftClicks;
|
||||
telem.rightClicks = statRightClicks;
|
||||
#endif
|
||||
#ifdef FEATURE_BATTERY_MONITOR
|
||||
telem.battVoltage = readBatteryVoltage();
|
||||
#endif
|
||||
cfgTelemetry.write ((uint8_t*)&telem, sizeof(telem));
|
||||
cfgTelemetry.notify((uint8_t*)&telem, sizeof(telem));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user