linuxdvb: rotor - add Max Rotor Movement field to the frontend config #2

This commit is contained in:
Jaroslav Kysela 2014-09-21 09:21:51 +02:00
parent dc56784fdd
commit 24b1818e43
3 changed files with 12 additions and 1 deletions

View file

@ -140,6 +140,7 @@ struct linuxdvb_satconf
* LNB settings
*/
int ls_lnb_poweroff;
uint32_t ls_max_rotor_move;
/*
* Position

View 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 */

View 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);