From 3fdc01849e88c7fb2078cfe99a891db3fb843049 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 28 Jan 2022 13:07:22 +0100 Subject: [PATCH] bump deps of firmware example --- actor-example/firmware/Cargo.toml | 8 ++++---- actor-example/firmware/src/bin/temperature-monitor.rs | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) 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]