ready to test capture Route and Autopiloz
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
CaptureRoute::CaptureRoute(MoveControl* moveControl, Navigation* navigation)
|
||||
: ManualControl(moveControl) {
|
||||
this->navigation = navigation;
|
||||
this->routeInfo = RouteInfo{0, 0};
|
||||
}
|
||||
|
||||
void CaptureRoute::loop() {
|
||||
@@ -18,5 +19,15 @@ void CaptureRoute::loop() {
|
||||
void CaptureRoute::runCaptureRoute() {
|
||||
if (Ps3.data.button.triangle) {
|
||||
this->navigation->addCurrentPosToRoute();
|
||||
this->routeInfo.totalPoints++;
|
||||
this->updateDisplay = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool CaptureRoute::shouldUpdate() {
|
||||
if (this->updateDisplay) {
|
||||
this->updateDisplay = false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user