diff options
Diffstat (limited to 'src/gyronardo.cpp')
-rw-r--r-- | src/gyronardo.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gyronardo.cpp b/src/gyronardo.cpp index e78bb1d..57bcd18 100644 --- a/src/gyronardo.cpp +++ b/src/gyronardo.cpp @@ -15,15 +15,14 @@ constexpr unsigned int BAUD_RATE = 9600U; constexpr unsigned int SENSOR_RETRY_TIME = 2000U; -UniquePtr<SerialStream> sout_ptr; +SerialStream sout(Serial_(), BAUD_RATE); +// SerialStream sout(Serial, BAUD_RATE); UniquePtr<Sensor> sensor; void setup() { - sout_ptr = make_unique<SerialStream>(Serial, BAUD_RATE); - - auto sout = *sout_ptr; + sout.waitReady(); sensor = make_unique<Sensor>(SENSOR_ADDRESS, Wire, sout, SENSOR_THROTTLE_TIME); |