included calibrateCompass to the manualDrive menu
This commit is contained in:
@@ -66,6 +66,9 @@ void CalibrateCompass::loop() {
|
||||
}
|
||||
|
||||
void CalibrateCompass::start() {
|
||||
if (this->state != State::Ready)
|
||||
return;
|
||||
|
||||
this->clearData();
|
||||
this->state = State::Calibrating;
|
||||
this->compass->setCalibration(0, 0, 0, 0, 0, 0);
|
||||
@@ -85,8 +88,13 @@ void CalibrateCompass::useData() {
|
||||
)
|
||||
}
|
||||
|
||||
void CalibrateCompass::resetData() {
|
||||
this->reset();
|
||||
this->compass->setCalibration(0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
void CalibrateCompass::reset() {
|
||||
this->start();
|
||||
this->clearData();
|
||||
this->state = State::Ready;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user