From 58163e18dce8d07d32500c8b24e616518e40710b Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 13 Nov 2008 13:32:15 +0100 Subject: [PATCH] add possibility to change delay after diseqc reset command and delay after diseqc peripherial poweron command via satellite equipment control plugin --- lib/dvb/sec.cpp | 4 ++-- lib/dvb/sec.h | 2 ++ lib/python/Components/NimManager.py | 8 ++++++++ .../Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py | 2 ++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index 2a6016e..2b7f717 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -637,11 +637,11 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA diseqc.data[2] = 0; // diseqc reset sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 50) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_DISEQC_RESET_CMD]) ); diseqc.data[2] = 3; // diseqc peripherial powersupply on sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) ); - sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, 150) ); + sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, m_params[DELAY_AFTER_DISEQC_PERIPHERIAL_POWERON_CMD]) ); } for (int seq_repeat = 0; seq_repeat < (di_param.m_seq_repeat?2:1); ++seq_repeat) diff --git a/lib/dvb/sec.h b/lib/dvb/sec.h index 42e53eb..e68ed16 100644 --- a/lib/dvb/sec.h +++ b/lib/dvb/sec.h @@ -267,6 +267,8 @@ public: MOTOR_COMMAND_RETRIES, // max transmit tries of rotor command when the rotor dont start turning (with power measurement) MOTOR_RUNNING_TIMEOUT, // max motor running time before timeout DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_SWITCH_CMDS, // delay after change voltage before transmit toneburst/diseqc + DELAY_AFTER_DISEQC_RESET_CMD, + DELAY_AFTER_DISEQC_PERIPHERIAL_POWERON_CMD, MAX_PARAMS }; private: diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 7060168..f4e9108 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -858,6 +858,14 @@ def InitSecParams(): x.addNotifier(lambda configElement: secClass.setParam(secClass.MOTOR_COMMAND_RETRIES, configElement.value)) config.sec.motor_command_retries = x + x = ConfigInteger(default=50, limits = (0, 9999)) + x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_DISEQC_RESET_CMD, configElement.value)) + config.sec.delay_after_diseqc_reset_cmd = x + + x = ConfigInteger(default=150, limits = (0, 9999)) + x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_DISEQC_PERIPHERIAL_POWERON_CMD, configElement.value)) + config.sec.delay_after_diseqc_peripherial_poweron_cmd = x + # TODO add support for satpos depending nims to advanced nim configuration # so a second/third/fourth cable from a motorized lnb can used behind a # diseqc 1.0 / diseqc 1.1 / toneburst switch diff --git a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py index 7b3d08f..ec223d3 100644 --- a/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py @@ -23,6 +23,8 @@ class SecParameterSetup(Screen, ConfigListScreen): Screen.__init__(self, session) list = [ + ("Delay after diseqc reset command", config.sec.delay_after_diseqc_reset_cmd), + ("Delay after diseqc peripherial poweron command", config.sec.delay_after_diseqc_peripherial_poweron_cmd), ("Delay after continuous tone change", config.sec.delay_after_continuous_tone_change), ("Delay after last voltage change", config.sec.delay_after_final_voltage_change), ("Delay between diseqc commands", config.sec.delay_between_diseqc_repeats), -- 2.7.4