- remove NtripReconnect from Autopilot and CaptureRoute
- shiftet moveControl States in the class namespace - added auto reconeect to NtripClient - a lot of refactor
This commit is contained in:
@@ -27,12 +27,6 @@
|
||||
*/
|
||||
class CaptureRoute : public ManualControl {
|
||||
public:
|
||||
enum NtripState {
|
||||
NoNtrip,
|
||||
Waiting,
|
||||
Enabled
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Construct a new Capture Route object
|
||||
*
|
||||
@@ -76,6 +70,7 @@ class CaptureRoute : public ManualControl {
|
||||
* @return RouteInfo
|
||||
*/
|
||||
RouteInfo getRouteInfo() const { return this->routeInfo; }
|
||||
Navigation::Status getLastStatus() const { return this->status; }
|
||||
|
||||
/**
|
||||
* @brief Get the distance to the last saved oint
|
||||
@@ -92,19 +87,13 @@ class CaptureRoute : public ManualControl {
|
||||
*/
|
||||
bool shouldUpdate();
|
||||
private:
|
||||
void checkNtrip();
|
||||
|
||||
Navigation* navigation;
|
||||
RouteInfo routeInfo;
|
||||
Point lastSavedPoint;
|
||||
NtripState state = NtripState::Waiting;
|
||||
Navigation::Status status = Navigation::Status::Complete;
|
||||
|
||||
uint8_t ntripReconnectAttemps = 0;
|
||||
uint8_t ntripReconnectMaxAttemps = 10;
|
||||
uint16_t reconnectNtripDelayMillis = 1000;
|
||||
uint16_t delay = 200;
|
||||
uint32_t lastMillis = 0;
|
||||
uint32_t reconnectNtripLastMillis = 0;
|
||||
|
||||
bool updateDisplay = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user