first build
This commit is contained in:
@@ -20,20 +20,6 @@ SensorData::SensorData() {
|
||||
this->loopDelay = 50;
|
||||
}
|
||||
|
||||
SensorData::~SensorData() {
|
||||
if (this->ntripClient)
|
||||
delete this->ntripClient;
|
||||
}
|
||||
|
||||
void SensorData::enableNtrip(String host, uint16_t port, String mountPoint, String user, String password) {
|
||||
this->ntripClient = new NTRIPClient(this->gnss, host.c_str(), port, mountPoint.c_str(), user.c_str(), password.c_str());
|
||||
this->ntripClient->gpsConfiguration();
|
||||
this->ntripClient->loop();
|
||||
this->ntripClient->setActivated(false);
|
||||
this->isNtripInit = true;
|
||||
this->addChildComponent(this->ntripClient);
|
||||
}
|
||||
|
||||
void SensorData::enableGnss(SPIClass* spiPort, uint8_t csPin) {
|
||||
this->gnss = new SFE_UBLOX_GNSS();
|
||||
if (this->gnss->begin(*spiPort, csPin, 4000000) == false) {
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <QMC5883LCompass.h>
|
||||
// Gyroskop
|
||||
#include "calcAzimuth.h"
|
||||
#include "ntripClient.h"
|
||||
|
||||
#include "point.h"
|
||||
class Sensors;
|
||||
@@ -30,9 +29,7 @@ class Sensors;
|
||||
class SensorData : public Component {
|
||||
public:
|
||||
SensorData();
|
||||
~SensorData();
|
||||
|
||||
void enableNtrip(String host, uint16_t port, String mountPoint, String user, String password);
|
||||
void enableGnss(SPIClass* spiPort, uint8_t csPin);
|
||||
void enableGnss();
|
||||
void enableRealCompass();
|
||||
@@ -50,7 +47,6 @@ class SensorData : public Component {
|
||||
|
||||
CalcAzimuth* getCalcCompass() const { return this->calcCompass; }
|
||||
QMC5883LCompass* getRealCompass() const { return this->realCompass; }
|
||||
NTRIPClient* getNtripClient() const { return this->ntripClient; }
|
||||
|
||||
// static
|
||||
/**
|
||||
@@ -71,19 +67,10 @@ class SensorData : public Component {
|
||||
QMC5883LCompass* realCompass = nullptr;
|
||||
CalcAzimuth* calcCompass = nullptr;
|
||||
SFE_UBLOX_GNSS* gnss = nullptr;
|
||||
NTRIPClient* ntripClient = nullptr;
|
||||
|
||||
UBX_NAV_PVT_data_t* gnssData;
|
||||
Point currentPosition;
|
||||
|
||||
char* host;
|
||||
char* mountPoint;
|
||||
char* user;
|
||||
char* password;
|
||||
|
||||
bool isNtripInit = false;
|
||||
|
||||
uint16_t port;
|
||||
int16_t realAzimuth = INT16_MAX;
|
||||
int16_t calcAzimuth = INT16_MAX;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user