diff --git a/src/bin/minimal.rs b/src/bin/minimal.rs index d15f05c..b3212e1 100644 --- a/src/bin/minimal.rs +++ b/src/bin/minimal.rs @@ -147,7 +147,7 @@ mod app { &mut rcc.apb2 ); gps_uart.listen(serial::Event::Rxne); - rtic::pend(Interrupt::USART1); + // rtic::pend(Interrupt::USART1); // Spawn tasks display_task::spawn().unwrap(); @@ -183,7 +183,9 @@ mod app { #[task(binds = USART1, shared = [gps])] fn on_uart(mut cx: on_uart::Context) { info!("hewwo"); - cx.shared.gps.lock(|gps| gps.handle()); + cx.shared.gps.lock(|gps| { + gps.handle(); + }); } #[task(binds = RTC_WKUP)] diff --git a/src/display.rs b/src/display.rs index 19b8154..984cb05 100644 --- a/src/display.rs +++ b/src/display.rs @@ -134,7 +134,7 @@ impl SharpMemDisplay .fold( self.driver.start(UPDATE_BIT), // command byte |trn, (y, row)| - trn.send(&[y as u8]) // address byte + trn.send(&[(y + 1) as u8]) // address byte, row is 1-indexed .send(row) // row data .send(&[0x00]) // spacing byte ) diff --git a/src/gps.rs b/src/gps.rs index 5b6a79b..3ca7b86 100644 --- a/src/gps.rs +++ b/src/gps.rs @@ -4,8 +4,8 @@ use ublox::{PacketRef, Parser}; use tinyvec::ArrayVec; pub struct Gps { - serial: SERIAL, - parser: Parser> + pub serial: SERIAL, + pub parser: Parser> } impl Gps