spelling
circle mode for autopilot menu entry for circle mode
This commit is contained in:
@@ -42,7 +42,7 @@ void MenuAutopilot::printPage() const {
|
||||
lineOne = "Status: ";
|
||||
lineTwo = "";
|
||||
switch (this->autopilot->getState()) {
|
||||
case Autopilot::State::InsufficientAccuarcy :
|
||||
case Autopilot::State::InsufficientAccuracy :
|
||||
lineTwo = "Err: LowAccuracy";
|
||||
break;
|
||||
|
||||
@@ -75,15 +75,20 @@ void MenuAutopilot::printPage() const {
|
||||
break;
|
||||
|
||||
default:
|
||||
lineTwo = "UNKOWN";
|
||||
lineTwo = "UNKOWN - ";
|
||||
lineTwo.concat(static_cast<int>(this->autopilot->getState()));
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 1:
|
||||
if (!navigationStarted)
|
||||
if (!navigationStarted) {
|
||||
lineOne = "Navigation is";
|
||||
lineTwo = "not started";
|
||||
break;
|
||||
}
|
||||
lineOne = "Distance: ";
|
||||
lineOne.concat(distanceString);
|
||||
lineTwo = "Turn: ";
|
||||
@@ -100,39 +105,75 @@ void MenuAutopilot::printPage() const {
|
||||
|
||||
case 3: {
|
||||
NTRIPClientStates status = this->driveManager->getNavigation()->getNTRIPClient()->getClientState();
|
||||
lineOne = "NTRIP Client is";
|
||||
uint8_t carrSoln = gpsData->flags.bits.carrSoln;
|
||||
lineOne = "GNSS: ";
|
||||
|
||||
if (status == NTRIPClientStates::pushData)
|
||||
lineTwo = "enabled";
|
||||
if (carrSoln == 0)
|
||||
lineOne.concat("None");
|
||||
else if (carrSoln == 1)
|
||||
lineOne.concat("Floating");
|
||||
else if (carrSoln == 2)
|
||||
lineOne.concat("Fixed");
|
||||
else
|
||||
lineOne.concat("UNKNOWN");
|
||||
else if (status == NTRIPClientStates::notAvailable)
|
||||
lineTwo = "not available";
|
||||
lineOne.concat("No WiFi");
|
||||
else
|
||||
lineTwo = "disabled";
|
||||
lineOne.concat("Offline");
|
||||
|
||||
lineTwo = "hAcc: ";
|
||||
if (gpsData->fixType)
|
||||
lineTwo.concat(gpsData->hAcc);
|
||||
else
|
||||
lineTwo.concat("0");
|
||||
break;
|
||||
}
|
||||
|
||||
case 4: {
|
||||
lineOne = "Carrier Solution";
|
||||
uint8_t carrSoln = gpsData->flags.bits.carrSoln;
|
||||
if (carrSoln == 0)
|
||||
lineTwo = "None";
|
||||
else if (carrSoln == 1)
|
||||
lineTwo = "Floating";
|
||||
else if (carrSoln == 2)
|
||||
lineTwo = "Fixed";
|
||||
else
|
||||
lineTwo = "UNKNOWN";
|
||||
case 4:
|
||||
if (this->driveManager->getNavigation()->getCalcAzimuthState() == Navigation::CalcAzimuthState::Good
|
||||
||this->driveManager->getNavigation()->getCalcAzimuthState() == Navigation::CalcAzimuthState::Super)
|
||||
{
|
||||
lineOne = "Calc Azi: ";
|
||||
lineTwo = "State: ";
|
||||
lineOne.concat(this->driveManager->getNavigation()->getCalcAzimuth());
|
||||
switch (this->driveManager->getNavigation()->getCalcAzimuthState()) {
|
||||
case Navigation::CalcAzimuthState::Bad :
|
||||
lineTwo.concat("Bad");
|
||||
break;
|
||||
|
||||
case Navigation::CalcAzimuthState::Good :
|
||||
lineTwo.concat("Good");
|
||||
break;
|
||||
|
||||
case Navigation::CalcAzimuthState::Invalid :
|
||||
lineTwo.concat("Invalid");
|
||||
break;
|
||||
|
||||
case Navigation::CalcAzimuthState::Ok :
|
||||
lineTwo.concat("Ok");
|
||||
break;
|
||||
|
||||
case Navigation::CalcAzimuthState::Super :
|
||||
lineTwo.concat("Super");
|
||||
break;
|
||||
|
||||
default:
|
||||
lineTwo.concat("Unkown");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
lineOne = "Real Azi: ";
|
||||
lineOne.concat(this->driveManager->getNavigation()->getAzimuth());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 5:
|
||||
lineOne = "hAccuracy: ";
|
||||
lineTwo = "Azimuth: ";
|
||||
lineTwo.concat(this->driveManager->getNavigation()->getAzimuth());
|
||||
if (gpsData->fixType)
|
||||
lineOne.concat(gpsData->hAcc);
|
||||
lineOne = "Loop mode is";
|
||||
if (this->autopilot->getLoopMode())
|
||||
lineTwo = "enabled";
|
||||
else
|
||||
lineOne.concat("0");
|
||||
lineTwo = "disabled";
|
||||
break;
|
||||
|
||||
case 6:
|
||||
@@ -170,37 +211,6 @@ void MenuAutopilot::printPage() const {
|
||||
lineTwo = "accuracy is low";
|
||||
break;
|
||||
|
||||
case 11:
|
||||
lineOne = "CalcAzi: ";
|
||||
lineTwo = "State: ";
|
||||
lineOne.concat(this->driveManager->getNavigation()->getCalcAzimuth());
|
||||
switch (this->driveManager->getNavigation()->getCalcAzimuthState()) {
|
||||
case Navigation::CalcAzimuthState::Bad :
|
||||
lineTwo.concat("Bad");
|
||||
break;
|
||||
|
||||
case Navigation::CalcAzimuthState::Good :
|
||||
lineTwo.concat("Good");
|
||||
break;
|
||||
|
||||
case Navigation::CalcAzimuthState::Invalid :
|
||||
lineTwo.concat("Invalid");
|
||||
break;
|
||||
|
||||
case Navigation::CalcAzimuthState::Ok :
|
||||
lineTwo.concat("Ok");
|
||||
break;
|
||||
|
||||
case Navigation::CalcAzimuthState::Super :
|
||||
lineTwo.concat("Super");
|
||||
break;
|
||||
|
||||
default:
|
||||
lineTwo.concat("Unkown");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 12:
|
||||
lineOne = "Test rotate";
|
||||
lineTwo = "180 degree";
|
||||
@@ -231,6 +241,10 @@ void MenuAutopilot::printPage() const {
|
||||
|
||||
void MenuAutopilot::runCommand() const {
|
||||
switch (this->getCurrentPage()) {
|
||||
case 5:
|
||||
this->autopilot->switchLoopMode();
|
||||
break;
|
||||
|
||||
case 6:
|
||||
this->autopilot->restart();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user