mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2025-10-13 15:06:39 +00:00
removed dummy data and pass read tally id
This commit is contained in:
parent
becdd43738
commit
c91f290c31
@ -2,7 +2,7 @@ use embassy_time::{Duration, Timer};
|
|||||||
use esp_hal::{Async, uart::Uart};
|
use esp_hal::{Async, uart::Uart};
|
||||||
use log::{debug, info};
|
use log::{debug, info};
|
||||||
|
|
||||||
use crate::TallyPublisher;
|
use crate::{TallyPublisher, store::TallyID};
|
||||||
|
|
||||||
#[embassy_executor::task]
|
#[embassy_executor::task]
|
||||||
pub async fn rfid_reader_task(mut uart_device: Uart<'static, Async>, chan: TallyPublisher) {
|
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();
|
core::fmt::Write::write_fmt(&mut hex_str, format_args!("{:02X} ", byte)).ok();
|
||||||
}
|
}
|
||||||
info!("Read {n} bytes from UART: {hex_str}");
|
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) => {
|
Err(e) => {
|
||||||
log::error!("Error reading from UART: {e}");
|
log::error!("Error reading from UART: {e}");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user