cleaning
refactore all components now have a base class compnent for loop functions
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user