File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,10 @@ impl Controller {
81
81
tokio:: select! {
82
82
result = uid_rx => {
83
83
let uid = result?;
84
- self . led. send( LedState :: On { color: YELLOW } ) . await ?;
85
84
86
85
if config_uids. contains( & uid) {
86
+ self . led. send( LedState :: On { color: YELLOW } ) . await ?;
87
+
87
88
if self . process_config_command( uid, & mut config_uids, nfc. clone( ) ) . await . is_ok( ) {
88
89
self . led. send( LedState :: On { color: CYAN } ) . await ?;
89
90
} else {
@@ -95,6 +96,13 @@ impl Controller {
95
96
continue ;
96
97
}
97
98
99
+ if self . networker_status != NetworkerStatus :: Connected {
100
+ self . wait_for_release( & nfc) . await ?;
101
+ continue ;
102
+ }
103
+
104
+ self . led. send( LedState :: On { color: YELLOW } ) . await ?;
105
+
98
106
let ( done_tx, done_rx) = oneshot:: channel( ) ;
99
107
self . audio_player. send( PlayerCommand :: PlayBloop { done: done_tx } ) . await ?;
100
108
done_rx. await ?;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ pub type AchievementId = [u8; 20];
31
31
#[ error( "Invalid credentials" ) ]
32
32
struct InvalidCredentialsError ;
33
33
34
- #[ derive( Debug ) ]
34
+ #[ derive( Debug , PartialEq ) ]
35
35
pub enum NetworkerStatus {
36
36
NoConfig ,
37
37
InvalidCredentials ,
You can’t perform that action at this time.
0 commit comments