From 3b165a78f2cd1e5fbdd2027f2d27c2270fea2355 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 13 Oct 2019 21:39:25 -0400 Subject: [PATCH] Ensures `remaining_delays_` is set properly after [reset/flush]_writing. --- Components/SerialPort/SerialPort.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Components/SerialPort/SerialPort.cpp b/Components/SerialPort/SerialPort.cpp index 18e1483b1..c9d9dc506 100644 --- a/Components/SerialPort/SerialPort.cpp +++ b/Components/SerialPort/SerialPort.cpp @@ -59,10 +59,12 @@ int Line::write_data_time_remaining() { } void Line::reset_writing() { + remaining_delays_ = 0; events_.clear(); } void Line::flush_writing() { + remaining_delays_ = 0; for(const auto &event : events_) { switch(event.type) { default: break;