mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* big refactor of the 'display' object. Now defined in variants/*/target modules.
This commit is contained in:
parent
bc4e0b52fa
commit
a73eb9823d
43 changed files with 210 additions and 58 deletions
|
|
@ -85,7 +85,7 @@ void UITask::newMsg(uint8_t path_len, const char* from_name, const char* text, i
|
|||
}
|
||||
}
|
||||
|
||||
void renderBatteryIndicator(DisplayDriver* _display, uint16_t batteryMilliVolts) {
|
||||
void UITask::renderBatteryIndicator(uint16_t batteryMilliVolts) {
|
||||
// Convert millivolts to percentage
|
||||
const int minMilliVolts = 3000; // Minimum voltage (e.g., 3.0V)
|
||||
const int maxMilliVolts = 4200; // Maximum voltage (e.g., 4.2V)
|
||||
|
|
@ -155,7 +155,7 @@ void UITask::renderCurrScreen() {
|
|||
_display->print(_node_prefs->node_name);
|
||||
|
||||
// battery voltage
|
||||
renderBatteryIndicator(_display, _board->getBattMilliVolts());
|
||||
renderBatteryIndicator(_board->getBattMilliVolts());
|
||||
|
||||
// freq / sf
|
||||
_display->setCursor(0, 20);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue