summaryrefslogtreecommitdiff
path: root/global.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2009-02-05 17:58:15 +0100
committerJochen Dolze <vdr@dolze.de>2009-02-05 17:58:15 +0100
commit210b6ab3d8a5367e116afefe31cea1d83fa094b9 (patch)
treea5a11ba0489b725994db55622ee7f2402cff03e9 /global.cpp
parent54a468314486b9c5e9ea34d36791873d54fb8365 (diff)
downloadvdr-plugin-infosatepg-210b6ab3d8a5367e116afefe31cea1d83fa094b9.tar.gz
vdr-plugin-infosatepg-210b6ab3d8a5367e116afefe31cea1d83fa094b9.tar.bz2
Changed setup channel option into Frequency, Polarization, Srate
Add setup option NoWakeup to prevent wakeup Improved parsing of Shorttext Fixed bug in event handling
Diffstat (limited to 'global.cpp')
-rw-r--r--global.cpp31
1 files changed, 28 insertions, 3 deletions
diff --git a/global.cpp b/global.cpp
index 7cb9bd8..c3ca300 100644
--- a/global.cpp
+++ b/global.cpp
@@ -79,7 +79,7 @@ int cGlobalInfosatdata::Load(int fd)
if (ret!=sizeof (bitfield)) return -1;
ret=read (fd,&file,sizeof (file));
if (ret!=sizeof (file)) return -1;
- dsyslog ("infosatepg: loaded file=%s",file);
+ if (file[0]!=0) dsyslog ("infosatepg: loaded file=%s",file);
return ret;
}
@@ -124,8 +124,11 @@ cGlobalInfosatepg::cGlobalInfosatepg()
// set public member
LastCurrentChannel=-1;
Pid=1809;
+ Srate = 22000;
+ Frequency = 12604;
+ Polarization ='h';
EventTimeDiff=480; // default 8 minutes
- Channel=1;
+ channel=-1;
MAC[0]=0x01;
MAC[1]=0x00;
MAC[2]=0x5e;
@@ -134,6 +137,7 @@ cGlobalInfosatepg::cGlobalInfosatepg()
WaitTime=10; // default 10 seconds
SetDirectory ("/tmp");
ProcessedAll=false;
+ NoWakeup=false;
}
cGlobalInfosatepg::~cGlobalInfosatepg()
@@ -196,7 +200,6 @@ void cGlobalInfosatepg::RemoveChannel(int Index)
infosatchannels[i].ChannelID=infosatchannels[i+1].ChannelID;
infosatchannels[i].Usage=infosatchannels[i+1].Usage;
}
- //infosatchannels[numinfosatchannels].Usage=0;
numinfosatchannels--;
}
@@ -403,3 +406,25 @@ bool cGlobalInfosatepg::ReceivedAll(int *Day, int *Month)
return res;
}
+
+bool cGlobalInfosatepg::FindReceiverChannel()
+{
+ cChannel *chan;
+ int source = cSource::FromString("S19.2E"); // only from astra 19.2E
+
+ for (int i=0; i<=Channels.MaxNumber(); i++)
+ {
+ chan = Channels.GetByNumber(i,0);
+ if (chan)
+ {
+ if (chan->Source()!=source) continue;
+ if (chan->Srate()!=Srate) continue;
+ if (chan->Frequency()!=Frequency) continue;
+ if (chan->Polarization()!=Polarization) continue;
+ channel=i;
+ return true;
+ }
+ }
+ channel=-1;
+ return false;
+}