diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 5e3ff5507..767f5b54d 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -930,6 +930,11 @@ void Screen::setFrames(FrameFocus focus) // If no module requested focus, will show the first frame instead ui->switchToFrame(fsi.positions.focusedModule); break; + case FOCUS_CLOCK: + // Whichever frame was marked by MeshModule::requestFocus(), if any + // If no module requested focus, will show the first frame instead + ui->switchToFrame(fsi.positions.clock); + break; case FOCUS_PRESERVE: // No more adjustment — force stay on same index diff --git a/src/graphics/Screen.h b/src/graphics/Screen.h index 4a0de0d24..21f1a0322 100644 --- a/src/graphics/Screen.h +++ b/src/graphics/Screen.h @@ -24,6 +24,7 @@ class Screen FOCUS_FAULT, FOCUS_TEXTMESSAGE, FOCUS_MODULE, // Note: target module should call requestFocus(), otherwise no info about which module to focus + FOCUS_CLOCK, }; explicit Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY); @@ -208,6 +209,7 @@ class Screen : public concurrency::OSThread FOCUS_FAULT, FOCUS_TEXTMESSAGE, FOCUS_MODULE, // Note: target module should call requestFocus(), otherwise no info about which module to focus + FOCUS_CLOCK, }; // Regenerate the normal set of frames, focusing a specific frame if requested diff --git a/src/graphics/draw/MenuHandler.cpp b/src/graphics/draw/MenuHandler.cpp index e17dff092..b4d970206 100644 --- a/src/graphics/draw/MenuHandler.cpp +++ b/src/graphics/draw/MenuHandler.cpp @@ -104,10 +104,10 @@ void menuHandler::ClockFacePicker() menuHandler::menuQueue = menuHandler::clock_menu; } else if (selected == 1) { graphics::ClockRenderer::digitalWatchFace = true; - screen->setFrames(); + screen->setFrames(Screen::FOCUS_CLOCK); } else { graphics::ClockRenderer::digitalWatchFace = false; - screen->setFrames(); + screen->setFrames(Screen::FOCUS_CLOCK); } }); }