mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
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
68 lines
2.5 KiB
C++
68 lines
2.5 KiB
C++
/**
|
|
* auto generated using spreadsheet and WpiClassGen.csproj
|
|
* @link https://docs.google.com/spreadsheets/d/1OU_ZV7fZLGYUQ-Uhc8sVAmUmWTlT8XBFYK8lfjg_tac/edit#gid=1766046967
|
|
*/
|
|
#ifndef CanTalonSRX_H_
|
|
#define CanTalonSRX_H_
|
|
#include "ctre.h" //BIT Defines + Typedefs
|
|
#include "CtreCanNode.h"
|
|
#include <NetworkCommunication/CANSessionMux.h> //CAN Comm
|
|
class CanTalonSRX : public CtreCanNode
|
|
{
|
|
public:
|
|
CanTalonSRX(int deviceNumber=0);
|
|
~CanTalonSRX();
|
|
void Set(double value);
|
|
|
|
/*------------------------ auto generated ----------------------*/
|
|
CTR_Code GetFault_OverTemp(int ¶m);
|
|
CTR_Code GetFault_UnderVoltage(int ¶m);
|
|
CTR_Code GetFault_ForLim(int ¶m);
|
|
CTR_Code GetFault_RevLim(int ¶m);
|
|
CTR_Code GetFault_HardwareFailure(int ¶m);
|
|
CTR_Code GetFault_ForSoftLim(int ¶m);
|
|
CTR_Code GetFault_RevSoftLim(int ¶m);
|
|
CTR_Code GetStckyFault_OverTemp(int ¶m);
|
|
CTR_Code GetStckyFault_UnderVoltage(int ¶m);
|
|
CTR_Code GetStckyFault_ForLim(int ¶m);
|
|
CTR_Code GetStckyFault_RevLim(int ¶m);
|
|
CTR_Code GetStckyFault_ForSoftLim(int ¶m);
|
|
CTR_Code GetStckyFault_RevSoftLim(int ¶m);
|
|
CTR_Code GetAppliedThrottle11(int ¶m);
|
|
CTR_Code GetCloseLoopErr(int ¶m);
|
|
CTR_Code GetSelectlFeedbackDevice(int ¶m);
|
|
CTR_Code GetModeSelect(int ¶m);
|
|
CTR_Code GetLimitSwitchEn(int ¶m);
|
|
CTR_Code GetLimitSwitchClosedFor(int ¶m);
|
|
CTR_Code GetLimitSwitchClosedRev(int ¶m);
|
|
CTR_Code GetCloseLoopCellSelect(int ¶m);
|
|
CTR_Code GetSensorPosition(int ¶m);
|
|
CTR_Code GetSensorVelocity(int ¶m);
|
|
CTR_Code GetCurrent(double ¶m);
|
|
CTR_Code GetBrakeIsEnabled(int ¶m);
|
|
CTR_Code GetEncPosition(int ¶m);
|
|
CTR_Code GetEncVel(int ¶m);
|
|
CTR_Code GetEncIndexRiseEvents(int ¶m);
|
|
CTR_Code GetQuadApin(int ¶m);
|
|
CTR_Code GetQuadBpin(int ¶m);
|
|
CTR_Code GetQuadIdxpin(int ¶m);
|
|
CTR_Code GetAnalogInWithOv(int ¶m);
|
|
CTR_Code GetAnalogInVel(int ¶m);
|
|
CTR_Code GetTemp(double ¶m);
|
|
CTR_Code GetBatteryV(double ¶m);
|
|
CTR_Code GetResetCount(int ¶m);
|
|
CTR_Code GetResetFlags(int ¶m);
|
|
CTR_Code GetFirmVers(int ¶m);
|
|
CTR_Code SetDemand24(int param);
|
|
CTR_Code SetLimitSwitchEn(int param);
|
|
CTR_Code SetSelectlFeedbackDevice(int param);
|
|
CTR_Code SetRevMotDuringCloseLoopEn(int param);
|
|
CTR_Code SetBrakeType(int param);
|
|
CTR_Code SetModeSelect(int param);
|
|
CTR_Code SetCloseLoopCellSelect(int param);
|
|
CTR_Code SetRampThrottle(int param);
|
|
CTR_Code SetRevEncoderPosAndVel(int param);
|
|
};
|
|
#endif
|
|
|