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

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