diff --git a/actor-example/firmware/Cargo.toml b/actor-example/firmware/Cargo.toml index 52bc0e8834..119a3bd957 100644 --- a/actor-example/firmware/Cargo.toml +++ b/actor-example/firmware/Cargo.toml @@ -8,12 +8,12 @@ actors = { path = "../actors" } cortex-m = "0.7.1" cortex-m-rt = "0.6.13" cortex-m-rtic = { path = "../.." } -defmt = "0.2.0" -defmt-rtt = "0.2.0" +defmt = "0.3.0" +defmt-rtt = "0.3.1" nrf52840-hal = "0.12.2" -panic-probe = { version = "0.2.0", features = ["print-defmt"] } +panic-probe = { version = "0.3.0", features = ["print-defmt"] } rtic-actor-traits = { path = "../../actor-traits" } -systick-monotonic = "0.1.0-alpha.0" +systick-monotonic = "1" [features] # set logging levels here diff --git a/actor-example/firmware/src/bin/temperature-monitor.rs b/actor-example/firmware/src/bin/temperature-monitor.rs index 69b0d5d8c2..6636d5828e 100644 --- a/actor-example/firmware/src/bin/temperature-monitor.rs +++ b/actor-example/firmware/src/bin/temperature-monitor.rs @@ -8,9 +8,8 @@ mod app { use actors::{ FakeTemperatureSensor, TemperatureAlert, TemperatureMonitor, TemperatureReadingCelsius, }; - use rtic::time::duration::*; use rtic_actor_traits::Receive; - use systick_monotonic::Systick; + use systick_monotonic::*; // configuration const TEMPERATURE_THRESHOLD: i32 = 37; @@ -31,7 +30,7 @@ mod app { impl Receive for TemperatureTracer { fn receive(&mut self, reading: TemperatureReadingCelsius) { - defmt::trace!("temperature: {} C", reading.0); + defmt::println!("temperature: {} C", reading.0); } } @@ -83,7 +82,7 @@ mod app { #[task(local = [temperature_sensor])] fn periodic(cx: periodic::Context) { cx.local.temperature_sensor.read(); - periodic::spawn_after(1.seconds()).expect("OOM"); + periodic::spawn_after(1.secs()).expect("OOM"); } #[shared]