1 from Screens.Screen import Screen
2 from Screens.MessageBox import MessageBox
3 from Plugins.Plugin import PluginDescriptor
5 from Components.ConfigList import ConfigListScreen
6 from Components.ActionMap import ActionMap
7 from Components.config import config
8 from Components.NimManager import nimmanager as nimmgr
10 class SecParameterSetup(Screen, ConfigListScreen):
12 <screen position="100,100" size="560,400" title="Satellite Equipment Setup" >
13 <widget name="config" position="10,10" size="540,390" />
15 def __init__(self, session):
16 self.skin = SecParameterSetup.skin
18 self["actions"] = ActionMap(["SetupActions"],
21 "cancel": self.keyCancel,
24 Screen.__init__(self, session)
26 ("Delay after continuous tone change", config.sec.delay_after_continuous_tone_change),
27 ("Delay after last voltage change", config.sec.delay_after_final_voltage_change),
28 ("Delay between diseqc commands", config.sec.delay_between_diseqc_repeats),
29 ("Delay after last diseqc command", config.sec.delay_after_last_diseqc_command),
30 ("Delay after toneburst", config.sec.delay_after_toneburst),
31 ("Delay after change voltage before switch command", config.sec.delay_after_change_voltage_before_switch_command),
32 ("Delay after enable voltage before switch command", config.sec.delay_after_enable_voltage_before_switch_command),
33 ("Delay between switch and motor command", config.sec.delay_between_switch_and_motor_command),
34 ("Delay after set voltage before measure motor power", config.sec.delay_after_voltage_change_before_measure_idle_inputpower),
35 ("Delay after enable voltage before motor command", config.sec.delay_after_enable_voltage_before_motor_command),
36 ("Delay after motor stop command", config.sec.delay_after_motor_stop_command),
37 ("Delay after voltage change before motor command", config.sec.delay_after_voltage_change_before_motor_command),
38 ("Motor running timeout", config.sec.motor_running_timeout),
39 ("Motor command retries", config.sec.motor_command_retries) ]
40 ConfigListScreen.__init__(self, list)
44 def confirmed(answer):
47 session.open(SecParameterSetup)
49 def SecSetupMain(Session, **kwargs):
52 session.openWithCallback(confirmed, MessageBox, _("Please do not change values when you not know what you do!"), MessageBox.TYPE_INFO)
54 def SecSetupStart(menuid):
57 # other menu than "scan"?
61 # only show if DVB-S frontends are available
62 for slot in nimmgr.nim_slots:
63 if slot.isCompatible("DVB-S"):
64 return [(_("Satellite Equipment Setup"), SecSetupMain, "satellite_equipment_setup", None)]
68 def Plugins(**kwargs):
69 if (nimmgr.hasNimType("DVB-S")):
70 return PluginDescriptor(name=_("Satellite Equipment Setup"), description="Setup your satellite equipment", where = PluginDescriptor.WHERE_MENU, fnc=SecSetupStart)