linuxdvb rotor: improve GOTOX mode (separate sat longtitute and position byte)

This commit is contained in:
Jaroslav Kysela 2014-12-02 17:10:39 +01:00
parent 3e505d77d9
commit 6967a9a281

View file

@ -77,9 +77,15 @@ const idclass_t linuxdvb_rotor_gotox_class =
{
.type = PT_U16,
.id = "position",
.name = "Position",
.name = "GOTOX Position",
.off = offsetof(linuxdvb_rotor_t, lr_position),
},
{
.type = PT_DBL,
.id = "sat_lon",
.name = "Satellite Longitude",
.off = offsetof(linuxdvb_rotor_t, lr_sat_lon),
},
{
.type = PT_U16,
.id = "rate",
@ -140,12 +146,11 @@ linuxdvb_rotor_grace
if (!ls->ls_orbital_dir || lr->lr_rate == 0)
return ls->ls_max_rotor_move;
newpos = (lr->lr_sat_lon + 0.05) * 10;
if (idnode_is_instance(&lr->ld_id, &linuxdvb_rotor_gotox_class)) {
newpos = lr->lr_position; /* GotoX */
tunit = 1000;
tunit = 1000; /* GOTOX */
} else {
newpos = (lr->lr_sat_lon + 0.05) * 10; /* USALS */
tunit = 10000;
tunit = 10000; /* USALS */
}
curpos = ls->ls_orbital_pos;