1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

LNB frequencies can now be configured

This commit is contained in:
Klaus Schmidinger 2000-10-08 16:18:23 +02:00
parent d5df19dca1
commit 212468e2e0
5 changed files with 19 additions and 7 deletions

2
MANUAL
View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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;

4
menu.c
View File

@ -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)