diff options
Diffstat (limited to 'src/sensor/sensor.hpp')
-rw-r--r-- | src/sensor/sensor.hpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/sensor/sensor.hpp b/src/sensor/sensor.hpp index 3e56627..7b76ae2 100644 --- a/src/sensor/sensor.hpp +++ b/src/sensor/sensor.hpp @@ -1,7 +1,7 @@ #pragma once -#include "utils/serial.hpp" -#include "utils/time.hpp" +#include "serial.hpp" +#include "std/time.hpp" #include <Arduino.h> #include <Wire.h> @@ -77,52 +77,52 @@ public: /** * Returns the current X axis acceleration in g:s (g-force). */ - double getAccelX(); + double getAccelX() const; /** * Returns the current Y axis acceleration in g:s (g-force). */ - double getAccelY(); + double getAccelY() const; /** * Returns the current Z axis acceleration in g:s (g-force). */ - double getAccelZ(); + double getAccelZ() const; /** * Returns the current X angle. */ - double getAngleX(); + double getAngleX() const; /** * Returns the current Y angle. */ - double getAngleY(); + double getAngleY() const; /** * Returns the current X axis in degrees/s. */ - double getGyroX(); + double getGyroX() const; /** * Returns the current Y axis in degrees/s. */ - double getGyroY(); + double getGyroY() const; /** * Returns the current Z axis in degrees/s. */ - double getGyroZ(); + double getGyroZ() const; /** * Returns the current pitch angle. */ - double getPitch(); + double getPitch() const; /** * Returns the current roll angle. */ - double getRoll(); + double getRoll() const; /** * Sets the value of a key in the sensor's register. @@ -157,6 +157,7 @@ public: private: TwoWire _wire; + SerialStream _sout; uint8_t _address; @@ -193,6 +194,4 @@ private: double _yaw = 0; int16_t _readHighLow(); - - SerialStream _sout; }; |