mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
make getControlMode public. Was public in 2014.
Change-Id: I158f41e66407d47c50e3d632661a040c8cd68d14
This commit is contained in:
@@ -41,6 +41,7 @@ public:
|
||||
/** Sets a potentiometer as the position reference only. <br> Passed as the "tag" when setting the control mode. */
|
||||
static const struct PotentiometerStruct {} Potentiometer;
|
||||
|
||||
typedef enum {kPercentVbus, kCurrent, kSpeed, kPosition, kVoltage} ControlMode;
|
||||
typedef enum {kCurrentFault = 1, kTemperatureFault = 2, kBusVoltageFault = 4, kGateDriverFault = 8} Faults;
|
||||
typedef enum {kForwardLimit = 1, kReverseLimit = 2} Limits;
|
||||
typedef enum {
|
||||
@@ -133,6 +134,7 @@ public:
|
||||
void ConfigReverseLimit(double reverseLimitPosition);
|
||||
void ConfigMaxOutputVoltage(double voltage);
|
||||
void ConfigFaultTime(float faultTime);
|
||||
ControlMode GetControlMode();
|
||||
|
||||
static void UpdateSyncGroup(uint8_t syncGroup);
|
||||
|
||||
@@ -147,10 +149,8 @@ public:
|
||||
|
||||
protected:
|
||||
// Control mode helpers
|
||||
typedef enum {kPercentVbus, kCurrent, kSpeed, kPosition, kVoltage} ControlMode;
|
||||
|
||||
void ChangeControlMode(ControlMode controlMode);
|
||||
ControlMode GetControlMode();
|
||||
|
||||
void SetSpeedReference(uint8_t reference);
|
||||
uint8_t GetSpeedReference();
|
||||
|
||||
@@ -54,7 +54,7 @@ public class CANJaguar implements MotorSafety, PIDOutput, SpeedController, LiveW
|
||||
/**
|
||||
* Mode determines how the Jaguar is controlled, used internally.
|
||||
*/
|
||||
private enum ControlMode {
|
||||
public enum ControlMode {
|
||||
PercentVbus, Current, Speed, Position, Voltage;
|
||||
}
|
||||
|
||||
@@ -1377,7 +1377,7 @@ public class CANJaguar implements MotorSafety, PIDOutput, SpeedController, LiveW
|
||||
*
|
||||
* @return ControlMode that the Jag is in.
|
||||
*/
|
||||
private ControlMode getControlMode() {
|
||||
public ControlMode getControlMode() {
|
||||
return m_controlMode;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user