refactore
This commit is contained in:
+15
-11
@@ -11,17 +11,8 @@
|
||||
|
||||
#include "sensors.h"
|
||||
|
||||
void Sensors::run() {
|
||||
this->compass->read();
|
||||
this->realAzimuth = this->compass->getAzimuth();
|
||||
}
|
||||
|
||||
void Sensors::runAsChild() {
|
||||
this->gnss->checkUblox();
|
||||
this->gnss->checkCallbacks();
|
||||
|
||||
if (Sensors::newData)
|
||||
Sensors::newData = false;
|
||||
Sensors::Sensors() {
|
||||
this->sensorData = new SensorData(this);
|
||||
}
|
||||
|
||||
void Sensors::enableGnss(SPIClass* spiPort, uint8_t csPin) {
|
||||
@@ -59,6 +50,19 @@ void Sensors::setOutputStatusPrintPVTdata(bool status) {
|
||||
Sensors::outputStatusPrintPVTdata = status;
|
||||
}
|
||||
|
||||
void Sensors::run() {
|
||||
this->compass->read();
|
||||
this->realAzimuth = this->compass->getAzimuth();
|
||||
}
|
||||
|
||||
void Sensors::runAsChild() {
|
||||
this->gnss->checkUblox();
|
||||
this->gnss->checkCallbacks();
|
||||
|
||||
if (Sensors::newData)
|
||||
Sensors::newData = false;
|
||||
}
|
||||
|
||||
void Sensors::initGnss() {
|
||||
uint8_t versionHigh = this->gnss->getProtocolVersionHigh();
|
||||
uint8_t versionLow = this->gnss->getProtocolVersionLow();
|
||||
|
||||
Reference in New Issue
Block a user