summaryrefslogtreecommitdiff
path: root/src/sensor/calibration.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-07 09:24:37 +0100
committerHampusM <hampus@hampusmat.com>2022-03-07 09:26:17 +0100
commit4b4605df15ce7061a08d7911069927bf49778d05 (patch)
tree5f853e2d7508e073bd12175a7d18ab9e6bf2ea82 /src/sensor/calibration.hpp
parentfaa501905e2fb554a2444b5e396d9e979ce0be0e (diff)
fix: prevent invalid UniquePtr usage
Diffstat (limited to 'src/sensor/calibration.hpp')
-rw-r--r--src/sensor/calibration.hpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sensor/calibration.hpp b/src/sensor/calibration.hpp
index a2da58b..090fd27 100644
--- a/src/sensor/calibration.hpp
+++ b/src/sensor/calibration.hpp
@@ -2,7 +2,6 @@
#include "sensor/sensor.hpp"
#include "serial.hpp"
-#include "std/memory.hpp"
// Calibration precision
constexpr float ACCEL_CAL_X_MAX = 0.006;
@@ -52,7 +51,7 @@ public:
* @param sensor A sensor to calibrate
* @param sout A Serial output stream
*/
- SensorCalibrator(UniquePtr<Sensor> sensor, SerialStream sout);
+ SensorCalibrator(Sensor sensor, SerialStream sout);
/**
* Calibrates the sensor.
@@ -70,7 +69,7 @@ private:
static void _adjustValues(SensorCalibratorValues &values);
static bool _isValuesInRange(const SensorCalibratorValues &values);
- UniquePtr<Sensor> _sensor;
+ Sensor _sensor;
SerialStream _sout;
};