more sensorData menu

This commit is contained in:
2023-09-10 13:00:12 +02:00
parent 7c8406f438
commit ad560e7d16
9 changed files with 119 additions and 212 deletions
+22
View File
@@ -30,6 +30,28 @@ void CalcAzimuth::updateCurrentPosition(Point point) {
this->positionChanged = true;
}
String CalcAzimuth::stateToString(State state) {
switch (state) {
case State::Invalid:
return "Invalid";
case State::Bad:
return "Bad";
case State::Ok:
return "Ok";
case State::Good:
return "Good";
case State::Super:
return "Super";
default:
return "UNKOWN";
}
}
void CalcAzimuth::run() {
if (!this->positionChanged)
return;
+2
View File
@@ -34,6 +34,8 @@ class CalcAzimuth : public Component {
int16_t getAzimuth() const { return this->calcAzimuth; }
State getState() const { return this->state; }
static String stateToString(State state);
private:
void run() override;
void updateAzimuth();
+6
View File
@@ -105,6 +105,12 @@ CalcAzimuth::State SensorData::getCalcAzimuthState() const {
return CalcAzimuth::State::Invalid;
}
NTRIPClientStates SensorData::getNtripState() const {
if (this->ntripClient)
return this->ntripClient->getClientState();
return NTRIPClientStates::notAvailable;
}
void SensorData::printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct) {
if (!SensorData::outputStatusPrintPVTdata)
return;
+1
View File
@@ -47,6 +47,7 @@ class SensorData : public Component {
Point getCurrentPos() const { return this->currentPosition; }
const UBX_NAV_PVT_data_t* getGnssData() const { return this->gnssData; };
NTRIPClientStates getNtripState() const;
const float* getGyroData() const { return this->yawPitchRoll; }
CalcAzimuth* getCalcCompass() const { return this->calcCompass; }