bugFix testModeMenu implement duration print

This commit is contained in:
2023-01-18 10:32:49 +01:00
parent fef40ab4b4
commit 801a474b49
6 changed files with 109 additions and 55 deletions
+21 -2
View File
@@ -11,12 +11,24 @@
#ifndef TEST_MODE_H
#define TEST_MODE_H
#include <iostream>
#include "moveControl.h"
#include "navigation.h"
#include "driveModi/driveModi.h"
class TestMode : public DriveModi {
public:
TestMode(MoveControl *MoveControl);
enum Maneuver {
None,
LeftEngine,
RightEngine,
BothEngine,
Turn,
Drive
};
TestMode(MoveControl *moveControl, Navigation* navigation);
~TestMode();
void loop() override;
@@ -34,11 +46,16 @@ class TestMode : public DriveModi {
uint8_t getRemainingManeuverTime();
bool getBusy() const { return this->busy; }
Maneuver getManeuver() const { return this->maneuver; }
private:
bool engineInit(int16_t powerPercentage, int16_t seconds);
MoveControl *moveControl;
Navigation* navigation;
Maneuver maneuver = Maneuver::None;
int16_t maneuverValueOne = 0;
int16_t maneuverValueTwo = 0;
double speed = 0;
double rotationSpeed = 0;
@@ -47,11 +64,13 @@ class TestMode : public DriveModi {
bool abort = false;
uint8_t delay = 10;
uint16_t azimuth;
int16_t degree;
uint32_t maneuverTime = 0;
uint32_t lastMillis = 0;
uint32_t actionStart = 0;
};
#endif // TEST_MODE_H