compilation works again
This commit is contained in:
@@ -11,14 +11,14 @@
|
||||
|
||||
#include "menuGPS.h"
|
||||
|
||||
MenuGPS::MenuGPS(DriveManager* driveManager) :
|
||||
MenuGPS::MenuGPS(SensorData* sensorData) :
|
||||
MenuInformationSites(10) {
|
||||
this->navigation = driveManager->getNavigation();
|
||||
this->ntripClient = this->navigation->getNTRIPClient();
|
||||
this->sensorData = sensorData;
|
||||
// this->ntripClient = this->navigation->getNTRIPClient();
|
||||
}
|
||||
|
||||
void MenuGPS::printPage() const {
|
||||
UBX_NAV_PVT_data_t* gpsData = this->navigation->getUbxData();
|
||||
const UBX_NAV_PVT_data_t* gpsData = this->sensorData->getGnssData();
|
||||
uint8_t fixType = 0;
|
||||
if (gpsData)
|
||||
fixType = gpsData->fixType;
|
||||
@@ -66,15 +66,15 @@ void MenuGPS::printPage() const {
|
||||
break;
|
||||
|
||||
case 3: {
|
||||
NTRIPClientStates status = this->ntripClient->getClientState();
|
||||
lineOne = "NTRIP Client is";
|
||||
// NTRIPClientStates status = this->ntripClient->getClientState();
|
||||
// lineOne = "NTRIP Client is";
|
||||
|
||||
if (status == NTRIPClientStates::pushData)
|
||||
lineTwo = "enabled";
|
||||
else if (status == NTRIPClientStates::notAvailable)
|
||||
lineTwo = "not available";
|
||||
else
|
||||
lineTwo = "disabled";
|
||||
// if (status == NTRIPClientStates::pushData)
|
||||
// lineTwo = "enabled";
|
||||
// else if (status == NTRIPClientStates::notAvailable)
|
||||
// lineTwo = "not available";
|
||||
// else
|
||||
// lineTwo = "disabled";
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -134,7 +134,7 @@ void MenuGPS::printPage() const {
|
||||
case 8:
|
||||
lineOne = "Azimuth: ";
|
||||
lineTwo = "";
|
||||
lineTwo.concat(this->navigation->getAzimuth());
|
||||
lineTwo.concat(this->sensorData->getRealAzimuth());
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -148,12 +148,12 @@ void MenuGPS::printPage() const {
|
||||
void MenuGPS::runCommand() const {
|
||||
switch (this->getCurrentPage()) {
|
||||
case 3: {
|
||||
// std::cout << "MenuGPS::runCommand " << this->ntripClient->getClientState() << std::endl;
|
||||
if (this->ntripClient->getClientState() == NTRIPClientStates::pushData)
|
||||
this->ntripClient->setActivated(false);
|
||||
else if (this->ntripClient->getClientState() != NTRIPClientStates::notAvailable)
|
||||
this->ntripClient->setActivated(true);
|
||||
break;
|
||||
// // std::cout << "MenuGPS::runCommand " << this->ntripClient->getClientState() << std::endl;
|
||||
// if (this->ntripClient->getClientState() == NTRIPClientStates::pushData)
|
||||
// this->ntripClient->setActivated(false);
|
||||
// else if (this->ntripClient->getClientState() != NTRIPClientStates::notAvailable)
|
||||
// this->ntripClient->setActivated(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
#include <SparkFun_u-blox_GNSS_Arduino_Library.h>
|
||||
|
||||
#include "menuInformationSites.h"
|
||||
#include "driveModi/driveManager.h"
|
||||
#include "navigation.h"
|
||||
#include "sensorData.h"
|
||||
#include "ntripClient.h"
|
||||
|
||||
/**
|
||||
@@ -30,14 +29,14 @@ class MenuGPS : public MenuInformationSites {
|
||||
*
|
||||
* @param gps
|
||||
*/
|
||||
MenuGPS(DriveManager* driveManager);
|
||||
MenuGPS(SensorData* sensorData);
|
||||
|
||||
private:
|
||||
void printPage() const override;
|
||||
void runCommand() const override;
|
||||
|
||||
NTRIPClient* ntripClient;
|
||||
Navigation* navigation;
|
||||
// NTRIPClient* ntripClient;
|
||||
SensorData* sensorData;
|
||||
};
|
||||
|
||||
#endif // MENU_GPS_H
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
void MenuAutopilot::printPage() const {
|
||||
CourseCorrection correction = this->autopilot->getCourseCorrection();
|
||||
UBX_NAV_PVT_data_t* gpsData = this->driveManager->getNavigation()->getUbxData();
|
||||
const UBX_NAV_PVT_data_t* gpsData = this->autopilot->getSensorData()->getGnssData();
|
||||
bool navigationStarted = this->autopilot->getState() >= Autopilot::State::NavigationStarted;
|
||||
|
||||
String distanceString = "";
|
||||
@@ -104,7 +104,7 @@ void MenuAutopilot::printPage() const {
|
||||
break;
|
||||
|
||||
case 3: {
|
||||
NTRIPClientStates status = this->driveManager->getNavigation()->getNTRIPClient()->getClientState();
|
||||
NTRIPClientStates status = this->autopilot->getSensorData()->getNtripClient()->getClientState();
|
||||
uint8_t carrSoln = gpsData->flags.bits.carrSoln;
|
||||
lineOne = "GNSS: ";
|
||||
|
||||
@@ -132,30 +132,30 @@ void MenuAutopilot::printPage() const {
|
||||
|
||||
case 4:
|
||||
|
||||
if (this->autopilot->getSensorData().getCalcAzimuth() == CalcAzimuth::CalcAzimuthState::Good
|
||||
||this->autopilot->getSensorData().getCalcAzimuth() == CalcAzimuth::CalcAzimuthState::Super)
|
||||
if (this->autopilot->getSensorData()->getCalcAzimuth() == CalcAzimuth::State::Good
|
||||
||this->autopilot->getSensorData()->getCalcAzimuth() == CalcAzimuth::State::Super)
|
||||
{
|
||||
lineOne = "Calc Azi: ";
|
||||
lineTwo = "State: ";
|
||||
lineOne.concat(this->autopilot->getSensorData().getCalcAzimuth());
|
||||
switch (this->autopilot->getSensorData().getCalcAzimuthState()) {
|
||||
case CalcAzimuth::CalcAzimuthState::Bad :
|
||||
lineOne.concat(this->autopilot->getSensorData()->getCalcAzimuth());
|
||||
switch (this->autopilot->getSensorData()->getCalcAzimuthState()) {
|
||||
case CalcAzimuth::State::Bad :
|
||||
lineTwo.concat("Bad");
|
||||
break;
|
||||
|
||||
case CalcAzimuth::CalcAzimuthState::Good :
|
||||
case CalcAzimuth::State::Good :
|
||||
lineTwo.concat("Good");
|
||||
break;
|
||||
|
||||
case CalcAzimuth::CalcAzimuthState::Invalid :
|
||||
case CalcAzimuth::State::Invalid :
|
||||
lineTwo.concat("Invalid");
|
||||
break;
|
||||
|
||||
case CalcAzimuth::CalcAzimuthState::Ok :
|
||||
case CalcAzimuth::State::Ok :
|
||||
lineTwo.concat("Ok");
|
||||
break;
|
||||
|
||||
case CalcAzimuth::CalcAzimuthState::Super :
|
||||
case CalcAzimuth::State::Super :
|
||||
lineTwo.concat("Super");
|
||||
break;
|
||||
|
||||
@@ -166,7 +166,7 @@ void MenuAutopilot::printPage() const {
|
||||
} else {
|
||||
lineOne = "Real Azi: ";
|
||||
lineTwo = "";
|
||||
lineOne.concat(this->driveManager->getNavigation()->getAzimuth());
|
||||
lineOne.concat(this->autopilot->getSensorData()->getRealAzimuth());
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -10,13 +10,11 @@
|
||||
*/
|
||||
#include "menuCalibrateCompass.h"
|
||||
|
||||
MenuCalibrateCompass::MenuCalibrateCompass(DriveManager* driveManager) : MenuDriveMode(driveManager) {
|
||||
this->caliCompass = new CalibrateCompass(this->driveManager->getNavigation()->getCompass());
|
||||
}
|
||||
MenuCalibrateCompass::MenuCalibrateCompass(DriveManager* driveManager) : MenuDriveMode(driveManager) {}
|
||||
|
||||
MenuCalibrateCompass::~MenuCalibrateCompass() {
|
||||
delete this->caliCompass;
|
||||
this->manualControl->setCalibrateCompass();
|
||||
this->caliCompassMode->setCalibrateCompass();
|
||||
}
|
||||
|
||||
void MenuCalibrateCompass::printPage() const {
|
||||
@@ -31,7 +29,7 @@ void MenuCalibrateCompass::printPage() const {
|
||||
|
||||
case 1:
|
||||
lineOne = "Azimuth:";
|
||||
lineTwo.concat(this->driveManager->getNavigation()->getAzimuth());
|
||||
lineTwo.concat(this->caliCompassMode->getSensorData()->getRealAzimuth());
|
||||
break;
|
||||
|
||||
case 2:
|
||||
@@ -112,8 +110,9 @@ void MenuCalibrateCompass::printPage() const {
|
||||
|
||||
void MenuCalibrateCompass::init() {
|
||||
this->firstPrint = false;
|
||||
this->driveManager->changeModus(Modi::ManualControl);
|
||||
this->manualControl = (ManualControl*) this->driveManager->getDriveModiPtr();
|
||||
this->driveManager->changeModus(Modi::CalibrateCompass);
|
||||
this->caliCompassMode = (CalibrateCompassM*) this->driveManager->getDriveModiPtr();
|
||||
this->caliCompass = new CalibrateCompass(this->caliCompassMode->getSensorData()->getRealCompass());
|
||||
this->setCountPages(11);
|
||||
this->updateDelay = 500;
|
||||
}
|
||||
@@ -123,12 +122,12 @@ void MenuCalibrateCompass::runCommand() const {
|
||||
case 2:
|
||||
switch (this->caliCompass->getState()) {
|
||||
case CalibrateCompass::State::Ready :
|
||||
this->manualControl->setCalibrateCompass(this->caliCompass);
|
||||
this->caliCompassMode->setCalibrateCompass(this->caliCompass);
|
||||
this->caliCompass->start();
|
||||
break;
|
||||
|
||||
case CalibrateCompass::State::Finished:
|
||||
this->manualControl->setCalibrateCompass();
|
||||
this->caliCompassMode->setCalibrateCompass();
|
||||
this->caliCompass->useData();
|
||||
break;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define MENU_CALIBRATE_COMPASS_H
|
||||
|
||||
#include "SpecialMenus/driveModi/menuDriveMode.h"
|
||||
#include ""
|
||||
#include "driveModi/Modi/CalibrateCompass/calibrateCompassM.h"
|
||||
#include "calibrateCompass.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
void MenuCaptureRoute::printPage() const {
|
||||
RouteInfo routeInfo = this->captureRoute->getRouteInfo();
|
||||
UBX_NAV_PVT_data_t* gpsData = this->driveManager->getNavigation()->getUbxData();
|
||||
const UBX_NAV_PVT_data_t* gpsData = this->captureRoute->getSensorData()->getGnssData();
|
||||
|
||||
String lineOne = "";
|
||||
String lineTwo = "";
|
||||
@@ -56,7 +56,7 @@ void MenuCaptureRoute::printPage() const {
|
||||
break;
|
||||
|
||||
case 4: {
|
||||
NTRIPClientStates status = this->driveManager->getNavigation()->getNTRIPClient()->getClientState();
|
||||
NTRIPClientStates status = this->captureRoute->getSensorData()->getNtripClient()->getClientState();
|
||||
lineOne = "NTRIP Client is";
|
||||
|
||||
if (status == NTRIPClientStates::pushData)
|
||||
@@ -85,7 +85,7 @@ void MenuCaptureRoute::printPage() const {
|
||||
case 6:
|
||||
lineOne = "hAccuracy: ";
|
||||
lineTwo = "Azimuth: ";
|
||||
lineTwo.concat(this->driveManager->getNavigation()->getAzimuth());
|
||||
lineTwo.concat(this->captureRoute->getSensorData()->getRealAzimuth());
|
||||
if (gpsData->fixType)
|
||||
lineOne.concat(gpsData->hAcc);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user