summaryrefslogtreecommitdiff
path: root/sources.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-08-21 11:02:52 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2013-08-21 11:02:52 +0200
commitcd10b439d0465afa6bce38188a4e9d8a5e74d859 (patch)
tree54480623232fb0e8e94fd37a5c9e31603301dd35 /sources.c
parent5b76eec1afbe435b5d1dfabaaa9546f8e400cba7 (diff)
downloadvdr-cd10b439d0465afa6bce38188a4e9d8a5e74d859.tar.gz
vdr-cd10b439d0465afa6bce38188a4e9d8a5e74d859.tar.bz2
Added basic support for positioners to control steerable satellite dishes
Diffstat (limited to 'sources.c')
-rw-r--r--sources.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sources.c b/sources.c
index 780c1fdc..ffaee98a 100644
--- a/sources.c
+++ b/sources.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sources.c 3.3 2013/05/23 09:41:54 kls Exp $
+ * $Id: sources.c 3.4 2013/05/23 10:20:28 kls Exp $
*/
#include "sources.h"
@@ -37,6 +37,13 @@ bool cSource::Parse(const char *s)
return code != stNone && description && *description;
}
+bool cSource::Matches(int Code1, int Code2)
+{
+ if (Code1 == (stSat | st_Any))
+ return IsSat(Code2);
+ return Code1 == Code2;
+}
+
int cSource::Position(int Code)
{
int n = (Code & st_Pos);