refactore
This commit is contained in:
+5
-11
@@ -25,24 +25,15 @@
|
||||
|
||||
class Sensors : public Component {
|
||||
public:
|
||||
enum CalcAzimuthState {
|
||||
Invalid,
|
||||
Bad,
|
||||
Ok,
|
||||
Good,
|
||||
Super
|
||||
};
|
||||
|
||||
Sensors();
|
||||
|
||||
void run() override;
|
||||
void runAsChild() override;
|
||||
|
||||
void enableGnss(SPIClass* spiPort, uint8_t csPin);
|
||||
void enableGnss();
|
||||
void enableCompass();
|
||||
void enableGyroskop();
|
||||
|
||||
const SensorData const getSensorData() const { return this->sensorData; }
|
||||
|
||||
/**
|
||||
* @brief Set the output status for PVTdata.
|
||||
*
|
||||
@@ -54,10 +45,13 @@ class Sensors : public Component {
|
||||
static void setOutputStatusPrintPVTdata(bool status);
|
||||
|
||||
private:
|
||||
void run() override;
|
||||
void runAsChild() override;
|
||||
void initGnss();
|
||||
|
||||
QMC5883LCompass* compass = nullptr;
|
||||
SFE_UBLOX_GNSS* gnss = nullptr;
|
||||
SensorData* sensorData;
|
||||
|
||||
CalcAzimuthState calcAzimuthState = CalcAzimuthState::Invalid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user