diff --git a/examples/companion_radio/ui-lvgl/NavMap.h b/examples/companion_radio/ui-lvgl/NavMap.h index cfbf76fb..ca6f5eff 100644 --- a/examples/companion_radio/ui-lvgl/NavMap.h +++ b/examples/companion_radio/ui-lvgl/NavMap.h @@ -494,13 +494,14 @@ void UITask::refreshNavBar() { if (!set) return; setTextFmt(_nav_title, "%s %s", navmap::s_tb.active() ? LV_SYMBOL_LOOP : person ? UI_SYMBOL_USERS : UI_SYMBOL_FLAG, name); - if (navmap::s_dial) lv_obj_add_flag(navmap::s_dial, LV_OBJ_FLAG_HIDDEN); // setDial() below shows it again if (!pos) { + if (navmap::s_dial) lv_obj_add_flag(navmap::s_dial, LV_OBJ_FLAG_HIDDEN); setText(_nav_info, "Position unknown (not shared recently)"); return; } int32_t lat, lon; if (!_core->course.currentLocation(lat, lon)) { + if (navmap::s_dial) lv_obj_add_flag(navmap::s_dial, LV_OBJ_FLAG_HIDDEN); setText(_nav_info, _core->gpsEnabled() || !_core->gpsAvailable() ? "Waiting for a GPS fix..." : "GPS is off - tap the crosshair to turn it on"); return; diff --git a/examples/companion_radio/ui-lvgl/StorageScreen.h b/examples/companion_radio/ui-lvgl/StorageScreen.h index 115976fe..ebc8f5ea 100644 --- a/examples/companion_radio/ui-lvgl/StorageScreen.h +++ b/examples/companion_radio/ui-lvgl/StorageScreen.h @@ -59,7 +59,8 @@ static void stopWalk() { // be reading off it (from a map left open, or a prefetch), then close the map // pack it reads from. static void releaseMapFiles() { - while (mapview::s_cache.busy()) { delay(5); mapview::pollTiles(); } + const uint32_t t0 = millis(); // a task stuck on a failing card mustn't hang the UI + while (mapview::s_cache.busy() && millis() - t0 < 3000) { delay(5); mapview::pollTiles(); } mapview::s_vpacks.closeOpen(); } diff --git a/examples/companion_radio/ui-new/NavView.h b/examples/companion_radio/ui-new/NavView.h index e729b630..bd55255d 100644 --- a/examples/companion_radio/ui-new/NavView.h +++ b/examples/companion_radio/ui-new/NavView.h @@ -71,7 +71,7 @@ inline void draw(DisplayDriver& d, int dial_r = 0, dial_x = 0, dial_y = 0; if (!wide) { const int top = d.listStart(); - const int tw = (dw > 9 * cw ? dw : 9 * cw) + 4; // the widest of the lines at the left + const int tw = (dw > 12 * cw ? dw : 12 * cw) + 4; // the widest of the lines at the left int r_side = (d.height() - top) / 2 - lh / 2 - 1; // room over the ring for the rose's N if (r_side > (d.width() - tw) / 2 - 1) r_side = (d.width() - tw) / 2 - 1; const int text_bottom = y + dist_h + dist_gap + lines * step; diff --git a/examples/companion_radio/ui-new/NearbyScreen.h b/examples/companion_radio/ui-new/NearbyScreen.h index 78a247ef..a8688907 100644 --- a/examples/companion_radio/ui-new/NearbyScreen.h +++ b/examples/companion_radio/ui-new/NearbyScreen.h @@ -1459,7 +1459,7 @@ public: snprintf(filt, sizeof(filt), "[%s]", typeName(e.type)); } const int name_right = lw - reserve - 2 - rw - display.getCharWidth(); - int mqr = display.drawTextEllipsized(tx, y, name_right - tx, filt, sel); + int mqr = display.drawTextEllipsized(tx, y, name_right > tx ? name_right - tx : 0, filt, sel); if (sel && mqr > 0) mq_delay = mqr; display.setColor(sel ? UIColor::window_bkg : UIColor::primary_txt); diff --git a/examples/companion_radio/ui-new/StatusScreen.h b/examples/companion_radio/ui-new/StatusScreen.h index 0ab8aa80..2cc853cb 100644 --- a/examples/companion_radio/ui-new/StatusScreen.h +++ b/examples/companion_radio/ui-new/StatusScreen.h @@ -175,7 +175,7 @@ private: const bool sleeping = sensors.isGpsDutySleeping(); if (f.place(lh + 5)) { // the fix as a chip, satellites used / in view const char* st = !on ? "OFF" : sleeping ? "SLEEP" : !fix ? "NO FIX" : (g && g->fix_mode == 2) ? "2D FIX" : "3D FIX"; - info::chip(d, 1, f.at, st, on && fix); + info::chip(d, 1, f.at, st, on && fix && !sleeping); #ifdef STATUS_HAS_SKY if (g) snprintf(a, sizeof(a), "%d/%d sats", skyview::usedCount(*g), g->count); else diff --git a/variants/simpson/SimpsonKeypad.cpp b/variants/simpson/SimpsonKeypad.cpp index f0b1e50e..5a4ffbc1 100644 --- a/variants/simpson/SimpsonKeypad.cpp +++ b/variants/simpson/SimpsonKeypad.cpp @@ -67,6 +67,12 @@ uint8_t SimpsonKeypad::poll() { _enter_long_sent = false; return SIMPSON_KEY_NONE; } + if (key != SIMPSON_KEY_ENTER && _last_key == SIMPSON_KEY_ENTER && !_enter_long_sent) { + // Another key arrived with Enter still down: the Enter counts now, the key on the next poll. + _last_key = SIMPSON_KEY_NONE; + _enter_pressed_at = 0; + return SIMPSON_KEY_ENTER; + } if (key == SIMPSON_KEY_ENTER && _last_key == SIMPSON_KEY_ENTER) { if (!_enter_long_sent && millis() - _enter_pressed_at >= SIMPSON_LONG_PRESS_MS) { _enter_long_sent = true;