remove all PS3 things and begin with ControllPad
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
|
||||
#include "driveModi/Modi/Autopilot/autopilot.h"
|
||||
|
||||
Autopilot::Autopilot(MoveControl* moveControl, Ps3Controller *gamepad, Navigation* navigation)
|
||||
: ManualControl(moveControl, gamepad) {
|
||||
Autopilot::Autopilot(MoveControl* moveControl, const ControllPadInput *input, Navigation* navigation)
|
||||
: ManualControl(moveControl, input) {
|
||||
this->navigation = navigation;
|
||||
this->navigationStarted = this->navigation->startNavigation();
|
||||
this->routeInfo = this->navigation->getRouteInfo();
|
||||
@@ -45,7 +45,7 @@ void Autopilot::runAutopilot() {
|
||||
this->selfDrivingAvailable = true;
|
||||
|
||||
if (!this->selfDriving && this->selfDrivingAvailable)
|
||||
this->setSelfDriving(this->gamepad->data.button.triangle);
|
||||
this->setSelfDriving(ControllPadButton::isControllPadButtonPressed(this->input, ControllPadButton::PadButton::Action));
|
||||
|
||||
if (this->routeInfo.currentPoint == this->routeInfo.totalPoints) {
|
||||
this->navigationEnded = true;
|
||||
|
||||
@@ -35,7 +35,7 @@ class Autopilot : public ManualControl {
|
||||
* @param moveControl for ManualControl
|
||||
* @param navigation for route instructions
|
||||
*/
|
||||
Autopilot(MoveControl* moveControl, Ps3Controller *gamepad, Navigation* navigation);
|
||||
Autopilot(MoveControl* moveControl, const ControllPadInput *input, Navigation* navigation);
|
||||
|
||||
/**
|
||||
* @brief Calls runAutopilot or ManualControl loop
|
||||
|
||||
Reference in New Issue
Block a user