mirror of
https://github.com/crosspoint-reader/crosspoint-reader.git
synced 2026-04-29 10:26:52 -07:00
fixes battery reading on x3
This commit is contained in:
+2
-3
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user