Skip to content

Commit

Permalink
bump deps of firmware example
Browse files Browse the repository at this point in the history
  • Loading branch information
japaric committed Jan 28, 2022
1 parent 15c41b7 commit 5d4fa40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions actor-example/firmware/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions actor-example/firmware/src/bin/temperature-monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -31,7 +30,7 @@ mod app {

impl Receive<TemperatureReadingCelsius> for TemperatureTracer {
fn receive(&mut self, reading: TemperatureReadingCelsius) {
defmt::trace!("temperature: {} C", reading.0);
defmt::println!("temperature: {} C", reading.0);
}
}

Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 5d4fa40

Please sign in to comment.