Show battery percentage on home screen (#167)

## Summary

* Show battery percentage on home screen
  * Moved battery rendering logic into shared ScreenComponents class
* As discussed
https://github.com/daveallie/crosspoint-reader/discussions/155
This commit is contained in:
Dave Allie
2025-12-30 22:41:47 +10:00
committed by GitHub
parent 52a0b5bbe9
commit e2cba5be83
4 changed files with 55 additions and 33 deletions

View File

@@ -6,6 +6,7 @@
#include "CrossPointState.h"
#include "MappedInputManager.h"
#include "ScreenComponents.h"
#include "fontIds.h"
void HomeActivity::taskTrampoline(void* param) {
@@ -315,5 +316,7 @@ void HomeActivity::render() const {
const auto labels = mappedInput.mapLabels("", "Confirm", "Up", "Down");
renderer.drawButtonHints(UI_10_FONT_ID, labels.btn1, labels.btn2, labels.btn3, labels.btn4);
ScreenComponents::drawBattery(renderer, 20, pageHeight - 30);
renderer.displayBuffer();
}