From ee076c66c99fbd7895459e80d679c374340a9ed2 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 7 Mar 2022 11:24:01 +0100 Subject: refactor: make misc improvements & update calibration precision --- src/gyronardo.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/gyronardo.cpp') diff --git a/src/gyronardo.cpp b/src/gyronardo.cpp index d8aaf0e..1c75c80 100644 --- a/src/gyronardo.cpp +++ b/src/gyronardo.cpp @@ -6,16 +6,13 @@ #include #include -// constexpr unsigned int LINE_CLEAR_LENGTH = 30U; - constexpr uint8_t SENSOR_ADDRESS = 0x68U; -constexpr unsigned int SENSOR_THROTTLE_TIME = 50U; // milliseconds - -constexpr unsigned int BAUD_RATE = 9600U; +constexpr uint32_t SENSOR_THROTTLE_TIME = 50U; // milliseconds +constexpr uint32_t SENSOR_RETRY_TIME = 2000U; // milliseconds -constexpr unsigned int SENSOR_RETRY_TIME = 2000U; +constexpr uint32_t BAUD_RATE = 9600U; -SerialStream sout(Serial_(), BAUD_RATE); +auto sout = SerialStream(Serial_(), BAUD_RATE); auto sensor = Sensor(SENSOR_ADDRESS, Wire, sout, SENSOR_THROTTLE_TIME); -- cgit v1.2.3-18-g5258