Class CANVenomJNI


  • public class CANVenomJNI
    extends java.lang.Object
    • Constructor Detail

      • CANVenomJNI

        public CANVenomJNI()
    • Method Detail

      • forceLoad

        public static void forceLoad()
                              throws java.io.IOException
        Force load the library.
        Throws:
        java.io.IOException - Unable to load libPlayingWithFusionDriver.so
      • create

        public static long create​(int motorID)
      • destroy

        public static void destroy​(long handle)
      • identifyMotor

        public static void identifyMotor​(long handle)
      • resetPosition

        public static void resetPosition​(long handle)
      • setPosition

        public static void setPosition​(long handle,
                                       double newPosition)
      • stopMotor

        public static void stopMotor​(long handle)
      • getFirmwareVersion

        public static long getFirmwareVersion​(long handle)
      • getSerialNumber

        public static long getSerialNumber​(long handle)
      • set

        public static void set​(long handle,
                               double command)
      • pidWrite

        public static void pidWrite​(long handle,
                                    double command)
      • setInverted

        public static void setInverted​(long handle,
                                       boolean isInverted)
      • get

        public static double get​(long handle)
      • getInverted

        public static boolean getInverted​(long handle)
      • disable

        public static void disable​(long handle)
      • enable

        public static void enable​(long handle)
      • getFwdLimitSwitchActive

        public static boolean getFwdLimitSwitchActive​(long handle)
      • getRevLimitSwitchActive

        public static boolean getRevLimitSwitchActive​(long handle)
      • enableLimitSwitches

        public static void enableLimitSwitches​(long handle,
                                               boolean fwdLimitSwitchEnabled,
                                               boolean revLimitSwitchEnabled)
      • getNumAvaliableMotionProfilePoints

        public static int getNumAvaliableMotionProfilePoints​(long handle)
      • getCurrentMotionProfilePoint

        public static int getCurrentMotionProfilePoint​(long handle)
      • getMotionProfilePositionTarget

        public static double getMotionProfilePositionTarget​(long handle)
      • getMotionProfileSpeedTarget

        public static double getMotionProfileSpeedTarget​(long handle)
      • getMotionProfileIsValid

        public static boolean getMotionProfileIsValid​(long handle)
      • getMotionProfileState

        public static int getMotionProfileState​(long handle)
      • clearMotionProfilePoints

        public static void clearMotionProfilePoints​(long handle)
      • addMotionProfilePoint

        public static void addMotionProfilePoint​(long handle,
                                                 double time,
                                                 double speed,
                                                 double position)
      • completeMotionProfilePath

        public static void completeMotionProfilePath​(long handle,
                                                     double time,
                                                     double position)
      • executePath

        public static void executePath​(long handle)
      • getBusVoltage

        public static double getBusVoltage​(long handle)
      • getOutputVoltage

        public static double getOutputVoltage​(long handle)
      • getDutyCycle

        public static double getDutyCycle​(long handle)
      • getOutputCurrent

        public static double getOutputCurrent​(long handle)
      • getTemperature

        public static double getTemperature​(long handle)
      • getAuxVoltage

        public static double getAuxVoltage​(long handle)
      • getSpeed

        public static double getSpeed​(long handle)
      • getPosition

        public static double getPosition​(long handle)
      • getPIDTarget

        public static double getPIDTarget​(long handle)
      • getKF

        public static double getKF​(long handle)
      • getB

        public static double getB​(long handle)
      • getKP

        public static double getKP​(long handle)
      • getKI

        public static double getKI​(long handle)
      • getKD

        public static double getKD​(long handle)
      • getMinPILimit

        public static double getMinPILimit​(long handle)
      • getMaxPILimit

        public static double getMaxPILimit​(long handle)
      • getMaxSpeed

        public static double getMaxSpeed​(long handle)
      • getMaxAcceleration

        public static double getMaxAcceleration​(long handle)
      • getMaxJerk

        public static double getMaxJerk​(long handle)
      • getControlMode

        public static int getControlMode​(long handle)
      • getActiveControlMode

        public static int getActiveControlMode​(long handle)
      • getBrakeCoastMode

        public static int getBrakeCoastMode​(long handle)
      • getActiveFaults

        public static int getActiveFaults​(long handle)
      • getLatchedFaults

        public static int getLatchedFaults​(long handle)
      • clearLatchedFaults

        public static void clearLatchedFaults​(long handle)
      • setCommandAndMode

        public static void setCommandAndMode​(long handle,
                                             int mode,
                                             double command)
      • setCommand

        public static void setCommand​(long handle,
                                      int mode,
                                      double command,
                                      double kF,
                                      double b)
      • setPID

        public static void setPID​(long handle,
                                  double kP,
                                  double kI,
                                  double kD,
                                  double kF,
                                  double b)
      • setKF

        public static void setKF​(long handle,
                                 double kF)
      • setB

        public static void setB​(long handle,
                                double b)
      • setKP

        public static void setKP​(long handle,
                                 double kP)
      • setKI

        public static void setKI​(long handle,
                                 double kI)
      • setKD

        public static void setKD​(long handle,
                                 double kD)
      • setMinPILimit

        public static void setMinPILimit​(long handle,
                                         double limit)
      • setMaxPILimit

        public static void setMaxPILimit​(long handle,
                                         double limit)
      • setMaxSpeed

        public static void setMaxSpeed​(long handle,
                                       double limit)
      • setMaxAcceleration

        public static void setMaxAcceleration​(long handle,
                                              double limit)
      • setMaxJerk

        public static void setMaxJerk​(long handle,
                                      double limit)
      • setControlMode

        public static void setControlMode​(long handle,
                                          int controlMode)
      • setBrakeCoastMode

        public static void setBrakeCoastMode​(long handle,
                                             int brakeCoastMode)