Beispiel #1
0
 def on_exit(self):
     """
     Called when the screen is hidden. 
     """
     gauges = list(kvFindClass(self, Gauge))
     for gauge in gauges:
         gauge.visible = False
    def init_view(self):
        screenMgr = kvFind(self, 'rcid', 'screens')
        
        databus = self._databus
        settings = self._settings
        
        self.initGlobalGauges()
        
        gaugeView = GaugeView(name='gaugeView', databus=databus, settings=settings)
        tachView = TachometerView(name='tachView', databus=databus, settings=settings)
        laptimeView = LaptimeView(name='laptimeView', databus=databus, settings=settings)
        #comboView = ComboView(name='comboView', databus=databus, settings=settings)
        rawChannelView = RawChannelView(name='rawchannelView', databus=databus, settings=settings)
        
        screenMgr.add_widget(gaugeView)
        screenMgr.add_widget(tachView)
        screenMgr.add_widget(laptimeView) 
        #screenMgr.add_widget(comboView)
        screenMgr.add_widget(rawChannelView)

        gauges = list(kvFindClass(self, DigitalGauge))

        for gauge in gauges:
            gauge.settings = self._settings
            gauge.data_bus = databus

        self._gaugeView = gaugeView
        self._tachView = tachView
        self._rawchannelView = rawChannelView
        self._laptimeView = laptimeView
        #self._comboView = comboView
        self._screen_mgr = screenMgr
        databus.start_update()
        Clock.schedule_once(lambda dt: self._show_last_view())
Beispiel #3
0
 def on_enter(self):
     """
     Called when the screen is shown. 
     """
     gauges = list(kvFindClass(self, Gauge))
     for gauge in gauges:
         gauge.visible = True
    def _init_view(self):
        databus = self._databus
        settings = self._settings

        self._init_global_gauges()

        # add the initial set of empty screens
        screens = self._screens
        screens += self._filter_dashboard_screens(
            self._settings.userPrefs.get_dashboard_screens())
        for i in range(0, len(screens)):
            self.ids.carousel.add_widget(AnchorLayout())

        # Find all of the global and set the objects they need
        gauges = list(kvFindClass(self, DigitalGauge))
        for gauge in gauges:
            gauge.settings = settings
            gauge.data_bus = databus

        # Initialize our alert type widgets
        self._alert_widgets['pit_stop'] = PitstopTimerView(databus, 'Pit Stop')

        self._notify_preference_listeners()
        self._show_last_view()

        if self._rc_api.connected:
            self._race_setup()

        self._rc_api.add_connect_listener(self._on_rc_connect)
        self._initialized = True

        Clock.schedule_once(
            lambda dt: HelpInfo.help_popup(
                'dashboard_gauge_help', self, arrow_pos='right_mid'), 2.0)
    def _init_view(self):
        databus = self._databus
        settings = self._settings
        dashboard_state = self._dashboard_state

        self._init_global_gauges()

        # add the initial set of empty screens
        screens = self._screens
        screens += self._filter_dashboard_screens(self._settings.userPrefs.get_dashboard_screens())
        for i in range (0, len(screens)):
            self.ids.carousel.add_widget(AnchorLayout())

        # Find all of the global and set the objects they need
        gauges = list(kvFindClass(self, DigitalGauge))
        for gauge in gauges:
            gauge.settings = settings
            gauge.data_bus = databus
            gauge.dashboard_state = dashboard_state

        # Initialize our alert type widgets
        self._alert_widgets['pit_stop'] = PitstopTimerView(databus, 'Pit Stop')

        self._notify_preference_listeners()
        self._show_last_view()

        if self._rc_api.connected:
            self._race_setup()

        self._rc_api.add_connect_listener(self._on_rc_connect)
        self._rc_api.addListener('alertmessage', self._on_alertmessage)
        self._initialized = True

        Clock.schedule_once(lambda dt: HelpInfo.help_popup('dashboard_gauge_help', self, arrow_pos='right_mid'), 2.0)
    def initGlobalGauges(self):
        databus = self._databus
        settings = self._settings
 
        activeGauges = list(kvFindClass(self, Gauge))
        
        for gauge in activeGauges:
            gauge.settings = settings
            gauge.data_bus = databus
Beispiel #7
0
 def init_view(self):
     data_bus = self._databus
     settings = self._settings
     
     gauges = list(kvFindClass(self, Gauge))
     
     for gauge in gauges:
         gauge.settings = settings
         gauge.data_bus = data_bus        
    def init_view(self):
        data_bus = self._databus
        settings = self._settings

        gauges = list(kvFindClass(self, Gauge))

        for gauge in gauges:
            gauge.settings = settings
            gauge.data_bus = data_bus
Beispiel #9
0
    def initGlobalGauges(self):
        dataBus = self._databus
        settings = self._settings

        activeGauges = list(kvFindClass(self, Gauge))

        for gauge in activeGauges:
            gauge.settings = settings
            gauge.data_bus = dataBus
 def initScreen(self):
     dataBus = self._databus
     settings = self._settings
     dataBus.addMetaListener(self.on_meta)
     
     gauges = list(kvFindClass(self, Gauge))
     
     for gauge in gauges:
         gauge.settings = settings
         gauge.data_bus = dataBus
Beispiel #11
0
    def initScreen(self):
        dataBus = self._databus
        settings = self._settings
        dataBus.addMetaListener(self.on_meta)

        gauges = list(kvFindClass(self, Gauge))

        for gauge in gauges:
            gauge.settings = settings
            gauge.data_bus = dataBus
Beispiel #12
0
    def _init_global_gauges(self):
        databus = self._databus
        settings = self._settings
        dashboard_state = self._dashboard_state

        activeGauges = list(kvFindClass(self, Gauge))

        for gauge in activeGauges:
            gauge.settings = settings
            gauge.data_bus = databus
            gauge.dashboard_state = dashboard_state
Beispiel #13
0
    def init_view(self):
        data_bus = self._databus
        settings = self._settings

        gauges = list(kvFindClass(self, Gauge))

        for gauge in gauges:
            gauge.settings = settings
            gauge.data_bus = data_bus
            gauge.dashboard_state = self._dashboard_state
        self._initialized = True
    def _init_global_gauges(self):
        databus = self._databus
        settings = self._settings
        dashboard_state = self._dashboard_state

        activeGauges = list(kvFindClass(self, Gauge))

        for gauge in activeGauges:
            gauge.settings = settings
            gauge.data_bus = databus
            gauge.dashboard_state = dashboard_state
    def init_view(self):
        data_bus = self._databus
        settings = self._settings

        gauges = list(kvFindClass(self, Gauge))

        for gauge in gauges:
            gauge.settings = settings
            gauge.data_bus = data_bus
            gauge.dashboard_state = self._dashboard_state
        self._initialized = True
    def init_view(self):
        data_bus = self._databus
        settings = self._settings

        gauges = list(kvFindClass(self, Gauge))

        for gauge in gauges:
            gauge.settings = settings
            gauge.data_bus = data_bus
        self._initialized = True

        self.ids.imu_gauge.zoom = 0.5
    def init_view(self):
        screenMgr = kvFind(self, 'rcid', 'screens')

        databus = self._databus
        settings = self._settings

        self.initGlobalGauges()

        gaugeView = GaugeView(name='gaugeView',
                              databus=databus,
                              settings=settings)
        tachView = TachometerView(name='tachView',
                                  databus=databus,
                                  settings=settings)
        laptimeView = LaptimeView(name='laptimeView',
                                  databus=databus,
                                  settings=settings)
        # comboView = ComboView(name='comboView', databus=databus, settings=settings)
        rawChannelView = RawChannelView(name='rawchannelView',
                                        databus=databus,
                                        settings=settings)

        screenMgr.add_widget(gaugeView)
        screenMgr.add_widget(tachView)
        screenMgr.add_widget(laptimeView)
        # screenMgr.add_widget(comboView)
        screenMgr.add_widget(rawChannelView)

        gauges = list(kvFindClass(self, DigitalGauge))

        for gauge in gauges:
            gauge.settings = self._settings
            gauge.data_bus = databus

        self._gaugeView = gaugeView
        self._tachView = tachView
        self._rawchannelView = rawChannelView
        self._laptimeView = laptimeView
        # self._comboView = comboView
        self._screen_mgr = screenMgr

        self._alert_widgets['pit_stop'] = PitstopTimerView(databus, 'Pit Stop')

        databus.start_update()
        self._notify_preference_listeners()
        Clock.schedule_once(lambda dt: self._show_last_view())
Beispiel #18
0
    def init_view(self):
        screenMgr = kvFind(self, 'rcid', 'screens')

        dataBus = self._databus
        settings = self._settings

        self.initGlobalGauges()

        gaugeView = GaugeView(name='gaugeView',
                              dataBus=dataBus,
                              settings=settings)
        tachView = TachometerView(name='tachView',
                                  dataBus=dataBus,
                                  settings=settings)
        laptimeView = LaptimeView(name='laptimeView',
                                  dataBus=dataBus,
                                  settings=settings)
        comboView = ComboView(name='comboView',
                              dataBus=dataBus,
                              settings=settings)
        rawChannelView = RawChannelView(name='rawchannelView',
                                        dataBus=dataBus,
                                        settings=settings)

        #screenMgr.transition=WipeTransition()
        screenMgr.add_widget(gaugeView)
        screenMgr.add_widget(tachView)
        screenMgr.add_widget(laptimeView)
        #screenMgr.add_widget(comboView) #TODO add support later
        screenMgr.add_widget(rawChannelView)

        gauges = list(kvFindClass(self, DigitalGauge))

        for gauge in gauges:
            gauge.settings = self._settings
            gauge.data_bus = dataBus

        self._gaugeView = gaugeView
        self._tachView = tachView
        self._rawchannelView = rawChannelView
        self._laptimeView = laptimeView
        self._comboView = comboView
        self._screen_mgr = screenMgr
        dataBus.start_update()
    def _init_view(self):
        databus = self._databus
        settings = self._settings

        self._init_global_gauges()
        self._init_view_builders()

        # Find all of the global and set the objects they need
        gauges = list(kvFindClass(self, DigitalGauge))
        for gauge in gauges:
            gauge.settings = settings
            gauge.data_bus = databus

        # Initialize our alert type widgets
        self._alert_widgets['pit_stop'] = PitstopTimerView(databus, 'Pit Stop')

        self._notify_preference_listeners()
        self._show_last_view()

        if self._rc_api.connected:
            self._race_setup()

        self._rc_api.add_connect_listener(self._on_rc_connect)
        self._initialized = True
    def _init_view(self):
        databus = self._databus
        settings = self._settings

        self._init_global_gauges()
        self._init_view_builders()

        # Find all of the global and set the objects they need
        gauges = list(kvFindClass(self, DigitalGauge))
        for gauge in gauges:
            gauge.settings = settings
            gauge.data_bus = databus

        # Initialize our alert type widgets
        self._alert_widgets['pit_stop'] = PitstopTimerView(databus, 'Pit Stop')

        self._notify_preference_listeners()
        self._show_last_view()

        if self._rc_api.connected:
            self._race_setup()

        self._rc_api.add_connect_listener(self._on_rc_connect)
        self._initialized = True
 def _notify_preference_listeners(self):
     listeners = list(kvFindClass(self, SettingsListener)) + self._alert_widgets.values()
     for listener in listeners:
         listener.user_preferences_updated(self._settings.userPrefs)
 def findActiveGauges(self, gauge_type):
     return list(kvFindClass(self, gauge_type))
 def findActiveGauges(self):
     return list(kvFindClass(self, Gauge))
 def _notify_preference_listeners(self):
     listeners = list(kvFindClass(
         self, SettingsListener)) + self._alert_widgets.values()
     for listener in listeners:
         listener.user_preferences_updated(self._settings.userPrefs)
Beispiel #25
0
 def _find_active_gauges(self):
     return list(kvFindClass(self, Gauge))
 def findActiveGauges(self, gauge_type):
     return list(kvFindClass(self, gauge_type))
 def findActiveGauges(self):
     return list(kvFindClass(self, Gauge))