summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-10-08 16:18:23 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-10-08 16:18:23 +0200
commit212468e2e0c9809486040c019005b8da65214f81 (patch)
treeb069b7c48991e822ddd145cd2f2caae67f4bdcd6
parentd5df19dca1a1991475ac8c09aea9713363ad63cb (diff)
downloadvdr-212468e2e0c9809486040c019005b8da65214f81.tar.gz
vdr-212468e2e0c9809486040c019005b8da65214f81.tar.bz2
LNB frequencies can now be configured
-rw-r--r--MANUAL2
-rw-r--r--config.c8
-rw-r--r--config.h4
-rw-r--r--dvbapi.c8
-rw-r--r--menu.c4
5 files changed, 19 insertions, 7 deletions
diff --git a/MANUAL b/MANUAL
index 96fb861e..9b864e36 100644
--- a/MANUAL
+++ b/MANUAL
@@ -214,3 +214,5 @@ Video Disk Recorder User's Manual
0 = instant recordings will not be marked
1 = instant recordings will be marked.
+ LnbFrequLo = 9750 The low and high LNB frequencies (in MHz)
+ LnbFrequHi = 10600
diff --git a/config.c b/config.c
index c7801912..1714651f 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.25 2000/10/08 12:41:59 kls Exp $
+ * $Id: config.c 1.26 2000/10/08 16:10:40 kls Exp $
*/
#include "config.h"
@@ -597,6 +597,8 @@ cSetup::cSetup(void)
ShowInfoOnChSwitch = 1;
MenuScrollPage = 1;
MarkInstantRecord = 1;
+ LnbFrequLo = 9750;
+ LnbFrequHi = 10600;
}
bool cSetup::Parse(char *s)
@@ -609,6 +611,8 @@ bool cSetup::Parse(char *s)
else if (!strcasecmp(Name, "ShowInfoOnChSwitch")) ShowInfoOnChSwitch = atoi(Value);
else if (!strcasecmp(Name, "MenuScrollPage")) MenuScrollPage = atoi(Value);
else if (!strcasecmp(Name, "MarkInstantRecord")) MarkInstantRecord = atoi(Value);
+ else if (!strcasecmp(Name, "LnbFrequLo")) LnbFrequLo = atoi(Value);
+ else if (!strcasecmp(Name, "LnbFrequHi")) LnbFrequHi = atoi(Value);
else
return false;
return true;
@@ -654,6 +658,8 @@ bool cSetup::Save(const char *FileName)
fprintf(f, "ShowInfoOnChSwitch = %d\n", ShowInfoOnChSwitch);
fprintf(f, "MenuScrollPage = %d\n", MenuScrollPage);
fprintf(f, "MarkInstantRecord = %d\n", MarkInstantRecord);
+ fprintf(f, "LnbFrequLo = %d\n", LnbFrequLo);
+ fprintf(f, "LnbFrequHi = %d\n", LnbFrequHi);
fclose(f);
isyslog(LOG_INFO, "saved setup to %s", FileName);
return true;
diff --git a/config.h b/config.h
index 78e2880e..d0a10d44 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 1.25 2000/10/08 12:39:00 kls Exp $
+ * $Id: config.h 1.26 2000/10/08 16:07:49 kls Exp $
*/
#ifndef __CONFIG_H
@@ -231,6 +231,8 @@ public:
int ShowInfoOnChSwitch;
int MenuScrollPage;
int MarkInstantRecord;
+ int LnbFrequLo;
+ int LnbFrequHi;
cSetup(void);
bool Load(const char *FileName);
bool Save(const char *FileName = NULL);
diff --git a/dvbapi.c b/dvbapi.c
index 04873fcc..e5c692cb 100644
--- a/dvbapi.c
+++ b/dvbapi.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.c 1.30 2000/10/03 13:26:16 kls Exp $
+ * $Id: dvbapi.c 1.31 2000/10/08 16:14:45 kls Exp $
*/
#include "dvbapi.h"
@@ -19,7 +19,7 @@ extern "C" {
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
-#include "dvbapi.h"
+#include "config.h"
#include "interface.h"
#include "tools.h"
#include "videodir.h"
@@ -1657,9 +1657,9 @@ bool cDvbApi::SetChannel(int FrequencyMHz, char Polarization, int Diseqc, int Sr
unsigned int freq = FrequencyMHz;
front.ttk = (freq < 11700UL) ? 0 : 1;
if (freq < 11700UL)
- freq -= 9750UL;
+ freq -= Setup.LnbFrequLo;
else
- freq -= 10600UL;
+ freq -= Setup.LnbFrequHi;
front.channel_flags = Ca ? DVB_CHANNEL_CA : DVB_CHANNEL_FTA;
front.pnr = Pnr;
front.freq = freq * 1000000UL;
diff --git a/menu.c b/menu.c
index ddf95417..39689c9c 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.35 2000/10/08 15:34:26 kls Exp $
+ * $Id: menu.c 1.36 2000/10/08 16:11:22 kls Exp $
*/
#include "menu.h"
@@ -1087,6 +1087,8 @@ cMenuSetup::cMenuSetup(void)
Add(new cMenuEditBoolItem("ShowInfoOnChSwitch", &data.ShowInfoOnChSwitch));
Add(new cMenuEditBoolItem("MenuScrollPage", &data.MenuScrollPage));
Add(new cMenuEditBoolItem("MarkInstantRecord", &data.MarkInstantRecord));
+ Add(new cMenuEditIntItem( "LnbFrequLo", &data.LnbFrequLo));
+ Add(new cMenuEditIntItem( "LnbFrequHi", &data.LnbFrequHi));
}
eOSState cMenuSetup::ProcessKey(eKeys Key)