refactore

This commit is contained in:
2023-09-03 12:36:16 +02:00
parent faaa3603a7
commit 5f650982a7
30 changed files with 578 additions and 430 deletions
+17 -2
View File
@@ -14,6 +14,14 @@
#include "component.h"
#include "moveControl.h"
#include "controlPadInput.h"
#include "sensorData.h"
struct DriveModiParams {
MoveControl* moveControl;
ControlPadInput* input;
SensorData* sensorData;
};
/**
* @brief Baseclass to build DriveModi
@@ -23,9 +31,12 @@
*/
class DriveModi : public Component {
public:
DriveModi(MoveControl* moveControl);
DriveModi(MoveControl* moveControl, ControlPadInput* input, SensorData* sensorData);
DriveModi(DriveModiParams);
virtual ~DriveModi();
SensorData getSensorData() const { return this->sensorData; }
/**
* @brief Set the max speed
*
@@ -48,8 +59,12 @@ class DriveModi : public Component {
protected:
MoveControl *moveControl;
ControlPadInput* input;
SensorData* sensorData;
double maxForwardSpeed = 1;
double maxRotationSpeed = 7;
private:
void init();
};
#endif // DRIVEMODI_H