From 1a0264a5259193e977101533342a6684d226626e Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 17 May 2022 12:53:14 +0200 Subject: refactor(minion): improve reading temperature sensor --- minion/src/temperature.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'minion/src/temperature.hpp') 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; }; -- cgit v1.2.3-18-g5258