mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-03 12:20:43 +00:00
Clock picker fixes
This commit is contained in:
parent
6088ab49eb
commit
a33672db4f
@ -861,10 +861,9 @@ void Screen::setFrames(FrameFocus focus)
|
||||
indicatorIcons.push_back(icon_memory);
|
||||
}
|
||||
#if !defined(DISPLAY_CLOCK_FRAME)
|
||||
LOG_INFO("Current state of graphics::ClockRenderer::digitalWatchFace is %s", graphics::ClockRenderer::digitalWatchFace);
|
||||
fsi.positions.clock = numframes;
|
||||
normalFrames[numframes++] = graphics::ClockRenderer::digitalWatchFace ? graphics::ClockRenderer::drawDigitalClockFrame
|
||||
: &graphics::ClockRenderer::drawAnalogClockFrame;
|
||||
: graphics::ClockRenderer::drawAnalogClockFrame;
|
||||
indicatorIcons.push_back(digital_icon_clock);
|
||||
#endif
|
||||
|
||||
|
@ -21,6 +21,7 @@ namespace graphics
|
||||
|
||||
namespace ClockRenderer
|
||||
{
|
||||
bool digitalWatchFace = true;
|
||||
|
||||
void drawSegmentedDisplayColon(OLEDDisplay *display, int x, int y, float scale)
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ class Screen;
|
||||
namespace ClockRenderer
|
||||
{
|
||||
// Whether we are showing the digital watch face or the analog one
|
||||
static bool digitalWatchFace = true;
|
||||
extern bool digitalWatchFace;
|
||||
|
||||
// Clock frame functions
|
||||
void drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||
|
@ -105,7 +105,6 @@ void menuHandler::ClockFacePicker()
|
||||
graphics::ClockRenderer::digitalWatchFace = false;
|
||||
screen->setFrames(); // Causes the screens to redraw, but doesn't change the face
|
||||
}
|
||||
service->reloadConfig(SEGMENT_CONFIG);
|
||||
});
|
||||
}
|
||||
|
||||
@ -175,7 +174,7 @@ void menuHandler::TZPicker()
|
||||
void menuHandler::clockMenu()
|
||||
{
|
||||
static const char *optionsArray[] = {"Back", "Clock Face", "12-hour", "Timezone"};
|
||||
screen->showOverlayBanner("Clock Menu", 30000, optionsArray, 3, [](int selected) -> void {
|
||||
screen->showOverlayBanner("Clock Menu", 30000, optionsArray, 4, [](int selected) -> void {
|
||||
if (selected == 1) {
|
||||
menuHandler::menuQueue = menuHandler::clock_face_picker;
|
||||
screen->setInterval(0);
|
||||
@ -198,16 +197,16 @@ void menuHandler::messageResponseMenu()
|
||||
static const char **optionsArrayPtr;
|
||||
int options;
|
||||
if (kb_found) {
|
||||
const char *optionsArray[] = {"Back", "Dismiss", "Reply via Preset", "Reply via Freetext"};
|
||||
static const char *optionsArray[] = {"Back", "Dismiss", "Reply via Preset", "Reply via Freetext"};
|
||||
optionsArrayPtr = optionsArray;
|
||||
options = 4;
|
||||
} else {
|
||||
const char *optionsArray[] = {"Back", "Dismiss", "Reply via Preset"};
|
||||
static const char *optionsArray[] = {"Back", "Dismiss", "Reply via Preset"};
|
||||
optionsArrayPtr = optionsArray;
|
||||
options = 3;
|
||||
}
|
||||
#ifdef HAS_I2S
|
||||
const char *optionsArray[] = {"Back", "Dismiss", "Reply via Preset", "Reply via Freetext", "Read Aloud"};
|
||||
static const char *optionsArray[] = {"Back", "Dismiss", "Reply via Preset", "Reply via Freetext", "Read Aloud"};
|
||||
optionsArrayPtr = optionsArray;
|
||||
options = 5;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user