]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb: rotor - add Max Rotor Movement field to the frontend config #2
authorJaroslav Kysela <perex@perex.cz>
Sun, 21 Sep 2014 07:21:51 +0000 (09:21 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sun, 21 Sep 2014 07:21:51 +0000 (09:21 +0200)
src/input/mpegts/linuxdvb/linuxdvb_private.h
src/input/mpegts/linuxdvb/linuxdvb_rotor.c
src/input/mpegts/linuxdvb/linuxdvb_satconf.c

index 38bb2b0c3f76fc4774b2293bcee6e905df5e4802..a0c8a4b6284e59420c20507a26db24bc997a214a 100644 (file)
@@ -140,6 +140,7 @@ struct linuxdvb_satconf
    * LNB settings
    */
   int                    ls_lnb_poweroff;
+  uint32_t               ls_max_rotor_move;
 
   /*
    * Position
index e83ad681f49d51d88f3fc31b0359b7a94aef22bb..65477fa029e4958bfecd7bf1557b5ae3ce6b1cbb 100644 (file)
@@ -138,7 +138,7 @@ linuxdvb_rotor_grace
   int newpos, curpos, delta;
 
   if (!ls->ls_orbital_dir || lr->lr_rate == 0)
-    return 120;
+    return ls->ls_max_rotor_move;
 
   if (idnode_is_instance(&lr->ld_id, &linuxdvb_rotor_gotox_class))
     newpos = lr->lr_position;                /* GotoX */
index 41ad0de84700137dfead0005ba81d30d155d9886..76738bc455265fd69d751074125d482e2c8400cd 100644 (file)
@@ -231,6 +231,14 @@ const idclass_t linuxdvb_satconf_class =
       .opts     = PO_ADVANCED,
       .def.i    = 1
     },
+    {
+      .type     = PT_U32,
+      .id       = "max_rotor_move",
+      .name     = "Max Rotor Movement (seconds)",
+      .off      = offsetof(linuxdvb_satconf_t, ls_max_rotor_move),
+      .opts     = PO_ADVANCED,
+      .def.u32  = 120
+    },
     {}
   }
 };
@@ -745,6 +753,8 @@ linuxdvb_satconf_create
   ls->ls_type     = lst->type;
   TAILQ_INIT(&ls->ls_elements);
 
+  ls->ls_max_rotor_move = 120;
+
   /* Create node */
   if (idnode_insert(&ls->ls_id, uuid, lst->idc, 0)) {
     free(ls);