cleaning
refactore all components now have a base class compnent for loop functions
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "route.h"
|
||||
#include "NTRIPClient.h"
|
||||
#include "calibrateCompass.h"
|
||||
#include "component.h"
|
||||
|
||||
/**
|
||||
* @brief The minimal distance between Points
|
||||
@@ -54,7 +55,7 @@ struct CourseCorrection {
|
||||
* be drive and the distance to the next checkpoint.
|
||||
*
|
||||
*/
|
||||
class Navigation {
|
||||
class Navigation : public Component {
|
||||
public:
|
||||
enum Status {
|
||||
InsufficientAccuracy,
|
||||
@@ -103,13 +104,6 @@ class Navigation {
|
||||
*/
|
||||
void initNtrip(String host, uint16_t port, String mountPoint, String user, String password);
|
||||
|
||||
/**
|
||||
* @brief Decodes new GPS information
|
||||
*
|
||||
* Should be called ever main loop.
|
||||
*/
|
||||
void loop();
|
||||
|
||||
/**
|
||||
* @brief creates a new empty route
|
||||
*
|
||||
@@ -218,6 +212,8 @@ class Navigation {
|
||||
static int16_t fixDegree(int16_t degree);
|
||||
|
||||
private:
|
||||
void run() override;
|
||||
void runAsChild() override;
|
||||
void updateCurrentLocation();
|
||||
void updateMagneticDeclination();
|
||||
void init(Route* route);
|
||||
|
||||
Reference in New Issue
Block a user