restore the received message (including \r\n in the end)

This commit is contained in:
Vladan Popovic 2022-06-20 00:38:00 +02:00
parent 858129cc82
commit fccbf98155
1 changed files with 1 additions and 1 deletions

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. // 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[0..line.len()-1].to_string()) Ok(format!("{}\n", line))
} }
else { else {
Err(ModemError::ReadError) Err(ModemError::ReadError)