screen: clear sceen on first GNSS fix
This commit is contained in:
parent
696bc97ca5
commit
e024251260
1 changed files with 5 additions and 0 deletions
|
|
@ -169,8 +169,13 @@ async fn main(spawner: Spawner) -> ! {
|
||||||
let gnss_update_ref = GNSS_UPDATE.borrow(cs);
|
let gnss_update_ref = GNSS_UPDATE.borrow(cs);
|
||||||
|
|
||||||
if let Some(fix) = gnss_update_ref.replace(None) {
|
if let Some(fix) = gnss_update_ref.replace(None) {
|
||||||
|
let prev_state = state.initialized();
|
||||||
state.update_with_gpsfix(&fix);
|
state.update_with_gpsfix(&fix);
|
||||||
|
|
||||||
|
if prev_state != state.initialized() {
|
||||||
|
let _ = screen::clear(&mut display).inspect_err(log_screen_error);
|
||||||
|
}
|
||||||
|
|
||||||
if fix.get_timestamp().is_some() {
|
if fix.get_timestamp().is_some() {
|
||||||
info!("{}", state.print_fix());
|
info!("{}", state.print_fix());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue