Re-applies changes that were accidentally discarded during a prior dry-run cherry-pick reset (git checkout -- .). - PR #1005: Use HalPowerManager for battery percentage (uint16_t return type, remove Battery.h, update theme files) - PR #1010: Fix dangling pointer in onGoToReader() - PR #1003: Render image placeholders while waiting for decode (adds isCached, renderPlaceholder, renderTextOnly, countUncachedImages, renderImagePlaceholders) Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -78,7 +78,7 @@ void HalPowerManager::startDeepSleep(HalGPIO& gpio) const {
|
||||
esp_deep_sleep_start();
|
||||
}
|
||||
|
||||
int HalPowerManager::getBatteryPercentage() const {
|
||||
uint16_t HalPowerManager::getBatteryPercentage() const {
|
||||
static const BatteryMonitor battery = BatteryMonitor(BAT_GPIO0);
|
||||
return battery.readPercentage();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class HalPowerManager {
|
||||
void startDeepSleep(HalGPIO& gpio) const;
|
||||
|
||||
// Get battery percentage (range 0-100)
|
||||
int getBatteryPercentage() const;
|
||||
uint16_t getBatteryPercentage() const;
|
||||
|
||||
// RAII lock to prevent low-power mode during critical work (e.g. rendering)
|
||||
class Lock {
|
||||
|
||||
Reference in New Issue
Block a user