Make HD-1780 obey rotation limits

"Patch to make the HD-1780 obey the limits of rotation and make those
defaults correct.  At my location, I need to set them a bit before
+/-180 to ensure that the rotor doesn't get torn up because the beam
will coast it past the stops."

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
(cherry picked from commit 4df53cd292)
Hamlib-3.0
Rob Frohne 2012-02-05 20:46:19 -08:00 zatwierdzone przez Nate Bargmann
rodzic ca0899ddc5
commit 4754d0027d
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -81,8 +81,8 @@ const struct rot_caps hd1780_rot_caps = {
.timeout = 60000,
.retry = 0,
.min_az = 0,
.max_az = 360,
.min_az = -180,
.max_az = 180,
.min_el = 0,
.max_el = 0,
@ -165,7 +165,7 @@ static int hd1780_rot_set_position(ROT *rot, azimuth_t azimuth, elevation_t elev
if (!rot)
return -RIG_EINVAL;
if (azimuth < 0 || azimuth > 360)
if ((azimuth - 180 < hd1780_rot_caps.min_az) || (azimuth - 180 > hd1780_rot_caps.max_az))
return -RIG_EINVAL;