linuxdvb rotor: Add Min Rotor Move
This commit is contained in:
parent
c8885ce5cb
commit
7a16e29293
3 changed files with 16 additions and 2 deletions
|
@ -145,6 +145,7 @@ struct linuxdvb_satconf
|
|||
*/
|
||||
int ls_lnb_poweroff;
|
||||
uint32_t ls_max_rotor_move;
|
||||
uint32_t ls_min_rotor_move;
|
||||
double ls_site_lat;
|
||||
double ls_site_lon;
|
||||
uint32_t ls_motor_rate;
|
||||
|
|
|
@ -294,7 +294,7 @@ linuxdvb_rotor_grace
|
|||
{
|
||||
linuxdvb_rotor_t *lr = (linuxdvb_rotor_t*)ld;
|
||||
linuxdvb_satconf_t *ls = ld->ld_satconf->lse_parent;
|
||||
int newpos, delta, tunit;
|
||||
int newpos, delta, tunit, min, res;
|
||||
|
||||
if (!ls->ls_last_orbital_pos || ls->ls_motor_rate == 0)
|
||||
return ls->ls_max_rotor_move;
|
||||
|
@ -310,7 +310,13 @@ linuxdvb_rotor_grace
|
|||
return 0;
|
||||
|
||||
/* add one extra second, because of the rounding issue */
|
||||
return ((ls->ls_motor_rate*delta+(tunit-1))/tunit) + 1;
|
||||
res = ((ls->ls_motor_rate*delta+(tunit-1))/tunit) + 1;
|
||||
|
||||
min = 1 + ls->ls_min_rotor_move;
|
||||
if (res < min)
|
||||
res = min;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -253,6 +253,13 @@ const idclass_t linuxdvb_satconf_class =
|
|||
.opts = PO_ADVANCED,
|
||||
.def.u32 = 120
|
||||
},
|
||||
{
|
||||
.type = PT_U32,
|
||||
.id = "min_rotor_move",
|
||||
.name = "Min Rotor Time (seconds)",
|
||||
.off = offsetof(linuxdvb_satconf_t, ls_min_rotor_move),
|
||||
.opts = PO_ADVANCED,
|
||||
},
|
||||
{
|
||||
.type = PT_DBL,
|
||||
.id = "site_lat",
|
||||
|
|
Loading…
Add table
Reference in a new issue