optimized navigation

This commit is contained in:
2023-05-11 10:54:41 +02:00
parent 9b4017da9f
commit f2b63f1ce6
5 changed files with 23 additions and 10 deletions
+5 -3
View File
@@ -42,7 +42,7 @@ class Autopilot : public ManualControl {
*
* This function should be called every main loop. If self
* driving is activated the function call run Autopilot. If
* the delay is not reached the function returns immediately.
* the loopDelayMillis is not reached the function returns immediately.
*
* If self driving is not activated this functions calls the
* ManualControl loop additionally.
@@ -127,8 +127,10 @@ class Autopilot : public ManualControl {
bool selfDrivingAvailable = false;
bool updateDisplay = false;
uint16_t lastMillis = 0;
uint8_t delay = 40;
uint8_t loopDelayMillis = 40;
uint16_t displayUpdateDelayMillis = 1000;
uint32_t displayUpdateLastMillis = 0;
uint32_t loopLastMillis = 0;
};
#endif // AUTOPILOT_H