diff --git a/releasenotes/RELEASE_NOTES_1.17.7-zephcore.md b/releasenotes/RELEASE_NOTES_1.17.7-zephcore.md index 62f0d00..0b24b30 100644 --- a/releasenotes/RELEASE_NOTES_1.17.7-zephcore.md +++ b/releasenotes/RELEASE_NOTES_1.17.7-zephcore.md @@ -167,6 +167,10 @@ matches the SoftDevice version of your bootloader. measurement the chip rejected the command that puts it back into its duty cycle. The next channel check recovered it and no packets were lost; the driver now returns the chip to standby first, and the command is accepted. +- **Joystick UI** (Wio Tracker L1 and other joystick boards): switching the GPS on from the GPS + screen showed "GPS disabled", and switching it off showed "GPS enabled". The GPS itself switched + correctly; the message now matches. The 3-tap buzzer and 4-tap GPS shortcuts now show a message + too, like the LED and advert shortcuts. - **New board**: Seeed LR2021 LoRa Plus EVK with a XIAO nRF54LM20A. Build it from source; there is no published firmware for it yet. - **Zephyr** updated to `74b7173e9c9`. One change in it would have been visible and is handled: diff --git a/zephcore/helpers/ui-joystick/joystick_ui_task.cpp b/zephcore/helpers/ui-joystick/joystick_ui_task.cpp index 2d98272..4b119bc 100644 --- a/zephcore/helpers/ui-joystick/joystick_ui_task.cpp +++ b/zephcore/helpers/ui-joystick/joystick_ui_task.cpp @@ -878,6 +878,7 @@ void JoystickUITask::loop() bool consumed = false; if (key == KEY_BUZZ_TOGGLE) { toggleBuzzer(); + showAlert(isBuzzerQuiet() ? "Buzzer off" : "Buzzer on", 1000); consumed = true; } else if (key == KEY_GPS_TOGGLE) { toggleGPS(); @@ -995,8 +996,15 @@ bool JoystickUITask::getGPSState() const void JoystickUITask::toggleGPS() { - if (!gps_is_available()) return; - mesh_gps_set_enabled(!gps_is_enabled()); + if (!gps_is_available()) { + showAlert("No GPS", 1000); + return; + } + /* The mesh loop applies the change later, so getGPSState() is still + * the old state here: the alert names the requested one. */ + bool enable = !gps_is_enabled(); + mesh_gps_set_enabled(enable); + showAlert(enable ? "GPS enabled" : "GPS disabled", 1000); } uint32_t JoystickUITask::getGpsDutySec() const diff --git a/zephcore/helpers/ui-joystick/joystick_ui_task.h b/zephcore/helpers/ui-joystick/joystick_ui_task.h index 226ea5a..7449702 100644 --- a/zephcore/helpers/ui-joystick/joystick_ui_task.h +++ b/zephcore/helpers/ui-joystick/joystick_ui_task.h @@ -114,6 +114,7 @@ public: void toggleBuzzer(); bool isGPSAvailable() const; bool getGPSState() const; + /* Requests the opposite state and shows the alert for it. */ void toggleGPS(); /* GPS duty-cycle interval, seconds (0 = always on). Steps through a fixed * preset ladder (step = +1/-1) rather than raw seconds, since the valid diff --git a/zephcore/helpers/ui-joystick/screens/system.cpp b/zephcore/helpers/ui-joystick/screens/system.cpp index c8edcec..f8c1c5a 100644 --- a/zephcore/helpers/ui-joystick/screens/system.cpp +++ b/zephcore/helpers/ui-joystick/screens/system.cpp @@ -874,7 +874,6 @@ bool GPSSettingsScreen::handleInput(char key) if (key == KEY_ENTER) { if (_selected == 0) { _task->toggleGPS(); - _task->showAlert(_task->getGPSState() ? "GPS enabled" : "GPS disabled", 1000); } else { _task->adjustGpsDuty(1); }