Set az/el return values to zero when not supported

pull/468/head
Mikael Nousiainen 2020-12-15 22:18:08 +02:00
rodzic 0b52d2a6c3
commit 429fd1ab89
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -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;
}