]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
fixes to previous commit as suggested by perexg
authorGary The Brown <djfreakwenc@gmail.com>
Mon, 4 Aug 2014 16:34:46 +0000 (17:34 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 4 Aug 2014 17:00:37 +0000 (19:00 +0200)
src/input/mpegts/linuxdvb/linuxdvb_rotor.c

index 2c7884ec2f3391c0849a7eacc0fbedd663d05a81..2233f4491e2767dc288e1e6d5c5c8263f4af9bbf 100644 (file)
@@ -133,15 +133,11 @@ static int
 linuxdvb_rotor_grace
   ( linuxdvb_diseqc_t *ld, dvb_mux_t *lm )
 {
-  if (ld->ld_satconf->lse_parent->ls_orbital_pos == 0)
-  {
-    if (lr->lr_rate != 0)
-      return (120 * 500 + 999)/1000;
-    else
-      return 120;
-  }
   linuxdvb_rotor_t *lr = (linuxdvb_rotor_t*)ld;
 
+  if (ld->ld_satconf->lse_parent->ls_orbital_pos == 0 || lr->lr_rate != 0)
+    return 120;
+
   int curpos = ld->ld_satconf->lse_parent->ls_orbital_pos;
 
   if (ld->ld_satconf->lse_parent->ls_orbital_dir == 'W')
@@ -192,8 +188,7 @@ linuxdvb_rotor_gotox_tune
 
   tvhdebug("diseqc", "rotor GOTOX pos %d sent", lr->lr_position);
 
-  linuxdvb_diseqc_t *ld = (linuxdvb_diseqc_t*)lr;
-  return linuxdvb_rotor_grace(ld,lm);
+  return linuxdvb_rotor_grace((linuxdvb_diseqc_t*)lr,lm);
 }
 
 /* USALS */
@@ -263,8 +258,7 @@ linuxdvb_rotor_usals_tune
     usleep(25000);
   }
 
-  linuxdvb_diseqc_t *ld = (linuxdvb_diseqc_t*)lr;
-  return linuxdvb_rotor_grace(ld,lm);
+  return linuxdvb_rotor_grace((linuxdvb_diseqc_t*)lr,lm);
 
 #undef TO_RAD
 #undef TO_DEG