mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Cleaned up integer type usage in wpilibc (#92)
Replaced all unsigned types to signed and int32_t with int in wpilibc
This commit is contained in:
committed by
Peter Johnson
parent
ff93050b31
commit
0cd05d1a42
@@ -24,10 +24,10 @@
|
||||
*/
|
||||
class ADXL345_I2C : public Accelerometer, public LiveWindowSendable {
|
||||
protected:
|
||||
static const uint8_t kAddress = 0x1D;
|
||||
static const uint8_t kPowerCtlRegister = 0x2D;
|
||||
static const uint8_t kDataFormatRegister = 0x31;
|
||||
static const uint8_t kDataRegister = 0x32;
|
||||
static const int kAddress = 0x1D;
|
||||
static const int kPowerCtlRegister = 0x2D;
|
||||
static const int kDataFormatRegister = 0x31;
|
||||
static const int kDataRegister = 0x32;
|
||||
static constexpr double kGsPerLSB = 0.00390625;
|
||||
enum PowerCtlFields {
|
||||
kPowerCtl_Link = 0x20,
|
||||
|
||||
@@ -27,9 +27,9 @@ class DigitalOutput;
|
||||
*/
|
||||
class ADXL345_SPI : public Accelerometer, public LiveWindowSendable {
|
||||
protected:
|
||||
static const uint8_t kPowerCtlRegister = 0x2D;
|
||||
static const uint8_t kDataFormatRegister = 0x31;
|
||||
static const uint8_t kDataRegister = 0x32;
|
||||
static const int kPowerCtlRegister = 0x2D;
|
||||
static const int kDataFormatRegister = 0x31;
|
||||
static const int kDataRegister = 0x32;
|
||||
static constexpr double kGsPerLSB = 0.00390625;
|
||||
enum SPIAddressFields { kAddress_Read = 0x80, kAddress_MultiByte = 0x40 };
|
||||
enum PowerCtlFields {
|
||||
|
||||
@@ -39,5 +39,5 @@ class ADXRS450_Gyro : public GyroBase {
|
||||
private:
|
||||
SPI m_spi;
|
||||
|
||||
uint16_t ReadRegister(uint8_t reg);
|
||||
uint16_t ReadRegister(int reg);
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@ class AnalogAccelerometer : public SensorBase,
|
||||
public PIDSource,
|
||||
public LiveWindowSendable {
|
||||
public:
|
||||
explicit AnalogAccelerometer(int32_t channel);
|
||||
explicit AnalogAccelerometer(int channel);
|
||||
explicit AnalogAccelerometer(AnalogInput* channel);
|
||||
explicit AnalogAccelerometer(std::shared_ptr<AnalogInput> channel);
|
||||
virtual ~AnalogAccelerometer() = default;
|
||||
|
||||
@@ -29,23 +29,22 @@ class AnalogInput;
|
||||
*/
|
||||
class AnalogGyro : public GyroBase {
|
||||
public:
|
||||
static const uint32_t kOversampleBits = 10;
|
||||
static const uint32_t kAverageBits = 0;
|
||||
static const int kOversampleBits = 10;
|
||||
static const int kAverageBits = 0;
|
||||
static constexpr float kSamplesPerSecond = 50.0;
|
||||
static constexpr float kCalibrationSampleTime = 5.0;
|
||||
static constexpr float kDefaultVoltsPerDegreePerSecond = 0.007;
|
||||
|
||||
explicit AnalogGyro(int32_t channel);
|
||||
explicit AnalogGyro(int channel);
|
||||
explicit AnalogGyro(AnalogInput* channel);
|
||||
explicit AnalogGyro(std::shared_ptr<AnalogInput> channel);
|
||||
AnalogGyro(int32_t channel, uint32_t center, float offset);
|
||||
AnalogGyro(std::shared_ptr<AnalogInput> channel, uint32_t center,
|
||||
float offset);
|
||||
AnalogGyro(int channel, int center, float offset);
|
||||
AnalogGyro(std::shared_ptr<AnalogInput> channel, int center, float offset);
|
||||
virtual ~AnalogGyro();
|
||||
|
||||
float GetAngle() const override;
|
||||
double GetRate() const override;
|
||||
virtual uint32_t GetCenter() const;
|
||||
virtual int GetCenter() const;
|
||||
virtual float GetOffset() const;
|
||||
void SetSensitivity(float voltsPerDegreePerSecond);
|
||||
void SetDeadband(float volts);
|
||||
|
||||
@@ -34,35 +34,35 @@ class AnalogInput : public SensorBase,
|
||||
friend class AnalogGyro;
|
||||
|
||||
public:
|
||||
static const uint8_t kAccumulatorModuleNumber = 1;
|
||||
static const uint32_t kAccumulatorNumChannels = 2;
|
||||
static const uint32_t kAccumulatorChannels[kAccumulatorNumChannels];
|
||||
static const int kAccumulatorModuleNumber = 1;
|
||||
static const int kAccumulatorNumChannels = 2;
|
||||
static const int kAccumulatorChannels[kAccumulatorNumChannels];
|
||||
|
||||
explicit AnalogInput(uint32_t channel);
|
||||
explicit AnalogInput(int channel);
|
||||
virtual ~AnalogInput();
|
||||
|
||||
int32_t GetValue() const;
|
||||
int32_t GetAverageValue() const;
|
||||
int GetValue() const;
|
||||
int GetAverageValue() const;
|
||||
|
||||
float GetVoltage() const;
|
||||
float GetAverageVoltage() const;
|
||||
|
||||
uint32_t GetChannel() const;
|
||||
int GetChannel() const;
|
||||
|
||||
void SetAverageBits(int32_t bits);
|
||||
int32_t GetAverageBits() const;
|
||||
void SetOversampleBits(int32_t bits);
|
||||
int32_t GetOversampleBits() const;
|
||||
void SetAverageBits(int bits);
|
||||
int GetAverageBits() const;
|
||||
void SetOversampleBits(int bits);
|
||||
int GetOversampleBits() const;
|
||||
|
||||
int32_t GetLSBWeight() const;
|
||||
int32_t GetOffset() const;
|
||||
int GetLSBWeight() const;
|
||||
int GetOffset() const;
|
||||
|
||||
bool IsAccumulatorChannel() const;
|
||||
void InitAccumulator();
|
||||
void SetAccumulatorInitialValue(int64_t value);
|
||||
void ResetAccumulator();
|
||||
void SetAccumulatorCenter(int32_t center);
|
||||
void SetAccumulatorDeadband(int32_t deadband);
|
||||
void SetAccumulatorCenter(int center);
|
||||
void SetAccumulatorDeadband(int deadband);
|
||||
int64_t GetAccumulatorValue() const;
|
||||
int64_t GetAccumulatorCount() const;
|
||||
void GetAccumulatorOutput(int64_t& value, int64_t& count) const;
|
||||
@@ -80,7 +80,7 @@ class AnalogInput : public SensorBase,
|
||||
std::shared_ptr<ITable> GetTable() const override;
|
||||
|
||||
private:
|
||||
uint32_t m_channel;
|
||||
int m_channel;
|
||||
// TODO: Adjust HAL to avoid use of raw pointers.
|
||||
HAL_AnalogInputHandle m_port;
|
||||
int64_t m_accumulatorOffset;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
class AnalogOutput : public SensorBase, public LiveWindowSendable {
|
||||
public:
|
||||
explicit AnalogOutput(uint32_t channel);
|
||||
explicit AnalogOutput(int channel);
|
||||
virtual ~AnalogOutput();
|
||||
|
||||
void SetVoltage(float voltage);
|
||||
@@ -35,7 +35,7 @@ class AnalogOutput : public SensorBase, public LiveWindowSendable {
|
||||
std::shared_ptr<ITable> GetTable() const override;
|
||||
|
||||
protected:
|
||||
uint32_t m_channel;
|
||||
int m_channel;
|
||||
HAL_AnalogOutputHandle m_port;
|
||||
|
||||
std::shared_ptr<ITable> m_table;
|
||||
|
||||
@@ -19,22 +19,22 @@ class AnalogTrigger : public SensorBase {
|
||||
friend class AnalogTriggerOutput;
|
||||
|
||||
public:
|
||||
explicit AnalogTrigger(int32_t channel);
|
||||
explicit AnalogTrigger(int channel);
|
||||
explicit AnalogTrigger(AnalogInput* channel);
|
||||
virtual ~AnalogTrigger();
|
||||
|
||||
void SetLimitsVoltage(float lower, float upper);
|
||||
void SetLimitsRaw(int32_t lower, int32_t upper);
|
||||
void SetLimitsRaw(int lower, int upper);
|
||||
void SetAveraged(bool useAveragedValue);
|
||||
void SetFiltered(bool useFilteredValue);
|
||||
int32_t GetIndex() const;
|
||||
int GetIndex() const;
|
||||
bool GetInWindow();
|
||||
bool GetTriggerState();
|
||||
std::shared_ptr<AnalogTriggerOutput> CreateOutput(
|
||||
AnalogTriggerType type) const;
|
||||
|
||||
private:
|
||||
uint8_t m_index;
|
||||
int m_index;
|
||||
HAL_AnalogTriggerHandle m_trigger;
|
||||
AnalogInput* m_analogInput = nullptr;
|
||||
bool m_ownsAnalog = false;
|
||||
|
||||
@@ -54,7 +54,7 @@ class AnalogTriggerOutput : public DigitalSource {
|
||||
HAL_Handle GetPortHandleForRouting() const override;
|
||||
AnalogTriggerType GetAnalogTriggerTypeForRouting() const override;
|
||||
bool IsAnalogTrigger() const override;
|
||||
uint32_t GetChannel() const override;
|
||||
int GetChannel() const override;
|
||||
|
||||
protected:
|
||||
AnalogTriggerOutput(const AnalogTrigger& trigger,
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "MotorSafety.h"
|
||||
#include "MotorSafetyHelper.h"
|
||||
#include "PIDOutput.h"
|
||||
#include "Resource.h"
|
||||
#include "tables/ITableListener.h"
|
||||
|
||||
/**
|
||||
@@ -35,7 +34,7 @@ class CANJaguar : public MotorSafety,
|
||||
public ITableListener {
|
||||
public:
|
||||
// The internal PID control loop in the Jaguar runs at 1kHz.
|
||||
static const int32_t kControllerRate = 1000;
|
||||
static const int kControllerRate = 1000;
|
||||
static constexpr double kApproxBusVoltage = 12.0;
|
||||
|
||||
// Control mode tags
|
||||
@@ -52,11 +51,11 @@ class CANJaguar : public MotorSafety,
|
||||
static const struct PotentiometerStruct {
|
||||
} Potentiometer;
|
||||
|
||||
explicit CANJaguar(uint8_t deviceNumber);
|
||||
explicit CANJaguar(int deviceNumber);
|
||||
virtual ~CANJaguar();
|
||||
|
||||
uint8_t getDeviceNumber() const;
|
||||
uint8_t GetHardwareVersion() const;
|
||||
int getDeviceNumber() const;
|
||||
int GetHardwareVersion() const;
|
||||
|
||||
// PIDOutput interface
|
||||
void PIDWrite(float output) override;
|
||||
@@ -91,7 +90,7 @@ class CANJaguar : public MotorSafety,
|
||||
void SetVoltageMode(QuadEncoderStruct, uint16_t codesPerRev);
|
||||
void SetVoltageMode(PotentiometerStruct);
|
||||
|
||||
void Set(float value, uint8_t syncGroup);
|
||||
void Set(float value, int syncGroup);
|
||||
|
||||
// CANSpeedController interface
|
||||
float Get() const override;
|
||||
@@ -115,7 +114,7 @@ class CANJaguar : public MotorSafety,
|
||||
bool GetReverseLimitOK() const override;
|
||||
uint16_t GetFaults() const override;
|
||||
void SetVoltageRampRate(double rampRate) override;
|
||||
uint32_t GetFirmwareVersion() const override;
|
||||
int GetFirmwareVersion() const override;
|
||||
void ConfigNeutralMode(NeutralMode mode) override;
|
||||
void ConfigEncoderCodesPerRev(uint16_t codesPerRev) override;
|
||||
void ConfigPotentiometerTurns(uint16_t turns) override;
|
||||
@@ -139,7 +138,7 @@ class CANJaguar : public MotorSafety,
|
||||
bool IsSafetyEnabled() const override;
|
||||
void SetSafetyEnabled(bool enabled) override;
|
||||
void GetDescription(std::ostringstream& desc) const override;
|
||||
uint8_t GetDeviceID() const;
|
||||
int GetDeviceID() const;
|
||||
|
||||
// SpeedController overrides
|
||||
void SetInverted(bool isInverted) override;
|
||||
@@ -147,28 +146,27 @@ class CANJaguar : public MotorSafety,
|
||||
|
||||
protected:
|
||||
// Control mode helpers
|
||||
void SetSpeedReference(uint8_t reference);
|
||||
uint8_t GetSpeedReference() const;
|
||||
void SetSpeedReference(int reference);
|
||||
int GetSpeedReference() const;
|
||||
|
||||
void SetPositionReference(uint8_t reference);
|
||||
uint8_t GetPositionReference() const;
|
||||
void SetPositionReference(int reference);
|
||||
int GetPositionReference() const;
|
||||
|
||||
uint8_t packPercentage(uint8_t* buffer, double value);
|
||||
uint8_t packFXP8_8(uint8_t* buffer, double value);
|
||||
uint8_t packFXP16_16(uint8_t* buffer, double value);
|
||||
uint8_t packint16_t(uint8_t* buffer, int16_t value);
|
||||
uint8_t packint32_t(uint8_t* buffer, int32_t value);
|
||||
int packPercentage(uint8_t* buffer, double value);
|
||||
int packFXP8_8(uint8_t* buffer, double value);
|
||||
int packFXP16_16(uint8_t* buffer, double value);
|
||||
int packInt16(uint8_t* buffer, int16_t value);
|
||||
int packInt32(uint8_t* buffer, int32_t value);
|
||||
double unpackPercentage(uint8_t* buffer) const;
|
||||
double unpackFXP8_8(uint8_t* buffer) const;
|
||||
double unpackFXP16_16(uint8_t* buffer) const;
|
||||
int16_t unpackint16_t(uint8_t* buffer) const;
|
||||
int32_t unpackint32_t(uint8_t* buffer) const;
|
||||
int16_t unpackInt16(uint8_t* buffer) const;
|
||||
int32_t unpackInt32(uint8_t* buffer) const;
|
||||
|
||||
void sendMessage(uint32_t messageID, const uint8_t* data, uint8_t dataSize,
|
||||
int32_t period = CAN_SEND_PERIOD_NO_REPEAT);
|
||||
void requestMessage(uint32_t messageID,
|
||||
int32_t period = CAN_SEND_PERIOD_NO_REPEAT);
|
||||
bool getMessage(uint32_t messageID, uint32_t mask, uint8_t* data,
|
||||
void sendMessage(int messageID, const uint8_t* data, uint8_t dataSize,
|
||||
int period = CAN_SEND_PERIOD_NO_REPEAT);
|
||||
void requestMessage(int messageID, int period = CAN_SEND_PERIOD_NO_REPEAT);
|
||||
bool getMessage(int messageID, uint32_t mask, uint8_t* data,
|
||||
uint8_t* dataSize) const;
|
||||
|
||||
void setupPeriodicStatus();
|
||||
@@ -176,13 +174,13 @@ class CANJaguar : public MotorSafety,
|
||||
|
||||
mutable priority_recursive_mutex m_mutex;
|
||||
|
||||
uint8_t m_deviceNumber;
|
||||
int m_deviceNumber;
|
||||
float m_value = 0.0f;
|
||||
|
||||
// Parameters/configuration
|
||||
ControlMode m_controlMode = kPercentVbus;
|
||||
uint8_t m_speedReference = LM_REF_NONE;
|
||||
uint8_t m_positionReference = LM_REF_NONE;
|
||||
int m_speedReference = LM_REF_NONE;
|
||||
int m_positionReference = LM_REF_NONE;
|
||||
double m_p = 0.0;
|
||||
double m_i = 0.0;
|
||||
double m_d = 0.0;
|
||||
@@ -221,10 +219,10 @@ class CANJaguar : public MotorSafety,
|
||||
mutable float m_temperature = 0.0f;
|
||||
mutable double m_position = 0.0;
|
||||
mutable double m_speed = 0.0;
|
||||
mutable uint8_t m_limits = 0x00;
|
||||
mutable int m_limits = 0x00;
|
||||
mutable uint16_t m_faults = 0x0000;
|
||||
uint32_t m_firmwareVersion = 0;
|
||||
uint8_t m_hardwareVersion = 0;
|
||||
int m_firmwareVersion = 0;
|
||||
int m_hardwareVersion = 0;
|
||||
|
||||
// Which periodic status messages have we received at least once?
|
||||
mutable std::atomic<bool> m_receivedStatusMessage0{false};
|
||||
|
||||
@@ -84,7 +84,7 @@ class CANSpeedController : public SpeedController {
|
||||
virtual bool GetReverseLimitOK() const = 0;
|
||||
virtual uint16_t GetFaults() const = 0;
|
||||
virtual void SetVoltageRampRate(double rampRate) = 0;
|
||||
virtual uint32_t GetFirmwareVersion() const = 0;
|
||||
virtual int GetFirmwareVersion() const = 0;
|
||||
virtual void ConfigNeutralMode(NeutralMode mode) = 0;
|
||||
virtual void ConfigEncoderCodesPerRev(uint16_t codesPerRev) = 0;
|
||||
virtual void ConfigPotentiometerTurns(uint16_t turns) = 0;
|
||||
|
||||
@@ -119,7 +119,7 @@ class CANTalon : public MotorSafety,
|
||||
* Value should be between 1ms and 255ms. If value is zero
|
||||
* then Talon will default to 1ms. If value exceeds 255ms API will cap it.
|
||||
*/
|
||||
unsigned int timeDurMs;
|
||||
int timeDurMs;
|
||||
/**
|
||||
* Which slot to get PIDF gains.
|
||||
* PID is used for position servo.
|
||||
@@ -127,7 +127,7 @@ class CANTalon : public MotorSafety,
|
||||
* Typically this is hardcoded to the a particular slot, but you are free
|
||||
* gain schedule if need be.
|
||||
*/
|
||||
unsigned int profileSlotSelect;
|
||||
int profileSlotSelect;
|
||||
/**
|
||||
* Set to true to only perform the velocity feed-forward and not perform
|
||||
* position servo. This is useful when learning how the position servo
|
||||
@@ -181,15 +181,15 @@ class CANTalon : public MotorSafety,
|
||||
* them into the Talon's low-level buffer, allowing the Talon to act on
|
||||
* them.
|
||||
*/
|
||||
unsigned int topBufferRem;
|
||||
int topBufferRem;
|
||||
/**
|
||||
* The number of points in the top trajectory buffer.
|
||||
*/
|
||||
unsigned int topBufferCnt;
|
||||
int topBufferCnt;
|
||||
/**
|
||||
* The number of points in the low level Talon buffer.
|
||||
*/
|
||||
unsigned int btmBufferCnt;
|
||||
int btmBufferCnt;
|
||||
/**
|
||||
* Set if isUnderrun ever gets set.
|
||||
* Only is cleared by clearMotionProfileHasUnderrun() to ensure
|
||||
@@ -253,7 +253,7 @@ class CANTalon : public MotorSafety,
|
||||
void SetI(double i) override;
|
||||
void SetD(double d) override;
|
||||
void SetF(double f);
|
||||
void SetIzone(unsigned iz);
|
||||
void SetIzone(int iz);
|
||||
void SetPID(double p, double i, double d) override;
|
||||
virtual void SetPID(double p, double i, double d, double f);
|
||||
double GetP() const override;
|
||||
@@ -269,7 +269,7 @@ class CANTalon : public MotorSafety,
|
||||
double GetPosition() const override;
|
||||
double GetSpeed() const override;
|
||||
virtual int GetClosedLoopError() const;
|
||||
virtual void SetAllowableClosedLoopErr(uint32_t allowableCloseLoopError);
|
||||
virtual void SetAllowableClosedLoopErr(int allowableCloseLoopError);
|
||||
virtual int GetAnalogIn() const;
|
||||
virtual void SetAnalogPosition(int newPosition);
|
||||
virtual int GetAnalogInRaw() const;
|
||||
@@ -298,7 +298,7 @@ class CANTalon : public MotorSafety,
|
||||
void ClearStickyFaults();
|
||||
void SetVoltageRampRate(double rampRate) override;
|
||||
virtual void SetVoltageCompensationRampRate(double rampRate);
|
||||
uint32_t GetFirmwareVersion() const override;
|
||||
int GetFirmwareVersion() const override;
|
||||
void ConfigNeutralMode(NeutralMode mode) override;
|
||||
void ConfigEncoderCodesPerRev(uint16_t codesPerRev) override;
|
||||
void ConfigPotentiometerTurns(uint16_t turns) override;
|
||||
@@ -347,8 +347,8 @@ class CANTalon : public MotorSafety,
|
||||
* edge, pass false to clear the position on falling edge.
|
||||
*/
|
||||
void EnableZeroSensorPositionOnIndex(bool enable, bool risingEdge);
|
||||
void ConfigSetParameter(uint32_t paramEnum, double value);
|
||||
bool GetParameter(uint32_t paramEnum, double& dvalue) const;
|
||||
void ConfigSetParameter(int paramEnum, double value);
|
||||
bool GetParameter(int paramEnum, double& dvalue) const;
|
||||
|
||||
void ConfigFaultTime(float faultTime) override;
|
||||
virtual void SetControlMode(ControlMode mode);
|
||||
@@ -469,8 +469,8 @@ class CANTalon : public MotorSafety,
|
||||
int m_deviceNumber;
|
||||
std::unique_ptr<CanTalonSRX> m_impl;
|
||||
std::unique_ptr<MotorSafetyHelper> m_safetyHelper;
|
||||
int m_profile = 0; // Profile from CANTalon to use. Set to zero until we can
|
||||
// actually test this.
|
||||
int m_profile = 0; // Profile from CANTalon to use. Set to zero until we
|
||||
// can actually test this.
|
||||
|
||||
bool m_controlEnabled = true;
|
||||
bool m_stopped = false;
|
||||
@@ -485,7 +485,7 @@ class CANTalon : public MotorSafety,
|
||||
* count (4X). Caller can use ConfigEncoderCodesPerRev to set the quadrature
|
||||
* encoder CPR.
|
||||
*/
|
||||
uint32_t m_codesPerRev = 0;
|
||||
int m_codesPerRev = 0;
|
||||
/**
|
||||
* Number of turns per rotation. For example, a 10-turn pot spins ten full
|
||||
* rotations from a wiper voltage of zero to 3.3 volts. Therefore knowing
|
||||
@@ -494,14 +494,14 @@ class CANTalon : public MotorSafety,
|
||||
* behaves as it did during the 2015 season, there are 1024 position units
|
||||
* from zero to 3.3V.
|
||||
*/
|
||||
uint32_t m_numPotTurns = 0;
|
||||
int m_numPotTurns = 0;
|
||||
/**
|
||||
* Although the Talon handles feedback selection, caching the feedback
|
||||
* selection is helpful at the API level for scaling into rotations and RPM.
|
||||
*/
|
||||
FeedbackDevice m_feedbackDevice = QuadEncoder;
|
||||
|
||||
static constexpr unsigned int kDelayForSolicitedSignalsUs = 4000;
|
||||
static constexpr int kDelayForSolicitedSignalsUs = 4000;
|
||||
/**
|
||||
* @param devToLookup FeedbackDevice to lookup the scalar for. Because Talon
|
||||
* allows multiple sensors to be attached simultaneously,
|
||||
@@ -531,8 +531,8 @@ class CANTalon : public MotorSafety,
|
||||
* @return fullRotations in native engineering units of the Talon SRX
|
||||
* firmware.
|
||||
*/
|
||||
int32_t ScaleRotationsToNativeUnits(FeedbackDevice devToLookup,
|
||||
double fullRotations) const;
|
||||
int ScaleRotationsToNativeUnits(FeedbackDevice devToLookup,
|
||||
double fullRotations) const;
|
||||
/**
|
||||
* @param rpm double precision value representing number of rotations per
|
||||
* minute of selected feedback sensor. If user has never called
|
||||
@@ -544,8 +544,7 @@ class CANTalon : public MotorSafety,
|
||||
* @return sensor velocity in native engineering units of the Talon SRX
|
||||
* firmware.
|
||||
*/
|
||||
int32_t ScaleVelocityToNativeUnits(FeedbackDevice devToLookup,
|
||||
double rpm) const;
|
||||
int ScaleVelocityToNativeUnits(FeedbackDevice devToLookup, double rpm) const;
|
||||
/**
|
||||
* @param nativePos integral position of the feedback sensor in native
|
||||
* Talon SRX units. If user has never called the config
|
||||
@@ -558,7 +557,7 @@ class CANTalon : public MotorSafety,
|
||||
* performed.
|
||||
*/
|
||||
double ScaleNativeUnitsToRotations(FeedbackDevice devToLookup,
|
||||
int32_t nativePos) const;
|
||||
int nativePos) const;
|
||||
/**
|
||||
* @param nativeVel integral velocity of the feedback sensor in native
|
||||
* Talon SRX units. If user has never called the config
|
||||
@@ -570,8 +569,7 @@ class CANTalon : public MotorSafety,
|
||||
* @return double precision of sensor velocity in RPM, unless config was never
|
||||
* performed.
|
||||
*/
|
||||
double ScaleNativeUnitsToRpm(FeedbackDevice devToLookup,
|
||||
int32_t nativeVel) const;
|
||||
double ScaleNativeUnitsToRpm(FeedbackDevice devToLookup, int nativeVel) const;
|
||||
|
||||
// LiveWindow stuff.
|
||||
std::shared_ptr<ITable> m_table;
|
||||
|
||||
@@ -23,11 +23,11 @@ class CameraServer : public ErrorBase {
|
||||
private:
|
||||
static constexpr uint16_t kPort = 1180;
|
||||
static constexpr uint8_t kMagicNumber[] = {0x01, 0x00, 0x00, 0x00};
|
||||
static constexpr uint32_t kSize640x480 = 0;
|
||||
static constexpr uint32_t kSize320x240 = 1;
|
||||
static constexpr uint32_t kSize160x120 = 2;
|
||||
static constexpr int32_t kHardwareCompression = -1;
|
||||
static constexpr uint32_t kMaxImageSize = 200000;
|
||||
static constexpr int kSize640x480 = 0;
|
||||
static constexpr int kSize320x240 = 1;
|
||||
static constexpr int kSize160x120 = 2;
|
||||
static constexpr int kHardwareCompression = -1;
|
||||
static constexpr int kMaxImageSize = 200000;
|
||||
|
||||
protected:
|
||||
CameraServer();
|
||||
@@ -38,22 +38,21 @@ class CameraServer : public ErrorBase {
|
||||
priority_recursive_mutex m_imageMutex;
|
||||
std::condition_variable_any m_newImageVariable;
|
||||
std::vector<uint8_t*> m_dataPool;
|
||||
unsigned int m_quality;
|
||||
int m_quality;
|
||||
bool m_autoCaptureStarted;
|
||||
bool m_hwClient;
|
||||
std::tuple<uint8_t*, unsigned int, unsigned int, bool> m_imageData;
|
||||
std::tuple<uint8_t*, int, int, bool> m_imageData;
|
||||
|
||||
void Serve();
|
||||
void AutoCapture();
|
||||
void SetImageData(uint8_t* data, unsigned int size, unsigned int start = 0,
|
||||
void SetImageData(uint8_t* data, int size, int start = 0,
|
||||
bool imaqData = false);
|
||||
void FreeImageData(
|
||||
std::tuple<uint8_t*, unsigned int, unsigned int, bool> imageData);
|
||||
void FreeImageData(std::tuple<uint8_t*, int, int, bool> imageData);
|
||||
|
||||
struct Request {
|
||||
uint32_t fps;
|
||||
int32_t compression;
|
||||
uint32_t size;
|
||||
int fps;
|
||||
int compression;
|
||||
int size;
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -76,8 +75,8 @@ class CameraServer : public ErrorBase {
|
||||
|
||||
bool IsAutoCaptureStarted();
|
||||
|
||||
void SetQuality(unsigned int quality);
|
||||
unsigned int GetQuality();
|
||||
void SetQuality(int quality);
|
||||
int GetQuality();
|
||||
|
||||
void SetSize(unsigned int size);
|
||||
void SetSize(int size);
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ class Compressor : public SensorBase,
|
||||
public ITableListener {
|
||||
public:
|
||||
// Default PCM ID is 0
|
||||
explicit Compressor(uint8_t pcmID = GetDefaultSolenoidModule());
|
||||
explicit Compressor(int pcmID = GetDefaultSolenoidModule());
|
||||
virtual ~Compressor() = default;
|
||||
|
||||
void Start();
|
||||
@@ -59,7 +59,7 @@ class Compressor : public SensorBase,
|
||||
|
||||
private:
|
||||
void SetCompressor(bool on);
|
||||
uint8_t m_module;
|
||||
int m_module;
|
||||
|
||||
std::shared_ptr<ITable> m_table;
|
||||
};
|
||||
|
||||
@@ -39,7 +39,7 @@ class Counter : public SensorBase,
|
||||
kExternalDirection = 3
|
||||
};
|
||||
explicit Counter(Mode mode = kTwoPulse);
|
||||
explicit Counter(int32_t channel);
|
||||
explicit Counter(int channel);
|
||||
explicit Counter(DigitalSource* source);
|
||||
explicit Counter(std::shared_ptr<DigitalSource> source);
|
||||
DEPRECATED("Use pass-by-reference instead.")
|
||||
@@ -51,7 +51,7 @@ class Counter : public SensorBase,
|
||||
std::shared_ptr<DigitalSource> downSource, bool inverted);
|
||||
virtual ~Counter();
|
||||
|
||||
void SetUpSource(int32_t channel);
|
||||
void SetUpSource(int channel);
|
||||
void SetUpSource(AnalogTrigger* analogTrigger, AnalogTriggerType triggerType);
|
||||
void SetUpSource(std::shared_ptr<AnalogTrigger> analogTrigger,
|
||||
AnalogTriggerType triggerType);
|
||||
@@ -61,7 +61,7 @@ class Counter : public SensorBase,
|
||||
void SetUpSourceEdge(bool risingEdge, bool fallingEdge);
|
||||
void ClearUpSource();
|
||||
|
||||
void SetDownSource(int32_t channel);
|
||||
void SetDownSource(int channel);
|
||||
void SetDownSource(AnalogTrigger* analogTrigger,
|
||||
AnalogTriggerType triggerType);
|
||||
void SetDownSource(std::shared_ptr<AnalogTrigger> analogTrigger,
|
||||
@@ -80,7 +80,7 @@ class Counter : public SensorBase,
|
||||
void SetReverseDirection(bool reverseDirection);
|
||||
|
||||
// CounterBase interface
|
||||
int32_t Get() const override;
|
||||
int Get() const override;
|
||||
void Reset() override;
|
||||
double GetPeriod() const override;
|
||||
void SetMaxPeriod(double maxPeriod) override;
|
||||
@@ -90,7 +90,7 @@ class Counter : public SensorBase,
|
||||
|
||||
void SetSamplesToAverage(int samplesToAverage);
|
||||
int GetSamplesToAverage() const;
|
||||
int32_t GetFPGAIndex() const { return m_index; }
|
||||
int GetFPGAIndex() const { return m_index; }
|
||||
|
||||
void UpdateTable() override;
|
||||
void StartLiveWindowMode() override;
|
||||
@@ -108,7 +108,7 @@ class Counter : public SensorBase,
|
||||
HAL_CounterHandle m_counter = HAL_kInvalidHandle;
|
||||
|
||||
private:
|
||||
int32_t m_index = 0; ///< The index of this counter.
|
||||
int m_index = 0; ///< The index of this counter.
|
||||
|
||||
std::shared_ptr<ITable> m_table;
|
||||
friend class DigitalGlitchFilter;
|
||||
|
||||
@@ -22,7 +22,7 @@ class CounterBase {
|
||||
enum EncodingType { k1X, k2X, k4X };
|
||||
|
||||
virtual ~CounterBase() = default;
|
||||
virtual int32_t Get() const = 0;
|
||||
virtual int Get() const = 0;
|
||||
virtual void Reset() = 0;
|
||||
virtual double GetPeriod() const = 0;
|
||||
virtual void SetMaxPeriod(double maxPeriod) = 0;
|
||||
|
||||
@@ -34,10 +34,10 @@ class DigitalGlitchFilter : public SensorBase {
|
||||
void Remove(Encoder* input);
|
||||
void Remove(Counter* input);
|
||||
|
||||
void SetPeriodCycles(uint32_t fpga_cycles);
|
||||
void SetPeriodCycles(int fpga_cycles);
|
||||
void SetPeriodNanoSeconds(uint64_t nanoseconds);
|
||||
|
||||
uint32_t GetPeriodCycles();
|
||||
int GetPeriodCycles();
|
||||
uint64_t GetPeriodNanoSeconds();
|
||||
|
||||
private:
|
||||
|
||||
@@ -27,10 +27,10 @@ class DigitalGlitchFilter;
|
||||
*/
|
||||
class DigitalInput : public DigitalSource, public LiveWindowSendable {
|
||||
public:
|
||||
explicit DigitalInput(uint32_t channel);
|
||||
explicit DigitalInput(int channel);
|
||||
virtual ~DigitalInput();
|
||||
bool Get() const;
|
||||
uint32_t GetChannel() const override;
|
||||
int GetChannel() const override;
|
||||
|
||||
// Digital Source Interface
|
||||
HAL_Handle GetPortHandleForRouting() const override;
|
||||
@@ -45,7 +45,7 @@ class DigitalInput : public DigitalSource, public LiveWindowSendable {
|
||||
std::shared_ptr<ITable> GetTable() const;
|
||||
|
||||
private:
|
||||
uint32_t m_channel;
|
||||
int m_channel;
|
||||
HAL_DigitalHandle m_handle;
|
||||
|
||||
std::shared_ptr<ITable> m_table;
|
||||
|
||||
@@ -25,11 +25,11 @@ class DigitalOutput : public DigitalSource,
|
||||
public ITableListener,
|
||||
public LiveWindowSendable {
|
||||
public:
|
||||
explicit DigitalOutput(uint32_t channel);
|
||||
explicit DigitalOutput(int channel);
|
||||
virtual ~DigitalOutput();
|
||||
void Set(bool value);
|
||||
bool Get();
|
||||
uint32_t GetChannel() const override;
|
||||
bool Get() const;
|
||||
int GetChannel() const override;
|
||||
void Pulse(float length);
|
||||
bool IsPulsing() const;
|
||||
void SetPWMRate(float rate);
|
||||
@@ -52,7 +52,7 @@ class DigitalOutput : public DigitalSource,
|
||||
std::shared_ptr<ITable> GetTable() const;
|
||||
|
||||
private:
|
||||
uint32_t m_channel;
|
||||
int m_channel;
|
||||
HAL_DigitalHandle m_handle;
|
||||
HAL_DigitalPWMHandle m_pwmGenerator;
|
||||
|
||||
|
||||
@@ -26,5 +26,5 @@ class DigitalSource : public InterruptableSensorBase {
|
||||
virtual HAL_Handle GetPortHandleForRouting() const = 0;
|
||||
virtual AnalogTriggerType GetAnalogTriggerTypeForRouting() const = 0;
|
||||
virtual bool IsAnalogTrigger() const = 0;
|
||||
virtual uint32_t GetChannel() const = 0;
|
||||
virtual int GetChannel() const = 0;
|
||||
};
|
||||
|
||||
@@ -28,9 +28,8 @@ class DoubleSolenoid : public SolenoidBase,
|
||||
public:
|
||||
enum Value { kOff, kForward, kReverse };
|
||||
|
||||
explicit DoubleSolenoid(uint32_t forwardChannel, uint32_t reverseChannel);
|
||||
DoubleSolenoid(uint8_t moduleNumber, uint32_t forwardChannel,
|
||||
uint32_t reverseChannel);
|
||||
explicit DoubleSolenoid(int forwardChannel, int reverseChannel);
|
||||
DoubleSolenoid(int moduleNumber, int forwardChannel, int reverseChannel);
|
||||
virtual ~DoubleSolenoid();
|
||||
virtual void Set(Value value);
|
||||
virtual Value Get() const;
|
||||
@@ -47,10 +46,10 @@ class DoubleSolenoid : public SolenoidBase,
|
||||
std::shared_ptr<ITable> GetTable() const;
|
||||
|
||||
private:
|
||||
uint32_t m_forwardChannel; ///< The forward channel on the module to control.
|
||||
uint32_t m_reverseChannel; ///< The reverse channel on the module to control.
|
||||
uint8_t m_forwardMask; ///< The mask for the forward channel.
|
||||
uint8_t m_reverseMask; ///< The mask for the reverse channel.
|
||||
int m_forwardChannel; ///< The forward channel on the module to control.
|
||||
int m_reverseChannel; ///< The reverse channel on the module to control.
|
||||
int m_forwardMask; ///< The mask for the forward channel.
|
||||
int m_reverseMask; ///< The mask for the reverse channel.
|
||||
HAL_SolenoidHandle m_forwardHandle = HAL_kInvalidHandle;
|
||||
HAL_SolenoidHandle m_reverseHandle = HAL_kInvalidHandle;
|
||||
|
||||
|
||||
@@ -34,25 +34,25 @@ class DriverStation : public SensorBase, public RobotStateInterface {
|
||||
static DriverStation& GetInstance();
|
||||
static void ReportError(std::string error);
|
||||
static void ReportWarning(std::string error);
|
||||
static void ReportError(bool is_error, int32_t code, const std::string& error,
|
||||
static void ReportError(bool is_error, int code, const std::string& error,
|
||||
const std::string& location,
|
||||
const std::string& stack);
|
||||
|
||||
static const uint32_t kJoystickPorts = 6;
|
||||
static const int kJoystickPorts = 6;
|
||||
|
||||
float GetStickAxis(uint32_t stick, uint32_t axis);
|
||||
int GetStickPOV(uint32_t stick, uint32_t pov);
|
||||
uint32_t GetStickButtons(uint32_t stick) const;
|
||||
bool GetStickButton(uint32_t stick, uint8_t button);
|
||||
float GetStickAxis(int stick, int axis);
|
||||
int GetStickPOV(int stick, int pov);
|
||||
int GetStickButtons(int stick) const;
|
||||
bool GetStickButton(int stick, int button);
|
||||
|
||||
int GetStickAxisCount(uint32_t stick) const;
|
||||
int GetStickPOVCount(uint32_t stick) const;
|
||||
int GetStickButtonCount(uint32_t stick) const;
|
||||
int GetStickAxisCount(int stick) const;
|
||||
int GetStickPOVCount(int stick) const;
|
||||
int GetStickButtonCount(int stick) const;
|
||||
|
||||
bool GetJoystickIsXbox(uint32_t stick) const;
|
||||
int GetJoystickType(uint32_t stick) const;
|
||||
std::string GetJoystickName(uint32_t stick) const;
|
||||
int GetJoystickAxisType(uint32_t stick, uint8_t axis) const;
|
||||
bool GetJoystickIsXbox(int stick) const;
|
||||
int GetJoystickType(int stick) const;
|
||||
std::string GetJoystickName(int stick) const;
|
||||
int GetJoystickAxisType(int stick, int axis) const;
|
||||
|
||||
bool IsEnabled() const override;
|
||||
bool IsDisabled() const override;
|
||||
@@ -66,7 +66,7 @@ class DriverStation : public SensorBase, public RobotStateInterface {
|
||||
bool IsBrownedOut() const;
|
||||
|
||||
Alliance GetAlliance() const;
|
||||
uint32_t GetLocation() const;
|
||||
int GetLocation() const;
|
||||
void WaitForData();
|
||||
double GetMatchTime() const;
|
||||
float GetBatteryVoltage() const;
|
||||
|
||||
@@ -46,7 +46,7 @@ class Encoder : public SensorBase,
|
||||
kResetOnRisingEdge
|
||||
};
|
||||
|
||||
Encoder(uint32_t aChannel, uint32_t bChannel, bool reverseDirection = false,
|
||||
Encoder(int aChannel, int bChannel, bool reverseDirection = false,
|
||||
EncodingType encodingType = k4X);
|
||||
Encoder(std::shared_ptr<DigitalSource> aSource,
|
||||
std::shared_ptr<DigitalSource> bSource, bool reverseDirection = false,
|
||||
@@ -58,9 +58,9 @@ class Encoder : public SensorBase,
|
||||
virtual ~Encoder();
|
||||
|
||||
// CounterBase interface
|
||||
int32_t Get() const override;
|
||||
int32_t GetRaw() const;
|
||||
int32_t GetEncodingScale() const;
|
||||
int Get() const override;
|
||||
int GetRaw() const;
|
||||
int GetEncodingScale() const;
|
||||
void Reset() override;
|
||||
double GetPeriod() const override;
|
||||
void SetMaxPeriod(double maxPeriod) override;
|
||||
@@ -76,7 +76,7 @@ class Encoder : public SensorBase,
|
||||
int GetSamplesToAverage() const;
|
||||
double PIDGet() override;
|
||||
|
||||
void SetIndexSource(uint32_t channel, IndexingType type = kResetOnRisingEdge);
|
||||
void SetIndexSource(int channel, IndexingType type = kResetOnRisingEdge);
|
||||
DEPRECATED("Use pass-by-reference instead.")
|
||||
void SetIndexSource(DigitalSource* source,
|
||||
IndexingType type = kResetOnRisingEdge);
|
||||
@@ -90,7 +90,7 @@ class Encoder : public SensorBase,
|
||||
void InitTable(std::shared_ptr<ITable> subTable) override;
|
||||
std::shared_ptr<ITable> GetTable() const override;
|
||||
|
||||
int32_t GetFPGAIndex() const;
|
||||
int GetFPGAIndex() const;
|
||||
|
||||
private:
|
||||
void InitEncoder(bool reverseDirection, EncodingType encodingType);
|
||||
|
||||
@@ -22,7 +22,7 @@ class GearTooth : public Counter {
|
||||
public:
|
||||
/// 55 uSec for threshold
|
||||
static constexpr double kGearToothThreshold = 55e-6;
|
||||
explicit GearTooth(uint32_t channel, bool directionSensitive = false);
|
||||
explicit GearTooth(int channel, bool directionSensitive = false);
|
||||
explicit GearTooth(DigitalSource* source, bool directionSensitive = false);
|
||||
explicit GearTooth(std::shared_ptr<DigitalSource> source,
|
||||
bool directionSensitive = false);
|
||||
|
||||
@@ -20,24 +20,23 @@ class I2C : SensorBase {
|
||||
public:
|
||||
enum Port { kOnboard, kMXP };
|
||||
|
||||
I2C(Port port, uint8_t deviceAddress);
|
||||
I2C(Port port, int deviceAddress);
|
||||
virtual ~I2C();
|
||||
|
||||
I2C(const I2C&) = delete;
|
||||
I2C& operator=(const I2C&) = delete;
|
||||
|
||||
bool Transaction(uint8_t* dataToSend, uint8_t sendSize, uint8_t* dataReceived,
|
||||
uint8_t receiveSize);
|
||||
bool Transaction(uint8_t* dataToSend, int sendSize, uint8_t* dataReceived,
|
||||
int receiveSize);
|
||||
bool AddressOnly();
|
||||
bool Write(uint8_t registerAddress, uint8_t data);
|
||||
bool WriteBulk(uint8_t* data, uint8_t count);
|
||||
bool Read(uint8_t registerAddress, uint8_t count, uint8_t* data);
|
||||
bool ReadOnly(uint8_t count, uint8_t* buffer);
|
||||
void Broadcast(uint8_t registerAddress, uint8_t data);
|
||||
bool VerifySensor(uint8_t registerAddress, uint8_t count,
|
||||
const uint8_t* expected);
|
||||
bool Write(int registerAddress, uint8_t data);
|
||||
bool WriteBulk(uint8_t* data, int count);
|
||||
bool Read(int registerAddress, int count, uint8_t* data);
|
||||
bool ReadOnly(int count, uint8_t* buffer);
|
||||
void Broadcast(int registerAddress, uint8_t data);
|
||||
bool VerifySensor(int registerAddress, int count, const uint8_t* expected);
|
||||
|
||||
private:
|
||||
Port m_port;
|
||||
uint8_t m_deviceAddress;
|
||||
int m_deviceAddress;
|
||||
};
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
*/
|
||||
class Jaguar : public PWMSpeedController {
|
||||
public:
|
||||
explicit Jaguar(uint32_t channel);
|
||||
explicit Jaguar(int channel);
|
||||
virtual ~Jaguar() = default;
|
||||
};
|
||||
|
||||
@@ -27,11 +27,11 @@ class DriverStation;
|
||||
*/
|
||||
class Joystick : public GenericHID, public ErrorBase {
|
||||
public:
|
||||
static const uint32_t kDefaultXAxis = 0;
|
||||
static const uint32_t kDefaultYAxis = 1;
|
||||
static const uint32_t kDefaultZAxis = 2;
|
||||
static const uint32_t kDefaultTwistAxis = 2;
|
||||
static const uint32_t kDefaultThrottleAxis = 3;
|
||||
static const int kDefaultXAxis = 0;
|
||||
static const int kDefaultYAxis = 1;
|
||||
static const int kDefaultZAxis = 2;
|
||||
static const int kDefaultTwistAxis = 2;
|
||||
static const int kDefaultThrottleAxis = 3;
|
||||
typedef enum {
|
||||
kXAxis,
|
||||
kYAxis,
|
||||
@@ -40,8 +40,8 @@ class Joystick : public GenericHID, public ErrorBase {
|
||||
kThrottleAxis,
|
||||
kNumAxisTypes
|
||||
} AxisType;
|
||||
static const uint32_t kDefaultTriggerButton = 1;
|
||||
static const uint32_t kDefaultTopButton = 2;
|
||||
static const int kDefaultTriggerButton = 1;
|
||||
static const int kDefaultTopButton = 2;
|
||||
typedef enum { kTriggerButton, kTopButton, kNumButtonTypes } ButtonType;
|
||||
typedef enum { kLeftRumble, kRightRumble } RumbleType;
|
||||
typedef enum {
|
||||
@@ -63,15 +63,15 @@ class Joystick : public GenericHID, public ErrorBase {
|
||||
kHIDFlight = 23,
|
||||
kHID1stPerson = 24
|
||||
} HIDType;
|
||||
explicit Joystick(uint32_t port);
|
||||
Joystick(uint32_t port, uint32_t numAxisTypes, uint32_t numButtonTypes);
|
||||
explicit Joystick(int port);
|
||||
Joystick(int port, int numAxisTypes, int numButtonTypes);
|
||||
virtual ~Joystick() = default;
|
||||
|
||||
Joystick(const Joystick&) = delete;
|
||||
Joystick& operator=(const Joystick&) = delete;
|
||||
|
||||
uint32_t GetAxisChannel(AxisType axis) const;
|
||||
void SetAxisChannel(AxisType axis, uint32_t channel);
|
||||
int GetAxisChannel(AxisType axis) const;
|
||||
void SetAxisChannel(AxisType axis, int channel);
|
||||
|
||||
float GetX(JoystickHand hand = kRightHand) const override;
|
||||
float GetY(JoystickHand hand = kRightHand) const override;
|
||||
@@ -79,15 +79,15 @@ class Joystick : public GenericHID, public ErrorBase {
|
||||
float GetTwist() const override;
|
||||
float GetThrottle() const override;
|
||||
virtual float GetAxis(AxisType axis) const;
|
||||
float GetRawAxis(uint32_t axis) const override;
|
||||
float GetRawAxis(int axis) const override;
|
||||
|
||||
bool GetTrigger(JoystickHand hand = kRightHand) const override;
|
||||
bool GetTop(JoystickHand hand = kRightHand) const override;
|
||||
bool GetBumper(JoystickHand hand = kRightHand) const override;
|
||||
bool GetRawButton(uint32_t button) const override;
|
||||
int GetPOV(uint32_t pov = 0) const override;
|
||||
bool GetRawButton(int button) const override;
|
||||
int GetPOV(int pov = 0) const override;
|
||||
bool GetButton(ButtonType button) const;
|
||||
static Joystick* GetStickForPort(uint32_t port);
|
||||
static Joystick* GetStickForPort(int port);
|
||||
|
||||
virtual float GetMagnitude() const;
|
||||
virtual float GetDirectionRadians() const;
|
||||
@@ -104,15 +104,15 @@ class Joystick : public GenericHID, public ErrorBase {
|
||||
int GetPOVCount() const;
|
||||
|
||||
void SetRumble(RumbleType type, float value);
|
||||
void SetOutput(uint8_t outputNumber, bool value);
|
||||
void SetOutputs(uint32_t value);
|
||||
void SetOutput(int outputNumber, bool value);
|
||||
void SetOutputs(int value);
|
||||
|
||||
private:
|
||||
DriverStation& m_ds;
|
||||
uint32_t m_port;
|
||||
std::vector<uint32_t> m_axes;
|
||||
std::vector<uint32_t> m_buttons;
|
||||
uint32_t m_outputs = 0;
|
||||
int m_port;
|
||||
std::vector<int> m_axes;
|
||||
std::vector<int> m_buttons;
|
||||
int m_outputs = 0;
|
||||
uint16_t m_leftRumble = 0;
|
||||
uint16_t m_rightRumble = 0;
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ class PWM : public SensorBase,
|
||||
kPeriodMultiplier_4X = 4
|
||||
};
|
||||
|
||||
explicit PWM(uint32_t channel);
|
||||
explicit PWM(int channel);
|
||||
virtual ~PWM();
|
||||
virtual void SetRaw(uint16_t value);
|
||||
virtual uint16_t GetRaw() const;
|
||||
@@ -56,11 +56,11 @@ class PWM : public SensorBase,
|
||||
void EnableDeadbandElimination(bool eliminateDeadband);
|
||||
void SetBounds(float max, float deadbandMax, float center, float deadbandMin,
|
||||
float min);
|
||||
void SetRawBounds(int32_t max, int32_t deadbandMax, int32_t center,
|
||||
int32_t deadbandMin, int32_t min);
|
||||
void SetRawBounds(int max, int deadbandMax, int center, int deadbandMin,
|
||||
int min);
|
||||
void GetRawBounds(int32_t* max, int32_t* deadbandMax, int32_t* center,
|
||||
int32_t* deadbandMin, int32_t* min);
|
||||
uint32_t GetChannel() const { return m_channel; }
|
||||
int GetChannel() const { return m_channel; }
|
||||
|
||||
protected:
|
||||
void ValueChanged(ITable* source, llvm::StringRef key,
|
||||
@@ -75,6 +75,6 @@ class PWM : public SensorBase,
|
||||
std::shared_ptr<ITable> m_table;
|
||||
|
||||
private:
|
||||
uint32_t m_channel;
|
||||
int m_channel;
|
||||
HAL_DigitalHandle m_handle;
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ class PWMSpeedController : public SafePWM, public SpeedController {
|
||||
bool GetInverted() const override;
|
||||
|
||||
protected:
|
||||
explicit PWMSpeedController(uint32_t channel);
|
||||
explicit PWMSpeedController(int channel);
|
||||
|
||||
private:
|
||||
bool m_isInverted = false;
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
class PowerDistributionPanel : public SensorBase, public LiveWindowSendable {
|
||||
public:
|
||||
PowerDistributionPanel();
|
||||
explicit PowerDistributionPanel(uint8_t module);
|
||||
explicit PowerDistributionPanel(int module);
|
||||
|
||||
float GetVoltage() const;
|
||||
float GetTemperature() const;
|
||||
float GetCurrent(uint8_t channel) const;
|
||||
float GetCurrent(int channel) const;
|
||||
float GetTotalCurrent() const;
|
||||
float GetTotalPower() const;
|
||||
float GetTotalEnergy() const;
|
||||
@@ -40,5 +40,5 @@ class PowerDistributionPanel : public SensorBase, public LiveWindowSendable {
|
||||
|
||||
private:
|
||||
std::shared_ptr<ITable> m_table;
|
||||
uint8_t m_module;
|
||||
int m_module;
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ class Preferences : public ErrorBase {
|
||||
std::shared_ptr<nt::Value> value, bool isNew) override;
|
||||
void ValueChangedEx(ITable* source, llvm::StringRef key,
|
||||
std::shared_ptr<nt::Value> value,
|
||||
unsigned int flags) override;
|
||||
uint32_t flags) override;
|
||||
};
|
||||
Listener m_listener;
|
||||
};
|
||||
|
||||
@@ -38,12 +38,12 @@ class Relay : public MotorSafety,
|
||||
enum Value { kOff, kOn, kForward, kReverse };
|
||||
enum Direction { kBothDirections, kForwardOnly, kReverseOnly };
|
||||
|
||||
explicit Relay(uint32_t channel, Direction direction = kBothDirections);
|
||||
explicit Relay(int channel, Direction direction = kBothDirections);
|
||||
virtual ~Relay();
|
||||
|
||||
void Set(Value value);
|
||||
Value Get() const;
|
||||
uint32_t GetChannel() const;
|
||||
int GetChannel() const;
|
||||
|
||||
void SetExpiration(float timeout) override;
|
||||
float GetExpiration() const override;
|
||||
@@ -65,7 +65,7 @@ class Relay : public MotorSafety,
|
||||
std::shared_ptr<ITable> m_table;
|
||||
|
||||
private:
|
||||
uint32_t m_channel;
|
||||
int m_channel;
|
||||
Direction m_direction;
|
||||
|
||||
HAL_RelayHandle m_forwardHandle = HAL_kInvalidHandle;
|
||||
|
||||
@@ -36,9 +36,9 @@ class RobotDrive : public MotorSafety, public ErrorBase {
|
||||
kRearRightMotor = 3
|
||||
};
|
||||
|
||||
RobotDrive(uint32_t leftMotorChannel, uint32_t rightMotorChannel);
|
||||
RobotDrive(uint32_t frontLeftMotorChannel, uint32_t rearLeftMotorChannel,
|
||||
uint32_t frontRightMotorChannel, uint32_t rearRightMotorChannel);
|
||||
RobotDrive(int leftMotorChannel, int rightMotorChannel);
|
||||
RobotDrive(int frontLeftMotorChannel, int rearLeftMotorChannel,
|
||||
int frontRightMotorChannel, int rearRightMotorChannel);
|
||||
RobotDrive(SpeedController* leftMotor, SpeedController* rightMotor);
|
||||
RobotDrive(SpeedController& leftMotor, SpeedController& rightMotor);
|
||||
RobotDrive(std::shared_ptr<SpeedController> leftMotor,
|
||||
@@ -61,20 +61,18 @@ class RobotDrive : public MotorSafety, public ErrorBase {
|
||||
bool squaredInputs = true);
|
||||
void TankDrive(GenericHID& leftStick, GenericHID& rightStick,
|
||||
bool squaredInputs = true);
|
||||
void TankDrive(GenericHID* leftStick, uint32_t leftAxis,
|
||||
GenericHID* rightStick, uint32_t rightAxis,
|
||||
bool squaredInputs = true);
|
||||
void TankDrive(GenericHID& leftStick, uint32_t leftAxis,
|
||||
GenericHID& rightStick, uint32_t rightAxis,
|
||||
bool squaredInputs = true);
|
||||
void TankDrive(GenericHID* leftStick, int leftAxis, GenericHID* rightStick,
|
||||
int rightAxis, bool squaredInputs = true);
|
||||
void TankDrive(GenericHID& leftStick, int leftAxis, GenericHID& rightStick,
|
||||
int rightAxis, bool squaredInputs = true);
|
||||
void TankDrive(float leftValue, float rightValue, bool squaredInputs = true);
|
||||
void ArcadeDrive(GenericHID* stick, bool squaredInputs = true);
|
||||
void ArcadeDrive(GenericHID& stick, bool squaredInputs = true);
|
||||
void ArcadeDrive(GenericHID* moveStick, uint32_t moveChannel,
|
||||
GenericHID* rotateStick, uint32_t rotateChannel,
|
||||
void ArcadeDrive(GenericHID* moveStick, int moveChannel,
|
||||
GenericHID* rotateStick, int rotateChannel,
|
||||
bool squaredInputs = true);
|
||||
void ArcadeDrive(GenericHID& moveStick, uint32_t moveChannel,
|
||||
GenericHID& rotateStick, uint32_t rotateChannel,
|
||||
void ArcadeDrive(GenericHID& moveStick, int moveChannel,
|
||||
GenericHID& rotateStick, int rotateChannel,
|
||||
bool squaredInputs = true);
|
||||
void ArcadeDrive(float moveValue, float rotateValue,
|
||||
bool squaredInputs = true);
|
||||
@@ -101,7 +99,7 @@ class RobotDrive : public MotorSafety, public ErrorBase {
|
||||
void Normalize(double* wheelSpeeds);
|
||||
void RotateVector(double& x, double& y, double angle);
|
||||
|
||||
static const int32_t kMaxNumberOfMotors = 4;
|
||||
static const int kMaxNumberOfMotors = 4;
|
||||
float m_sensitivity = 0.5;
|
||||
double m_maxOutput = 1.0;
|
||||
std::shared_ptr<SpeedController> m_frontLeftMotor;
|
||||
@@ -111,7 +109,7 @@ class RobotDrive : public MotorSafety, public ErrorBase {
|
||||
std::unique_ptr<MotorSafetyHelper> m_safetyHelper;
|
||||
|
||||
private:
|
||||
int32_t GetNumMotors() {
|
||||
int GetNumMotors() {
|
||||
int motors = 0;
|
||||
if (m_frontLeftMotor) motors++;
|
||||
if (m_frontRightMotor) motors++;
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
*/
|
||||
class SD540 : public PWMSpeedController {
|
||||
public:
|
||||
explicit SD540(uint32_t channel);
|
||||
explicit SD540(int channel);
|
||||
virtual ~SD540() = default;
|
||||
};
|
||||
|
||||
@@ -42,27 +42,25 @@ class SPI : public SensorBase {
|
||||
void SetChipSelectActiveHigh();
|
||||
void SetChipSelectActiveLow();
|
||||
|
||||
virtual int32_t Write(uint8_t* data, uint8_t size);
|
||||
virtual int32_t Read(bool initiate, uint8_t* dataReceived, uint8_t size);
|
||||
virtual int32_t Transaction(uint8_t* dataToSend, uint8_t* dataReceived,
|
||||
uint8_t size);
|
||||
virtual int Write(uint8_t* data, int size);
|
||||
virtual int Read(bool initiate, uint8_t* dataReceived, int size);
|
||||
virtual int Transaction(uint8_t* dataToSend, uint8_t* dataReceived, int size);
|
||||
|
||||
void InitAccumulator(double period, uint32_t cmd, uint8_t xfer_size,
|
||||
uint32_t valid_mask, uint32_t valid_value,
|
||||
uint8_t data_shift, uint8_t data_size, bool is_signed,
|
||||
bool big_endian);
|
||||
void InitAccumulator(double period, int cmd, int xfer_size, int valid_mask,
|
||||
int valid_value, int data_shift, int data_size,
|
||||
bool is_signed, bool big_endian);
|
||||
void FreeAccumulator();
|
||||
void ResetAccumulator();
|
||||
void SetAccumulatorCenter(int32_t center);
|
||||
void SetAccumulatorDeadband(int32_t deadband);
|
||||
int32_t GetAccumulatorLastValue() const;
|
||||
void SetAccumulatorCenter(int center);
|
||||
void SetAccumulatorDeadband(int deadband);
|
||||
int GetAccumulatorLastValue() const;
|
||||
int64_t GetAccumulatorValue() const;
|
||||
int64_t GetAccumulatorCount() const;
|
||||
double GetAccumulatorAverage() const;
|
||||
void GetAccumulatorOutput(int64_t& value, int64_t& count) const;
|
||||
|
||||
protected:
|
||||
uint8_t m_port;
|
||||
int m_port;
|
||||
bool m_msbFirst = false; // default little-endian
|
||||
bool m_sampleOnTrailing = false; // default data updated on falling edge
|
||||
bool m_clk_idle_high = false; // default clock active high
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
class SafePWM : public PWM, public MotorSafety {
|
||||
public:
|
||||
explicit SafePWM(uint32_t channel);
|
||||
explicit SafePWM(int channel);
|
||||
virtual ~SafePWM() = default;
|
||||
|
||||
void SetExpiration(float timeout);
|
||||
|
||||
@@ -46,7 +46,7 @@ class SerialPort : public ErrorBase {
|
||||
enum WriteBufferMode { kFlushOnAccess = 1, kFlushWhenFull = 2 };
|
||||
enum Port { kOnboard = 0, kMXP = 1, kUSB = 2 };
|
||||
|
||||
SerialPort(uint32_t baudRate, Port port = kOnboard, uint8_t dataBits = 8,
|
||||
SerialPort(int baudRate, Port port = kOnboard, int dataBits = 8,
|
||||
Parity parity = kParity_None, StopBits stopBits = kStopBits_One);
|
||||
~SerialPort();
|
||||
|
||||
@@ -56,19 +56,19 @@ class SerialPort : public ErrorBase {
|
||||
void SetFlowControl(FlowControl flowControl);
|
||||
void EnableTermination(char terminator = '\n');
|
||||
void DisableTermination();
|
||||
int32_t GetBytesReceived();
|
||||
uint32_t Read(char* buffer, int32_t count);
|
||||
uint32_t Write(const std::string& buffer, int32_t count);
|
||||
int GetBytesReceived();
|
||||
int Read(char* buffer, int count);
|
||||
int Write(const std::string& buffer, int count);
|
||||
void SetTimeout(float timeout);
|
||||
void SetReadBufferSize(uint32_t size);
|
||||
void SetWriteBufferSize(uint32_t size);
|
||||
void SetReadBufferSize(int size);
|
||||
void SetWriteBufferSize(int size);
|
||||
void SetWriteBufferMode(WriteBufferMode mode);
|
||||
void Flush();
|
||||
void Reset();
|
||||
|
||||
private:
|
||||
uint32_t m_resourceManagerHandle = 0;
|
||||
uint32_t m_portHandle = 0;
|
||||
int m_resourceManagerHandle = 0;
|
||||
int m_portHandle = 0;
|
||||
bool m_consoleModeEnabled = false;
|
||||
uint8_t m_port;
|
||||
int m_port;
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
class Servo : public SafePWM {
|
||||
public:
|
||||
explicit Servo(uint32_t channel);
|
||||
explicit Servo(int channel);
|
||||
virtual ~Servo();
|
||||
void Set(float value);
|
||||
void SetOffline();
|
||||
|
||||
@@ -25,8 +25,8 @@ class Solenoid : public SolenoidBase,
|
||||
public LiveWindowSendable,
|
||||
public ITableListener {
|
||||
public:
|
||||
explicit Solenoid(uint32_t channel);
|
||||
Solenoid(uint8_t moduleNumber, uint32_t channel);
|
||||
explicit Solenoid(int channel);
|
||||
Solenoid(int moduleNumber, int channel);
|
||||
virtual ~Solenoid();
|
||||
virtual void Set(bool on);
|
||||
virtual bool Get() const;
|
||||
@@ -43,6 +43,6 @@ class Solenoid : public SolenoidBase,
|
||||
|
||||
private:
|
||||
HAL_SolenoidHandle m_solenoidHandle = HAL_kInvalidHandle;
|
||||
uint32_t m_channel; ///< The channel on the module to control.
|
||||
int m_channel; ///< The channel on the module to control.
|
||||
std::shared_ptr<ITable> m_table;
|
||||
};
|
||||
|
||||
@@ -18,18 +18,18 @@
|
||||
class SolenoidBase : public SensorBase {
|
||||
public:
|
||||
virtual ~SolenoidBase() = default;
|
||||
uint8_t GetAll(int module = 0) const;
|
||||
int GetAll(int module = 0) const;
|
||||
|
||||
uint8_t GetPCMSolenoidBlackList(int module) const;
|
||||
int GetPCMSolenoidBlackList(int module) const;
|
||||
bool GetPCMSolenoidVoltageStickyFault(int module) const;
|
||||
bool GetPCMSolenoidVoltageFault(int module) const;
|
||||
void ClearAllPCMStickyFaults(int module);
|
||||
|
||||
protected:
|
||||
explicit SolenoidBase(uint8_t pcmID);
|
||||
explicit SolenoidBase(int pcmID);
|
||||
static const int m_maxModules = 63;
|
||||
static const int m_maxPorts = 8;
|
||||
// static void* m_ports[m_maxModules][m_maxPorts];
|
||||
uint8_t m_moduleNumber; ///< Slot number where the module is plugged into
|
||||
/// the chassis.
|
||||
int m_moduleNumber; ///< Slot number where the module is plugged into
|
||||
/// the chassis.
|
||||
};
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
*/
|
||||
class Spark : public PWMSpeedController {
|
||||
public:
|
||||
explicit Spark(uint32_t channel);
|
||||
explicit Spark(int channel);
|
||||
virtual ~Spark() = default;
|
||||
};
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
*/
|
||||
class Talon : public PWMSpeedController {
|
||||
public:
|
||||
explicit Talon(uint32_t channel);
|
||||
explicit Talon(int channel);
|
||||
virtual ~Talon() = default;
|
||||
};
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
*/
|
||||
class TalonSRX : public PWMSpeedController {
|
||||
public:
|
||||
explicit TalonSRX(uint32_t channel);
|
||||
explicit TalonSRX(int channel);
|
||||
virtual ~TalonSRX() = default;
|
||||
};
|
||||
|
||||
@@ -50,19 +50,19 @@ class USBCamera : public ErrorBase {
|
||||
|
||||
priority_recursive_mutex m_mutex;
|
||||
|
||||
unsigned int m_width = 320;
|
||||
unsigned int m_height = 240;
|
||||
int m_width = 320;
|
||||
int m_height = 240;
|
||||
double m_fps = 30;
|
||||
std::string m_whiteBalance = AUTO;
|
||||
unsigned int m_whiteBalanceValue = 0;
|
||||
int m_whiteBalanceValue = 0;
|
||||
bool m_whiteBalanceValuePresent = false;
|
||||
std::string m_exposure = MANUAL;
|
||||
unsigned int m_exposureValue = 50;
|
||||
int m_exposureValue = 50;
|
||||
bool m_exposureValuePresent = false;
|
||||
unsigned int m_brightness = 80;
|
||||
int m_brightness = 80;
|
||||
bool m_needSettingsUpdate = true;
|
||||
|
||||
unsigned int GetJpegSize(void* buffer, unsigned int buffSize);
|
||||
int GetJpegSize(void* buffer, int buffSize);
|
||||
|
||||
public:
|
||||
static constexpr char const* kDefaultCameraName = "cam0";
|
||||
@@ -74,18 +74,18 @@ class USBCamera : public ErrorBase {
|
||||
void StartCapture();
|
||||
void StopCapture();
|
||||
void SetFPS(double fps);
|
||||
void SetSize(unsigned int width, unsigned int height);
|
||||
void SetSize(int width, int height);
|
||||
|
||||
void UpdateSettings();
|
||||
/**
|
||||
* Set the brightness, as a percentage (0-100).
|
||||
*/
|
||||
void SetBrightness(unsigned int brightness);
|
||||
void SetBrightness(int brightness);
|
||||
|
||||
/**
|
||||
* Get the brightness, as a percentage (0-100).
|
||||
*/
|
||||
unsigned int GetBrightness();
|
||||
int GetBrightness();
|
||||
|
||||
/**
|
||||
* Set the white balance to auto
|
||||
@@ -100,7 +100,7 @@ class USBCamera : public ErrorBase {
|
||||
/**
|
||||
* Set the white balance to manual, with specified color temperature
|
||||
*/
|
||||
void SetWhiteBalanceManual(unsigned int wbValue);
|
||||
void SetWhiteBalanceManual(int wbValue);
|
||||
|
||||
/**
|
||||
* Set the exposure to auto exposure
|
||||
@@ -115,8 +115,8 @@ class USBCamera : public ErrorBase {
|
||||
/**
|
||||
* Set the exposure to manual, with a given percentage (0-100)
|
||||
*/
|
||||
void SetExposureManual(unsigned int expValue);
|
||||
void SetExposureManual(int expValue);
|
||||
|
||||
void GetImage(Image* image);
|
||||
unsigned int GetImageData(void* buffer, unsigned int bufferSize);
|
||||
int GetImageData(void* buffer, int bufferSize);
|
||||
};
|
||||
|
||||
@@ -47,8 +47,7 @@ class Ultrasonic : public SensorBase,
|
||||
Ultrasonic(std::shared_ptr<DigitalOutput> pingChannel,
|
||||
std::shared_ptr<DigitalInput> echoChannel,
|
||||
DistanceUnit units = kInches);
|
||||
Ultrasonic(uint32_t pingChannel, uint32_t echoChannel,
|
||||
DistanceUnit units = kInches);
|
||||
Ultrasonic(int pingChannel, int echoChannel, DistanceUnit units = kInches);
|
||||
virtual ~Ultrasonic();
|
||||
|
||||
void Ping();
|
||||
@@ -79,7 +78,7 @@ class Ultrasonic : public SensorBase,
|
||||
// Time (sec) for the ping trigger pulse.
|
||||
static constexpr double kPingTime = 10 * 1e-6;
|
||||
// Priority that the ultrasonic round robin task runs.
|
||||
static const uint32_t kPriority = 64;
|
||||
static const int kPriority = 64;
|
||||
// Max time (ms) between readings.
|
||||
static constexpr double kMaxUltrasonicTime = 0.1;
|
||||
static constexpr double kSpeedOfSoundInchesPerSec = 1130.0 * 12.0;
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
*/
|
||||
class Victor : public PWMSpeedController {
|
||||
public:
|
||||
explicit Victor(uint32_t channel);
|
||||
explicit Victor(int channel);
|
||||
virtual ~Victor() = default;
|
||||
};
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
*/
|
||||
class VictorSP : public PWMSpeedController {
|
||||
public:
|
||||
explicit VictorSP(uint32_t channel);
|
||||
explicit VictorSP(int channel);
|
||||
virtual ~VictorSP() = default;
|
||||
};
|
||||
|
||||
@@ -61,8 +61,7 @@ class AxisCamera : public ErrorBase {
|
||||
int GetImage(Image* image);
|
||||
int GetImage(ColorImage* image);
|
||||
HSLImage* GetImage();
|
||||
int CopyJPEG(char** destImage, unsigned int& destImageSize,
|
||||
unsigned int& destImageBufferSize);
|
||||
int CopyJPEG(char** destImage, int& destImageSize, int& destImageBufferSize);
|
||||
|
||||
void WriteBrightness(int brightness);
|
||||
int GetBrightness();
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
/* Constants */
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* Error Codes */
|
||||
#define ERR_VISION_GENERAL_ERROR 166000 //
|
||||
#define ERR_COLOR_NOT_FOUND 166100 // TrackAPI.cpp
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* Color threshold values.
|
||||
* This object represnts the threshold values for any type of color object
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "nivision.h"
|
||||
|
||||
/* Constants */
|
||||
@@ -142,14 +144,13 @@ int frcColorEqualize(Image* dest, const Image* source, int colorEqualization);
|
||||
/* Image Thresholding & Conversion functions */
|
||||
|
||||
/* Smart Threshold: calls imaqLocalThreshold */
|
||||
int frcSmartThreshold(Image* dest, const Image* source,
|
||||
unsigned int windowWidth, unsigned int windowHeight,
|
||||
LocalThresholdMethod method, double deviationWeight,
|
||||
ObjectType type);
|
||||
int frcSmartThreshold(Image* dest, const Image* source,
|
||||
unsigned int windowWidth, unsigned int windowHeight,
|
||||
LocalThresholdMethod method, double deviationWeight,
|
||||
ObjectType type, float replaceValue);
|
||||
int frcSmartThreshold(Image* dest, const Image* source, int windowWidth,
|
||||
int windowHeight, LocalThresholdMethod method,
|
||||
double deviationWeight, ObjectType type);
|
||||
int frcSmartThreshold(Image* dest, const Image* source, int windowWidth,
|
||||
int windowHeight, LocalThresholdMethod method,
|
||||
double deviationWeight, ObjectType type,
|
||||
float replaceValue);
|
||||
|
||||
/* Simple Threshold: calls imaqThreshold */
|
||||
int frcSimpleThreshold(Image* dest, const Image* source, float rangeMin,
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
#include "PowerDistributionPanel.h"
|
||||
#include "Preferences.h"
|
||||
#include "Relay.h"
|
||||
#include "Resource.h"
|
||||
#include "RobotBase.h"
|
||||
#include "RobotDrive.h"
|
||||
#include "SD540.h"
|
||||
|
||||
Reference in New Issue
Block a user