diff --git a/apps/example/src/example.rs b/apps/example/src/example.rs index 3e1a1e0..6d25a8a 100644 --- a/apps/example/src/example.rs +++ b/apps/example/src/example.rs @@ -41,7 +41,9 @@ impl App for Example { ExampleCmd::Noop => info!("NOOP command received"), ExampleCmd::Reset => { info!("RESET command received"); + let perf = self.data.hk.perf; self.data = Default::default(); + self.data.hk.perf = perf; } }, _ => { diff --git a/builds/rp_pico_example/Cargo.toml b/builds/rp_pico_example/Cargo.toml index 1668703..641b9ab 100644 --- a/builds/rp_pico_example/Cargo.toml +++ b/builds/rp_pico_example/Cargo.toml @@ -8,6 +8,7 @@ embassy-usb-logger = { git = "https://github.com/embassy-rs/embassy.git" } rfe = { path = "../../rfe", default-features = false, features = ["rp2040"] } to = { path = "../../apps/to", default-features = false } hs = { path = "../../apps/hs", default-features = false, features = ["rp2040"] } +example = { path = "../../apps/example" } anyhow.workspace = true anyhow.default_features = false embedded-alloc = "0.6.0" diff --git a/builds/rp_pico_example/src/main.rs b/builds/rp_pico_example/src/main.rs index 58efd58..108a4b8 100644 --- a/builds/rp_pico_example/src/main.rs +++ b/builds/rp_pico_example/src/main.rs @@ -15,10 +15,11 @@ mod app { usb::{self, Driver}, }; use embedded_hal::digital::v2::OutputPin; + use example::Example; use fugit::Duration; use hs::{Hs, HsConfig, Rp2040Watchdog, StubSystemInfoGrabber}; use log::info; - use msg::{ExampleHk, Instance, MsgKind, MsgPacket, TargetMsg, TlmSetItem, ToTlmSet}; + use msg::{Instance, MsgKind, MsgPacket, TargetMsg, TlmSetItem, ToTlmSet}; use rfe::{connector::Connector, Rate, *}; use rp_pico::hal::{ clocks, @@ -69,19 +70,13 @@ mod app { self.counter += 1; self.on = !self.on; if self.on { - info!("led on!"); self.led_pin.set_high().ok(); } else { - info!("led off!"); self.led_pin.set_low().ok(); } } - fn hk(&mut self, rfe: &mut Rfe) { - rfe.send(msg::Msg::ExampleHk(ExampleHk { - counter: self.counter, - })); - } + fn hk(&mut self, _rfe: &mut Rfe) {} fn out_data(&mut self, _rfe: &mut Rfe) {} @@ -198,7 +193,9 @@ mod app { }, ); let mut to = To::new(&mut log_connector, tlmsets); + let mut example = Example::new(); let mut wd = Rp2040Watchdog::new(ctx.local.wd.take().unwrap()); + let mut grabber = StubSystemInfoGrabber::new(); let mut hs = Hs::new( HsConfig { @@ -218,6 +215,7 @@ mod app { instance.add_app("blink_app", &mut blink_app).unwrap(); instance.add_app("to", &mut to).unwrap(); instance.add_app("hs", &mut hs).unwrap(); + instance.add_app("example", &mut example).unwrap(); let mut next_time = Mono::now() + Duration::::from_ticks(10000);