diff mbox

dvb-apps: fixes in scan utility

Message ID 157C68AB74BE874882CBA1525C1D967F61530EFFD5@hyperion.intranet.lantan.ru (mailing list archive)
State Not Applicable
Headers show

Commit Message

Anton Myachin Nov. 17, 2009, 4:18 p.m. UTC
None
diff mbox

Patch

--- a/util/scan/scan.c  2009-11-16 19:29:41.000000000 +0500
+++ b/util/scan/scan.c  2009-11-16 20:37:44.000000000 +0500
@@ -1484,7 +1484,7 @@  static int __tune_to_transponder (int fr

                                setup_switch (frontend_fd,
                                              switch_pos,
-                                             t->polarisation == POLARISATION_VERTICAL ? 0 : 1,
+                                             t->polarisation == POLARISATION_VERTICAL || t->polarisation == POLARISATION_CIRCULAR_RIGHT ? 0 : 1,
                                              hiband);
                                usleep(50000);
                                if (hiband)
@@ -1497,7 +1497,12 @@  static int __tune_to_transponder (int fr
                                                lnb_type.low_val: lnb_type.high_val));
                        }
                } else  {
-                       /* Monopoint LNBf without switch */
+                       /* Monopoint LNBf */
+                       setup_switch (frontend_fd,
+                                     switch_pos,
+                                     t->polarisation == POLARISATION_VERTICAL || t->polarisation == POLARISATION_CIRCULAR_RIGHT ? 0 : 1,
+                                     0);
+                       usleep(50000);
                        p.frequency = abs(p.frequency - lnb_type.low_val);
                }
                if (verbosity >= 2)
@@ -1930,7 +1935,7 @@  static void pids_dump_service_parameter_

 static char sat_polarisation (struct transponder *t)
 {
-       return t->polarisation == POLARISATION_VERTICAL ? 'v' : 'h';
+       return t->polarisation == POLARISATION_VERTICAL || t->polarisation == POLARISATION_CIRCULAR_RIGHT ? 'v' : 'h';
 }

 static int sat_number (struct transponder *t)