@@ -549,22 +549,10 @@ namespace microdata {
549549 public static streamingDone : boolean = true
550550 private static streamDataBack : boolean = true
551551
552- private static setupDone : boolean = false ;
553-
554552 private targetIDCache : number [ ]
555553
556554 constructor ( app : AppInterface , sensors ?: Sensor [ ] , configs ?: RecordingConfig [ ] ) {
557555 super ( app )
558-
559- // This DistributedLoggingScreen can take a while to start on account of the DistributedLoggingProtocol.
560- // Because of this it is important to unbind the buttons so that they cannot be invoked during setup.
561- control . onEvent ( ControllerButtonEvent . Pressed , controller . up . id , ( ) => { } ) ;
562- control . onEvent ( ControllerButtonEvent . Pressed , controller . down . id , ( ) => { } ) ;
563- control . onEvent ( ControllerButtonEvent . Pressed , controller . left . id , ( ) => { } ) ;
564- control . onEvent ( ControllerButtonEvent . Pressed , controller . right . id , ( ) => { } ) ;
565- control . onEvent ( ControllerButtonEvent . Pressed , controller . A . id , ( ) => { } ) ;
566- control . onEvent ( ControllerButtonEvent . Pressed , controller . B . id , ( ) => { } ) ;
567-
568556 this . uiState = UI_STATE . SHOWING_OPTIONS
569557 this . distributedLogger = new DistributedLoggingProtocol ( app , true , this )
570558
@@ -580,30 +568,26 @@ namespace microdata {
580568 this . app . pushScene ( new TabularDataViewer ( this . app , function ( ) { this . app . popScene ( ) ; this . app . pushScene ( new DistributedLoggingScreen ( this . app ) ) } ) )
581569 }
582570 }
583-
584- DistributedLoggingScreen . setupDone = true ;
585571 }
586572
587573 callback ( msg : string ) {
588574 DistributedLoggingScreen . streamingDone = true
589575 }
590576
591- /* override */ startup ( controlSetupFn ? : ( ) => void ) {
577+ /* override */ startup ( controlSetupfn : ( ) => void ) {
592578 super . startup ( )
593579
594580 control . onEvent (
595581 ControllerButtonEvent . Pressed ,
596582 controller . B . id ,
597583 ( ) => {
598- if ( DistributedLoggingScreen . setupDone ) {
599- if ( this . uiState != UI_STATE . SHOWING_OPTIONS ) {
600- this . uiState = UI_STATE . SHOWING_OPTIONS
601- this . cursor . visible = true
602- }
603- else if ( DistributedLoggingScreen . streamingDone ) {
604- this . app . popScene ( )
605- this . app . pushScene ( new Home ( this . app ) ) ;
606- }
584+ if ( this . uiState != UI_STATE . SHOWING_OPTIONS ) {
585+ this . uiState = UI_STATE . SHOWING_OPTIONS
586+ this . cursor . visible = true
587+ }
588+ else if ( DistributedLoggingScreen . streamingDone ) {
589+ this . app . popScene ( )
590+ this . app . pushScene ( new Home ( this . app ) ) ;
607591 }
608592 }
609593 )
0 commit comments