diff --git a/src/MappedInputManager.h b/src/MappedInputManager.h index bd594a25..67f094cc 100644 --- a/src/MappedInputManager.h +++ b/src/MappedInputManager.h @@ -15,6 +15,7 @@ class MappedInputManager { explicit MappedInputManager(HalGPIO& gpio) : gpio(gpio) {} + void update() const { gpio.update(); } bool wasPressed(Button button) const; bool wasReleased(Button button) const; bool isPressed(Button button) const; diff --git a/src/activities/network/CrossPointWebServerActivity.cpp b/src/activities/network/CrossPointWebServerActivity.cpp index 0338d825..fe568503 100644 --- a/src/activities/network/CrossPointWebServerActivity.cpp +++ b/src/activities/network/CrossPointWebServerActivity.cpp @@ -348,6 +348,9 @@ void CrossPointWebServerActivity::loop() { // Yield and check for exit button every 64 iterations if ((i & 0x3F) == 0x3F) { yield(); + // Force trigger an update of which buttons are being pressed so be have accurate state + // for back button checking + mappedInput.update(); // Check for exit button inside loop for responsiveness if (mappedInput.wasPressed(MappedInputManager::Button::Back)) { onGoBack();