make retransmit rotor diseqc command retries changable
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Wed, 14 Feb 2007 11:20:56 +0000 (11:20 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Wed, 14 Feb 2007 11:20:56 +0000 (11:20 +0000)
lib/dvb/sec.cpp
lib/dvb/sec.h
lib/python/Components/NimManager.py

index 81008c7..a1e9499 100644 (file)
@@ -689,7 +689,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                                sec_sequence.push_back( eSecCommand(eSecCommand::IF_MEASURE_IDLE_WAS_NOT_OK_GOTO, compare) );
 ////////////////////////////
                                                sec_sequence.push_back( eSecCommand(eSecCommand::SET_POWER_LIMITING_MODE, eSecCommand::modeStatic) );
-                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_DISEQC_RETRYS, 2) );  // 2 retries
+                                               sec_sequence.push_back( eSecCommand(eSecCommand::SET_ROTOR_DISEQC_RETRYS, m_params[MOTOR_COMMAND_RETRIES]) );  // 2 retries
                                                sec_sequence.push_back( eSecCommand(eSecCommand::INVALIDATE_CURRENT_ROTORPARMS) );
                                                sec_sequence.push_back( eSecCommand(eSecCommand::SEND_DISEQC, diseqc) );
                                                sec_sequence.push_back( eSecCommand(eSecCommand::SET_TIMEOUT, 40) );  // 2 seconds rotor start timout
index 8861740..e5273f8 100644 (file)
@@ -253,6 +253,7 @@ public:
                DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_MOTOR_CMD, // delay after enable voltage before transmit motor command
                DELAY_AFTER_MOTOR_STOP_CMD, // delay after transmit motor stop
                DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MOTOR_CMD, // delay after voltage change before transmit motor command
+               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
                MAX_PARAMS
        };
index d6d9d78..818a443 100644 (file)
@@ -691,6 +691,11 @@ def InitSecParams():
        x.addNotifier(lambda configElement: secClass.setParam(secClass.MOTOR_RUNNING_TIMEOUT, configElement.value))
        config.sec.motor_running_timeout = x
 
+       x = ConfigInteger(default=2)
+       x.addNotifier(lambda configElement: secClass.setParam(secClass.MOTOR_COMMAND_RETRIES, configElement.value))
+       config.sec.motor_command_retries = x
+
+
 def InitNimManager(nimmgr):
        InitSecParams()