some menu improvements

This commit is contained in:
2023-04-26 15:56:34 +02:00
parent 00eed74f7d
commit 996390ccca
5 changed files with 9 additions and 10 deletions
@@ -64,10 +64,6 @@ void MenuAutopilot::printMenu() {
}
void MenuAutopilot::update() {
if (millis() - this->lastMillis < this->minDelay)
return;
this->lastMillis = millis();
if (!this->autopilot->shouldUpdate())
return;
@@ -41,16 +41,13 @@ class MenuAutopilot : public MenuDriveMode {
/**
* @brief can be called to update shown data
*/
void update();
void update() override;
private:
void init();
Autopilot* autopilot;
RouteInfo routeInfo;
uint32_t lastMillis = 0;
uint16_t minDelay = 1500;
};
#endif // MENU_AUTOPILOT_DRIVE_H
@@ -40,7 +40,7 @@ class MenuCaptureRoute : public MenuDriveMode {
/**
* @brief can be called to update shown data
*/
void update();
void update() override;
private:
void init();