diff --git a/src/driveModi/Modi/Autopilot/autopilot.cpp b/src/driveModi/Modi/Autopilot/autopilot.cpp index 9b5ebd1..86ba8ad 100644 --- a/src/driveModi/Modi/Autopilot/autopilot.cpp +++ b/src/driveModi/Modi/Autopilot/autopilot.cpp @@ -45,7 +45,7 @@ void Autopilot::runAutopilot() { this->selfDrivingAvailable = true; if (!this->selfDriving && this->selfDrivingAvailable) - this->setSelfDriving(Ps3.data.button.triangle); + this->setSelfDriving(this->gamepad->data.button.triangle); if (this->routeInfo.currentPoint == this->routeInfo.totalPoints) { this->navigationEnded = true; diff --git a/src/driveModi/Modi/ManualControl/manualControl.cpp b/src/driveModi/Modi/ManualControl/manualControl.cpp index 5afc56a..877cf02 100644 --- a/src/driveModi/Modi/ManualControl/manualControl.cpp +++ b/src/driveModi/Modi/ManualControl/manualControl.cpp @@ -31,8 +31,8 @@ void ManualControl::loop() { } void ManualControl::runManualControl() { - int8_t x = Ps3.data.analog.stick.lx; - int8_t y = Ps3.data.analog.stick.ly; + int8_t x = this->gamepad->data.analog.stick.lx; + int8_t y = this->gamepad->data.analog.stick.ly; double value_per_step = this->max_speed * 2 / 256; this->moveControl->setSpeed((y * -1) * value_per_step);