Skip to content

Commit

Permalink
Bugfix: Display timeout works only when a draw operation happens
Browse files Browse the repository at this point in the history
Fixes #287

- Added timer restart in the process method.
- Removed redundant timer restart from the draw method.
- Ensures display timeout functions correctly during user interactions.
  • Loading branch information
forntoh committed Jan 5, 2025
1 parent 8fe19ef commit 486eca3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions src/LcdMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ bool LcdMenu::process(const unsigned char c) {
if (!enabled) {
return false;
}
renderer.restartTimer();
return screen->process(this, c);
};

Expand Down
1 change: 0 additions & 1 deletion src/MenuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ void MenuScreen::setCursor(MenuRenderer* renderer, uint8_t position) {
}

void MenuScreen::draw(MenuRenderer* renderer) {
renderer->restartTimer();
for (uint8_t i = 0; i < renderer->maxRows; i++) {
MenuItem* item = this->items[view + i];
if (item == nullptr) {
Expand Down

0 comments on commit 486eca3

Please sign in to comment.