diff --git a/sw/com_rs b/sw/com_rs index f7c4661..5e3c741 160000 --- a/sw/com_rs +++ b/sw/com_rs @@ -1 +1 @@ -Subproject commit f7c46612a4181e3d33ec6c5fc90740062d2d9832 +Subproject commit 5e3c741369ae2c1a537b41b70bdfd40d1b62e06d diff --git a/sw/src/main.rs b/sw/src/main.rs index 3c332a0..73fe4ea 100644 --- a/sw/src/main.rs +++ b/sw/src/main.rs @@ -474,6 +474,18 @@ fn main() -> ! { logln!(LL::Debug, "CLoop"); com_tx((rx & 0xFF) | ((com_sentinel as u16 & 0xFF) << 8)); com_sentinel += 1; + } else if rx == ComState::LINK_PING.verb { + logln!(LL::Debug, "CPing"); + match com_rx(500) { + Ok(ping) => { + com_tx(!ping); + com_tx(0x600d); + }, + _ => { + com_tx(0xEEEE); + com_tx(0xFFFF); + } + } } else if rx == ComState::GAS_GAUGE.verb { logln!(LL::Trace, "CGg"); // This gets polled frequently com_tx(pow.current as u16);