removed dummy data and pass read tally id

This commit is contained in:
Philipp_EndevourOS 2025-10-01 18:56:37 +02:00
parent becdd43738
commit c91f290c31

View File

@ -2,7 +2,7 @@ use embassy_time::{Duration, Timer};
use esp_hal::{Async, uart::Uart};
use log::{debug, info};
use crate::TallyPublisher;
use crate::{TallyPublisher, store::TallyID};
#[embassy_executor::task]
pub async fn rfid_reader_task(mut uart_device: Uart<'static, Async>, chan: TallyPublisher) {
@ -17,7 +17,7 @@ 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([1, 0, 2, 5, 0, 8, 12, 15]).await;
chan.publish(uart_buffer[..8].try_into().unwrap()).await;
}
Err(e) => {
log::error!("Error reading from UART: {e}");