Removed surplus zero byte

This commit is contained in:
Sebastian 2026-01-02 19:49:16 +01:00
parent ceb4dc035f
commit 8e371bc6a2
2 changed files with 1 additions and 2 deletions

View file

@ -38,7 +38,6 @@ impl Encoder<HostMessage> for ProtocolCodec {
fn encode(&mut self, item: HostMessage, dst: &mut BytesMut) -> Result<(), Self::Error> { fn encode(&mut self, item: HostMessage, dst: &mut BytesMut) -> Result<(), Self::Error> {
let msg_bytes = to_stdvec_cobs(&item).unwrap(); let msg_bytes = to_stdvec_cobs(&item).unwrap();
dst.put(msg_bytes.as_slice()); dst.put(msg_bytes.as_slice());
dst.put_u8(0);
Ok(()) Ok(())
} }
} }

View file

@ -514,7 +514,7 @@ mod app {
bootloader::reboot_to_bootloader(); bootloader::reboot_to_bootloader();
} }
}, },
Err(err) => defmt::error!("Unable to parse host message"), Err(err) => defmt::error!("Unable to parse host message: {}", err),
}; };
*buffer = Vec::<u8, USB_BUFFER_SIZE>::from_slice(rest).unwrap(); *buffer = Vec::<u8, USB_BUFFER_SIZE>::from_slice(rest).unwrap();