load correction data for compass from flash

This commit is contained in:
2023-05-24 11:42:03 +02:00
parent 1b25f59719
commit 75b461237e
3 changed files with 13 additions and 2 deletions
+3 -1
View File
@@ -65,7 +65,9 @@ void Navigation::init(Route* route) {
Wire.write(0x01);
Wire.endTransmission();
this->compass->setMode(0x01,0x0C,0x10,0X00);
// this->compass->setCalibration(-1903, 367, -893, 1468, -1110, 310);
CalibrateCompass caliCompass(this->compass);
caliCompass.loadData();
caliCompass.useData();
}
Navigation::~Navigation() {
+1
View File
@@ -20,6 +20,7 @@
#include "route.h"
#include "NTRIPClient.h"
#include "calibrateCompass.h"
/**
* @brief The minimal distance between Points
@@ -84,6 +84,11 @@ void MenuManualControl::printPage() const {
}
break;
case 8:
lineOne = "Save compass";
lineTwo = "data in flash";
break;
default:
this->printDefault();
return;
@@ -96,7 +101,7 @@ void MenuManualControl::init() {
this->firstPrint = false;
this->driveManager->changeModus(Modi::ManualControl);
this->manualControl = (ManualControl*) this->driveManager->getDriveModiPtr();
this->setCountPages(7);
this->setCountPages(9);
this->updateDelay = 500;
}
@@ -136,6 +141,9 @@ void MenuManualControl::runCommand() const {
break;
}
break;
case 8:
this->caliCompass->saveData();
default:
break;