some menu improvements
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user