From 6967a9a2812df36825cc628eccd190d337e5f6b0 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 2 Dec 2014 17:10:39 +0100 Subject: [PATCH] linuxdvb rotor: improve GOTOX mode (separate sat longtitute and position byte) --- src/input/mpegts/linuxdvb/linuxdvb_rotor.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/input/mpegts/linuxdvb/linuxdvb_rotor.c b/src/input/mpegts/linuxdvb/linuxdvb_rotor.c index b16b342f..a1c75bed 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_rotor.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_rotor.c @@ -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;