summaryrefslogtreecommitdiff
path: root/minion/src/temperature.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-05-17 12:53:14 +0200
committerHampusM <hampus@hampusmat.com>2022-05-17 14:02:29 +0200
commit1a0264a5259193e977101533342a6684d226626e (patch)
tree221ff059cfef729857c65e5bc7bc38528744f5c0 /minion/src/temperature.hpp
parent76bc59f8548bb3388747cc1c54326fb7236dc1eb (diff)
refactor(minion): improve reading temperature sensor
Diffstat (limited to 'minion/src/temperature.hpp')
-rw-r--r--minion/src/temperature.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/minion/src/temperature.hpp b/minion/src/temperature.hpp
index dcc213c..a4eea71 100644
--- a/minion/src/temperature.hpp
+++ b/minion/src/temperature.hpp
@@ -20,7 +20,10 @@ constexpr auto BITS_IN_BYTE = 8U;
enum class TemperatureSensorStatus
{
OK,
- TIMEOUT,
+ LOW_RESPONSE_SIGNAL_TIMEOUT,
+ HIGH_RESPONSE_SIGNAL_TIMEOUT,
+ START_TO_TRANSMIT_SIGNAL_TIMEOUT,
+ DATA_TRANSMIT_TIMEOUT,
CHECKSUM_ERROR
};
@@ -39,4 +42,6 @@ private:
uint8_t _temperature{};
auto _wait_read(uint8_t level, size_t timeout_micros) noexcept -> bool;
+
+ void _restore_pin() noexcept;
};