Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb: satconf - next more udelay fixes (rotor/switch) - keep ever…
…ything consistent
  • Loading branch information
perexg committed Oct 23, 2015
1 parent 1cbbd31 commit 4077153
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/input/mpegts/linuxdvb/linuxdvb_rotor.c
Expand Up @@ -95,7 +95,7 @@ const idclass_t linuxdvb_rotor_class = {
{
.type = PT_U32,
.id = "powerup_time",
.name = N_("Powerup Time (ms) (10-200)"),
.name = N_("Powerup Time (ms) (0-200)"),
.off = offsetof(linuxdvb_rotor_t, lr_powerup_time),
.def.u32 = 100,
},
Expand Down Expand Up @@ -430,7 +430,7 @@ linuxdvb_rotor_tune
return 0;

/* Force to 18v (quicker movement) */
if (linuxdvb_satconf_start(lsp, MINMAX(lr->lr_powerup_time, 10, 200), 1))
if (linuxdvb_satconf_start(lsp, MINMAX(lr->lr_powerup_time, 0, 200), 1))
return -1;

/* GotoX */
Expand Down Expand Up @@ -501,7 +501,7 @@ linuxdvb_rotor_create0
}
lr = (linuxdvb_rotor_t *)ld;
if (lr->lr_powerup_time == 0)
lr->lr_powerup_time = 100;
lr->lr_powerup_time = 85;
if (lr->lr_cmd_time == 0)
lr->lr_cmd_time = 25;
}
Expand Down
4 changes: 3 additions & 1 deletion src/input/mpegts/linuxdvb/linuxdvb_satconf.c
Expand Up @@ -712,8 +712,10 @@ linuxdvb_satconf_start ( linuxdvb_satconf_t *ls, int delay, int vol )
}
ls->ls_last_tone_off = 1;
}
if (delay)
if (delay) {
tvhtrace("diseqc", "initial sleep %dms", delay);
usleep(delay*1000);
}
return 0;
}

Expand Down
8 changes: 4 additions & 4 deletions src/input/mpegts/linuxdvb/linuxdvb_switch.c
Expand Up @@ -146,7 +146,7 @@ const idclass_t linuxdvb_switch_class =
{
.type = PT_U32,
.id = "poweruptime",
.name = N_("Powerup Time (ms) (10-200)"),
.name = N_("Powerup Time (ms) (0-200)"),
.off = offsetof(linuxdvb_switch_t, ls_powerup_time),
.def.u32 = 100,
},
Expand Down Expand Up @@ -181,7 +181,7 @@ linuxdvb_switch_tune

lsp->ls_last_switch = NULL;

if (linuxdvb_satconf_start(lsp, MINMAX(ls->ls_powerup_time, 10, 200), pol))
if (linuxdvb_satconf_start(lsp, MINMAX(ls->ls_powerup_time, 0, 200), pol))
return -1;

com = 0xF0 | (ls->ls_committed << 2) | (pol << 1) | band;
Expand Down Expand Up @@ -232,7 +232,7 @@ linuxdvb_switch_tune
if (ls->ls_toneburst >= 0 &&
(lsp->ls_diseqc_full || lsp->ls_last_toneburst != ls->ls_toneburst + 1)) {

if (linuxdvb_satconf_start(lsp, MINMAX(ls->ls_powerup_time, 10, 200), vol))
if (linuxdvb_satconf_start(lsp, MINMAX(ls->ls_powerup_time, 0, 200), vol))
return -1;

lsp->ls_last_toneburst = 0;
Expand Down Expand Up @@ -282,7 +282,7 @@ linuxdvb_switch_create0
ld->ls_uncommitted = u;
}
if (ld->ls_powerup_time == 0)
ld->ls_powerup_time = 100;
ld->ls_powerup_time = 85;
if (ld->ls_sleep_time == 0)
ld->ls_sleep_time = 25;
}
Expand Down

0 comments on commit 4077153

Please sign in to comment.