linuxdvb rotor: small cleanups
This commit is contained in:
parent
129bb84bf6
commit
9ce0c5542d
2 changed files with 11 additions and 6 deletions
|
@ -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",
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue