fixed netcode

This commit is contained in:
Andy Killorin 2024-10-30 13:06:06 -04:00
commit ead78021d7
Signed by: ank
GPG key ID: 23F9463ECB67FE8C

View file

@ -186,9 +186,8 @@ async fn main(spawner: Spawner) {
pwm.set_config(&c);
},
'B' => {
let mut buf: [u8;8] = [0;8];
buf.copy_from_slice(segs.next().unwrap());
let card = u64::from_ne_bytes(buf);
let buf: [u8;8] = hex::FromHex::from_hex(segs.next().unwrap()).unwrap();
let card: u64 = u64::from_ne_bytes(buf);
info!("card {card:#16x}");
open_door(&mut c, &mut pwm).await;