included calibrateCompass to the manualDrive menu
This commit is contained in:
@@ -23,6 +23,9 @@ ManualControl::~ManualControl() {
|
||||
}
|
||||
|
||||
void ManualControl::loop() {
|
||||
if (caliCompass)
|
||||
this->caliCompass->loop();
|
||||
|
||||
if (millis() - this->lastMillis < delay) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "moveControl.h"
|
||||
#include "driveModi/driveModi.h"
|
||||
#include "controlPadInput.h"
|
||||
#include "calibrateCompass.h"
|
||||
|
||||
/**
|
||||
* @brief Drive the Rover with a Joystick
|
||||
@@ -76,6 +77,8 @@ class ManualControl : public DriveModi {
|
||||
void decreaseMaxRotation(double increase = 0.1) { max_rotation -= increase; }
|
||||
double getMaxRotation() { return this->max_rotation; }
|
||||
|
||||
void setCalibrateCompass(CalibrateCompass* val = nullptr) { this->caliCompass = val; }
|
||||
|
||||
uint16_t getDutycycleLeft() const { return this->moveControl->getDutycycleLeft(); }
|
||||
uint16_t getDutycycleRight() const { return this->moveControl->getDutycycleRight(); }
|
||||
|
||||
@@ -88,6 +91,7 @@ class ManualControl : public DriveModi {
|
||||
uint8_t delay = 10;
|
||||
double max_speed = 1;
|
||||
double max_rotation = 7;
|
||||
CalibrateCompass* caliCompass = nullptr;
|
||||
};
|
||||
|
||||
#endif // MANUAL_CONTROL_H
|
||||
|
||||
Reference in New Issue
Block a user