Beispiel #1
0
 def current_status(self, setting):
     if setting == "UART":
         return "UART / BrickPi " + ("Enabled" if (
             update_comms_settings.check_ir_setting() == False
             and update_comms_settings.check_bt_setting() == False) else
                                     "Disabled")
     elif setting == "blt":
         return ("Bluetooth " +
                 ("Enabled" if update_comms_settings.check_bt_setting() else
                  "Disabled"))
     elif setting == "ir":
         return ("IR Receiver " +
                 ("Enabled" if update_comms_settings.check_ir_setting() else
                  "Disabled"))
 def current_status(self, setting):
     if setting == "UART":
         return "UART / BrickPi " + (
             "Enabled"
             if (
                 update_comms_settings.check_ir_setting() == False
                 and update_comms_settings.check_bt_setting() == False
             )
             else "Disabled"
         )
     elif setting == "blt":
         return "Bluetooth " + ("Enabled" if update_comms_settings.check_bt_setting() else "Disabled")
     elif setting == "ir":
         return "IR Receiver " + ("Enabled" if update_comms_settings.check_ir_setting() else "Disabled")
Beispiel #3
0
    def enable_blt_button_OnClick(self,event):
        dlg = wx.MessageDialog(self, 'Enabling Bluetooth', ' ', wx.OK|wx.ICON_INFORMATION)
        dlg.ShowModal()
        dlg.Destroy()

        update_comms_settings.disable_ir_setting()
        if update_comms_settings.check_bt_setting()==False:
            update_comms_settings.enable_bt_setting()
        self.update_labels()
    def enable_blt_button_OnClick(self, event):
        dlg = wx.MessageDialog(self, "Enabling Bluetooth", " ", wx.OK | wx.ICON_INFORMATION)
        dlg.ShowModal()
        dlg.Destroy()

        update_comms_settings.disable_ir_setting()
        if update_comms_settings.check_bt_setting() == False:
            update_comms_settings.enable_bt_setting()
        self.update_labels()