driveManager gets now the object
This commit is contained in:
+16
-12
@@ -1,17 +1,7 @@
|
||||
#include "driveModi.h"
|
||||
|
||||
DriveModi::DriveModi(MoveControl* moveControl, ControlPadInput* input, SensorData* sensorData) {
|
||||
this->moveControl = moveControl;
|
||||
this->input = input;
|
||||
this->sensorData = sensorData;
|
||||
this->init();
|
||||
}
|
||||
|
||||
DriveModi::DriveModi(DriveModiParams params){
|
||||
this->moveControl = params.moveControl;
|
||||
this->input = params.input;
|
||||
this->sensorData = params.sensorData;
|
||||
this->init();
|
||||
DriveModi::DriveModi() {
|
||||
this->loopDelay = 0;
|
||||
}
|
||||
|
||||
DriveModi::~DriveModi() {
|
||||
@@ -20,6 +10,20 @@ DriveModi::~DriveModi() {
|
||||
this->moveControl->setDrivingStatus(MoveControl::Status::Stop);
|
||||
}
|
||||
|
||||
void DriveModi::activate(MoveControl* moveControl, ControlPadInput* input, SensorData* sensorData) {
|
||||
this->moveControl = moveControl;
|
||||
this->input = input;
|
||||
this->sensorData = sensorData;
|
||||
this->init();
|
||||
}
|
||||
|
||||
void DriveModi::activate(DriveModiParams params){
|
||||
this->moveControl = params.moveControl;
|
||||
this->input = params.input;
|
||||
this->sensorData = params.sensorData;
|
||||
this->init();
|
||||
}
|
||||
|
||||
void DriveModi::init() {
|
||||
this->moveControl->setDrivingStatus(MoveControl::Status::Drive);
|
||||
this->loopDelay = 40;
|
||||
|
||||
Reference in New Issue
Block a user