Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb rotor: small cleanups
  • Loading branch information
perexg committed Dec 12, 2014
1 parent 129bb84 commit 9ce0c55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/input/mpegts/linuxdvb/linuxdvb_rotor.c
Expand Up @@ -177,17 +177,19 @@ static int
linuxdvb_rotor_check_orbital_pos
( dvb_mux_t *lm, linuxdvb_satconf_ele_t *ls )
{
linuxdvb_satconf_t *lsp;
int pos;
char dir;


if (dvb_network_get_orbital_pos(lm->mm_network, &pos, &dir) < 0)
return 0;

if (dir != ls->lse_parent->ls_orbital_dir)
lsp = ls->lse_parent;

if (dir != lsp->ls_orbital_dir)
return 0;

if (abs(pos - ls->lse_parent->ls_orbital_pos) > 2)
if (abs(pos - lsp->ls_orbital_pos) > 2)
return 0;

tvhdebug("diseqc", "rotor already positioned to %i.%i%c",
Expand Down
9 changes: 6 additions & 3 deletions src/input/mpegts/linuxdvb/linuxdvb_satconf.c
Expand Up @@ -670,9 +670,12 @@ linuxdvb_satconf_ele_tune ( linuxdvb_satconf_ele_t *lse )
}

/* Remember the last network position for rotor */
dvb_network_get_orbital_pos(lm->mm_network,
&lse->lse_parent->ls_orbital_pos,
&lse->lse_parent->ls_orbital_dir);
if (dvb_network_get_orbital_pos(lm->mm_network,
&ls->ls_orbital_pos,
&ls->ls_orbital_dir) < 0) {
ls->ls_orbital_pos = 0;
ls->ls_orbital_dir = 0;
}

/* Set the tone (en50494 don't use tone) */
if (!lse->lse_en50494) {
Expand Down

0 comments on commit 9ce0c55

Please sign in to comment.