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.write(0x01);
|
||||||
Wire.endTransmission();
|
Wire.endTransmission();
|
||||||
this->compass->setMode(0x01,0x0C,0x10,0X00);
|
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() {
|
Navigation::~Navigation() {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "route.h"
|
#include "route.h"
|
||||||
#include "NTRIPClient.h"
|
#include "NTRIPClient.h"
|
||||||
|
#include "calibrateCompass.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The minimal distance between Points
|
* @brief The minimal distance between Points
|
||||||
|
|||||||
@@ -84,6 +84,11 @@ void MenuManualControl::printPage() const {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 8:
|
||||||
|
lineOne = "Save compass";
|
||||||
|
lineTwo = "data in flash";
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
this->printDefault();
|
this->printDefault();
|
||||||
return;
|
return;
|
||||||
@@ -96,7 +101,7 @@ void MenuManualControl::init() {
|
|||||||
this->firstPrint = false;
|
this->firstPrint = false;
|
||||||
this->driveManager->changeModus(Modi::ManualControl);
|
this->driveManager->changeModus(Modi::ManualControl);
|
||||||
this->manualControl = (ManualControl*) this->driveManager->getDriveModiPtr();
|
this->manualControl = (ManualControl*) this->driveManager->getDriveModiPtr();
|
||||||
this->setCountPages(7);
|
this->setCountPages(9);
|
||||||
this->updateDelay = 500;
|
this->updateDelay = 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,6 +142,9 @@ void MenuManualControl::runCommand() const {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 8:
|
||||||
|
this->caliCompass->saveData();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user