Skip to content

Commit f268475

Browse files
committed
♻️ refactor(serial): Remove conditional in get read timeout function
1 parent 60d6a17 commit f268475

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/serial.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,8 @@ DataLength Serial::getDataLength() const {
375375
}
376376

377377
std::chrono::milliseconds Serial::getReadTimeout() const {
378-
if (canonical_mode_ == CanonicalMode::DISABLE) {
379-
this->getTermios2();
380-
return std::chrono::milliseconds(options_.c_cc[VTIME] * 100);
381-
}
382-
return read_timeout_ms_;
378+
this->getTermios2();
379+
return std::chrono::milliseconds(options_.c_cc[VTIME] * 100);
383380
}
384381

385382
uint16_t Serial::getMinNumberCharRead() const {

0 commit comments

Comments
 (0)