diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-07 11:24:01 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-03-07 11:24:01 +0100 |
commit | ee076c66c99fbd7895459e80d679c374340a9ed2 (patch) | |
tree | 14bbacde20f8d23d8ec3c4638f18f6a09a1153cb /src/gyronardo.cpp | |
parent | 5fea3a40f77417f639de3dbb27797d8e2ecdbaca (diff) |
refactor: make misc improvements & update calibration precision
Diffstat (limited to 'src/gyronardo.cpp')
-rw-r--r-- | src/gyronardo.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
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 <Arduino.h> #include <Wire.h> -// 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); |