From: Ronny Strutz Date: Sat, 3 Sep 2005 00:02:15 +0000 (+0000) Subject: add rfmod X-Git-Tag: 2.6.0~5579 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/e4ef86473060528115c4469d3e912f398a68a397 add rfmod --- diff --git a/lib/python/Components/Makefile.am b/lib/python/Components/Makefile.am index d452b358..6e99f781 100644 --- a/lib/python/Components/Makefile.am +++ b/lib/python/Components/Makefile.am @@ -8,4 +8,4 @@ install_DATA = \ EventInfo.py Label.py ServiceScan.py VolumeBar.py \ GUIComponent.py MenuList.py TextInput.py __init__.py MovieList.py \ InputDevice.py ServicePosition.py SetupDevices.py Harddisk.py \ - AVSwitch.py Network.py + AVSwitch.py Network.py RFmod.py diff --git a/lib/python/Components/RFmod.py b/lib/python/Components/RFmod.py new file mode 100644 index 00000000..fc5579fc --- /dev/null +++ b/lib/python/Components/RFmod.py @@ -0,0 +1,52 @@ +from config import * +from enigma import * + +class RFmod: + def __init__(self): + pass + + def setFunction(self, value): + eRFmod.getInstance().setFunction(value) + def setTestmode(self, value): + eRFmod.getInstance().setTestmode(value) + def setSoundFunction(self, value): + eRFmod.getInstance().setSoundFunction(value) + def setSoundCarrier(self, value): + eRFmod.getInstance().setSoundCarrier(value) + def setChannel(self, value): + eRFmod.getInstance().setChannel(value) + def setFinetune(self, value): + eRFmod.getInstance().setFinetune(value) + +def InitRFmod(): + + config.rfmod = ConfigSubsection(); + config.rfmod.enable = configElement("config.rfmod.enable", configBoolean, 1, ("Enable", "Disable") ); + config.rfmod.test = configElement("config.rfmod.test", configBoolean, 1, ("Enable", "Disable") ); + config.rfmod.sound = configElement("config.rfmod.sound", configBoolean, 0, ("Enable", "Disable") ); + config.rfmod.soundcarrier = configElement("config.rfmod.soundcarrier", configBoolean, 1, ("4.5 MHz", "5.5 MHz", "6.0 MHz", "6.5 MHz") ); + config.rfmod.channel = configElement("config.rfmod.channel", configBoolean, 6, ("30", "31", "32", "33", "34", "35", "36", "37", "38", "39") ); + config.rfmod.finetune = configElement("config.rfmod.finetune", ConfigSlider, 5, ""); + + 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.value); + def setChannel(configElement): + iRFmod.setChannel(configElement.value); + def setFinetune(configElement): + iRFmod.setFinetune(configElement.value); + + # 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); diff --git a/lib/python/Components/SetupDevices.py b/lib/python/Components/SetupDevices.py index 10e1a1c4..8cdf0a69 100644 --- a/lib/python/Components/SetupDevices.py +++ b/lib/python/Components/SetupDevices.py @@ -26,13 +26,13 @@ def InitSetupDevices(): config.rc = ConfigSubsection(); config.rc.map = configElement("config.rc.map", configBoolean, 0, ("Default", "Classic") ); - config.rfmod = ConfigSubsection(); - config.rfmod.enable = configElement("config.rfmod.enable", configBoolean, 1, ("Enable", "Disable") ); - config.rfmod.test = configElement("config.rfmod.test", configBoolean, 1, ("Enable", "Disable") ); - config.rfmod.sound = configElement("config.rfmod.sound", configBoolean, 0, ("Enable", "Disable") ); - config.rfmod.soundcarrier = configElement("config.rfmod.soundcarrier", configBoolean, 1, ("4.5 MHz", "5.5 MHz", "6.0 MHz", "6.5 MHz") ); - config.rfmod.channel = configElement("config.rfmod.channel", configBoolean, 6, ("30", "31", "32", "33", "34", "35", "36", "37", "38", "39") ); - config.rfmod.finetune = configElement("config.rfmod.finetune", ConfigSlider, 5, ""); + #config.rfmod = ConfigSubsection(); + #config.rfmod.enable = configElement("config.rfmod.enable", configBoolean, 1, ("Enable", "Disable") ); + #config.rfmod.test = configElement("config.rfmod.test", configBoolean, 1, ("Enable", "Disable") ); + #config.rfmod.sound = configElement("config.rfmod.sound", configBoolean, 0, ("Enable", "Disable") ); + #config.rfmod.soundcarrier = configElement("config.rfmod.soundcarrier", configBoolean, 1, ("4.5 MHz", "5.5 MHz", "6.0 MHz", "6.5 MHz") ); + #config.rfmod.channel = configElement("config.rfmod.channel", configBoolean, 6, ("30", "31", "32", "33", "34", "35", "36", "37", "38", "39") ); + #config.rfmod.finetune = configElement("config.rfmod.finetune", ConfigSlider, 5, ""); config.keyboard = ConfigSubsection(); config.keyboard.keymap = configElement("config.keyboard.keymap", configBoolean, 1, ("English", "German") );