summaryrefslogtreecommitdiff
path: root/src/sensor
diff options
context:
space:
mode:
Diffstat (limited to 'src/sensor')
-rw-r--r--src/sensor/calibration.cpp6
-rw-r--r--src/sensor/sensor.cpp2
-rw-r--r--src/sensor/sensor.hpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/sensor/calibration.cpp b/src/sensor/calibration.cpp
index e01bb34..1a2b91e 100644
--- a/src/sensor/calibration.cpp
+++ b/src/sensor/calibration.cpp
@@ -1,6 +1,6 @@
#include "calibration.hpp"
-#include "std/time.hpp"
+#include "common/time.hpp"
#include "utils.hpp"
SensorCalibrator::SensorCalibrator(Sensor &sensor, SerialStream sout)
@@ -11,11 +11,11 @@ SensorCalibrator::SensorCalibrator(Sensor &sensor, SerialStream sout)
bool SensorCalibrator::calibrate(unsigned int throttle_time)
{
bool done = false;
- auto start_time = time_now();
+ auto start_time = common::time_now();
while (!done)
{
- if (time_now().diff(start_time).millisecs() >= CALIBRATION_TIMEOUT)
+ if (common::time_now().diff(start_time).millisecs() >= CALIBRATION_TIMEOUT)
{
return false;
}
diff --git a/src/sensor/sensor.cpp b/src/sensor/sensor.cpp
index 4d7f256..af25a96 100644
--- a/src/sensor/sensor.cpp
+++ b/src/sensor/sensor.cpp
@@ -40,7 +40,7 @@ bool Sensor::isConnected() noexcept
bool Sensor::read() noexcept
{
- auto now = time_now();
+ auto now = common::time_now();
if (_throttle_enabled && now.diff(_last_time).millisecs() < _throttle_time)
{
diff --git a/src/sensor/sensor.hpp b/src/sensor/sensor.hpp
index b79b918..1e7e488 100644
--- a/src/sensor/sensor.hpp
+++ b/src/sensor/sensor.hpp
@@ -1,7 +1,7 @@
#pragma once
+#include "common/time.hpp"
#include "serial.hpp"
-#include "std/time.hpp"
#include <Arduino.h>
#include <Wire.h>
@@ -164,7 +164,7 @@ private:
bool _throttle_enabled;
unsigned int _throttle_time;
- Time _last_time;
+ common::Time _last_time;
SensorStatus _status;