mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Fixes warnings thrown by cpplint.py (#154)
* Fixed cpplint.py [runtime/int] warnings * Fixed cpplint.py [readability/casting] warnings * Fixed cpplint.py [readability/namespace] warnings * Fixed cpplint.py [readability/braces] warnings * Fixed cpplint.py [whitespace/braces] warnings * Fixed cpplint.py [runtime/explicit] warnings * Fixed cpplint.py [runtime/printf] warnings * Fixed cpplint.py [readability/inheritance] warnings * Fixed cpplint.py [whitespace/tab] warnings * Fixed cpplint.py [build/storage_class] warnings * Fixed cpplint.py [readability/multiline_comment] warnings * Fixed cpplint.py [whitespace/semicolon] warnings * Fixed cpplint.py [readability/check] warnings * Fixed cpplint.py [runtime/arrays] warnings * Ran format.py
This commit is contained in:
committed by
Peter Johnson
parent
e44a6e227a
commit
0cb288ffba
@@ -59,20 +59,20 @@ class ADXL345_I2C : public Accelerometer, public LiveWindowSendable {
|
||||
ADXL345_I2C& operator=(const ADXL345_I2C&) = delete;
|
||||
|
||||
// Accelerometer interface
|
||||
virtual void SetRange(Range range) override;
|
||||
virtual double GetX() override;
|
||||
virtual double GetY() override;
|
||||
virtual double GetZ() override;
|
||||
void SetRange(Range range) override;
|
||||
double GetX() override;
|
||||
double GetY() override;
|
||||
double GetZ() override;
|
||||
|
||||
virtual double GetAcceleration(Axes axis);
|
||||
virtual AllAxes GetAccelerations();
|
||||
|
||||
virtual std::string GetSmartDashboardType() const override;
|
||||
virtual void InitTable(std::shared_ptr<ITable> subtable) override;
|
||||
virtual void UpdateTable() override;
|
||||
virtual std::shared_ptr<ITable> GetTable() const override;
|
||||
virtual void StartLiveWindowMode() override {}
|
||||
virtual void StopLiveWindowMode() override {}
|
||||
std::string GetSmartDashboardType() const override;
|
||||
void InitTable(std::shared_ptr<ITable> subtable) override;
|
||||
void UpdateTable() override;
|
||||
std::shared_ptr<ITable> GetTable() const override;
|
||||
void StartLiveWindowMode() override {}
|
||||
void StopLiveWindowMode() override {}
|
||||
|
||||
protected:
|
||||
I2C m_i2c;
|
||||
|
||||
@@ -54,27 +54,27 @@ class ADXL345_SPI : public Accelerometer, public LiveWindowSendable {
|
||||
};
|
||||
|
||||
public:
|
||||
ADXL345_SPI(SPI::Port port, Range range = kRange_2G);
|
||||
explicit ADXL345_SPI(SPI::Port port, Range range = kRange_2G);
|
||||
virtual ~ADXL345_SPI() = default;
|
||||
|
||||
ADXL345_SPI(const ADXL345_SPI&) = delete;
|
||||
ADXL345_SPI& operator=(const ADXL345_SPI&) = delete;
|
||||
|
||||
// Accelerometer interface
|
||||
virtual void SetRange(Range range) override;
|
||||
virtual double GetX() override;
|
||||
virtual double GetY() override;
|
||||
virtual double GetZ() override;
|
||||
void SetRange(Range range) override;
|
||||
double GetX() override;
|
||||
double GetY() override;
|
||||
double GetZ() override;
|
||||
|
||||
virtual double GetAcceleration(Axes axis);
|
||||
virtual AllAxes GetAccelerations();
|
||||
|
||||
virtual std::string GetSmartDashboardType() const override;
|
||||
virtual void InitTable(std::shared_ptr<ITable> subtable) override;
|
||||
virtual void UpdateTable() override;
|
||||
virtual std::shared_ptr<ITable> GetTable() const override;
|
||||
virtual void StartLiveWindowMode() override {}
|
||||
virtual void StopLiveWindowMode() override {}
|
||||
std::string GetSmartDashboardType() const override;
|
||||
void InitTable(std::shared_ptr<ITable> subtable) override;
|
||||
void UpdateTable() override;
|
||||
std::shared_ptr<ITable> GetTable() const override;
|
||||
void StartLiveWindowMode() override {}
|
||||
void StopLiveWindowMode() override {}
|
||||
|
||||
protected:
|
||||
SPI m_spi;
|
||||
|
||||
@@ -32,28 +32,28 @@ class ADXL362 : public Accelerometer, public LiveWindowSendable {
|
||||
};
|
||||
|
||||
public:
|
||||
ADXL362(Range range = kRange_2G);
|
||||
ADXL362(SPI::Port port, Range range = kRange_2G);
|
||||
explicit ADXL362(Range range = kRange_2G);
|
||||
explicit ADXL362(SPI::Port port, Range range = kRange_2G);
|
||||
virtual ~ADXL362() = default;
|
||||
|
||||
ADXL362(const ADXL362&) = delete;
|
||||
ADXL362& operator=(const ADXL362&) = delete;
|
||||
|
||||
// Accelerometer interface
|
||||
virtual void SetRange(Range range) override;
|
||||
virtual double GetX() override;
|
||||
virtual double GetY() override;
|
||||
virtual double GetZ() override;
|
||||
void SetRange(Range range) override;
|
||||
double GetX() override;
|
||||
double GetY() override;
|
||||
double GetZ() override;
|
||||
|
||||
virtual double GetAcceleration(Axes axis);
|
||||
virtual AllAxes GetAccelerations();
|
||||
|
||||
virtual std::string GetSmartDashboardType() const override;
|
||||
virtual void InitTable(std::shared_ptr<ITable> subtable) override;
|
||||
virtual void UpdateTable() override;
|
||||
virtual std::shared_ptr<ITable> GetTable() const override;
|
||||
virtual void StartLiveWindowMode() override {}
|
||||
virtual void StopLiveWindowMode() override {}
|
||||
std::string GetSmartDashboardType() const override;
|
||||
void InitTable(std::shared_ptr<ITable> subtable) override;
|
||||
void UpdateTable() override;
|
||||
std::shared_ptr<ITable> GetTable() const override;
|
||||
void StartLiveWindowMode() override {}
|
||||
void StopLiveWindowMode() override {}
|
||||
|
||||
private:
|
||||
SPI m_spi;
|
||||
|
||||
@@ -53,34 +53,34 @@ class AnalogPotentiometer : public Potentiometer, public LiveWindowSendable {
|
||||
*
|
||||
* @return The current position of the potentiometer.
|
||||
*/
|
||||
virtual double Get() const override;
|
||||
double Get() const override;
|
||||
|
||||
/**
|
||||
* Implement the PIDSource interface.
|
||||
*
|
||||
* @return The current reading.
|
||||
*/
|
||||
virtual double PIDGet() override;
|
||||
double PIDGet() override;
|
||||
|
||||
/*
|
||||
* Live Window code, only does anything if live window is activated.
|
||||
*/
|
||||
virtual std::string GetSmartDashboardType() const override;
|
||||
virtual void InitTable(std::shared_ptr<ITable> subtable) override;
|
||||
virtual void UpdateTable() override;
|
||||
virtual std::shared_ptr<ITable> GetTable() const override;
|
||||
std::string GetSmartDashboardType() const override;
|
||||
void InitTable(std::shared_ptr<ITable> subtable) override;
|
||||
void UpdateTable() override;
|
||||
std::shared_ptr<ITable> GetTable() const override;
|
||||
|
||||
/**
|
||||
* AnalogPotentiometers don't have to do anything special when entering the
|
||||
* LiveWindow.
|
||||
*/
|
||||
virtual void StartLiveWindowMode() override {}
|
||||
void StartLiveWindowMode() override {}
|
||||
|
||||
/**
|
||||
* AnalogPotentiometers don't have to do anything special when exiting the
|
||||
* LiveWindow.
|
||||
*/
|
||||
virtual void StopLiveWindowMode() override {}
|
||||
void StopLiveWindowMode() override {}
|
||||
|
||||
private:
|
||||
std::shared_ptr<AnalogInput> m_analog_input;
|
||||
|
||||
@@ -49,10 +49,10 @@ class AnalogTriggerOutput : public DigitalSource {
|
||||
bool Get() const;
|
||||
|
||||
// DigitalSource interface
|
||||
virtual HAL_Handle GetPortHandleForRouting() const override;
|
||||
virtual AnalogTriggerType GetAnalogTriggerTypeForRouting() const override;
|
||||
virtual bool IsAnalogTrigger() const override;
|
||||
virtual uint32_t GetChannel() const override;
|
||||
HAL_Handle GetPortHandleForRouting() const override;
|
||||
AnalogTriggerType GetAnalogTriggerTypeForRouting() const override;
|
||||
bool IsAnalogTrigger() const override;
|
||||
uint32_t GetChannel() const override;
|
||||
|
||||
protected:
|
||||
AnalogTriggerOutput(const AnalogTrigger& trigger,
|
||||
|
||||
@@ -12,4 +12,4 @@ enum class AnalogTriggerType {
|
||||
kState = 1,
|
||||
kRisingPulse = 2,
|
||||
kFallingPulse = 3
|
||||
};
|
||||
};
|
||||
|
||||
@@ -22,21 +22,21 @@ class BuiltInAccelerometer : public Accelerometer,
|
||||
public SensorBase,
|
||||
public LiveWindowSendable {
|
||||
public:
|
||||
BuiltInAccelerometer(Range range = kRange_8G);
|
||||
explicit BuiltInAccelerometer(Range range = kRange_8G);
|
||||
virtual ~BuiltInAccelerometer() = default;
|
||||
|
||||
// Accelerometer interface
|
||||
virtual void SetRange(Range range) override;
|
||||
virtual double GetX() override;
|
||||
virtual double GetY() override;
|
||||
virtual double GetZ() override;
|
||||
void SetRange(Range range) override;
|
||||
double GetX() override;
|
||||
double GetY() override;
|
||||
double GetZ() override;
|
||||
|
||||
virtual std::string GetSmartDashboardType() const override;
|
||||
virtual void InitTable(std::shared_ptr<ITable> subtable) override;
|
||||
virtual void UpdateTable() override;
|
||||
virtual std::shared_ptr<ITable> GetTable() const override;
|
||||
virtual void StartLiveWindowMode() override {}
|
||||
virtual void StopLiveWindowMode() override {}
|
||||
std::string GetSmartDashboardType() const override;
|
||||
void InitTable(std::shared_ptr<ITable> subtable) override;
|
||||
void UpdateTable() override;
|
||||
std::shared_ptr<ITable> GetTable() const override;
|
||||
void StartLiveWindowMode() override {}
|
||||
void StopLiveWindowMode() override {}
|
||||
|
||||
private:
|
||||
std::shared_ptr<ITable> m_table;
|
||||
|
||||
@@ -59,7 +59,7 @@ class CANJaguar : public MotorSafety,
|
||||
uint8_t GetHardwareVersion() const;
|
||||
|
||||
// PIDOutput interface
|
||||
virtual void PIDWrite(float output) override;
|
||||
void PIDWrite(float output) override;
|
||||
|
||||
// Control mode methods
|
||||
void EnableControl(double encoderInitialPosition = 0.0);
|
||||
@@ -94,39 +94,39 @@ class CANJaguar : public MotorSafety,
|
||||
void Set(float value, uint8_t syncGroup);
|
||||
|
||||
// CANSpeedController interface
|
||||
virtual float Get() const override;
|
||||
virtual void Set(float value) override;
|
||||
virtual void Disable() override;
|
||||
virtual void SetP(double p) override;
|
||||
virtual void SetI(double i) override;
|
||||
virtual void SetD(double d) override;
|
||||
virtual void SetPID(double p, double i, double d) override;
|
||||
virtual double GetP() const override;
|
||||
virtual double GetI() const override;
|
||||
virtual double GetD() const override;
|
||||
virtual bool IsModePID(CANSpeedController::ControlMode mode) const override;
|
||||
virtual float GetBusVoltage() const override;
|
||||
virtual float GetOutputVoltage() const override;
|
||||
virtual float GetOutputCurrent() const override;
|
||||
virtual float GetTemperature() const override;
|
||||
virtual double GetPosition() const override;
|
||||
virtual double GetSpeed() const override;
|
||||
virtual bool GetForwardLimitOK() const override;
|
||||
virtual bool GetReverseLimitOK() const override;
|
||||
virtual uint16_t GetFaults() const override;
|
||||
virtual void SetVoltageRampRate(double rampRate) override;
|
||||
virtual uint32_t GetFirmwareVersion() const override;
|
||||
virtual void ConfigNeutralMode(NeutralMode mode) override;
|
||||
virtual void ConfigEncoderCodesPerRev(uint16_t codesPerRev) override;
|
||||
virtual void ConfigPotentiometerTurns(uint16_t turns) override;
|
||||
virtual void ConfigSoftPositionLimits(double forwardLimitPosition,
|
||||
double reverseLimitPosition) override;
|
||||
virtual void DisableSoftPositionLimits() override;
|
||||
virtual void ConfigLimitMode(LimitMode mode) override;
|
||||
virtual void ConfigForwardLimit(double forwardLimitPosition) override;
|
||||
virtual void ConfigReverseLimit(double reverseLimitPosition) override;
|
||||
virtual void ConfigMaxOutputVoltage(double voltage) override;
|
||||
virtual void ConfigFaultTime(float faultTime) override;
|
||||
float Get() const override;
|
||||
void Set(float value) override;
|
||||
void Disable() override;
|
||||
void SetP(double p) override;
|
||||
void SetI(double i) override;
|
||||
void SetD(double d) override;
|
||||
void SetPID(double p, double i, double d) override;
|
||||
double GetP() const override;
|
||||
double GetI() const override;
|
||||
double GetD() const override;
|
||||
bool IsModePID(CANSpeedController::ControlMode mode) const override;
|
||||
float GetBusVoltage() const override;
|
||||
float GetOutputVoltage() const override;
|
||||
float GetOutputCurrent() const override;
|
||||
float GetTemperature() const override;
|
||||
double GetPosition() const override;
|
||||
double GetSpeed() const override;
|
||||
bool GetForwardLimitOK() const override;
|
||||
bool GetReverseLimitOK() const override;
|
||||
uint16_t GetFaults() const override;
|
||||
void SetVoltageRampRate(double rampRate) override;
|
||||
uint32_t GetFirmwareVersion() const override;
|
||||
void ConfigNeutralMode(NeutralMode mode) override;
|
||||
void ConfigEncoderCodesPerRev(uint16_t codesPerRev) override;
|
||||
void ConfigPotentiometerTurns(uint16_t turns) override;
|
||||
void ConfigSoftPositionLimits(double forwardLimitPosition,
|
||||
double reverseLimitPosition) override;
|
||||
void DisableSoftPositionLimits() override;
|
||||
void ConfigLimitMode(LimitMode mode) override;
|
||||
void ConfigForwardLimit(double forwardLimitPosition) override;
|
||||
void ConfigReverseLimit(double reverseLimitPosition) override;
|
||||
void ConfigMaxOutputVoltage(double voltage) override;
|
||||
void ConfigFaultTime(float faultTime) override;
|
||||
virtual void SetControlMode(ControlMode mode);
|
||||
virtual ControlMode GetControlMode() const;
|
||||
|
||||
@@ -142,8 +142,8 @@ class CANJaguar : public MotorSafety,
|
||||
uint8_t GetDeviceID() const;
|
||||
|
||||
// SpeedController overrides
|
||||
virtual void SetInverted(bool isInverted) override;
|
||||
virtual bool GetInverted() const override;
|
||||
void SetInverted(bool isInverted) override;
|
||||
bool GetInverted() const override;
|
||||
|
||||
protected:
|
||||
// Control mode helpers
|
||||
|
||||
@@ -226,47 +226,47 @@ class CANTalon : public MotorSafety,
|
||||
virtual ~CANTalon();
|
||||
|
||||
// PIDOutput interface
|
||||
virtual void PIDWrite(float output) override;
|
||||
void PIDWrite(float output) override;
|
||||
|
||||
// PIDSource interface
|
||||
virtual double PIDGet() override;
|
||||
double PIDGet() override;
|
||||
|
||||
// MotorSafety interface
|
||||
virtual void SetExpiration(float timeout) override;
|
||||
virtual float GetExpiration() const override;
|
||||
virtual bool IsAlive() const override;
|
||||
virtual void StopMotor() override;
|
||||
virtual void SetSafetyEnabled(bool enabled) override;
|
||||
virtual bool IsSafetyEnabled() const override;
|
||||
virtual void GetDescription(std::ostringstream& desc) const override;
|
||||
void SetExpiration(float timeout) override;
|
||||
float GetExpiration() const override;
|
||||
bool IsAlive() const override;
|
||||
void StopMotor() override;
|
||||
void SetSafetyEnabled(bool enabled) override;
|
||||
bool IsSafetyEnabled() const override;
|
||||
void GetDescription(std::ostringstream& desc) const override;
|
||||
|
||||
// CANSpeedController interface
|
||||
virtual float Get() const override;
|
||||
virtual void Set(float value) override;
|
||||
virtual void Reset() override;
|
||||
virtual void SetSetpoint(float value) override;
|
||||
virtual void Disable() override;
|
||||
float Get() const override;
|
||||
void Set(float value) override;
|
||||
void Reset() override;
|
||||
void SetSetpoint(float value) override;
|
||||
void Disable() override;
|
||||
virtual void EnableControl();
|
||||
virtual void Enable() override;
|
||||
virtual void SetP(double p) override;
|
||||
virtual void SetI(double i) override;
|
||||
virtual void SetD(double d) override;
|
||||
void Enable() override;
|
||||
void SetP(double p) override;
|
||||
void SetI(double i) override;
|
||||
void SetD(double d) override;
|
||||
void SetF(double f);
|
||||
void SetIzone(unsigned iz);
|
||||
virtual void SetPID(double p, double i, double d) override;
|
||||
void SetPID(double p, double i, double d) override;
|
||||
virtual void SetPID(double p, double i, double d, double f);
|
||||
virtual double GetP() const override;
|
||||
virtual double GetI() const override;
|
||||
virtual double GetD() const override;
|
||||
double GetP() const override;
|
||||
double GetI() const override;
|
||||
double GetD() const override;
|
||||
virtual double GetF() const;
|
||||
virtual bool IsModePID(CANSpeedController::ControlMode mode) const override;
|
||||
virtual float GetBusVoltage() const override;
|
||||
virtual float GetOutputVoltage() const override;
|
||||
virtual float GetOutputCurrent() const override;
|
||||
virtual float GetTemperature() const override;
|
||||
bool IsModePID(CANSpeedController::ControlMode mode) const override;
|
||||
float GetBusVoltage() const override;
|
||||
float GetOutputVoltage() const override;
|
||||
float GetOutputCurrent() const override;
|
||||
float GetTemperature() const override;
|
||||
void SetPosition(double pos);
|
||||
virtual double GetPosition() const override;
|
||||
virtual double GetSpeed() const override;
|
||||
double GetPosition() const override;
|
||||
double GetSpeed() const override;
|
||||
virtual int GetClosedLoopError() const;
|
||||
virtual void SetAllowableClosedLoopErr(uint32_t allowableCloseLoopError);
|
||||
virtual int GetAnalogIn() const;
|
||||
@@ -290,23 +290,23 @@ class CANTalon : public MotorSafety,
|
||||
virtual int GetPulseWidthRiseToRiseUs() const;
|
||||
virtual FeedbackDeviceStatus IsSensorPresent(
|
||||
FeedbackDevice feedbackDevice) const;
|
||||
virtual bool GetForwardLimitOK() const override;
|
||||
virtual bool GetReverseLimitOK() const override;
|
||||
virtual uint16_t GetFaults() const override;
|
||||
bool GetForwardLimitOK() const override;
|
||||
bool GetReverseLimitOK() const override;
|
||||
uint16_t GetFaults() const override;
|
||||
uint16_t GetStickyFaults() const;
|
||||
void ClearStickyFaults();
|
||||
virtual void SetVoltageRampRate(double rampRate) override;
|
||||
void SetVoltageRampRate(double rampRate) override;
|
||||
virtual void SetVoltageCompensationRampRate(double rampRate);
|
||||
virtual uint32_t GetFirmwareVersion() const override;
|
||||
virtual void ConfigNeutralMode(NeutralMode mode) override;
|
||||
virtual void ConfigEncoderCodesPerRev(uint16_t codesPerRev) override;
|
||||
virtual void ConfigPotentiometerTurns(uint16_t turns) override;
|
||||
virtual void ConfigSoftPositionLimits(double forwardLimitPosition,
|
||||
double reverseLimitPosition) override;
|
||||
virtual void DisableSoftPositionLimits() override;
|
||||
virtual void ConfigLimitMode(LimitMode mode) override;
|
||||
virtual void ConfigForwardLimit(double forwardLimitPosition) override;
|
||||
virtual void ConfigReverseLimit(double reverseLimitPosition) override;
|
||||
uint32_t GetFirmwareVersion() const override;
|
||||
void ConfigNeutralMode(NeutralMode mode) override;
|
||||
void ConfigEncoderCodesPerRev(uint16_t codesPerRev) override;
|
||||
void ConfigPotentiometerTurns(uint16_t turns) override;
|
||||
void ConfigSoftPositionLimits(double forwardLimitPosition,
|
||||
double reverseLimitPosition) override;
|
||||
void DisableSoftPositionLimits() override;
|
||||
void ConfigLimitMode(LimitMode mode) override;
|
||||
void ConfigForwardLimit(double forwardLimitPosition) override;
|
||||
void ConfigReverseLimit(double reverseLimitPosition) override;
|
||||
void ConfigLimitSwitchOverrides(bool bForwardLimitSwitchEn,
|
||||
bool bReverseLimitSwitchEn);
|
||||
void ConfigForwardSoftLimitEnable(bool bForwardSoftLimitEn);
|
||||
@@ -333,7 +333,7 @@ class CANTalon : public MotorSafety,
|
||||
* @param normallyOpen true for normally open. false for normally closed.
|
||||
*/
|
||||
void ConfigRevLimitSwitchNormallyOpen(bool normallyOpen);
|
||||
virtual void ConfigMaxOutputVoltage(double voltage) override;
|
||||
void ConfigMaxOutputVoltage(double voltage) override;
|
||||
void ConfigPeakOutputVoltage(double forwardVoltage, double reverseVoltage);
|
||||
void ConfigNominalOutputVoltage(double forwardVoltage, double reverseVoltage);
|
||||
/**
|
||||
@@ -349,7 +349,7 @@ class CANTalon : public MotorSafety,
|
||||
void ConfigSetParameter(uint32_t paramEnum, double value);
|
||||
bool GetParameter(uint32_t paramEnum, double& dvalue) const;
|
||||
|
||||
virtual void ConfigFaultTime(float faultTime) override;
|
||||
void ConfigFaultTime(float faultTime) override;
|
||||
virtual void SetControlMode(ControlMode mode);
|
||||
void SetFeedbackDevice(FeedbackDevice device);
|
||||
void SetStatusFrameRateMs(StatusFrameRate stateFrame, int periodMs);
|
||||
@@ -449,8 +449,8 @@ class CANTalon : public MotorSafety,
|
||||
std::shared_ptr<ITable> GetTable() const override;
|
||||
|
||||
// SpeedController overrides
|
||||
virtual void SetInverted(bool isInverted) override;
|
||||
virtual bool GetInverted() const override;
|
||||
void SetInverted(bool isInverted) override;
|
||||
bool GetInverted() const override;
|
||||
|
||||
private:
|
||||
// Values for various modes as is sent in the CAN packets for the Talon.
|
||||
|
||||
@@ -94,7 +94,7 @@ class Counter : public SensorBase,
|
||||
void UpdateTable() override;
|
||||
void StartLiveWindowMode() override;
|
||||
void StopLiveWindowMode() override;
|
||||
virtual std::string GetSmartDashboardType() const override;
|
||||
std::string GetSmartDashboardType() const override;
|
||||
void InitTable(std::shared_ptr<ITable> subTable) override;
|
||||
std::shared_ptr<ITable> GetTable() const override;
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ class DigitalInput : public DigitalSource, public LiveWindowSendable {
|
||||
uint32_t GetChannel() const override;
|
||||
|
||||
// Digital Source Interface
|
||||
virtual HAL_Handle GetPortHandleForRouting() const override;
|
||||
virtual AnalogTriggerType GetAnalogTriggerTypeForRouting() const override;
|
||||
virtual bool IsAnalogTrigger() const override;
|
||||
HAL_Handle GetPortHandleForRouting() const override;
|
||||
AnalogTriggerType GetAnalogTriggerTypeForRouting() const override;
|
||||
bool IsAnalogTrigger() const override;
|
||||
|
||||
void UpdateTable();
|
||||
void StartLiveWindowMode();
|
||||
|
||||
@@ -36,12 +36,12 @@ class DigitalOutput : public DigitalSource,
|
||||
void UpdateDutyCycle(float dutyCycle);
|
||||
|
||||
// Digital Source Interface
|
||||
virtual HAL_Handle GetPortHandleForRouting() const override;
|
||||
virtual AnalogTriggerType GetAnalogTriggerTypeForRouting() const override;
|
||||
virtual bool IsAnalogTrigger() const override;
|
||||
HAL_Handle GetPortHandleForRouting() const override;
|
||||
AnalogTriggerType GetAnalogTriggerTypeForRouting() const override;
|
||||
bool IsAnalogTrigger() const override;
|
||||
|
||||
virtual void ValueChanged(ITable* source, llvm::StringRef key,
|
||||
std::shared_ptr<nt::Value> value, bool isNew);
|
||||
void ValueChanged(ITable* source, llvm::StringRef key,
|
||||
std::shared_ptr<nt::Value> value, bool isNew) override;
|
||||
void UpdateTable();
|
||||
void StartLiveWindowMode();
|
||||
void StopLiveWindowMode();
|
||||
|
||||
@@ -21,12 +21,12 @@ class GearTooth : public Counter {
|
||||
public:
|
||||
/// 55 uSec for threshold
|
||||
static constexpr double kGearToothThreshold = 55e-6;
|
||||
GearTooth(uint32_t channel, bool directionSensitive = false);
|
||||
GearTooth(DigitalSource* source, bool directionSensitive = false);
|
||||
GearTooth(std::shared_ptr<DigitalSource> source,
|
||||
bool directionSensitive = false);
|
||||
explicit GearTooth(uint32_t channel, bool directionSensitive = false);
|
||||
explicit GearTooth(DigitalSource* source, bool directionSensitive = false);
|
||||
explicit GearTooth(std::shared_ptr<DigitalSource> source,
|
||||
bool directionSensitive = false);
|
||||
virtual ~GearTooth() = default;
|
||||
void EnableDirectionSensing(bool directionSensitive);
|
||||
|
||||
virtual std::string GetSmartDashboardType() const override;
|
||||
std::string GetSmartDashboardType() const override;
|
||||
};
|
||||
|
||||
@@ -72,19 +72,19 @@ class Joystick : public GenericHID, public ErrorBase {
|
||||
uint32_t GetAxisChannel(AxisType axis) const;
|
||||
void SetAxisChannel(AxisType axis, uint32_t channel);
|
||||
|
||||
virtual float GetX(JoystickHand hand = kRightHand) const override;
|
||||
virtual float GetY(JoystickHand hand = kRightHand) const override;
|
||||
virtual float GetZ() const override;
|
||||
virtual float GetTwist() const override;
|
||||
virtual float GetThrottle() const override;
|
||||
float GetX(JoystickHand hand = kRightHand) const override;
|
||||
float GetY(JoystickHand hand = kRightHand) const override;
|
||||
float GetZ() const override;
|
||||
float GetTwist() const override;
|
||||
float GetThrottle() const override;
|
||||
virtual float GetAxis(AxisType axis) const;
|
||||
float GetRawAxis(uint32_t axis) const override;
|
||||
|
||||
virtual bool GetTrigger(JoystickHand hand = kRightHand) const override;
|
||||
virtual bool GetTop(JoystickHand hand = kRightHand) const override;
|
||||
virtual bool GetBumper(JoystickHand hand = kRightHand) const override;
|
||||
virtual bool GetRawButton(uint32_t button) const override;
|
||||
virtual int GetPOV(uint32_t pov = 0) 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 GetButton(ButtonType button) const;
|
||||
static Joystick* GetStickForPort(uint32_t port);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class MotorSafety;
|
||||
|
||||
class MotorSafetyHelper : public ErrorBase {
|
||||
public:
|
||||
MotorSafetyHelper(MotorSafety* safeObject);
|
||||
explicit MotorSafetyHelper(MotorSafety* safeObject);
|
||||
~MotorSafetyHelper();
|
||||
void Feed();
|
||||
void SetExpiration(float expirationTime);
|
||||
|
||||
@@ -43,8 +43,8 @@ class PWM : public SensorBase,
|
||||
|
||||
explicit PWM(uint32_t channel);
|
||||
virtual ~PWM();
|
||||
virtual void SetRaw(unsigned short value);
|
||||
virtual unsigned short GetRaw() const;
|
||||
virtual void SetRaw(uint16_t value);
|
||||
virtual uint16_t GetRaw() const;
|
||||
virtual void SetPosition(float pos);
|
||||
virtual float GetPosition() const;
|
||||
virtual void SetSpeed(float speed);
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
class PWMSpeedController : public SafePWM, public SpeedController {
|
||||
public:
|
||||
virtual ~PWMSpeedController() = default;
|
||||
virtual void Set(float value) override;
|
||||
virtual float Get() const override;
|
||||
virtual void Disable() override;
|
||||
virtual void StopMotor() override;
|
||||
void Set(float value) override;
|
||||
float Get() const override;
|
||||
void Disable() override;
|
||||
void StopMotor() override;
|
||||
|
||||
virtual void PIDWrite(float output) override;
|
||||
void PIDWrite(float output) override;
|
||||
|
||||
virtual void SetInverted(bool isInverted) override;
|
||||
virtual bool GetInverted() const override;
|
||||
void SetInverted(bool isInverted) override;
|
||||
bool GetInverted() const override;
|
||||
|
||||
protected:
|
||||
explicit PWMSpeedController(uint32_t channel);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
class PowerDistributionPanel : public SensorBase, public LiveWindowSendable {
|
||||
public:
|
||||
PowerDistributionPanel();
|
||||
PowerDistributionPanel(uint8_t module);
|
||||
explicit PowerDistributionPanel(uint8_t module);
|
||||
|
||||
double GetVoltage() const;
|
||||
double GetTemperature() const;
|
||||
|
||||
@@ -37,7 +37,7 @@ class Relay : public MotorSafety,
|
||||
enum Value { kOff, kOn, kForward, kReverse };
|
||||
enum Direction { kBothDirections, kForwardOnly, kReverseOnly };
|
||||
|
||||
Relay(uint32_t channel, Direction direction = kBothDirections);
|
||||
explicit Relay(uint32_t channel, Direction direction = kBothDirections);
|
||||
virtual ~Relay();
|
||||
|
||||
void Set(Value value);
|
||||
|
||||
@@ -22,7 +22,7 @@ class DigitalInput;
|
||||
class SPI : public SensorBase {
|
||||
public:
|
||||
enum Port { kOnboardCS0, kOnboardCS1, kOnboardCS2, kOnboardCS3, kMXP };
|
||||
SPI(Port SPIport);
|
||||
explicit SPI(Port SPIport);
|
||||
virtual ~SPI();
|
||||
|
||||
SPI(const SPI&) = delete;
|
||||
|
||||
@@ -27,8 +27,8 @@ class SolenoidBase : public SensorBase {
|
||||
|
||||
protected:
|
||||
explicit SolenoidBase(uint8_t pcmID);
|
||||
const static int m_maxModules = 63;
|
||||
const static int m_maxPorts = 8;
|
||||
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.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
class ColorImage : public ImageBase {
|
||||
public:
|
||||
ColorImage(ImageType type);
|
||||
explicit ColorImage(ImageType type);
|
||||
virtual ~ColorImage() = default;
|
||||
BinaryImage* ThresholdRGB(int redLow, int redHigh, int greenLow,
|
||||
int greenHigh, int blueLow, int blueHigh);
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
class HSLImage : public ColorImage {
|
||||
public:
|
||||
HSLImage();
|
||||
HSLImage(const char* fileName);
|
||||
explicit HSLImage(const char* fileName);
|
||||
virtual ~HSLImage() = default;
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
class ImageBase : public ErrorBase {
|
||||
public:
|
||||
ImageBase(ImageType type);
|
||||
explicit ImageBase(ImageType type);
|
||||
virtual ~ImageBase();
|
||||
virtual void Write(const char* fileName);
|
||||
int GetHeight();
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
class RGBImage : public ColorImage {
|
||||
public:
|
||||
RGBImage();
|
||||
RGBImage(const char* fileName);
|
||||
explicit RGBImage(const char* fileName);
|
||||
virtual ~RGBImage() = default;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user