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:
Tyler Veness
2016-07-10 17:47:44 -07:00
committed by Peter Johnson
parent e44a6e227a
commit 0cb288ffba
141 changed files with 670 additions and 626 deletions

View File

@@ -36,7 +36,8 @@ class AnalogPotentiometer : public Potentiometer, public LiveWindowSendable {
* @param offset The offset to add to the scaled value for controlling the
* zero value
*/
AnalogPotentiometer(int channel, double scale = 1.0, double offset = 0.0);
explicit AnalogPotentiometer(int channel, double scale = 1.0,
double offset = 0.0);
AnalogPotentiometer(AnalogInput* input, double scale = 1.0,
double offset = 0.0);
@@ -58,27 +59,27 @@ class AnalogPotentiometer : public Potentiometer, public LiveWindowSendable {
*
* @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:
double m_scale, m_offset;

View File

@@ -80,7 +80,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;

View File

@@ -48,7 +48,7 @@ class DriverStation : public SensorBase, public RobotStateInterface {
float GetStickAxis(uint32_t stick, uint32_t axis);
bool GetStickButton(uint32_t stick, uint32_t button);
short GetStickButtons(uint32_t stick);
int16_t GetStickButtons(uint32_t stick);
float GetAnalogIn(uint32_t channel);
bool GetDigitalIn(uint32_t channel);

View File

@@ -22,5 +22,5 @@ class Jaguar : public SafePWM, public SpeedController {
virtual float Get() const;
virtual void Disable();
virtual void PIDWrite(float output) override;
void PIDWrite(float output) override;
};

View File

@@ -50,19 +50,19 @@ class Joystick : public GenericHID, public ErrorBase {
uint32_t GetAxisChannel(AxisType axis);
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 = 1) 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 = 1) const override;
bool GetButton(ButtonType button) const;
static Joystick* GetStickForPort(uint32_t port);

View File

@@ -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);

View File

@@ -43,7 +43,7 @@ class PWM : public SensorBase,
explicit PWM(uint32_t channel);
virtual ~PWM();
virtual void SetRaw(unsigned short value);
virtual void SetRaw(uint16_t value);
void SetPeriodMultiplier(PeriodMultiplier mult);
void EnableDeadbandElimination(bool eliminateDeadband);
void SetBounds(int32_t max, int32_t deadbandMax, int32_t center,

View File

@@ -39,7 +39,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);

View File

@@ -22,5 +22,5 @@ class Talon : public SafePWM, public SpeedController {
virtual float Get() const;
virtual void Disable();
virtual void PIDWrite(float output) override;
void PIDWrite(float output) override;
};

View File

@@ -22,5 +22,5 @@ class Victor : public SafePWM, public SpeedController {
virtual float Get() const;
virtual void Disable();
virtual void PIDWrite(float output) override;
void PIDWrite(float output) override;
};

View File

@@ -24,7 +24,7 @@ class SimContinuousOutput {
float speed;
public:
SimContinuousOutput(std::string topic);
explicit SimContinuousOutput(std::string topic);
/**
* Set the output value.

View File

@@ -14,7 +14,7 @@ using namespace gazebo;
class SimDigitalInput {
public:
SimDigitalInput(std::string topic);
explicit SimDigitalInput(std::string topic);
/**
* @return The value of the potentiometer.

View File

@@ -15,7 +15,7 @@ using namespace gazebo;
class SimEncoder {
public:
SimEncoder(std::string topic);
explicit SimEncoder(std::string topic);
void Reset();
void Start();

View File

@@ -14,7 +14,7 @@ using namespace gazebo;
class SimFloatInput {
public:
SimFloatInput(std::string topic);
explicit SimFloatInput(std::string topic);
/**
* @return The value of the potentiometer.

View File

@@ -14,7 +14,7 @@ using namespace gazebo;
class SimGyro {
public:
SimGyro(std::string topic);
explicit SimGyro(std::string topic);
void Reset();
double GetAngle();