File tree Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -310,7 +310,10 @@ async fn main(spawner: Spawner) {
310310 ws_sleep_sig. signal ( last_sleep) ;
311311
312312 match last_sleep {
313- true => wifi_res. stop_radio ( ) ,
313+ true => {
314+ unsafe { crate :: state:: TRUST_SERVER = false } ;
315+ wifi_res. stop_radio ( )
316+ }
314317 false => wifi_res. restart_radio ( ) ,
315318 }
316319 }
Original file line number Diff line number Diff line change @@ -128,6 +128,10 @@ pub async fn rfid_task(
128128 continue ;
129129 }
130130
131+ let fkm_token = unsafe { crate :: state:: FKM_TOKEN } ;
132+ if fkm_token != 0 {
133+ log:: info!( "TODO: use fkm_token ({fkm_token}) to verify if card is legit (not copied)" ) ;
134+ }
131135 // TODO: WRITE SECURED
132136 /*
133137 let status = mfrc522
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ pub enum TimerPacketInner {
7070 added : bool ,
7171 locales : Vec < TranslationLocale > ,
7272 default_locale : String ,
73+ fkm_token : i32 ,
7374 } ,
7475 Logs {
7576 logs : Vec < String > ,
Original file line number Diff line number Diff line change @@ -349,6 +349,7 @@ async fn ws_rw(
349349 added,
350350 locales,
351351 default_locale,
352+ fkm_token,
352353 } => {
353354 let mut state = global_state. state . lock ( ) . await ;
354355 state. device_added = Some ( added) ;
@@ -363,6 +364,8 @@ async fn ws_rw(
363364
364365 crate :: translations:: select_locale ( & default_locale, & global_state) ;
365366 crate :: translations:: set_default_locale ( ) ;
367+
368+ unsafe { crate :: state:: FKM_TOKEN = fkm_token } ;
366369 }
367370 TimerPacketInner :: ApiError ( e) => {
368371 // if should_reset_time reset time
You can’t perform that action at this time.
0 commit comments