add cable support to e2
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 22 Nov 2005 03:01:15 +0000 (03:01 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 22 Nov 2005 03:01:15 +0000 (03:01 +0000)
lib/dvb/frontend.cpp
lib/dvb/frontendparms.h
lib/python/Screens/ScanSetup.py
po/Makefile
po/de.po

index f2c3401..75824f0 100644 (file)
@@ -648,7 +648,96 @@ RESULT eDVBFrontend::tune(const iDVBFrontendParameters &where)
                eDVBFrontendParametersCable feparm;
                if (where.getDVBC(feparm))
                        return -EINVAL;
-               eFatal("cable tuning nyi");
+#if HAVE_DVB_API_VERSION < 3
+               parm.Frequency = feparm.frequency;
+#else
+               parm.frequency = feparm.frequency;
+#endif
+
+               parm.u.qam.symbol_rate = feparm.symbol_rate;
+
+               switch (feparm.modulation)
+               {
+               case eDVBFrontendParametersCable::Modulation::QAM16:
+                       parm.u.qam.modulation = QAM_16;
+                       break;
+               case eDVBFrontendParametersCable::Modulation::QAM32:
+                       parm.u.qam.modulation = QAM_32;
+                       break;
+               case eDVBFrontendParametersCable::Modulation::QAM64:
+                       parm.u.qam.modulation = QAM_64;
+                       break;
+               case eDVBFrontendParametersCable::Modulation::QAM128:
+                       parm.u.qam.modulation = QAM_128;
+                       break;
+               case eDVBFrontendParametersCable::Modulation::QAM256:
+                       parm.u.qam.modulation = QAM_256;
+                       break;                  
+               case eDVBFrontendParametersCable::Modulation::Auto:
+                       parm.u.qam.modulation = QAM_AUTO;
+                       break;                  
+               }
+               switch (feparm.modulation)
+               {               
+               case eDVBFrontendParametersCable::Inversion::On:
+                       #if HAVE_DVB_API_VERSION < 3
+                       parm.Inversion =
+                       #else
+                       parm.inversion =
+                       #endif
+                               INVERSION_ON;
+                       break;
+               case eDVBFrontendParametersCable::Inversion::Off:
+                       #if HAVE_DVB_API_VERSION < 3
+                       parm.Inversion =
+                       #else
+                       parm.inversion =
+                       #endif
+                               INVERSION_OFF;
+                       break;
+               case eDVBFrontendParametersCable::Inversion::Unknown:
+                       #if HAVE_DVB_API_VERSION < 3
+                       parm.Inversion =
+                       #else
+                       parm.inversion =
+                       #endif
+                               INVERSION_AUTO;
+                       break;                                          
+               }
+               switch (feparm.fec_inner)
+               {               
+               case eDVBFrontendParametersCable::FEC::fNone:
+                       parm.u.qam.fec_inner = FEC_NONE;
+                       break;
+               case eDVBFrontendParametersCable::FEC::f1_2:
+                       parm.u.qam.fec_inner = FEC_1_2;
+                       break;
+               case eDVBFrontendParametersCable::FEC::f2_3:
+                       parm.u.qam.fec_inner = FEC_2_3;
+                       break;
+               case eDVBFrontendParametersCable::FEC::f3_4:
+                       parm.u.qam.fec_inner = FEC_3_4;
+                       break;
+               case eDVBFrontendParametersCable::FEC::f4_5:
+                       parm.u.qam.fec_inner = FEC_4_5;
+                       break;
+               case eDVBFrontendParametersCable::FEC::f5_6:
+                       parm.u.qam.fec_inner = FEC_5_6;
+                       break;
+               case eDVBFrontendParametersCable::FEC::f6_7:
+                       parm.u.qam.fec_inner = FEC_6_7;
+                       break;
+               case eDVBFrontendParametersCable::FEC::f7_8:
+                       parm.u.qam.fec_inner = FEC_7_8;
+                       break;
+               case eDVBFrontendParametersCable::FEC::f8_9:
+                       parm.u.qam.fec_inner = FEC_8_9;
+                       break;
+               case eDVBFrontendParametersCable::FEC::fAuto:
+                       parm.u.qam.fec_inner = FEC_AUTO;
+                       break;
+               }
+               break;
        }
        case feTerrestrial:
        {
index 46d8d77..466ae34 100644 (file)
@@ -34,6 +34,24 @@ struct eDVBFrontendParametersSatellite
 
 struct eDVBFrontendParametersCable
 {
+       struct Inversion
+       {
+               enum {
+                       On, Off, Unknown
+               };
+       };
+       struct FEC
+       {
+               enum {
+                       fNone, f1_2, f2_3, f3_4, f4_5, f5_6, f6_7, f7_8, f8_9, fAuto
+               };
+       };
+       struct Modulation {
+               enum {
+                       QAM16, QAM32, QAM64, QAM128, QAM256, Auto
+               };
+       };
+               
        unsigned int frequency, symbol_rate;
        int modulation, inversion, fec_inner;
 #ifndef SWIG
index 8f68b90..57ff33f 100644 (file)
@@ -175,9 +175,9 @@ class ScanSetup(Screen):
 
                        # cable
                        config.scan.cab.frequency = configElement_nonSave("config.scan.cab.frequency", configSequence, [466], configsequencearg.get("INTEGER", (10000, 14000)))
-                       config.scan.cab.inversion = configElement_nonSave("config.scan.cab.inversion", configSelection, 0, ("auto", "off", "on"))
-                       config.scan.cab.modulation = configElement_nonSave("config.scan.cab.modulation", configSelection, 0, ("Auto", "16-QAM", "32-QAM", "64-QAM", "128-QAM", "256-QAM"))
-                       config.scan.cab.fec = configElement_nonSave("config.scan.cab.fec", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"))
+                       config.scan.cab.inversion = configElement_nonSave("config.scan.cab.inversion", configSelection, 0, ("off", "on", "Auto"))
+                       config.scan.cab.modulation = configElement_nonSave("config.scan.cab.modulation", configSelection, 0, ("16-QAM", "32-QAM", "64-QAM", "128-QAM", "256-QAM", "Auto"))
+                       config.scan.cab.fec = configElement_nonSave("config.scan.cab.fec", configSelection, 0, ("None", "1/2", "2/3", "3/4", "4/5", "5/6", "6/7", "7/8", "8/9", "Auto"))
                        config.scan.cab.symbolrate = configElement_nonSave("config.scan.cab.symbolrate", configSequence, [6900], configsequencearg.get("INTEGER", (1, 30000)))
 
                        # terrestial
index a6635f2..5a3b485 100644 (file)
@@ -34,6 +34,7 @@ enigma2.pot:
                        ../lib/python/Screens/HarddiskSetup.py \
                        ../lib/python/Screens/InfoBar.py \
                        ../lib/python/Screens/TimerEdit.py \
+                       ../lib/python/Screens/Wizard.py \
                        ../lib/python/Components/SetupDevices.py \
                        ../lib/python/Components/Language.py \
                        ../lib/python/Components/NimManager.py \
index d38189c..0d20e88 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: tuxbox-enigma 0.0.1\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-11-21 20:03+0100\n"
+"POT-Creation-Date: 2005-11-22 02:41+0100\n"
 "PO-Revision-Date: 2005-11-17 20:53+0100\n"
 "Last-Translator: Automatically generated\n"
 "Language-Team: none\n"
@@ -30,7 +30,7 @@ msgstr ""
 msgid "Add"
 msgstr "Hinzufuegen"
 
-#: ../lib/python/Components/NimManager.py:367
+#: ../lib/python/Components/NimManager.py:362
 msgid "Advanced"
 msgstr "Erweitert"
 
@@ -50,6 +50,10 @@ msgstr "Kapazitaet"
 msgid "Classic"
 msgstr "klassisch"
 
+#: ../lib/python/Screens/Wizard.py:28
+msgid "Close this Screen..."
+msgstr ""
+
 #: ../lib/python/Screens/Satconfig.py:31 ../lib/python/Screens/Satconfig.py:55
 #: ../lib/python/Screens/Satconfig.py:64 ../data/
 msgid "Configmode"
@@ -71,11 +75,11 @@ msgstr "Erkannte Festplatten"
 msgid "Detected NIMs:"
 msgstr "Erkannte Tuner:"
 
-#: ../lib/python/Components/NimManager.py:368
+#: ../lib/python/Components/NimManager.py:363
 msgid "DiSEqC A/B"
 msgstr ""
 
-#: ../lib/python/Components/NimManager.py:368
+#: ../lib/python/Components/NimManager.py:363
 msgid "DiSEqC A/B/C/D"
 msgstr ""
 
@@ -149,7 +153,7 @@ msgstr "Laengengrad"
 msgid "Model: "
 msgstr "Modell:"
 
-#: ../lib/python/Components/NimManager.py:241
+#: ../lib/python/Components/NimManager.py:236
 msgid "N/A"
 msgstr ""
 
@@ -177,7 +181,7 @@ msgstr ""
 msgid "Port D"
 msgstr ""
 
-#: ../lib/python/Components/NimManager.py:368
+#: ../lib/python/Components/NimManager.py:363
 msgid "Positioner"
 msgstr "Motor"
 
@@ -185,15 +189,15 @@ msgstr "Motor"
 msgid "Satellite"
 msgstr "Satellit"
 
-#: ../lib/python/Components/NimManager.py:367
+#: ../lib/python/Components/NimManager.py:362
 msgid "Simple"
 msgstr "Einfach"
 
-#: ../lib/python/Components/NimManager.py:368
+#: ../lib/python/Components/NimManager.py:363
 msgid "Single"
 msgstr "Einzeln"
 
-#: ../lib/python/Components/NimManager.py:295
+#: ../lib/python/Components/NimManager.py:290
 msgid "Socket "
 msgstr "Sockel "
 
@@ -209,7 +213,7 @@ msgstr ""
 msgid "Terrestrial provider"
 msgstr "Region"
 
-#: ../lib/python/Components/NimManager.py:368
+#: ../lib/python/Components/NimManager.py:363
 msgid "Toneburst A/B"
 msgstr ""
 
@@ -229,7 +233,21 @@ msgstr "Art der Suche"
 msgid "Use DHCP"
 msgstr "Adresse automatisch beziehen (DHCP)"
 
-#: ../lib/python/Components/NimManager.py:297
+#: ../lib/python/Screens/Wizard.py:24
+msgid ""
+"Welcome!\n"
+"\n"
+"You can always press the help key!\n"
+"\n"
+"Please Note: Do a service search first!"
+msgstr ""
+"Willkommen!\n"
+"\n"
+"Sie koennen jederzeit auf Help (Hilfe) druecken!\n"
+"\n"
+"Bitte zuerst eine Kanalsuche durchfuehren!"
+
+#: ../lib/python/Components/NimManager.py:292
 msgid "empty/unknown"
 msgstr ""