mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-15 02:23:18 +00:00
UI fixes
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user