Пример #1
0
    def get(self) -> int:
        """Gets the current count. Returns the current count on the Encoder.
        This method compensates for the decoding type.

        :returns: Current count from the Encoder adjusted for the 1x, 2x, or
            4x scale factor.
        """
        return hal.getEncoder(self.encoder)
Пример #2
0
    def get(self) -> int:
        """Gets the current count. Returns the current count on the Encoder.
        This method compensates for the decoding type.

        :returns: Current count from the Encoder adjusted for the 1x, 2x, or
            4x scale factor.
        """
        return hal.getEncoder(self.encoder)
Пример #3
0
    def getRaw(self):
        """Gets the raw value from the encoder. The raw value is the actual
        count unscaled by the 1x, 2x, or 4x scale factor.

        :returns: Current raw count from the encoder
        """
        if self.counter is not None:
            return self.counter.get()
        return hal.getEncoder(self.encoder)
Пример #4
0
    def getRaw(self):
        """Gets the raw value from the encoder. The raw value is the actual
        count unscaled by the 1x, 2x, or 4x scale factor.

        :returns: Current raw count from the encoder
        """
        if self.counter is not None:
            return self.counter.get()
        return hal.getEncoder(self.encoder)