From 8c4b6803649a90b656606fcfc91621e76e867cbc Mon Sep 17 00:00:00 2001
From: Federico Lolli <federico.lolli@skywarder.eu>
Date: Mon, 19 Feb 2024 00:24:43 +0100
Subject: [PATCH] increased maximum baudrate accepted

---
 src/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib.rs b/src/lib.rs
index 1d201eb..5e17207 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -108,7 +108,7 @@ fn open_serial(args: Args<'_>) -> SResult<()> {
         .map_mexerr(|e| Error::InvalidBaudrate(Box::new(e)))?;
     // Check for arg2 to resemble a baud rate (this type mismatch should be
     // fixed later on)
-    if arg2 != arg2.floor() || !(0.0..=115_200.0).contains(&arg2) {
+    if arg2 != arg2.floor() || !(0.0..=921_600.0).contains(&arg2) {
         return Err(Error::InvalidBaudrate(Box::new(Error::InvalidMatlabType(
             "do not use decimal units, use a number between 0 and 115200".into(),
         ))));
-- 
GitLab