more sensorData menu
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user