changed decom to output json

This commit is contained in:
2025-04-07 22:32:22 -05:00
parent bfe3333d65
commit d7d8c0789a
21 changed files with 1165 additions and 951 deletions
+11 -4
View File
@@ -89,14 +89,16 @@ mod watchdog_rp2040 {
pub struct Rp2040Watchdog {
wd: Watchdog,
time: u32,
timeout: u32,
enabled: bool,
}
impl Rp2040Watchdog {
pub fn new(wd: Watchdog) -> Self {
Self {
wd,
time: 3 * 1000000,
timeout: 3 * 1000000,
enabled: false,
}
}
}
@@ -105,16 +107,21 @@ mod watchdog_rp2040 {
fn enable(&mut self) {
self.wd
.start(rp2040_hal::fugit::Duration::<u32, 1, 1000000>::from_ticks(
self.time,
self.timeout,
));
self.enabled = true;
}
fn disable(&mut self) {
self.wd.disable();
self.enabled = false;
}
fn set_timeout(&mut self, time: i32) {
self.time = time as u32 * 1000000;
self.timeout = time as u32 * 1000000;
if self.enabled {
self.enable();
}
}
fn feed(&mut self) {