mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Added support for CAN Talon SRX in C++ and Java.
Currently, the JNI bindings are generated by Swig and, unfortunately, the interface available through Java is lower-level than that for C++ (ie, direct access to the ctre code through the JNI bindings, rather than an interface on top of that), but it does work. See eclipse plugins for some short samples. There are a couple of short unit tests as placeholders. Still needs some cleaning up. Change-Id: Iae2f74693ca6b80bf7d5aca0625c66aa6e0b7f85 Added quick samples for C++/Java CAN Talon stuff. Change-Id: I3acb27d6fd5568d88931e0d678c09973d436735d
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.11
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package edu.wpi.first.wpilibj.hal;
|
||||
|
||||
public class CanTalon {
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.11
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package edu.wpi.first.wpilibj.hal;
|
||||
|
||||
public class CanTalonSRX extends CtreCanNode {
|
||||
private long swigCPtr;
|
||||
|
||||
protected CanTalonSRX(long cPtr, boolean cMemoryOwn) {
|
||||
super(CanTalonJNI.CanTalonSRX_SWIGUpcast(cPtr), cMemoryOwn);
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(CanTalonSRX obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
CanTalonJNI.delete_CanTalonSRX(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
super.delete();
|
||||
}
|
||||
|
||||
public CanTalonSRX(int deviceNumber) {
|
||||
this(CanTalonJNI.new_CanTalonSRX__SWIG_0(deviceNumber), true);
|
||||
}
|
||||
|
||||
public CanTalonSRX() {
|
||||
this(CanTalonJNI.new_CanTalonSRX__SWIG_1(), true);
|
||||
}
|
||||
|
||||
public void Set(double value) {
|
||||
CanTalonJNI.CanTalonSRX_Set(swigCPtr, this, value);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetFault_OverTemp(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetFault_OverTemp(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetFault_UnderVoltage(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetFault_UnderVoltage(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetFault_ForLim(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetFault_ForLim(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetFault_RevLim(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetFault_RevLim(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetFault_HardwareFailure(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetFault_HardwareFailure(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetFault_ForSoftLim(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetFault_ForSoftLim(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetFault_RevSoftLim(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetFault_RevSoftLim(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetStckyFault_OverTemp(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetStckyFault_OverTemp(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetStckyFault_UnderVoltage(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetStckyFault_UnderVoltage(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetStckyFault_ForLim(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetStckyFault_ForLim(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetStckyFault_RevLim(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetStckyFault_RevLim(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetStckyFault_ForSoftLim(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetStckyFault_ForSoftLim(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetStckyFault_RevSoftLim(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetStckyFault_RevSoftLim(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetAppliedThrottle11(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetAppliedThrottle11(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetCloseLoopErr(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetCloseLoopErr(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetSelectlFeedbackDevice(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetSelectlFeedbackDevice(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetModeSelect(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetModeSelect(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetLimitSwitchEn(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetLimitSwitchEn(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetLimitSwitchClosedFor(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetLimitSwitchClosedFor(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetLimitSwitchClosedRev(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetLimitSwitchClosedRev(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetCloseLoopCellSelect(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetCloseLoopCellSelect(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetSensorPosition(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetSensorPosition(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetSensorVelocity(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetSensorVelocity(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetCurrent(SWIGTYPE_p_double param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetCurrent(swigCPtr, this, SWIGTYPE_p_double.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetBrakeIsEnabled(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetBrakeIsEnabled(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetEncPosition(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetEncPosition(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetEncVel(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetEncVel(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetEncIndexRiseEvents(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetEncIndexRiseEvents(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetQuadApin(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetQuadApin(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetQuadBpin(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetQuadBpin(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetQuadIdxpin(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetQuadIdxpin(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetAnalogInWithOv(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetAnalogInWithOv(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetAnalogInVel(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetAnalogInVel(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetTemp(SWIGTYPE_p_double param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetTemp(swigCPtr, this, SWIGTYPE_p_double.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetBatteryV(SWIGTYPE_p_double param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetBatteryV(swigCPtr, this, SWIGTYPE_p_double.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetResetCount(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetResetCount(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetResetFlags(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetResetFlags(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code GetFirmVers(SWIGTYPE_p_int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_GetFirmVers(swigCPtr, this, SWIGTYPE_p_int.getCPtr(param)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code SetDemand24(int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_SetDemand24(swigCPtr, this, param), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code SetLimitSwitchEn(int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_SetLimitSwitchEn(swigCPtr, this, param), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code SetSelectlFeedbackDevice(int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_SetSelectlFeedbackDevice(swigCPtr, this, param), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code SetRevMotDuringCloseLoopEn(int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_SetRevMotDuringCloseLoopEn(swigCPtr, this, param), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code SetBrakeType(int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_SetBrakeType(swigCPtr, this, param), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code SetModeSelect(int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_SetModeSelect(swigCPtr, this, param), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code SetCloseLoopCellSelect(int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_SetCloseLoopCellSelect(swigCPtr, this, param), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code SetRampThrottle(int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_SetRampThrottle(swigCPtr, this, param), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_CTR_Code SetRevEncoderPosAndVel(int param) {
|
||||
return new SWIGTYPE_p_CTR_Code(CanTalonJNI.CanTalonSRX_SetRevEncoderPosAndVel(swigCPtr, this, param), true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.11
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package edu.wpi.first.wpilibj.hal;
|
||||
|
||||
public class CtreCanNode {
|
||||
private long swigCPtr;
|
||||
protected boolean swigCMemOwn;
|
||||
|
||||
protected CtreCanNode(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(CtreCanNode obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if (swigCPtr != 0) {
|
||||
if (swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
CanTalonJNI.delete_CtreCanNode(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public CtreCanNode(SWIGTYPE_p_UINT8 deviceNumber) {
|
||||
this(CanTalonJNI.new_CtreCanNode(SWIGTYPE_p_UINT8.getCPtr(deviceNumber)), true);
|
||||
}
|
||||
|
||||
public SWIGTYPE_p_UINT8 GetDeviceNumber() {
|
||||
return new SWIGTYPE_p_UINT8(CanTalonJNI.CtreCanNode_GetDeviceNumber(swigCPtr, this), true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.11
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package edu.wpi.first.wpilibj.hal;
|
||||
|
||||
public class SWIGTYPE_p_CTR_Code {
|
||||
private long swigCPtr;
|
||||
|
||||
protected SWIGTYPE_p_CTR_Code(long cPtr, boolean futureUse) {
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_CTR_Code() {
|
||||
swigCPtr = 0;
|
||||
}
|
||||
|
||||
protected static long getCPtr(SWIGTYPE_p_CTR_Code obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.11
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package edu.wpi.first.wpilibj.hal;
|
||||
|
||||
public class SWIGTYPE_p_UINT8 {
|
||||
private long swigCPtr;
|
||||
|
||||
public SWIGTYPE_p_UINT8(long cPtr, boolean futureUse) {
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_UINT8() {
|
||||
swigCPtr = 0;
|
||||
}
|
||||
|
||||
protected static long getCPtr(SWIGTYPE_p_UINT8 obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.11
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package edu.wpi.first.wpilibj.hal;
|
||||
|
||||
public class SWIGTYPE_p_double {
|
||||
private long swigCPtr;
|
||||
|
||||
protected SWIGTYPE_p_double(long cPtr, boolean futureUse) {
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_double() {
|
||||
swigCPtr = 0;
|
||||
}
|
||||
|
||||
protected static long getCPtr(SWIGTYPE_p_double obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.11
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package edu.wpi.first.wpilibj.hal;
|
||||
|
||||
public class SWIGTYPE_p_int {
|
||||
private long swigCPtr;
|
||||
|
||||
protected SWIGTYPE_p_int(long cPtr, boolean futureUse) {
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected SWIGTYPE_p_int() {
|
||||
swigCPtr = 0;
|
||||
}
|
||||
|
||||
protected static long getCPtr(SWIGTYPE_p_int obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 2.0.11
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package edu.wpi.first.wpilibj.hal;
|
||||
|
||||
public class CanTalonJNI {
|
||||
public final static native long new_CtreCanNode(long jarg1);
|
||||
public final static native void delete_CtreCanNode(long jarg1);
|
||||
public final static native long CtreCanNode_GetDeviceNumber(long jarg1, CtreCanNode jarg1_);
|
||||
public final static native long new_CanTalonSRX__SWIG_0(int jarg1);
|
||||
public final static native long new_CanTalonSRX__SWIG_1();
|
||||
public final static native void delete_CanTalonSRX(long jarg1);
|
||||
public final static native void CanTalonSRX_Set(long jarg1, CanTalonSRX jarg1_, double jarg2);
|
||||
public final static native long CanTalonSRX_GetFault_OverTemp(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetFault_UnderVoltage(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetFault_ForLim(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetFault_RevLim(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetFault_HardwareFailure(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetFault_ForSoftLim(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetFault_RevSoftLim(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetStckyFault_OverTemp(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetStckyFault_UnderVoltage(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetStckyFault_ForLim(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetStckyFault_RevLim(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetStckyFault_ForSoftLim(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetStckyFault_RevSoftLim(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetAppliedThrottle11(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetCloseLoopErr(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetSelectlFeedbackDevice(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetModeSelect(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetLimitSwitchEn(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetLimitSwitchClosedFor(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetLimitSwitchClosedRev(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetCloseLoopCellSelect(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetSensorPosition(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetSensorVelocity(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetCurrent(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetBrakeIsEnabled(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetEncPosition(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetEncVel(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetEncIndexRiseEvents(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetQuadApin(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetQuadBpin(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetQuadIdxpin(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetAnalogInWithOv(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetAnalogInVel(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetTemp(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetBatteryV(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetResetCount(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetResetFlags(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_GetFirmVers(long jarg1, CanTalonSRX jarg1_, long jarg2);
|
||||
public final static native long CanTalonSRX_SetDemand24(long jarg1, CanTalonSRX jarg1_, int jarg2);
|
||||
public final static native long CanTalonSRX_SetLimitSwitchEn(long jarg1, CanTalonSRX jarg1_, int jarg2);
|
||||
public final static native long CanTalonSRX_SetSelectlFeedbackDevice(long jarg1, CanTalonSRX jarg1_, int jarg2);
|
||||
public final static native long CanTalonSRX_SetRevMotDuringCloseLoopEn(long jarg1, CanTalonSRX jarg1_, int jarg2);
|
||||
public final static native long CanTalonSRX_SetBrakeType(long jarg1, CanTalonSRX jarg1_, int jarg2);
|
||||
public final static native long CanTalonSRX_SetModeSelect(long jarg1, CanTalonSRX jarg1_, int jarg2);
|
||||
public final static native long CanTalonSRX_SetCloseLoopCellSelect(long jarg1, CanTalonSRX jarg1_, int jarg2);
|
||||
public final static native long CanTalonSRX_SetRampThrottle(long jarg1, CanTalonSRX jarg1_, int jarg2);
|
||||
public final static native long CanTalonSRX_SetRevEncoderPosAndVel(long jarg1, CanTalonSRX jarg1_, int jarg2);
|
||||
public final static native long CanTalonSRX_SWIGUpcast(long jarg1);
|
||||
}
|
||||
Reference in New Issue
Block a user