desktop: parse and discard RSP_KEEPALIVE messages

This commit is contained in:
jess 2026-04-03 02:27:09 -07:00
parent c1721dfd1f
commit d409f3569e
2 changed files with 4 additions and 0 deletions

View File

@ -734,6 +734,7 @@ impl App {
self.cal_cell_constant = Some(k); self.cal_cell_constant = Some(k);
self.status = format!("Device cell constant: {:.4} cm-1", k); self.status = format!("Device cell constant: {:.4} cm-1", k);
} }
EisMessage::Keepalive => {}
}, },
Message::TabSelected(t) => { Message::TabSelected(t) => {
if t == Tab::Browse { if t == Tab::Browse {

View File

@ -26,6 +26,7 @@ pub const RSP_REF_LP_RANGE: u8 = 0x21;
pub const RSP_REFS_DONE: u8 = 0x22; pub const RSP_REFS_DONE: u8 = 0x22;
pub const RSP_CELL_K: u8 = 0x11; pub const RSP_CELL_K: u8 = 0x11;
pub const RSP_REF_STATUS: u8 = 0x23; pub const RSP_REF_STATUS: u8 = 0x23;
pub const RSP_KEEPALIVE: u8 = 0x50;
/* Cue → ESP32 */ /* Cue → ESP32 */
pub const CMD_SET_SWEEP: u8 = 0x10; pub const CMD_SET_SWEEP: u8 = 0x10;
@ -258,6 +259,7 @@ pub enum EisMessage {
RefsDone, RefsDone,
RefStatus { has_refs: bool }, RefStatus { has_refs: bool },
CellK(f32), CellK(f32),
Keepalive,
} }
fn decode_u16(data: &[u8]) -> u16 { fn decode_u16(data: &[u8]) -> u16 {
@ -413,6 +415,7 @@ pub fn parse_sysex(data: &[u8]) -> Option<EisMessage> {
let p = &data[2..]; let p = &data[2..];
Some(EisMessage::CellK(decode_float(&p[0..5]))) Some(EisMessage::CellK(decode_float(&p[0..5])))
} }
RSP_KEEPALIVE => Some(EisMessage::Keepalive),
_ => None, _ => None,
} }
} }