remove \r\n from the end of the rx buffer

may be a bad idea and should be revisited
This commit is contained in:
Vladan Popovic 2022-06-20 00:10:20 +02:00
parent 835bf50b80
commit 4fefd547d1

View file

@ -121,7 +121,7 @@ impl<UART: serial::Uart> Modem<UART> {
//
// This check here is tested on sim800l and works only because the modem has \r\n as CRLF.
if line.ends_with("\r") {
Ok(line)
Ok(line[0..line.len()-1].to_string())
}
else {
Err(ModemError::ReadError)