Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
    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")
Ejemplo n.º 4
0
    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")