]> www.vanbest.org Git - sasc-ng.git/commitdiff
sasc: fix source & transponder handling
authorleslie <unknown>
Wed, 10 Feb 2010 21:01:18 +0000 (22:01 +0100)
committerleslie <unknown>
Wed, 10 Feb 2010 21:01:18 +0000 (22:01 +0100)
contrib/sasc-ng/dvblb_plugins/plugin_cam.c
contrib/sasc-ng/sc/misc.cpp

index ac4c033f0556d02abc1a0e18506f5953f278e625..ad2d75764a5a15325f4a9a6576e0d1f04c57d77b 100644 (file)
@@ -309,8 +309,9 @@ void process_cam(struct msg *msg, unsigned int priority)
 
   ch->SetId(0, 1, sidmsg->sid, 0);
   //set source type to Satellite.  Use orbit and E/W data
-  int source = 0x8000 | (BCD2INT(sidmsg->nit.orbit) & 0x7ff) | ((int)sidmsg->nit.is_east << 19);
-  ch->SetSatTransponderData(source, sidmsg->nit.frequency, sidmsg->nit.polarization, sidmsg->nit.symbolrate, 0);
+  int source = 0x8000 | (BCD2INT(sidmsg->nit.orbit) & 0x7ff) | ((int)sidmsg->nit.is_east << 11);
+  static char Polarizations[] = { 'h', 'v', 'l', 'r' };
+  ch->SetSatTransponderData(source, BCD2INT(sidmsg->nit.frequency)/100, Polarizations[sidmsg->nit.polarization], BCD2INT(sidmsg->nit.symbolrate), 0);
   dcnt = (MAXDPIDS >= sidmsg->epid_count) ?
             sidmsg->epid_count : MAXDPIDS;
   memcpy(dpid, sidmsg->epid, sizeof(int)*dcnt);
index 1c679d2841a9a80589f31a5e4ffd917e2a0e7b39..d82412f4054ec03e3847e15fa91ad9ea6bcb3bda 100644 (file)
@@ -2,7 +2,15 @@
 #include "include/vdr/device.h"
 #include <ctype.h>
 #include <linux/dvb/ca.h>
-int cChannel::Transponder() const {return sid;}
+int cChannel::Transponder() const
+{
+  int tf = frequency;
+  while (tf > 20000)
+        tf /= 1000;
+  if (IsSat())
+     tf = Transponder(tf, polarization);
+  return tf;
+}
 int cChannel::Transponder(int Frequency, char Polarization)
 {
   // some satellites have transponders at the same frequency, just with different polarization: