Pass gamepad to all objects
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
|
||||
#include "driveModi/Modi/CaptureRoute/captureRoute.h"
|
||||
|
||||
CaptureRoute::CaptureRoute(MoveControl* moveControl, Navigation* navigation)
|
||||
: ManualControl(moveControl) {
|
||||
CaptureRoute::CaptureRoute(MoveControl* moveControl, Ps3Controller *gamepad, Navigation* navigation)
|
||||
: ManualControl(moveControl, gamepad) {
|
||||
this->navigation = navigation;
|
||||
this->routeInfo = RouteInfo{0, 0};
|
||||
}
|
||||
@@ -28,7 +28,7 @@ void CaptureRoute::loop() {
|
||||
}
|
||||
|
||||
void CaptureRoute::runCaptureRoute() {
|
||||
if (Ps3.data.button.triangle) {
|
||||
if (this->gamepad->data.button.triangle) {
|
||||
if (this->navigation->addCurrentPosToRoute()) {
|
||||
this->routeInfo = navigation->getRouteInfo();
|
||||
this->updateDisplay = true;
|
||||
|
||||
Reference in New Issue
Block a user