Class TetrixEncoderMotor

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getLimitAngle()
      Return the last angle that this motor was rotating to via one of the rotate methods.
      int getTachoCount()
      Returns the tachometer count.
      void resetTachoCount()
      Reset the the tachometer count.
      void rotate​(int degrees, boolean immediateReturn)
      Rotate by the requested number of degrees with option for wait until completion or immediate return where the motor completes its rotation asynchronously.
      void rotateTo​(int limitAngle, boolean immediateReturn)
      Rotate to the target angle with option for wait until completion or immediate return where the motor completes its rotation asynchronously.
      void setRegulate​(boolean regulate)
      Disable or Enable internal motor controller speed regulation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getTachoCount

        public int getTachoCount()
        Description copied from interface: Encoder
        Returns the tachometer count.
        Specified by:
        getTachoCount in interface Encoder
        Returns:
        tachometer count in degrees
      • resetTachoCount

        public void resetTachoCount()
        Reset the the tachometer count. Calling this method will stop any current motor action. This is imposed by the HiTechic Motor Controller firmware.
        Specified by:
        resetTachoCount in interface Encoder
      • rotate

        public void rotate​(int degrees,
                           boolean immediateReturn)
        Rotate by the requested number of degrees with option for wait until completion or immediate return where the motor completes its rotation asynchronously.
        Parameters:
        degrees - number of degrees to rotate relative to the current position.
        immediateReturn - if true, do not wait for the move to complete. false will block until the rotation completes.
      • rotateTo

        public void rotateTo​(int limitAngle,
                             boolean immediateReturn)
        Rotate to the target angle with option for wait until completion or immediate return where the motor completes its rotation asynchronously.
        Parameters:
        limitAngle - Angle [in degrees] to rotate to.
        immediateReturn - if true, do not wait for the move to complete. false will block until the rotation completes.
      • getLimitAngle

        public int getLimitAngle()
        Return the last angle that this motor was rotating to via one of the rotate methods.
        Returns:
        angle in degrees
      • setRegulate

        public void setRegulate​(boolean regulate)
        Disable or Enable internal motor controller speed regulation. Setting this to true will cause the motor controller firmware to adjust the motor power to compensate for changing loads in order to maintain a constant motor speed. Default at instantiation is false.
        Parameters:
        regulate - true to enable regulation, false otherwise.