remove \r\n from the end of the rx buffer
may be a bad idea and should be revisited
This commit is contained in:
parent
835bf50b80
commit
4fefd547d1
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
// This check here is tested on sim800l and works only because the modem has \r\n as CRLF.
|
||||||
if line.ends_with("\r") {
|
if line.ends_with("\r") {
|
||||||
Ok(line)
|
Ok(line[0..line.len()-1].to_string())
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Err(ModemError::ReadError)
|
Err(ModemError::ReadError)
|
||||||
|
|
Loading…
Reference in a new issue