Skip to content

Commit

Permalink
Power off module if hard_reset fails during AT probing (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasKoch authored Sep 28, 2023
1 parent 29741f8 commit 461461e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ublox-cellular/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ where

// At this point, if is_alive fails, the configured Baud rate is probably wrong
if let Err(e) = self.is_alive(5).map_err(|_| Error::BaudDetection) {
self.hard_reset()?;
if self.hard_reset().is_err() {
self.hard_power_off()?;
BlockingTimer::after(Duration::from_secs(1)).wait();
}
return Err(e);
}

Expand Down

0 comments on commit 461461e

Please sign in to comment.