GNSS: Don't print warnings on no fix
This commit is contained in:
parent
1a5012dec5
commit
fb47f17c3f
1 changed files with 6 additions and 8 deletions
14
src/main.rs
14
src/main.rs
|
|
@ -372,14 +372,12 @@ async fn main(spawner: Spawner) -> ! {
|
|||
println!("{}", ubx::pretty_print_nav_sat(packet));
|
||||
}
|
||||
ublox::proto27::PacketRef::NavPvt(pvt) => {
|
||||
match applogic::GnssFix::try_from(pvt) {
|
||||
Ok(pos_state) => {
|
||||
critical_section::with(|cs| {
|
||||
let gnss_update_ref = GNSS_UPDATE.borrow(cs);
|
||||
gnss_update_ref.replace(Some(pos_state));
|
||||
});
|
||||
}
|
||||
Err(err) => warn!("{err}"),
|
||||
// error can be ignored b/c it's just when no GNSS fix yet
|
||||
if let Ok(pos_state) = applogic::GnssFix::try_from(pvt) {
|
||||
critical_section::with(|cs| {
|
||||
let gnss_update_ref = GNSS_UPDATE.borrow(cs);
|
||||
gnss_update_ref.replace(Some(pos_state));
|
||||
});
|
||||
}
|
||||
|
||||
// update GNSS HB on screen
|
||||
|
|
|
|||
Loading…
Reference in a new issue