6 RFMOD_CHANNEL_MAX = 69 + 1
12 def setFunction(self, value):
13 eRFmod.getInstance().setFunction(value)
14 def setTestmode(self, value):
15 eRFmod.getInstance().setTestmode(value)
16 def setSoundFunction(self, value):
17 eRFmod.getInstance().setSoundFunction(value)
18 def setSoundCarrier(self, value):
19 eRFmod.getInstance().setSoundCarrier(value)
20 def setChannel(self, value):
21 eRFmod.getInstance().setChannel(value)
22 def setFinetune(self, value):
23 eRFmod.getInstance().setFinetune(value)
27 config.rfmod = ConfigSubsection();
28 config.rfmod.enable = configElement("config.rfmod.enable", configSelection, 1, (("enable", _("Enable")), ("disable", _("Disable"))) );
29 config.rfmod.test = configElement("config.rfmod.test", configSelection, 0, (("disable", _("Disable")), ("enable", _("Enable"))) );
30 config.rfmod.sound = configElement("config.rfmod.sound", configSelection, 0, (("enable", _("Enable")), ("disable", _("Disable"))) );
31 config.rfmod.soundcarrier = configElement("config.rfmod.soundcarrier", configSelection, 1, ("4.5 MHz", "5.5 MHz", "6.0 MHz", "6.5 MHz") );
32 config.rfmod.channel = configElement("config.rfmod.channel", configSelection, 36 - RFMOD_CHANNEL_MIN, tuple(["%d" % x for x in range(RFMOD_CHANNEL_MIN, RFMOD_CHANNEL_MAX)]))
33 config.rfmod.finetune = configElement("config.rfmod.finetune", configSlider, 5, (1, 10));
37 def setFunction(configElement):
38 iRFmod.setFunction(configElement.value);
39 def setTestmode(configElement):
40 iRFmod.setTestmode(configElement.value);
41 def setSoundFunction(configElement):
42 iRFmod.setSoundFunction(configElement.value);
43 def setSoundCarrier(configElement):
44 iRFmod.setSoundCarrier(configElement.value);
45 def setChannel(configElement):
46 iRFmod.setChannel(configElement.value + RFMOD_CHANNEL_MIN);
47 def setFinetune(configElement):
48 iRFmod.setFinetune(configElement.value - 5);
50 # this will call the "setup-val" initial
51 config.rfmod.enable.addNotifier(setFunction);
52 config.rfmod.test.addNotifier(setTestmode);
53 config.rfmod.sound.addNotifier(setSoundFunction);
54 config.rfmod.soundcarrier.addNotifier(setSoundCarrier);
55 config.rfmod.channel.addNotifier(setChannel);
56 config.rfmod.finetune.addNotifier(setFinetune);