refactore
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user