Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb: rotor - add Max Rotor Movement field to the frontend config #2
  • Loading branch information
perexg committed Sep 21, 2014
1 parent dc56784 commit 24b1818
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_private.h
Expand Up @@ -140,6 +140,7 @@ struct linuxdvb_satconf
* LNB settings
*/
int ls_lnb_poweroff;
uint32_t ls_max_rotor_move;

/*
* Position
Expand Down
2 changes: 1 addition & 1 deletion src/input/mpegts/linuxdvb/linuxdvb_rotor.c
Expand Up @@ -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 */
Expand Down
10 changes: 10 additions & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_satconf.c
Expand Up @@ -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
},
{}
}
};
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 24b1818

Please sign in to comment.