From 429fd1ab89fb51847db78e5b75e773d58712bc22 Mon Sep 17 00:00:00 2001 From: Mikael Nousiainen Date: Tue, 15 Dec 2020 22:18:08 +0200 Subject: [PATCH] Set az/el return values to zero when not supported --- rotators/prosistel/prosistel.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rotators/prosistel/prosistel.c b/rotators/prosistel/prosistel.c index 77dc19add..96d4c4787 100644 --- a/rotators/prosistel/prosistel.c +++ b/rotators/prosistel/prosistel.c @@ -252,6 +252,10 @@ static int prosistel_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) *az = (azimuth_t) posval; } + else + { + *az = 0; + } // Query elevation only if the rotator has the capability to do so // It is an error to query for elevation if it's not supported by the rotator controller @@ -285,6 +289,10 @@ static int prosistel_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) *el = (elevation_t) posval; } + else + { + *el = 0; + } return retval; }