mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-27 23:38:12 +00:00
feat: add runtime display rotation setting for e-ink builds
Adds Settings > Display > Rotation (0°/90°/180°/270°) that persists to NodePrefs and is applied on startup. Falls back to compile-time DISPLAY_ROTATION when the field is missing from an older prefs file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -150,6 +150,12 @@ uint16_t GxEPDDisplay::getTextWidth(const char* str) {
|
||||
return w;
|
||||
}
|
||||
|
||||
void GxEPDDisplay::setDisplayRotation(uint8_t rot) {
|
||||
display.setRotation(rot & 3);
|
||||
setDimensions(display.width(), display.height());
|
||||
last_display_crc_value = -1; // force redraw on next endFrame
|
||||
}
|
||||
|
||||
void GxEPDDisplay::endFrame() {
|
||||
uint32_t crc = display_crc.finalize();
|
||||
if (crc != last_display_crc_value) {
|
||||
|
||||
Reference in New Issue
Block a user