diff options
Diffstat (limited to 'src/calibration.hpp')
-rw-r--r-- | src/calibration.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/calibration.hpp b/src/calibration.hpp index 79b3758..e66b6fc 100644 --- a/src/calibration.hpp +++ b/src/calibration.hpp @@ -1,7 +1,9 @@ #ifndef CALIBRATION_HPP #define CALIBRATION_HPP -#include "sensor.hpp" +#include "sensor/sensor.hpp" +#include "utils/memory.hpp" +#include "utils/serial.hpp" // Calibration precision #define ACCEL_CAL_X_MAX 0.006 @@ -37,8 +39,9 @@ public: * Sensor calibrator. * * @param sensor A sensor to calibrate + * @param sout A Serial output stream */ - SensorCalibrator(Sensor *sensor); + SensorCalibrator(unique_ptr<Sensor> &sensor, SerialStream sout); /** * Calibrates the sensor. @@ -57,7 +60,9 @@ private: void _adjustCalibration(); - Sensor *_sensor; + unique_ptr<Sensor> &_sensor; + + SerialStream _sout; float _accel_x; float _accel_y; |