def InitRFmod(): detected = eRFmod.getInstance().detected() SystemInfo["RfModulator"] = detected if detected: config.rfmod = ConfigSubsection() config.rfmod.enable = ConfigOnOff(default=False) config.rfmod.test = ConfigOnOff(default=False) config.rfmod.sound = ConfigOnOff(default=True) config.rfmod.soundcarrier = ConfigSelection(choices=[("4500","4.5 MHz"), ("5500", "5.5 MHz"), ("6000", "6.0 MHz"), ("6500", "6.5 MHz")], default="5500") config.rfmod.channel = ConfigSelection(default = "36", choices = ["%d" % x for x in range(RFMOD_CHANNEL_MIN, RFMOD_CHANNEL_MAX)]) config.rfmod.finetune = ConfigSlider(default=5, limits=(1, 10)) iRFmod = RFmod() def setFunction(configElement): iRFmod.setFunction(configElement.getValue()); def setTestmode(configElement): iRFmod.setTestmode(configElement.getValue()); def setSoundFunction(configElement): iRFmod.setSoundFunction(configElement.getValue()); def setSoundCarrier(configElement): iRFmod.setSoundCarrier(configElement.index); def setChannel(configElement): iRFmod.setChannel(int(configElement.getValue())); def setFinetune(configElement): iRFmod.setFinetune(configElement.getValue() - 5); # this will call the "setup-val" initial config.rfmod.enable.addNotifier(setFunction); config.rfmod.test.addNotifier(setTestmode); config.rfmod.sound.addNotifier(setSoundFunction); config.rfmod.soundcarrier.addNotifier(setSoundCarrier); config.rfmod.channel.addNotifier(setChannel); config.rfmod.finetune.addNotifier(setFinetune);
def InitRFmod(): detected = eRFmod.getInstance().detected() SystemInfo['RfModulator'] = detected config.rfmod = ConfigSubsection() if detected: config.rfmod.enable = ConfigOnOff(default=False) config.rfmod.test = ConfigOnOff(default=False) config.rfmod.sound = ConfigOnOff(default=True) config.rfmod.soundcarrier = ConfigSelection(choices=[ ('4500', '4.5 MHz'), ('5500', '5.5 MHz'), ('6000', '6.0 MHz'), ('6500', '6.5 MHz') ], default='5500') config.rfmod.channel = ConfigSelection( default='36', choices=[ '%d' % x for x in range(RFMOD_CHANNEL_MIN, RFMOD_CHANNEL_MAX) ]) config.rfmod.finetune = ConfigSlider(default=5, limits=(1, 10)) iRFmod = RFmod() def setFunction(configElement): iRFmod.setFunction(configElement.value) def setTestmode(configElement): iRFmod.setTestmode(configElement.value) def setSoundFunction(configElement): iRFmod.setSoundFunction(configElement.value) def setSoundCarrier(configElement): iRFmod.setSoundCarrier(configElement.index) def setChannel(configElement): iRFmod.setChannel(int(configElement.value)) def setFinetune(configElement): iRFmod.setFinetune(configElement.value - 5) config.rfmod.enable.addNotifier(setFunction) config.rfmod.test.addNotifier(setTestmode) config.rfmod.sound.addNotifier(setSoundFunction) config.rfmod.soundcarrier.addNotifier(setSoundCarrier) config.rfmod.channel.addNotifier(setChannel) config.rfmod.finetune.addNotifier(setFinetune) else: config.rfmod.enable = ConfigNothing() config.rfmod.test = ConfigNothing() config.rfmod.sound = ConfigNothing() config.rfmod.soundcarrier = ConfigNothing() config.rfmod.channel = ConfigNothing() config.rfmod.finetune = ConfigNothing()
def InitSetupDevices(): def keyboardNotifier(configElement): keyboard.activateKeyboardMap(configElement.index) config.keyboard = ConfigSubsection() config.keyboard.keymap = ConfigSelection( default=keyboard.getDefaultKeyboardMap(), choices=keyboard.getKeyboardMaplist()) config.keyboard.keymap.addNotifier(keyboardNotifier) def languageNotifier(configElement): language.activateLanguage(configElement.value) config.osd = ConfigSubsection() if getMachineBrand() == 'Atto.TV': defaultLanguage = "pt_BR" elif getMachineBrand() == 'Zgemma': defaultLanguage = "en_US" elif getMachineBrand() == 'Beyonwiz': defaultLanguage = "en_GB" else: defaultLanguage = "de_DE" config.osd.language = ConfigText(default=defaultLanguage) config.osd.language.addNotifier(languageNotifier) config.parental = ConfigSubsection() config.parental.lock = ConfigOnOff(default=False) config.parental.setuplock = ConfigOnOff(default=False) config.expert = ConfigSubsection() config.expert.satpos = ConfigOnOff(default=True) config.expert.fastzap = ConfigOnOff(default=True) config.expert.skipconfirm = ConfigOnOff(default=False) config.expert.hideerrors = ConfigOnOff(default=False) config.expert.autoinfo = ConfigOnOff(default=True)
def InitSetupDevices(): def timezoneNotifier(configElement): timezones.activateTimezone(configElement.index) config.timezone = ConfigSubsection() config.timezone.val = ConfigSelection( default=timezones.getDefaultTimezone(), choices=timezones.getTimezoneList()) config.timezone.val.addNotifier(timezoneNotifier) def keyboardNotifier(configElement): keyboard.activateKeyboardMap(configElement.index) config.keyboard = ConfigSubsection() config.keyboard.keymap = ConfigSelection( default=keyboard.getDefaultKeyboardMap(), choices=keyboard.getKeyboardMaplist()) config.keyboard.keymap.addNotifier(keyboardNotifier) def languageNotifier(configElement): language.activateLanguage(configElement.value) config.osd = ConfigSubsection() config.osd.language = ConfigText(default='it_IT') config.osd.language.addNotifier(languageNotifier) config.parental = ConfigSubsection() config.parental.lock = ConfigOnOff(default=False) config.parental.setuplock = ConfigOnOff(default=False) config.expert = ConfigSubsection() config.expert.satpos = ConfigOnOff(default=True) config.expert.fastzap = ConfigOnOff(default=True) config.expert.skipconfirm = ConfigOnOff(default=False) config.expert.hideerrors = ConfigOnOff(default=False) config.expert.autoinfo = ConfigOnOff(default=True)
def InitSetupDevices(): ''' def timezoneNotifier(configElement): timezones.activateTimezone(configElement.index) config.timezone = ConfigSubsection(); config.timezone.val = ConfigSelection(default = timezones.getDefaultTimezone(), choices = timezones.getTimezoneList()) config.timezone.val.addNotifier(timezoneNotifier) def keyboardNotifier(configElement): keyboard.activateKeyboardMap(configElement.index) config.keyboard = ConfigSubsection(); config.keyboard.keymap = ConfigSelection(default = keyboard.getDefaultKeyboardMap(), choices = keyboard.getKeyboardMaplist()) config.keyboard.keymap.addNotifier(keyboardNotifier) ''' def languageNotifier(configElement): language.activateLanguage(configElement.value) config.osd = ConfigSubsection() if os.path.exists('/var/tuxbox/config/neutrino.conf'): with open('/var/tuxbox/config/neutrino.conf', 'r') as f: for line in f.readlines(): if line.startswith('language='): lang = line.split("=")[1].strip() if lang == 'polski': config.osd.language = ConfigText(default = "pl_PL"); elif lang == 'deutsch': config.osd.language = ConfigText(default = "de_DE"); else: config.osd.language = ConfigText(default = "en_EN"); config.osd.language.addNotifier(languageNotifier) config.parental = ConfigSubsection(); config.parental.lock = ConfigOnOff(default = False) config.parental.setuplock = ConfigOnOff(default = False) config.expert = ConfigSubsection(); config.expert.satpos = ConfigOnOff(default = True) config.expert.fastzap = ConfigOnOff(default = True) config.expert.skipconfirm = ConfigOnOff(default = False) config.expert.hideerrors = ConfigOnOff(default = False) config.expert.autoinfo = ConfigOnOff(default = True)
def InitSetupDevices(): def keyboardNotifier(configElement): keyboard.activateKeyboardMap(configElement.index) config.keyboard = ConfigSubsection() config.keyboard.keymap = ConfigSelection(default = keyboard.getDefaultKeyboardMap(), choices = keyboard.getKeyboardMaplist()) config.keyboard.keymap.addNotifier(keyboardNotifier) config.parental = ConfigSubsection() config.parental.lock = ConfigOnOff(default = False) config.parental.setuplock = ConfigOnOff(default = False) config.expert = ConfigSubsection() config.expert.satpos = ConfigOnOff(default = True) config.expert.fastzap = ConfigOnOff(default = True) config.expert.skipconfirm = ConfigOnOff(default = False) config.expert.hideerrors = ConfigOnOff(default = False) config.expert.autoinfo = ConfigOnOff(default = True)
def InitSetupDevices(): def timezoneNotifier(configElement): timezones.activateTimezone(configElement.index) config.timezone = ConfigSubsection() config.timezone.val = ConfigSelection(default = timezones.getDefaultTimezone(), choices = timezones.getTimezoneList()) config.timezone.val.addNotifier(timezoneNotifier) def keyboardNotifier(configElement): keyboard.activateKeyboardMap(configElement.index) config.keyboard = ConfigSubsection() config.keyboard.keymap = ConfigSelection(default = keyboard.getDefaultKeyboardMap(), choices = keyboard.getKeyboardMaplist()) config.keyboard.keymap.addNotifier(keyboardNotifier) def languageNotifier(configElement): language.activateLanguage(configElement.value) config.osd = ConfigSubsection(); if open("/proc/stb/info/boxtype").read().strip() == "ini-9000ru": config.osd.language = ConfigText(default = "ru_RU"); elif open("/proc/stb/info/boxtype").read().strip() == "ini-5000ru": config.osd.language = ConfigText(default = "ru_RU"); elif open("/proc/stb/info/boxtype").read().strip() == "ini-1000ru": config.osd.language = ConfigText(default = "ru_RU"); else: config.osd.language = ConfigText(default = "en_GB"); config.osd.language.addNotifier(languageNotifier) config.parental = ConfigSubsection() config.parental.lock = ConfigOnOff(default = False) config.parental.setuplock = ConfigOnOff(default = False) config.expert = ConfigSubsection() config.expert.satpos = ConfigOnOff(default = True) config.expert.fastzap = ConfigOnOff(default = True) config.expert.skipconfirm = ConfigOnOff(default = False) config.expert.hideerrors = ConfigOnOff(default = False) config.expert.autoinfo = ConfigOnOff(default = True)
def InitSetupDevices(): def timezoneNotifier(configElement): timezones.activateTimezone(configElement.index) config.timezone = ConfigSubsection() config.timezone.val = ConfigSelection( default=timezones.getDefaultTimezone(), choices=timezones.getTimezoneList()) config.timezone.val.addNotifier(timezoneNotifier) def keyboardNotifier(configElement): keyboard.activateKeyboardMap(configElement.index) config.keyboard = ConfigSubsection() config.keyboard.keymap = ConfigSelection( default=keyboard.getDefaultKeyboardMap(), choices=keyboard.getKeyboardMaplist()) config.keyboard.keymap.addNotifier(keyboardNotifier) def languageNotifier(configElement): language.activateLanguage(configElement.value) config.osd = ConfigSubsection() if getMachineBrand() in ('Vimastec'): config.osd.language = ConfigText(default="fr_FR") elif getMachineBrand() in ('Zgemma', 'Beyonwiz') or getBrandOEM() in ('airdigital'): config.osd.language = ConfigText(default="en_US") else: config.osd.language = ConfigText(default="de_DE") config.osd.language.addNotifier(languageNotifier) config.parental = ConfigSubsection() config.parental.lock = ConfigOnOff(default=False) config.parental.setuplock = ConfigOnOff(default=False) config.expert = ConfigSubsection() config.expert.satpos = ConfigOnOff(default=True) config.expert.fastzap = ConfigOnOff(default=True) config.expert.skipconfirm = ConfigOnOff(default=False) config.expert.hideerrors = ConfigOnOff(default=False) config.expert.autoinfo = ConfigOnOff(default=True)
def InitAVSwitch(): config.av = ConfigSubsection() config.av.yuvenabled = ConfigBoolean(default=False) colorformat_choices = { "cvbs": _("CVBS"), "rgb": _("RGB"), "svideo": _("S-Video") } try: have_analog_output = open("/proc/stb/video/mode_choices", "r").read()[:-1].find("PAL") != -1 except: have_analog_output = False SystemInfo["AnalogOutput"] = have_analog_output # when YUV is not enabled, don't let the user select it if config.av.yuvenabled.value and have_analog_output: colorformat_choices["yuv"] = _("YPbPr") config.av.colorformat = ConfigSelection(choices=colorformat_choices, default="rgb") config.av.aspectratio = ConfigSelection(choices={ "4_3_letterbox": _("4:3 Letterbox"), "4_3_panscan": _("4:3 PanScan"), "16_9": _("16:9"), "16_9_always": _("16:9 always"), "16_10_letterbox": _("16:10 Letterbox"), "16_10_panscan": _("16:10 PanScan"), "16_9_letterbox": _("16:9 Letterbox") }, default="4_3_letterbox") config.av.aspect = ConfigSelection(choices={ "4_3": _("4:3"), "16_9": _("16:9"), "16_10": _("16:10"), "auto": _("Automatic") }, default="auto") config.av.policy_169 = ConfigSelection( choices={ # TRANSLATORS: (aspect ratio policy: black bars on top/bottom) in doubt, keep english term. "letterbox": _("Letterbox"), # TRANSLATORS: (aspect ratio policy: cropped content on left/right) in doubt, keep english term "panscan": _("Pan&Scan"), # TRANSLATORS: (aspect ratio policy: display as fullscreen, even if this breaks the aspect) "scale": _("Just Scale") }, default="letterbox") config.av.policy_43 = ConfigSelection( choices={ # TRANSLATORS: (aspect ratio policy: black bars on left/right) in doubt, keep english term. "pillarbox": _("Pillarbox"), # TRANSLATORS: (aspect ratio policy: cropped content on left/right) in doubt, keep english term "panscan": _("Pan&Scan"), # TRANSLATORS: (aspect ratio policy: display as fullscreen, with stretching the left/right) "nonlinear": _("Nonlinear"), # TRANSLATORS: (aspect ratio policy: display as fullscreen, even if this breaks the aspect) "scale": _("Just Scale") }, default="pillarbox") config.av.tvsystem = ConfigSelection(choices={ "pal": _("PAL"), "ntsc": _("NTSC"), "multinorm": _("multinorm") }, default="pal") config.av.wss = ConfigOnOff(default=True) config.av.defaultac3 = ConfigYesNo(default=False) config.av.generalAC3delay = ConfigSelectionNumber(-1000, 1000, 25, default=0) config.av.generalPCMdelay = ConfigSelectionNumber(-1000, 1000, 25, default=0) config.av.vcrswitch = ConfigOnOff(default=False) iAVSwitch = AVSwitch() def setColorFormat(configElement): map = {"cvbs": 0, "rgb": 1, "svideo": 2, "yuv": 3} iAVSwitch.setColorFormat(map[configElement.value]) def setAspectRatio(configElement): map = { "4_3_letterbox": 0, "4_3_panscan": 1, "16_9": 2, "16_9_always": 3, "16_10_letterbox": 4, "16_10_panscan": 5, "16_9_letterbox": 6 } iAVSwitch.setAspectRatio(map[configElement.value]) def setSystem(configElement): map = {"pal": 0, "ntsc": 1, "multinorm": 2} iAVSwitch.setSystem(map[configElement.value]) def setWSS(configElement): iAVSwitch.setAspectWSS() try: have_analog_output = open("/proc/stb/video/mode_choices", "r").read()[:-1].find("PAL") != -1 except: have_analog_output = False SystemInfo["AnalogOutput"] = have_analog_output if have_analog_output: # this will call the "setup-val" initial config.av.colorformat.addNotifier(setColorFormat) config.av.aspectratio.addNotifier(setAspectRatio) config.av.tvsystem.addNotifier(setSystem) config.av.wss.addNotifier(setWSS) iAVSwitch.setInput("ENCODER") # init on startup SystemInfo["ScartSwitch"] = eAVSwitch.getInstance().haveScartSwitch() try: can_downmix = open("/proc/stb/audio/ac3_choices", "r").read()[:-1].find("downmix") != -1 except: can_downmix = False SystemInfo["CanDownmixAC3"] = can_downmix if can_downmix: def setAC3Downmix(configElement): open("/proc/stb/audio/ac3", "w").write(configElement.value and "downmix" or "passthrough") config.av.downmix_ac3 = ConfigYesNo(default=True) config.av.downmix_ac3.addNotifier(setAC3Downmix) try: can_osd_alpha = open("/proc/stb/video/alpha", "r") and True or False except: can_osd_alpha = False ac3plus_support = False try: ac3plus_choices = open("/proc/stb/audio/ac3plus_choices", "r").read() if ac3plus_choices.find("use_hdmi_caps") != -1: eDVBServicePMTHandler.setDDPSupport(True) if ac3plus_choices.find("force_ac3") != -1: ac3plus_support = True except: pass SystemInfo["SupportsAC3PlusTranscode"] = ac3plus_support if ac3plus_support: def setAC3PlusConvert(configElement): open("/proc/stb/audio/ac3plus", "w").write(configElement.value) config.av.convert_ac3plus = ConfigSelection(choices=[ ("use_hdmi_caps", _("controlled by HDMI")), ("force_ac3", _("always")) ], default="use_hdmi_caps") config.av.convert_ac3plus.addNotifier(setAC3PlusConvert) SystemInfo["CanChangeOsdAlpha"] = can_osd_alpha def setAlpha(config): open("/proc/stb/video/alpha", "w").write(str(config.value)) if can_osd_alpha: config.av.osd_alpha = ConfigSlider(default=255, limits=(0, 255)) config.av.osd_alpha.addNotifier(setAlpha) if os_path.exists("/proc/stb/vmpeg/0/pep_scaler_sharpness"): def setScaler_sharpness(config): myval = int(config.value) try: print "--> setting scaler_sharpness to: %0.8X" % myval open("/proc/stb/vmpeg/0/pep_scaler_sharpness", "w").write("%0.8X" % myval) open("/proc/stb/vmpeg/0/pep_apply", "w").write("1") except IOError: print "couldn't write pep_scaler_sharpness" config.av.scaler_sharpness = ConfigSlider(default=13, limits=(0, 26)) config.av.scaler_sharpness.addNotifier(setScaler_sharpness) else: config.av.scaler_sharpness = NoSave(ConfigNothing()) try: hlg_choices = open("/proc/stb/hdmi/hlg_support_choices", "r").read() def setHlgSupport(configElement): open("/proc/stb/hdmi/hlg_support", "w").write(configElement.value) config.av.hlg_support = ConfigSelection( default="auto(EDID)", choices=[("auto(EDID)", _("controlled by HDMI")), ("yes", _("force enabled")), ("no", _("force disabled"))]) config.av.hlg_support.addNotifier(setHlgSupport) def setHdr10Support(configElement): open("/proc/stb/hdmi/hdr10_support", "w").write(configElement.value) config.av.hdr10_support = ConfigSelection( default="auto(EDID)", choices=[("auto(EDID)", _("controlled by HDMI")), ("yes", _("force enabled")), ("no", _("force disabled"))]) config.av.hdr10_support.addNotifier(setHdr10Support) def setDisable12Bit(configElement): open("/proc/stb/video/disable_12bit", "w").write(configElement.value) config.av.allow_12bit = ConfigSelection(default="0", choices=[("0", _("yes")), ("1", _("no"))]) config.av.allow_12bit.addNotifier(setDisable12Bit) def setDisable10Bit(configElement): open("/proc/stb/video/disable_10bit", "w").write(configElement.value) config.av.allow_10bit = ConfigSelection(default="0", choices=[("0", _("yes")), ("1", _("no"))]) config.av.allow_10bit.addNotifier(setDisable10Bit) SystemInfo["HDRSupport"] = True except: SystemInfo["HDRSupport"] = False
def InitSenseWheel(): detected = eQBOXSenseWheel.getInstance().detected() SystemInfo["SenseWheel"] = detected config.sensewheel = ConfigSubsection() def setPanelLedsEnable(configElement): isensewheel.disableSense() config.sensewheel.ledpanelhue.enable = configElement.value config.sensewheel.ledpanelsaturation.enable = configElement.value config.sensewheel.ledpanelvalue.enable = configElement.value isensewheel.setPanelLedsEnable(configElement.value) def setBoardLedsEnable(configElement): isensewheel.disableSense() config.sensewheel.ledboardhue.enable = configElement.value config.sensewheel.ledboardsaturation.enable = configElement.value config.sensewheel.ledboardvalue.enable = configElement.value isensewheel.setBoardLedsEnable(configElement.value) def setPanelLedsHue(configElement): isensewheel.disableSense() isensewheel.setPanelLedsHue(configElement.value) def setPanelLedsSaturation(configElement): isensewheel.disableSense() isensewheel.setPanelLedsSaturation(configElement.value) def setPanelLedsValue(configElement): isensewheel.disableSense() isensewheel.setPanelLedsValue(configElement.value) def setBoardLedsHue(configElement): isensewheel.disableSense() isensewheel.setBoardLedsHue(configElement.value) def setBoardLedsSaturation(configElement): isensewheel.disableSense() isensewheel.setBoardLedsSaturation(configElement.value) def setBoardLedsValue(configElement): isensewheel.disableSense() isensewheel.setBoardLedsValue(configElement.value) def disableSense(configElement): isensewheel.disableSense() def enableSense(configElement): isensewheel.enableSense() def setEnableFlag(configElement): isensewheel.setEnableFlag(configElement.value) def setStandbyPanelLeds(configElement): isensewheel.setStandbyPanelLeds(configElement.value) def setStandbyBoardLeds(configElement): isensewheel.setStandbyBoardLeds(configElement.value) def setStandbyPanel(configElement): isensewheel.setStandbyPanel(configElement.value) def saveAndExitFromSensePlugin(configElement): if (isensewheel.IsFlagSenseEnabled()): isensewheel.enableSense() else: isensewheel.setPanelLedsEnable(False) isensewheel.disableSense() #-< # confirm flag enabled sensewheel isensewheel.ConfirmFlagSenseEnabled() def reloadAndExitFromSensePlugin(configElement): # restore old sense enable situation saved isensewheel.RestoreOrigFlagSenseEnabled() if (isensewheel.IsFlagSenseEnabled()): isensewheel.enableSense() else: isensewheel.setPanelLedsEnable(False) isensewheel.disableSense() #-< # WHEEL ----------------------------------------------------------------------------------- config.sensewheel.ledpanelhue = ConfigSlider(default=150, increment=4, limits=(0, 359)) config.sensewheel.ledpanelhue.addNotifier(setPanelLedsHue) config.sensewheel.ledpanelhue.apply = lambda: setPanelLedsHue( config.sensewheel.ledpanelhue) config.sensewheel.ledpanelhue.addNotifierLoad(reloadAndExitFromSensePlugin) config.sensewheel.ledpanelhue.addNotifierSave(saveAndExitFromSensePlugin) config.sensewheel.ledpanelsaturation = ConfigSlider(default=50, increment=2, limits=(0, 99)) config.sensewheel.ledpanelsaturation.addNotifier(setPanelLedsSaturation) config.sensewheel.ledpanelsaturation.apply = lambda: setPanelLedsSaturation( config.sensewheel.ledpanelsaturation) config.sensewheel.ledpanelsaturation.addNotifierLoad( reloadAndExitFromSensePlugin) config.sensewheel.ledpanelsaturation.addNotifierSave( saveAndExitFromSensePlugin) config.sensewheel.ledpanelvalue = ConfigSlider(default=50, increment=2, limits=(0, 99)) config.sensewheel.ledpanelvalue.addNotifier(setPanelLedsValue) config.sensewheel.ledpanelvalue.apply = lambda: setPanelLedsValue( config.sensewheel.ledpanelvalue) config.sensewheel.ledpanelvalue.addNotifierLoad( reloadAndExitFromSensePlugin) config.sensewheel.ledpanelvalue.addNotifierSave(saveAndExitFromSensePlugin) config.sensewheel.ledpanelenabled = ConfigOnOff() config.sensewheel.ledpanelenabled.addNotifier(setPanelLedsEnable) config.sensewheel.ledpanelenabled.apply = lambda: setPanelLedsEnable( config.sensewheel.ledpanelenabled) config.sensewheel.ledpanelenabled.addNotifierLoad( reloadAndExitFromSensePlugin) config.sensewheel.ledpanelenabled.addNotifierSave( saveAndExitFromSensePlugin) # BOARD ----------------------------------------------------------------------------------- config.sensewheel.ledboardhue = ConfigSlider(default=150, increment=4, limits=(0, 359)) config.sensewheel.ledboardhue.addNotifier(setBoardLedsHue) config.sensewheel.ledboardhue.apply = lambda: setBoardLedsHue( config.sensewheel.ledboardhue) config.sensewheel.ledboardhue.addNotifierLoad(reloadAndExitFromSensePlugin) config.sensewheel.ledboardhue.addNotifierSave(saveAndExitFromSensePlugin) config.sensewheel.ledboardsaturation = ConfigSlider(default=50, increment=2, limits=(0, 99)) config.sensewheel.ledboardsaturation.addNotifier(setBoardLedsSaturation) config.sensewheel.ledboardsaturation.apply = lambda: setBoardLedsSaturation( config.sensewheel.ledboardsaturation) config.sensewheel.ledboardsaturation.addNotifierLoad( reloadAndExitFromSensePlugin) config.sensewheel.ledboardsaturation.addNotifierSave( saveAndExitFromSensePlugin) config.sensewheel.ledboardvalue = ConfigSlider(default=50, increment=2, limits=(0, 99)) config.sensewheel.ledboardvalue.addNotifier(setBoardLedsValue) config.sensewheel.ledboardvalue.apply = lambda: setBoardLedsValue( config.sensewheel.ledboardvalue) config.sensewheel.ledboardvalue.addNotifierLoad( reloadAndExitFromSensePlugin) config.sensewheel.ledboardvalue.addNotifierSave(saveAndExitFromSensePlugin) config.sensewheel.ledboardenabled = ConfigOnOff() config.sensewheel.ledboardenabled.addNotifier(setBoardLedsEnable) config.sensewheel.ledboardenabled.apply = lambda: setBoardLedsEnable( config.sensewheel.ledboardenabled) config.sensewheel.ledpanelenabled.addNotifierLoad( reloadAndExitFromSensePlugin) config.sensewheel.ledpanelenabled.addNotifierSave( saveAndExitFromSensePlugin) # TOUCH ---------------------------------------------------------------------------------- config.sensewheel.enabled = ConfigEnableDisable() config.sensewheel.enabled.addNotifier(setEnableFlag) config.sensewheel.enabled.apply = lambda: setEnableFlag(config.sensewheel. enabled.value) ### Init ### isensewheel.setInitEnableFlag(config.sensewheel.enabled.value) if (isensewheel.IsFlagSenseEnabled()): print("ENABLE") isensewheel.enableSense() else: print("DISABLE") isensewheel.setPanelLedsEnable(False) isensewheel.disableSense() #-< ############ config.sensewheel.enabled.addNotifierLoad(reloadAndExitFromSensePlugin) config.sensewheel.enabled.addNotifierSave(saveAndExitFromSensePlugin) config.sensewheel.standbypanelled = ConfigOnOff() config.sensewheel.standbypanelled.addNotifier(setStandbyPanelLeds) config.sensewheel.standbypanelled.apply = lambda: setStandbyPanelLeds( config.sensewheel.standbypanelled) config.sensewheel.standbypanelled.addNotifierLoad( reloadAndExitFromSensePlugin) config.sensewheel.standbypanelled.addNotifierSave( saveAndExitFromSensePlugin) config.sensewheel.standbyboardled = ConfigOnOff() config.sensewheel.standbyboardled.addNotifier(setStandbyBoardLeds) config.sensewheel.standbyboardled.apply = lambda: setStandbyBoardLeds( config.sensewheel.standbyboardled) config.sensewheel.standbyboardled.addNotifierLoad( reloadAndExitFromSensePlugin) config.sensewheel.standbyboardled.addNotifierSave( saveAndExitFromSensePlugin) config.sensewheel.enablepanelstandby = ConfigOnOff() config.sensewheel.enablepanelstandby.addNotifier(setStandbyPanel) config.sensewheel.enablepanelstandby.apply = lambda: setStandbyPanel( config.sensewheel.enablepanelstandby) config.sensewheel.enablepanelstandby.addNotifierLoad( reloadAndExitFromSensePlugin) config.sensewheel.enablepanelstandby.addNotifierSave( saveAndExitFromSensePlugin)