added possibility to save and load the data
from flash for compass calibration
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QMC5883LCompass.h>
|
||||
#include <Preferences.h>
|
||||
|
||||
class CalibrateCompass {
|
||||
public:
|
||||
@@ -32,6 +33,8 @@ class CalibrateCompass {
|
||||
void useData();
|
||||
void resetData();
|
||||
void reset();
|
||||
void saveData();
|
||||
void loadData();
|
||||
|
||||
State getState() const { return this->state; }
|
||||
CallibrationData getCallibrationData() const { return this->data; }
|
||||
@@ -43,6 +46,7 @@ class CalibrateCompass {
|
||||
|
||||
void clearData();
|
||||
|
||||
bool newData = false;
|
||||
const uint16_t maxTimeWithoutChange = 5000;
|
||||
uint32_t lastChange = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user