Update core modules and add GUI panels

This commit is contained in:
2026-06-08 17:32:42 +08:00
parent 2d33b4b2ae
commit 2eb02350da
23 changed files with 822 additions and 161 deletions

View File

@@ -1,4 +1,5 @@
use super::Framer;
use tracing::{debug, warn};
/// COBS (Consistent Overhead Byte Stuffing) framer.
///
@@ -38,9 +39,16 @@ impl Framer for CobsFramer {
for &byte in data {
if byte == 0x00 {
if !self.buf.is_empty() {
// Decode failed (corrupt packet) — discard and continue
let buf_len = self.buf.len();
if let Some(decoded) = cobs_decode(&self.buf) {
debug!(
encoded_len = buf_len,
decoded_len = decoded.len(),
"COBS frame decoded"
);
frames.push(decoded);
} else {
warn!(len = buf_len, "corrupt COBS packet discarded");
}
self.buf.clear();
}