3 from config import config #global config instance
5 from config import configElement
6 from config import ConfigSubsection
7 from config import ConfigSlider
8 from config import configBoolean
10 #temp. class for exhibition
16 def setBright(self, value):
17 os.system("lcddimm " + str(value * 10))
19 def setContrast(self, value):
20 os.system("lcdcontrast " + str(value * 6))
22 def InitSetupDevices():
23 config.timezone = ConfigSubsection();
24 config.timezone.val = configElement("config.timezone.val", configBoolean, 1, ("GMT", "GMT+1", "GMT+2", "GMT+3", "GMT+4", "GMT+5", "GMT+6", "GMT+7", "GMT+8", "GMT+9") );
26 config.rc = ConfigSubsection();
27 config.rc.map = configElement("config.rc.map", configBoolean, 0, ("Default", "Classic") );
29 config.rfmod = ConfigSubsection();
30 config.rfmod.enable = configElement("config.rfmod.enable", configBoolean, 1, ("Enable", "Disable") );
31 config.rfmod.test = configElement("config.rfmod.test", configBoolean, 1, ("Enable", "Disable") );
32 config.rfmod.sound = configElement("config.rfmod.sound", configBoolean, 0, ("Enable", "Disable") );
33 config.rfmod.soundcarrier = configElement("config.rfmod.soundcarrier", configBoolean, 1, ("4.5 MHz", "5.5 MHz", "6.0 MHz", "6.5 MHz") );
34 config.rfmod.channel = configElement("config.rfmod.channel", configBoolean, 6, ("30", "31", "32", "33", "34", "35", "36", "37", "38", "39") );
35 config.rfmod.finetune = configElement("config.rfmod.finetune", ConfigSlider, 5, "");
37 config.keyboard = ConfigSubsection();
38 config.keyboard.keymap = configElement("config.keyboard.keymap", configBoolean, 1, ("English", "German") );
40 config.osd = ConfigSubsection();
41 config.osd.alpha = configElement("config.osd.alpha", ConfigSlider, 0, "");
42 config.osd.bright = configElement("config.osd.bright", ConfigSlider, 5, "");
43 config.osd.contrast = configElement("config.osd.contrast", ConfigSlider, 5, "");
44 config.osd.language = configElement("config.osd.language", configBoolean, 0, ("English", "English US") );
46 config.lcd = ConfigSubsection();
47 config.lcd.bright = configElement("config.lcd.bright", ConfigSlider, 7, "");
48 config.lcd.contrast = configElement("config.lcd.contrast", ConfigSlider, 2, "");
49 config.lcd.standby = configElement("config.lcd.standby", ConfigSlider, 1, "");
50 config.lcd.invert = configElement("config.lcd.invert", configBoolean, 1, ("Enable", "Disable") );
54 def setLCDbright(configElement):
55 ilcd.setBright(configElement.value);
57 def setLCDcontrast(configElement):
58 ilcd.setContrast(configElement.value);
60 config.lcd.bright.addNotifier(setLCDbright);
61 config.lcd.contrast.addNotifier(setLCDcontrast);
63 config.parental = ConfigSubsection();
64 config.parental.lock = configElement("config.parental.lock", configBoolean, 1, ("Enable", "Disable") );
65 config.parental.setuplock = configElement("config.parental.setuplock", configBoolean, 1, ("Enable", "Disable") );
67 config.expert = ConfigSubsection();
68 config.expert.splitsize = configElement("config.expert.splitsize", configBoolean, 1, ("0.5Gbyte", "1.0 GByte", "1.5 GByte", "2.0 GByte") );
69 config.expert.satpos = configElement("config.expert.satpos", configBoolean, 1, ("Enable", "Disable") );
70 config.expert.fastzap = configElement("config.expert.fastzap", configBoolean, 0, ("Enable", "Disable") );
71 config.expert.skipconfirm = configElement("config.expert.skipconfirm", configBoolean, 1, ("Enable", "Disable") );
72 config.expert.hideerrors = configElement("config.expert.hideerrors", configBoolean, 1, ("Enable", "Disable") );
73 config.expert.autoinfo = configElement("config.expert.autoinfo", configBoolean, 1, ("Enable", "Disable") );
75 config.sat = ConfigSubsection();
76 config.sat.satA = configElement("config.sat.satA", configBoolean, 1, ("Disabled" ,"Astra 19.2", "Hotbird 13.0") );
77 config.sat.satB = configElement("config.sat.satB", configBoolean, 0, ("Disabled" ,"Astra 19.2", "Hotbird 13.0") );
78 config.sat.diseqcA = configElement("config.sat.diseqcA", configBoolean, 3, ("no DiSEqC", "DiSEqC 1.0", "DiSEqC 1.1", "DiSEqC 1.2") );
79 config.sat.diseqcB = configElement("config.sat.diseqcB", configBoolean, 0, ("no DiSEqC", "DiSEqC 1.0", "DiSEqC 1.1", "DiSEqC 1.2") );
80 config.sat.posA = configElement("config.sat.posA", configBoolean, 0, ("DiSEqC A", "DiSEqC B", "DiSEqC C", "DiSEqC D") );
81 config.sat.posB = configElement("config.sat.posB", configBoolean, 1, ("DiSEqC A", "DiSEqC B", "DiSEqC C", "DiSEqC D") );
83 #config.blasel = ConfigSubsection();
84 #config.blasel.val = configElement("", configBoolean, 0, ("bunt", "s/w", "gruen") );
85 #config.inputDevices.delay = configElement("config.inputDevices.delay", ConfigSlider, 3);
87 #this instance anywhere else needed?
88 #iDevices = inputDevices();
90 #def inputDevicesRepeatChanged(configElement):
91 # iDevices.setRepeat(configElement.value);
93 #def inputDevicesDelayChanged(configElement):
94 # iDevices.setDelay(configElement.value);
96 # this will call the "setup-val" initial
97 #config.inputDevices.repeat.addNotifier(inputDevicesRepeatChanged);
98 #config.inputDevices.delay.addNotifier(inputDevicesDelayChanged);