mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2025-10-13 15:06:39 +00:00
fixed RFID read id parser
This commit is contained in:
parent
dfe5197ab8
commit
211961a770
@ -17,7 +17,11 @@ pub async fn rfid_reader_task(mut uart_device: Uart<'static, Async>, chan: Tally
|
||||
core::fmt::Write::write_fmt(&mut hex_str, format_args!("{:02X} ", byte)).ok();
|
||||
}
|
||||
info!("Read {n} bytes from UART: {hex_str}");
|
||||
chan.publish(uart_buffer[..8].try_into().unwrap()).await;
|
||||
|
||||
// The first byte is always 0x02 (Start of text)
|
||||
// Followed by 12 Bytes of chars
|
||||
// Ended by 0x03 (End of text)
|
||||
chan.publish(uart_buffer[1..13].try_into().unwrap()).await;
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("Error reading from UART: {e}");
|
||||
|
Loading…
x
Reference in New Issue
Block a user