File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -591,7 +591,7 @@ void onboarding(uint8_t key) {
591591 "have fun\nwith your OneKey Classic." ),
592592 NULL , NULL , NULL , NULL );
593593 key = protectWaitKey (0 , 1 );
594- if (protectAbortedByInitialize ) return ;
594+ if (protectAbortedByInitializeOnboarding ) return ;
595595 if (key != KEY_CONFIRM ) {
596596 goto done1 ;
597597 }
@@ -610,7 +610,7 @@ void onboarding(uint8_t key) {
610610 oledRefresh ();
611611 }
612612 key = protectWaitKey (0 , 1 );
613- if (protectAbortedByInitialize ) return ;
613+ if (protectAbortedByInitializeOnboarding ) return ;
614614 if (key != KEY_CONFIRM ) {
615615 goto done1 ;
616616 }
@@ -629,7 +629,7 @@ void onboarding(uint8_t key) {
629629 oledRefresh ();
630630 }
631631 key = protectWaitKey (0 , 1 );
632- if (protectAbortedByInitialize ) return ;
632+ if (protectAbortedByInitializeOnboarding ) return ;
633633 if (key != KEY_CONFIRM ) {
634634 goto done2 ;
635635 }
Original file line number Diff line number Diff line change 4242#define MAX_WRONG_PINS 15
4343
4444bool protectAbortedByCancel = false;
45+ // allow the app to connect to the device when in the tutorial page
46+ bool protectAbortedByInitializeOnboarding = false;
4547bool protectAbortedByInitialize = false;
4648bool protectAbortedByTimeout = false;
4749extern bool exitBlindSignByInitialize ;
@@ -751,6 +753,7 @@ uint8_t protectWaitKey(uint32_t time_out, uint8_t mode) {
751753 uint8_t key = KEY_NULL ;
752754
753755 protectAbortedByInitialize = false;
756+ protectAbortedByInitializeOnboarding = false;
754757 usbTiny (1 );
755758 timer_out_set (timer_out_oper , time_out );
756759 while (1 ) {
@@ -784,6 +787,7 @@ uint8_t protectWaitKey(uint32_t time_out, uint8_t mode) {
784787 }
785788 }
786789 usbTiny (0 );
790+ protectAbortedByInitializeOnboarding = protectAbortedByInitialize ;
787791 if (protectAbortedByInitialize ) {
788792 if (device_sleep_state ) device_sleep_state = SLEEP_CANCEL_BY_USB ;
789793 fsm_sendFailure (FailureType_Failure_ActionCancelled , NULL );
Original file line number Diff line number Diff line change @@ -65,5 +65,6 @@ void enter_sleep(void);
6565
6666extern bool protectAbortedByCancel ;
6767extern bool protectAbortedByInitialize ;
68+ extern bool protectAbortedByInitializeOnboarding ;
6869extern bool protectAbortedByTimeout ;
6970#endif
You can’t perform that action at this time.
0 commit comments