refactore
all components now have a base class compnent for loop functions
This commit is contained in:
2023-08-18 10:47:35 +02:00
parent 25d37e3970
commit 11d21e2e89
35 changed files with 303 additions and 511 deletions
+4 -12
View File
@@ -22,6 +22,7 @@
#include "networkConfig.h"
#include "debugTimes.h"
#include "controlPadInput.h"
#include "component.h"
// All Drive Modi
#include "driveModi/Modi/ManualControl/manualControl.h"
@@ -43,7 +44,7 @@ enum class Modi {
TestMode
};
class DriveManager {
class DriveManager : public Component {
public:
/**
* @brief Construct a new Drive Manager object
@@ -60,17 +61,6 @@ class DriveManager {
*/
~DriveManager();
/**
* @brief Calls all loop functions
*
* Calls the MoveControl, Navigation loop function. The
* loop function from the DriveMode is called if it is set.
*
* This function should be called every main loop.
*
*/
void loop();
/**
* @brief Increment the DriveModi enum
* Than calls changeModus
@@ -116,6 +106,8 @@ class DriveManager {
Modi getDriveModi() { return this->currentModus; }
private:
void run() override;
Modi currentModus = Modi::Off;
MoveControl *moveControl;
const ControlPadInput* input;