added more functions for capture route
This commit is contained in:
@@ -22,12 +22,11 @@ ManualControl::~ManualControl() {
|
||||
}
|
||||
|
||||
void ManualControl::loop() {
|
||||
static uint32_t last_millis = 0;
|
||||
if (millis() - last_millis < delay) {
|
||||
if (millis() - this->last_millis < delay) {
|
||||
return;
|
||||
}
|
||||
this->runManualControl();
|
||||
last_millis = millis();
|
||||
this->last_millis = millis();
|
||||
}
|
||||
|
||||
void ManualControl::runManualControl() {
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#ifndef MANUAL_CONTROL_H
|
||||
#define MANUAL_CONTROL_H
|
||||
|
||||
#include <Ps3Controller.h>
|
||||
|
||||
#include "moveControl.h"
|
||||
#include "driveModi/driveModi.h"
|
||||
|
||||
@@ -74,6 +72,7 @@ class ManualControl : public DriveModi{
|
||||
private:
|
||||
MoveControl *moveControl;
|
||||
|
||||
uint32_t last_millis = 0;
|
||||
uint8_t delay = 10;
|
||||
double max_speed = 1;
|
||||
double max_rotation = 7;
|
||||
|
||||
Reference in New Issue
Block a user