def getStopped(self) -> bool: """Determine if the encoder is stopped. Using the MaxPeriod value, a boolean is returned that is True if the encoder is considered stopped and False if it is still moving. A stopped encoder is one where the most recent pulse width exceeds the MaxPeriod. :returns: True if the encoder is considered stopped. """ return hal.getEncoderStopped(self.encoder)
def getStopped(self): """Determine if the encoder is stopped. Using the MaxPeriod value, a boolean is returned that is True if the encoder is considered stopped and False if it is still moving. A stopped encoder is one where the most recent pulse width exceeds the MaxPeriod. :returns: True if the encoder is considered stopped. """ if self.counter is not None: return self.counter.getStopped() elif self.encoder is not None: return hal.getEncoderStopped(self.encoder) else: raise ValueError("operation on freed port")