Package com.playingwithfusion.jni
Class CANVenomJNI
- java.lang.Object
-
- com.playingwithfusion.jni.CANVenomJNI
-
public class CANVenomJNI extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CANVenomJNI.Helper
-
Constructor Summary
Constructors Constructor Description CANVenomJNI()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addMotionProfilePoint(long handle, double time, double speed, double position)
static void
clearLatchedFaults(long handle)
static void
clearMotionProfilePoints(long handle)
static void
completeMotionProfilePath(long handle, double time, double position)
static long
create(int motorID)
static void
destroy(long handle)
static void
disable(long handle)
static void
enable(long handle)
static void
enableLimitSwitches(long handle, boolean fwdLimitSwitchEnabled, boolean revLimitSwitchEnabled)
static void
executePath(long handle)
static void
forceLoad()
Force load the library.static double
get(long handle)
static int
getActiveControlMode(long handle)
static int
getActiveFaults(long handle)
static double
getAuxVoltage(long handle)
static double
getB(long handle)
static int
getBrakeCoastMode(long handle)
static double
getBusVoltage(long handle)
static int
getControlMode(long handle)
static int
getCurrentMotionProfilePoint(long handle)
static double
getDutyCycle(long handle)
static long
getFirmwareVersion(long handle)
static boolean
getFwdLimitSwitchActive(long handle)
static boolean
getInverted(long handle)
static double
getKD(long handle)
static double
getKF(long handle)
static double
getKI(long handle)
static double
getKP(long handle)
static int
getLatchedFaults(long handle)
static double
getMaxAcceleration(long handle)
static double
getMaxJerk(long handle)
static double
getMaxPILimit(long handle)
static double
getMaxSpeed(long handle)
static double
getMinPILimit(long handle)
static boolean
getMotionProfileIsValid(long handle)
static double
getMotionProfilePositionTarget(long handle)
static double
getMotionProfileSpeedTarget(long handle)
static int
getMotionProfileState(long handle)
static int
getNumAvaliableMotionProfilePoints(long handle)
static double
getOutputCurrent(long handle)
static double
getOutputVoltage(long handle)
static double
getPIDTarget(long handle)
static double
getPosition(long handle)
static boolean
getRevLimitSwitchActive(long handle)
static long
getSerialNumber(long handle)
static double
getSpeed(long handle)
static double
getTemperature(long handle)
static void
identifyMotor(long handle)
static void
pidWrite(long handle, double command)
static void
resetPosition(long handle)
static void
set(long handle, double command)
static void
setB(long handle, double b)
static void
setBrakeCoastMode(long handle, int brakeCoastMode)
static void
setCommand(long handle, int mode, double command, double kF, double b)
static void
setCommandAndMode(long handle, int mode, double command)
static void
setControlMode(long handle, int controlMode)
static void
setInverted(long handle, boolean isInverted)
static void
setKD(long handle, double kD)
static void
setKF(long handle, double kF)
static void
setKI(long handle, double kI)
static void
setKP(long handle, double kP)
static void
setMaxAcceleration(long handle, double limit)
static void
setMaxJerk(long handle, double limit)
static void
setMaxPILimit(long handle, double limit)
static void
setMaxSpeed(long handle, double limit)
static void
setMinPILimit(long handle, double limit)
static void
setPID(long handle, double kP, double kI, double kD, double kF, double b)
static void
setPosition(long handle, double newPosition)
static void
stopMotor(long handle)
-
-
-
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)
-
-