2025-12-22 17:16:46 +11:00
|
|
|
#include "OtaUpdateActivity.h"
|
|
|
|
|
|
|
|
|
|
#include <GfxRenderer.h>
|
|
|
|
|
#include <WiFi.h>
|
|
|
|
|
|
2025-12-30 15:09:30 +10:00
|
|
|
#include "MappedInputManager.h"
|
2025-12-22 17:16:46 +11:00
|
|
|
#include "activities/network/WifiSelectionActivity.h"
|
feat: UI themes, Lyra (#528)
## Summary
### What is the goal of this PR?
- Visual UI overhaul
- UI theme selection
### What changes are included?
- Added a setting "UI Theme": Classic, Lyra
- The classic theme is the current Crosspoint theme
- The Lyra theme implements these mockups:
https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2003-7596&t=4CSOZqf0n9uQMxDt-0
by Discord users yagofarias, ruby and gan_shu
- New functions in GFXRenderer to render rounded rectangles, greyscale
fills (using dithering) and thick lines
- Basic UI components are factored into BaseTheme methods which can be
overridden by each additional theme. Methods that are not overridden
will fallback to BaseTheme behavior. This means any new
features/components in CrossPoint only need to be developed for the
"Classic" BaseTheme.
- Additional themes can easily be developed by the community using this
foundation



## Additional Context
- Only the Home, Library and main Settings screens have been implemented
so far, this will be extended to the transfer screens and chapter
selection screen later on, but we need to get the ball rolling somehow
:)
- Loading extra covers on the home screen in the Lyra theme takes a
little more time (about 2 seconds), I added a loading bar popup (reusing
the Indexing progress bar from the reader view, factored into a neat UI
component) but the popup adds ~400ms to the loading time.
- ~~Home screen thumbnails will need to be generated separately for each
theme, because they are displayed in different sizes. Because we're
using dithering, displaying a thumb with the wrong size causes the
picture to look janky or dark as it does on the screenshots above. No
worries this will be fixed in a future PR.~~ Thumbs are now generated
with a size parameter
- UI Icons will need to be implemented in a future PR.
---
### AI Usage
While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? _**PARTIALLY**_
This is not a vibe coded PR. Copilot was used for autocompletion to save
time but I reviewed, understood and edited all generated code.
---------
Co-authored-by: Dave Allie <dave@daveallie.com>
2026-02-05 17:50:11 +07:00
|
|
|
#include "components/UITheme.h"
|
Aleo, Noto Sans, Open Dyslexic fonts (#163)
## Summary
* Swap out Bookerly font due to licensing issues, replace default font
with Aleo
* I did a bunch of searching around for a nice replacement font, and
this trumped several other like Literata, Merriwether, Vollkorn, etc
* Add Noto Sans, and Open Dyslexic as font options
* They can be selected in the settings screen
* Add font size options (Small, Medium, Large, Extra Large)
* Adjustable in settings
* Swap out uses of reader font in headings and replaced with slightly
larger Ubuntu font
* Replaced PixelArial14 font as it was difficult to track down, replace
with Space Grotesk
* Remove auto formatting on generated font files
* Massively speeds up formatting step now that there is a lot more CPP
font source
* Include fonts with their licenses in the repo
## Additional Context
Line compression setting will follow
| Font | Small | Medium | Large | X Large |
| --- | --- | --- | --- | --- |
| Aleo |

|

|

|

|
| Noto Sans |

|

|

|

|
| Open Dyslexic |

|

|

|

|
2025-12-30 18:21:47 +10:00
|
|
|
#include "fontIds.h"
|
2025-12-22 17:16:46 +11:00
|
|
|
#include "network/OtaUpdater.h"
|
|
|
|
|
|
|
|
|
|
void OtaUpdateActivity::taskTrampoline(void* param) {
|
|
|
|
|
auto* self = static_cast<OtaUpdateActivity*>(param);
|
|
|
|
|
self->displayTaskLoop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OtaUpdateActivity::onWifiSelectionComplete(const bool success) {
|
|
|
|
|
exitActivity();
|
|
|
|
|
|
|
|
|
|
if (!success) {
|
2026-02-13 12:16:39 +01:00
|
|
|
LOG_ERR("OTA", "WiFi connection failed, exiting");
|
2025-12-22 17:16:46 +11:00
|
|
|
goBack();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-13 12:16:39 +01:00
|
|
|
LOG_DBG("OTA", "WiFi connected, checking for update");
|
2025-12-22 17:16:46 +11:00
|
|
|
|
|
|
|
|
xSemaphoreTake(renderingMutex, portMAX_DELAY);
|
|
|
|
|
state = CHECKING_FOR_UPDATE;
|
|
|
|
|
xSemaphoreGive(renderingMutex);
|
|
|
|
|
updateRequired = true;
|
|
|
|
|
vTaskDelay(10 / portTICK_PERIOD_MS);
|
|
|
|
|
const auto res = updater.checkForUpdate();
|
|
|
|
|
if (res != OtaUpdater::OK) {
|
2026-02-13 12:16:39 +01:00
|
|
|
LOG_DBG("OTA", "Update check failed: %d", res);
|
2025-12-22 17:16:46 +11:00
|
|
|
xSemaphoreTake(renderingMutex, portMAX_DELAY);
|
|
|
|
|
state = FAILED;
|
|
|
|
|
xSemaphoreGive(renderingMutex);
|
|
|
|
|
updateRequired = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!updater.isUpdateNewer()) {
|
2026-02-13 12:16:39 +01:00
|
|
|
LOG_DBG("OTA", "No new update available");
|
2025-12-22 17:16:46 +11:00
|
|
|
xSemaphoreTake(renderingMutex, portMAX_DELAY);
|
|
|
|
|
state = NO_UPDATE;
|
|
|
|
|
xSemaphoreGive(renderingMutex);
|
|
|
|
|
updateRequired = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
xSemaphoreTake(renderingMutex, portMAX_DELAY);
|
|
|
|
|
state = WAITING_CONFIRMATION;
|
|
|
|
|
xSemaphoreGive(renderingMutex);
|
|
|
|
|
updateRequired = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OtaUpdateActivity::onEnter() {
|
|
|
|
|
ActivityWithSubactivity::onEnter();
|
|
|
|
|
|
|
|
|
|
renderingMutex = xSemaphoreCreateMutex();
|
|
|
|
|
|
|
|
|
|
xTaskCreate(&OtaUpdateActivity::taskTrampoline, "OtaUpdateActivityTask",
|
|
|
|
|
2048, // Stack size
|
|
|
|
|
this, // Parameters
|
|
|
|
|
1, // Priority
|
|
|
|
|
&displayTaskHandle // Task handle
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// Turn on WiFi immediately
|
2026-02-13 12:16:39 +01:00
|
|
|
LOG_DBG("OTA", "Turning on WiFi...");
|
2025-12-22 17:16:46 +11:00
|
|
|
WiFi.mode(WIFI_STA);
|
|
|
|
|
|
|
|
|
|
// Launch WiFi selection subactivity
|
2026-02-13 12:16:39 +01:00
|
|
|
LOG_DBG("OTA", "Launching WifiSelectionActivity...");
|
2025-12-28 21:59:14 -06:00
|
|
|
enterNewActivity(new WifiSelectionActivity(renderer, mappedInput,
|
2025-12-22 17:16:46 +11:00
|
|
|
[this](const bool connected) { onWifiSelectionComplete(connected); }));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OtaUpdateActivity::onExit() {
|
|
|
|
|
ActivityWithSubactivity::onExit();
|
|
|
|
|
|
|
|
|
|
// Turn off wifi
|
|
|
|
|
WiFi.disconnect(false); // false = don't erase credentials, send disconnect frame
|
|
|
|
|
delay(100); // Allow disconnect frame to be sent
|
|
|
|
|
WiFi.mode(WIFI_OFF);
|
|
|
|
|
delay(100); // Allow WiFi hardware to fully power down
|
|
|
|
|
|
|
|
|
|
// Wait until not rendering to delete task to avoid killing mid-instruction to EPD
|
|
|
|
|
xSemaphoreTake(renderingMutex, portMAX_DELAY);
|
|
|
|
|
if (displayTaskHandle) {
|
|
|
|
|
vTaskDelete(displayTaskHandle);
|
|
|
|
|
displayTaskHandle = nullptr;
|
|
|
|
|
}
|
|
|
|
|
vSemaphoreDelete(renderingMutex);
|
|
|
|
|
renderingMutex = nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OtaUpdateActivity::displayTaskLoop() {
|
|
|
|
|
while (true) {
|
2026-01-27 14:30:27 +00:00
|
|
|
if (updateRequired || updater.getRender()) {
|
2025-12-22 17:16:46 +11:00
|
|
|
updateRequired = false;
|
|
|
|
|
xSemaphoreTake(renderingMutex, portMAX_DELAY);
|
|
|
|
|
render();
|
|
|
|
|
xSemaphoreGive(renderingMutex);
|
|
|
|
|
}
|
|
|
|
|
vTaskDelay(10 / portTICK_PERIOD_MS);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OtaUpdateActivity::render() {
|
|
|
|
|
if (subActivity) {
|
|
|
|
|
// Subactivity handles its own rendering
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
float updaterProgress = 0;
|
|
|
|
|
if (state == UPDATE_IN_PROGRESS) {
|
2026-02-13 12:16:39 +01:00
|
|
|
LOG_DBG("OTA", "Update progress: %d / %d", updater.getProcessedSize(), updater.getTotalSize());
|
2026-01-27 14:30:27 +00:00
|
|
|
updaterProgress = static_cast<float>(updater.getProcessedSize()) / static_cast<float>(updater.getTotalSize());
|
2025-12-22 17:16:46 +11:00
|
|
|
// Only update every 2% at the most
|
|
|
|
|
if (static_cast<int>(updaterProgress * 50) == lastUpdaterPercentage / 2) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
lastUpdaterPercentage = static_cast<int>(updaterProgress * 100);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const auto pageWidth = renderer.getScreenWidth();
|
|
|
|
|
|
|
|
|
|
renderer.clearScreen();
|
2025-12-31 12:11:36 +10:00
|
|
|
renderer.drawCenteredText(UI_12_FONT_ID, 15, "Update", true, EpdFontFamily::BOLD);
|
2025-12-22 17:16:46 +11:00
|
|
|
|
|
|
|
|
if (state == CHECKING_FOR_UPDATE) {
|
2025-12-31 12:11:36 +10:00
|
|
|
renderer.drawCenteredText(UI_10_FONT_ID, 300, "Checking for update...", true, EpdFontFamily::BOLD);
|
2025-12-22 17:16:46 +11:00
|
|
|
renderer.displayBuffer();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (state == WAITING_CONFIRMATION) {
|
2025-12-31 12:11:36 +10:00
|
|
|
renderer.drawCenteredText(UI_10_FONT_ID, 200, "New update available!", true, EpdFontFamily::BOLD);
|
Aleo, Noto Sans, Open Dyslexic fonts (#163)
## Summary
* Swap out Bookerly font due to licensing issues, replace default font
with Aleo
* I did a bunch of searching around for a nice replacement font, and
this trumped several other like Literata, Merriwether, Vollkorn, etc
* Add Noto Sans, and Open Dyslexic as font options
* They can be selected in the settings screen
* Add font size options (Small, Medium, Large, Extra Large)
* Adjustable in settings
* Swap out uses of reader font in headings and replaced with slightly
larger Ubuntu font
* Replaced PixelArial14 font as it was difficult to track down, replace
with Space Grotesk
* Remove auto formatting on generated font files
* Massively speeds up formatting step now that there is a lot more CPP
font source
* Include fonts with their licenses in the repo
## Additional Context
Line compression setting will follow
| Font | Small | Medium | Large | X Large |
| --- | --- | --- | --- | --- |
| Aleo |

|

|

|

|
| Noto Sans |

|

|

|

|
| Open Dyslexic |

|

|

|

|
2025-12-30 18:21:47 +10:00
|
|
|
renderer.drawText(UI_10_FONT_ID, 20, 250, "Current Version: " CROSSPOINT_VERSION);
|
|
|
|
|
renderer.drawText(UI_10_FONT_ID, 20, 270, ("New Version: " + updater.getLatestVersion()).c_str());
|
2025-12-22 17:16:46 +11:00
|
|
|
|
2025-12-30 16:15:40 -06:00
|
|
|
const auto labels = mappedInput.mapLabels("Cancel", "Update", "", "");
|
feat: UI themes, Lyra (#528)
## Summary
### What is the goal of this PR?
- Visual UI overhaul
- UI theme selection
### What changes are included?
- Added a setting "UI Theme": Classic, Lyra
- The classic theme is the current Crosspoint theme
- The Lyra theme implements these mockups:
https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2003-7596&t=4CSOZqf0n9uQMxDt-0
by Discord users yagofarias, ruby and gan_shu
- New functions in GFXRenderer to render rounded rectangles, greyscale
fills (using dithering) and thick lines
- Basic UI components are factored into BaseTheme methods which can be
overridden by each additional theme. Methods that are not overridden
will fallback to BaseTheme behavior. This means any new
features/components in CrossPoint only need to be developed for the
"Classic" BaseTheme.
- Additional themes can easily be developed by the community using this
foundation



## Additional Context
- Only the Home, Library and main Settings screens have been implemented
so far, this will be extended to the transfer screens and chapter
selection screen later on, but we need to get the ball rolling somehow
:)
- Loading extra covers on the home screen in the Lyra theme takes a
little more time (about 2 seconds), I added a loading bar popup (reusing
the Indexing progress bar from the reader view, factored into a neat UI
component) but the popup adds ~400ms to the loading time.
- ~~Home screen thumbnails will need to be generated separately for each
theme, because they are displayed in different sizes. Because we're
using dithering, displaying a thumb with the wrong size causes the
picture to look janky or dark as it does on the screenshots above. No
worries this will be fixed in a future PR.~~ Thumbs are now generated
with a size parameter
- UI Icons will need to be implemented in a future PR.
---
### AI Usage
While CrossPoint doesn't have restrictions on AI tools in contributing,
please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? _**PARTIALLY**_
This is not a vibe coded PR. Copilot was used for autocompletion to save
time but I reviewed, understood and edited all generated code.
---------
Co-authored-by: Dave Allie <dave@daveallie.com>
2026-02-05 17:50:11 +07:00
|
|
|
GUI.drawButtonHints(renderer, labels.btn1, labels.btn2, labels.btn3, labels.btn4);
|
2025-12-22 17:16:46 +11:00
|
|
|
renderer.displayBuffer();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (state == UPDATE_IN_PROGRESS) {
|
2025-12-31 12:11:36 +10:00
|
|
|
renderer.drawCenteredText(UI_10_FONT_ID, 310, "Updating...", true, EpdFontFamily::BOLD);
|
2025-12-22 17:16:46 +11:00
|
|
|
renderer.drawRect(20, 350, pageWidth - 40, 50);
|
|
|
|
|
renderer.fillRect(24, 354, static_cast<int>(updaterProgress * static_cast<float>(pageWidth - 44)), 42);
|
Aleo, Noto Sans, Open Dyslexic fonts (#163)
## Summary
* Swap out Bookerly font due to licensing issues, replace default font
with Aleo
* I did a bunch of searching around for a nice replacement font, and
this trumped several other like Literata, Merriwether, Vollkorn, etc
* Add Noto Sans, and Open Dyslexic as font options
* They can be selected in the settings screen
* Add font size options (Small, Medium, Large, Extra Large)
* Adjustable in settings
* Swap out uses of reader font in headings and replaced with slightly
larger Ubuntu font
* Replaced PixelArial14 font as it was difficult to track down, replace
with Space Grotesk
* Remove auto formatting on generated font files
* Massively speeds up formatting step now that there is a lot more CPP
font source
* Include fonts with their licenses in the repo
## Additional Context
Line compression setting will follow
| Font | Small | Medium | Large | X Large |
| --- | --- | --- | --- | --- |
| Aleo |

|

|

|

|
| Noto Sans |

|

|

|

|
| Open Dyslexic |

|

|

|

|
2025-12-30 18:21:47 +10:00
|
|
|
renderer.drawCenteredText(UI_10_FONT_ID, 420,
|
|
|
|
|
(std::to_string(static_cast<int>(updaterProgress * 100)) + "%").c_str());
|
2025-12-22 17:16:46 +11:00
|
|
|
renderer.drawCenteredText(
|
Aleo, Noto Sans, Open Dyslexic fonts (#163)
## Summary
* Swap out Bookerly font due to licensing issues, replace default font
with Aleo
* I did a bunch of searching around for a nice replacement font, and
this trumped several other like Literata, Merriwether, Vollkorn, etc
* Add Noto Sans, and Open Dyslexic as font options
* They can be selected in the settings screen
* Add font size options (Small, Medium, Large, Extra Large)
* Adjustable in settings
* Swap out uses of reader font in headings and replaced with slightly
larger Ubuntu font
* Replaced PixelArial14 font as it was difficult to track down, replace
with Space Grotesk
* Remove auto formatting on generated font files
* Massively speeds up formatting step now that there is a lot more CPP
font source
* Include fonts with their licenses in the repo
## Additional Context
Line compression setting will follow
| Font | Small | Medium | Large | X Large |
| --- | --- | --- | --- | --- |
| Aleo |

|

|

|

|
| Noto Sans |

|

|

|

|
| Open Dyslexic |

|

|

|

|
2025-12-30 18:21:47 +10:00
|
|
|
UI_10_FONT_ID, 440,
|
2026-01-27 14:30:27 +00:00
|
|
|
(std::to_string(updater.getProcessedSize()) + " / " + std::to_string(updater.getTotalSize())).c_str());
|
2025-12-22 17:16:46 +11:00
|
|
|
renderer.displayBuffer();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (state == NO_UPDATE) {
|
2025-12-31 12:11:36 +10:00
|
|
|
renderer.drawCenteredText(UI_10_FONT_ID, 300, "No update available", true, EpdFontFamily::BOLD);
|
2025-12-22 17:16:46 +11:00
|
|
|
renderer.displayBuffer();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (state == FAILED) {
|
2025-12-31 12:11:36 +10:00
|
|
|
renderer.drawCenteredText(UI_10_FONT_ID, 300, "Update failed", true, EpdFontFamily::BOLD);
|
2025-12-22 17:16:46 +11:00
|
|
|
renderer.displayBuffer();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (state == FINISHED) {
|
2025-12-31 12:11:36 +10:00
|
|
|
renderer.drawCenteredText(UI_10_FONT_ID, 300, "Update complete", true, EpdFontFamily::BOLD);
|
Aleo, Noto Sans, Open Dyslexic fonts (#163)
## Summary
* Swap out Bookerly font due to licensing issues, replace default font
with Aleo
* I did a bunch of searching around for a nice replacement font, and
this trumped several other like Literata, Merriwether, Vollkorn, etc
* Add Noto Sans, and Open Dyslexic as font options
* They can be selected in the settings screen
* Add font size options (Small, Medium, Large, Extra Large)
* Adjustable in settings
* Swap out uses of reader font in headings and replaced with slightly
larger Ubuntu font
* Replaced PixelArial14 font as it was difficult to track down, replace
with Space Grotesk
* Remove auto formatting on generated font files
* Massively speeds up formatting step now that there is a lot more CPP
font source
* Include fonts with their licenses in the repo
## Additional Context
Line compression setting will follow
| Font | Small | Medium | Large | X Large |
| --- | --- | --- | --- | --- |
| Aleo |

|

|

|

|
| Noto Sans |

|

|

|

|
| Open Dyslexic |

|

|

|

|
2025-12-30 18:21:47 +10:00
|
|
|
renderer.drawCenteredText(UI_10_FONT_ID, 350, "Press and hold power button to turn back on");
|
2025-12-22 17:16:46 +11:00
|
|
|
renderer.displayBuffer();
|
|
|
|
|
state = SHUTTING_DOWN;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void OtaUpdateActivity::loop() {
|
|
|
|
|
if (subActivity) {
|
|
|
|
|
subActivity->loop();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (state == WAITING_CONFIRMATION) {
|
2025-12-28 21:59:14 -06:00
|
|
|
if (mappedInput.wasPressed(MappedInputManager::Button::Confirm)) {
|
2026-02-13 12:16:39 +01:00
|
|
|
LOG_DBG("OTA", "New update available, starting download...");
|
2025-12-22 17:16:46 +11:00
|
|
|
xSemaphoreTake(renderingMutex, portMAX_DELAY);
|
|
|
|
|
state = UPDATE_IN_PROGRESS;
|
|
|
|
|
xSemaphoreGive(renderingMutex);
|
|
|
|
|
updateRequired = true;
|
|
|
|
|
vTaskDelay(10 / portTICK_PERIOD_MS);
|
2026-01-27 14:30:27 +00:00
|
|
|
const auto res = updater.installUpdate();
|
2025-12-22 17:16:46 +11:00
|
|
|
|
|
|
|
|
if (res != OtaUpdater::OK) {
|
2026-02-13 12:16:39 +01:00
|
|
|
LOG_DBG("OTA", "Update failed: %d", res);
|
2025-12-22 17:16:46 +11:00
|
|
|
xSemaphoreTake(renderingMutex, portMAX_DELAY);
|
|
|
|
|
state = FAILED;
|
|
|
|
|
xSemaphoreGive(renderingMutex);
|
|
|
|
|
updateRequired = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
xSemaphoreTake(renderingMutex, portMAX_DELAY);
|
|
|
|
|
state = FINISHED;
|
|
|
|
|
xSemaphoreGive(renderingMutex);
|
|
|
|
|
updateRequired = true;
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-28 21:59:14 -06:00
|
|
|
if (mappedInput.wasPressed(MappedInputManager::Button::Back)) {
|
2025-12-22 17:16:46 +11:00
|
|
|
goBack();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (state == FAILED) {
|
2025-12-28 21:59:14 -06:00
|
|
|
if (mappedInput.wasPressed(MappedInputManager::Button::Back)) {
|
2025-12-22 17:16:46 +11:00
|
|
|
goBack();
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (state == NO_UPDATE) {
|
2025-12-28 21:59:14 -06:00
|
|
|
if (mappedInput.wasPressed(MappedInputManager::Button::Back)) {
|
2025-12-22 17:16:46 +11:00
|
|
|
goBack();
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (state == SHUTTING_DOWN) {
|
|
|
|
|
ESP.restart();
|
|
|
|
|
}
|
|
|
|
|
}
|