Boolean drives_available()
Return true if the telescope drives are available to be enabled for observing.
# If the drives are currently unavailable, wait for them to become available. if(!$drives_available) { print "Waiting for the telescope drives to become available" until $drives_available } # Enable the drive servos, and wait for the completion of this operation. axes all until $acquired(source) # Keep an eye out for the drives becoming disabled again, while observing. catch(!$drives_enabled) { ...observe sources... }
$drives_available()
function
returns false
, to indicate that the drives are not
available for observing. When the drives are again available,
the $drives_available()
function
returns true
. Schedules can call this function to
determine when it is okay to attempt to re-enable the drive
servos after an outage, and resume observations.
Note that the $drives_available()
function doesn't
indicate that the drives are currently usable for observing. That
is the job of
the $drives_enabled()
function, which indicates when the drives are not only available,
but when their servos are also enabled. So to detect when a drive
outage occurs, schedules should use
!$drives_enabled()
in their catch statements, rather
than !$drives_available()
.