cleanup of the nextion code

This commit is contained in:
Robert Schauklies 2026-01-14 23:32:01 +01:00
parent 1a5c58c31c
commit 502afc9a5f

View file

@ -29,11 +29,6 @@ impl<'a> Nextion<'a> {
let _ = &self.interface.write(b"\xff\xff\xff");
}
fn read_frame(&mut self, buf: &mut [u8]) -> Result<usize, RxError> {
let size: usize = 0;
let mut tmp_buf: [u8; 20] = [0; 20];
let mut cmd_end_ctr = 0;
let mut i = 0;
let mut read_header = false;
loop {
if !self.interface.read_ready() {
continue;
@ -70,7 +65,6 @@ impl<'a> Nextion<'a> {
UartStatemachine::Terminator(n) => {
if byte == b'\xff' {
if n >= 2 {
rprintln!("SENDING {:?}",buf);
let idx = self.idx;
self.reset();
return Ok(idx);