def is_moving(self): state = indihelper.getNumberState(self.filterwheel, 'FILTER_SLOT') if state is None: return None return state == PyIndi.IPS_BUSY state = indihelper.getfindLightState(self.filterwheel, 'FILTER_SLOT') return state == PyIndi.IPS_BUSY
def get_state(self): # FIXME using hard coded values based on ASCOM camera state # and definied in pyastroimageview.CameraManager.CameraState! state = indihelper.getNumberState(self.cam, 'CCD_EXPOSURE') if state is None: # UNKNOWN return -1 elif state == PyIndi.IPS_BUSY: # just use EXPOSING return 2 elif state == PyIndi.IPS_ALERT: # ERROR return 5 elif state == PyIndi.IPS_IDLE or state == PyIndi.IPS_OK: # IDLE return 0 # otherwise UNKNOWN return -1
def is_slewing(self): using_eqcoord = False if self.slew_eqcoord is not None: logging.debug('using slew_eqcoord') state = self.slew_eqcoord.s using_eqcoord = True else: state = indihelper.getNumberState(self.mount, 'EQUATORIAL_EOD_COORD') if state is None: return None # Keep eye on this have seen the end of slews not detected properly if self.slew_eqcoord is not None: logging.debug(f'is_slewing: state = {state}') if state != PyIndi.IPS_BUSY and using_eqcoord: # slew is done clear slew_eqcoord self.slew_eqcoord = None return state == PyIndi.IPS_BUSY
def is_moving(self): state = indihelper.getNumberState(self.focuser, 'ABS_FOCUS_POSITION') if state is None: return None return state == PyIndi.IPS_BUSY