fix rfmod audio (on and off was swapped)
[enigma2.git] / lib / python / Components / RFmod.py
index ff87a72..be088a5 100644 (file)
@@ -1,5 +1,5 @@
-from config import *
-from enigma import *
+from config import config, ConfigSelection, ConfigSubsection, ConfigOnOff, ConfigSlider
+from enigma import eRFmod
 
 # CHECK ME.
 RFMOD_CHANNEL_MIN = 21
@@ -10,11 +10,11 @@ class RFmod:
                pass
 
        def setFunction(self, value):
-               eRFmod.getInstance().setFunction(value)
+               eRFmod.getInstance().setFunction(not value)
        def setTestmode(self, value):
                eRFmod.getInstance().setTestmode(value)
        def setSoundFunction(self, value):
-               eRFmod.getInstance().setSoundFunction(value)
+               eRFmod.getInstance().setSoundFunction(not value)
        def setSoundCarrier(self, value):
                eRFmod.getInstance().setSoundCarrier(value)
        def setChannel(self, value):
@@ -24,7 +24,7 @@ class RFmod:
 
 def InitRFmod():
 
-       config.rfmod = ConfigSubsection();
+       config.rfmod = ConfigSubsection()
        config.rfmod.enable = ConfigOnOff(default=False)
        config.rfmod.test = ConfigOnOff(default=False)
        config.rfmod.sound = ConfigOnOff(default=True)
@@ -41,7 +41,7 @@ def InitRFmod():
        def setSoundFunction(configElement):
                iRFmod.setSoundFunction(configElement.value);
        def setSoundCarrier(configElement):
-               iRFmod.setSoundCarrier(int(configElement.value));
+               iRFmod.setSoundCarrier(configElement.index);
        def setChannel(configElement):
                iRFmod.setChannel(int(configElement.value));
        def setFinetune(configElement):