load correction data for compass from flash
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user