Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lukipuki committed Nov 13, 2024
1 parent 9c076d8 commit 01869a4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions nrf52840/src/at_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ impl AtUart {
timeout: Duration,
indices: &[usize],
) -> Result<AtResponse, Error> {
self.write(command).await?;
debug!("Calling {}", command);
self.write(command).await?;
let lines = self.read(timeout).await?;
if let Some(&FromModem::Ok) = lines.last() {
Ok(AtResponse::new(lines, command, indices))
Expand All @@ -233,11 +233,10 @@ impl AtUart {
response_timeout: Duration,
indices: &[usize],
) -> Result<AtResponse, Error> {
self.write(command).await?;
debug!("Calling {}", command);
self.write(command).await?;
let mut lines = self.read(call_timeout).await?;
let second = self.read(response_timeout).await?;
lines.extend(second);
lines.extend(self.read(response_timeout).await?);
Ok(AtResponse::new(lines, command, indices))
}
}
Expand Down

0 comments on commit 01869a4

Please sign in to comment.