fixes battery reading on x3

This commit is contained in:
Justin Mitchell
2026-02-12 16:55:27 -05:00
parent cbea838f91
commit 9a1548189c
6 changed files with 28 additions and 9 deletions
+2 -3
View File
@@ -44,11 +44,10 @@ void HalGPIO::startDeepSleep() {
int HalGPIO::getBatteryPercentage() const {
if (_deviceType == DeviceType::X3) {
// X3 battery telemetry is not on ADC in stock fw; avoid fighting EPD DC on GPIO4.
return 0;
}
static const BatteryMonitor battery = BatteryMonitor(BAT_GPIO0);
return battery.readPercentage();
static const BatteryMonitor bat(BAT_GPIO0);
return bat.readPercentage();
}
bool HalGPIO::isUsbConnected() const {