Fixed cpplint.py warnings (#215)

* Fixed cpplint.py [build/include_order] and [build/include_what_you_use] warnings
* Fixed cpplint.py [readability/casting] warnings
* Updated .styleguide format
* Fixed cpplint.py [build/header_guard] warnings
This commit is contained in:
Tyler Veness
2016-09-05 13:55:31 -07:00
committed by Peter Johnson
parent 59ec54887d
commit 05626cfafe
132 changed files with 280 additions and 172 deletions

View File

@@ -1,12 +1,15 @@
cExtensions {
}
cppExtensions {
cpp
cppHeaderExtensions {
h
inc
}
cppSrcExtensions {
cpp
}
otherExtensions {
java
}

View File

@@ -18,6 +18,7 @@
#include <condition_variable>
#include <memory>
#include <utility>
#include "priority_mutex.h"

View File

@@ -7,12 +7,12 @@
#include "HAL/Accelerometer.h"
#include <stdint.h>
#include <cassert>
#include <cstdio>
#include <memory>
#include <stdint.h>
#include "ChipObject.h"
#include "HAL/HAL.h"

View File

@@ -9,6 +9,8 @@
#include <stdint.h>
#include <memory>
#include "ChipObject.h"
#include "HAL/Ports.h"
#include "HAL/cpp/priority_mutex.h"

View File

@@ -9,6 +9,8 @@
#include <stdint.h>
#include <memory>
#include "ChipObject.h"
#include "HAL/AnalogTrigger.h"
#include "HAL/Ports.h"

View File

@@ -5,13 +5,12 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "HAL/HAL.h"
#include <cstdlib>
#include <cstring>
#include <limits>
#include "FRC_NetworkCommunication/FRCComm.h"
#include "HAL/HAL.h"
#include "HAL/cpp/priority_condition_variable.h"
#include "HAL/cpp/priority_mutex.h"

View File

@@ -7,12 +7,14 @@
#pragma once
#include "simulation/gz_msgs/msgs.h"
#include <string>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/transport/transport.hh>
#include "simulation/gz_msgs/msgs.h"
using namespace gazebo;
/**

View File

@@ -7,12 +7,14 @@
#pragma once
#include "simulation/gz_msgs/msgs.h"
#include <string>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/transport/transport.hh>
#include "simulation/gz_msgs/msgs.h"
using namespace gazebo;
/**

View File

@@ -7,12 +7,14 @@
#pragma once
#include "simulation/gz_msgs/msgs.h"
#include <string>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/transport/transport.hh>
#include "simulation/gz_msgs/msgs.h"
using namespace gazebo;
/**

View File

@@ -7,12 +7,14 @@
#pragma once
#include "simulation/gz_msgs/msgs.h"
#include <string>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/transport/transport.hh>
#include "simulation/gz_msgs/msgs.h"
using namespace gazebo;
/// \brief The axis about which to measure rotation.

View File

@@ -7,6 +7,8 @@
#include "external_limit_switch.h"
#include <string>
ExternalLimitSwitch::ExternalLimitSwitch(sdf::ElementPtr sdf) {
sensor = std::dynamic_pointer_cast<sensors::ContactSensor>(
sensors::get_sensor(sdf->Get<std::string>("sensor")));

View File

@@ -7,8 +7,6 @@
#pragma once
#include "switch.h"
#ifdef _WIN32
#include <Winsock2.h>
#endif
@@ -17,6 +15,8 @@
#include <gazebo/gazebo.hh>
#include <gazebo/sensors/sensors.hh>
#include "switch.h"
using namespace gazebo;
class ExternalLimitSwitch : public Switch {

View File

@@ -7,6 +7,8 @@
#include "internal_limit_switch.h"
#include <string>
InternalLimitSwitch::InternalLimitSwitch(physics::ModelPtr model,
sdf::ElementPtr sdf) {
joint = model->GetJoint(sdf->Get<std::string>("joint"));

View File

@@ -7,14 +7,15 @@
#pragma once
#include "switch.h"
#ifdef _WIN32
#include <Winsock2.h>
#endif
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include "switch.h"
using namespace gazebo;
class InternalLimitSwitch : public Switch {

View File

@@ -7,17 +7,17 @@
#pragma once
#include "simulation/gz_msgs/msgs.h"
#include "switch.h"
#include "external_limit_switch.h"
#include "internal_limit_switch.h"
#include <string>
#include <gazebo/gazebo.hh>
#include <gazebo/physics/physics.hh>
#include <gazebo/transport/transport.hh>
#include "external_limit_switch.h"
#include "internal_limit_switch.h"
#include "simulation/gz_msgs/msgs.h"
#include "switch.h"
using namespace gazebo;
/**

View File

@@ -9,7 +9,7 @@
class Switch {
public:
virtual ~Switch() {}
virtual ~Switch() = default;
/// \brief Returns true when the switch is triggered.
virtual bool Get() = 0;

View File

@@ -5,14 +5,14 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "pneumatic_piston.h"
#ifdef _WIN32
// Ensure that Winsock2.h is included before Windows.h, which can get
// pulled in by anybody (e.g., Boost).
#include <Winsock2.h>
#endif
#include "pneumatic_piston.h"
#include <boost/algorithm/string/replace.hpp>
#include <gazebo/physics/physics.hh>
#include <gazebo/transport/transport.hh>

View File

@@ -7,10 +7,12 @@
#pragma once
#include "simulation/gz_msgs/msgs.h"
#include <string>
#include <gazebo/gazebo.hh>
#include "simulation/gz_msgs/msgs.h"
using namespace gazebo;
/**

View File

@@ -5,14 +5,14 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "potentiometer.h"
#ifdef _WIN32
// Ensure that Winsock2.h is included before Windows.h, which can get
// pulled in by anybody (e.g., Boost).
#include <Winsock2.h>
#endif
#include "potentiometer.h"
#include <boost/algorithm/string/replace.hpp>
#include <gazebo/physics/physics.hh>
#include <gazebo/transport/transport.hh>

View File

@@ -7,10 +7,12 @@
#pragma once
#include <simulation/gz_msgs/msgs.h>
#include <string>
#include <gazebo/gazebo.hh>
#include "simulation/gz_msgs/msgs.h"
using namespace gazebo;
/**

View File

@@ -5,14 +5,14 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "rangefinder.h"
#ifdef _WIN32
// Ensure that Winsock2.h is included before Windows.h, which can get
// pulled in by anybody (e.g., Boost).
#include <Winsock2.h>
#endif
#include "rangefinder.h"
#include <boost/algorithm/string/replace.hpp>
#include <gazebo/physics/physics.hh>
#include <gazebo/sensors/sensors.hh>

View File

@@ -7,10 +7,12 @@
#pragma once
#include <simulation/gz_msgs/msgs.h>
#include <string>
#include <gazebo/gazebo.hh>
#include "simulation/gz_msgs/msgs.h"
using namespace gazebo;
/**

View File

@@ -5,14 +5,14 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "servo.h"
#ifdef _WIN32
// Ensure that Winsock2.h is included before Windows.h, which can get
// pulled in by anybody (e.g., Boost).
#include <Winsock2.h>
#endif
#include "servo.h"
#include <boost/algorithm/string/replace.hpp>
#include <gazebo/physics/physics.hh>
#include <gazebo/transport/transport.hh>

View File

@@ -7,10 +7,12 @@
#pragma once
#include "simulation/gz_msgs/msgs.h"
#include <string>
#include <gazebo/gazebo.hh>
#include "simulation/gz_msgs/msgs.h"
using namespace gazebo;
/**

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "I2C.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "LiveWindow/LiveWindowSendable.h"
#include "SPI.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "LiveWindow/LiveWindowSendable.h"
#include "SPI.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "AnalogInput.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -7,8 +7,9 @@
#pragma once
#include "GyroBase.h"
#include <memory>
#include "GyroBase.h"
#include "HAL/Types.h"
class AnalogInput;

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "HAL/Types.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -10,6 +10,7 @@
#include <stdint.h>
#include <memory>
#include <string>
#include "HAL/AnalogOutput.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -5,7 +5,10 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
#include <memory>
#include <string>
#include "AnalogInput.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -7,6 +7,8 @@
#pragma once
#include <memory>
#include "AnalogTriggerOutput.h"
#include "HAL/Types.h"
#include "SensorBase.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "LiveWindow/LiveWindowSendable.h"
#include "SensorBase.h"

View File

@@ -10,6 +10,7 @@
#include <atomic>
#include <memory>
#include <sstream>
#include <string>
#include <utility>
#include "CAN/can_proto.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "CANSpeedController.h"
#include "HAL/CanTalonSRX.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "HAL/Types.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "AnalogTrigger.h"
#include "CounterBase.h"

View File

@@ -10,6 +10,7 @@
#include <stdint.h>
#include <memory>
#include <string>
#include "DigitalSource.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "DigitalSource.h"
#include "HAL/Types.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "HAL/Types.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -9,6 +9,8 @@
#include <atomic>
#include <condition_variable>
#include <memory>
#include <string>
#include "HAL/cpp/Semaphore.h"
#include "HAL/cpp/priority_condition_variable.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "Counter.h"
#include "CounterBase.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "Counter.h"

View File

@@ -5,6 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
#include "HLUsageReporting.h"
class HardwareHLReporting : public HLUsageReportingInterface {

View File

@@ -10,6 +10,7 @@
#include <stdint.h>
#include <memory>
#include <string>
#include <vector>
#include "ErrorBase.h"

View File

@@ -9,6 +9,7 @@
#include <atomic>
#include <functional>
#include <utility>
#include "ErrorBase.h"
#include "HAL/Notifier.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "HAL/Types.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "LiveWindow/LiveWindowSendable.h"
#include "SensorBase.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <map>
#include <memory>
#include <string>
#include <vector>

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "HAL/Types.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -7,6 +7,8 @@
#pragma once
#include <string>
#include "ErrorBase.h"
/**

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "SafePWM.h"
#include "SpeedController.h"

View File

@@ -8,6 +8,7 @@
#pragma once
#include <memory>
#include <string>
#include "HAL/Types.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -10,6 +10,7 @@
#include <atomic>
#include <memory>
#include <set>
#include <string>
#include "Counter.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -9,6 +9,7 @@
#include <string>
#include <thread>
#include <vector>
#include "ErrorBase.h"
#include "HAL/cpp/priority_mutex.h"

View File

@@ -7,6 +7,8 @@
#pragma once
#include <string>
/* Constants */
#define LOG_DEBUG __FILE__, __FUNCTION__, __LINE__, DEBUG_TYPE
#define LOG_INFO __FILE__, __FUNCTION__, __LINE__, INFO_TYPE

View File

@@ -6,13 +6,14 @@
/*----------------------------------------------------------------------------*/
#include "AnalogInput.h"
#include <sstream>
#include "HAL/HAL.h"
#include "LiveWindow/LiveWindow.h"
#include "Timer.h"
#include "WPIErrors.h"
#include <sstream>
const uint8_t AnalogInput::kAccumulatorModuleNumber;
const uint32_t AnalogInput::kAccumulatorNumChannels;
const uint32_t AnalogInput::kAccumulatorChannels[] = {0, 1};

View File

@@ -6,13 +6,14 @@
/*----------------------------------------------------------------------------*/
#include "AnalogOutput.h"
#include "HAL/HAL.h"
#include "LiveWindow/LiveWindow.h"
#include "WPIErrors.h"
#include <limits>
#include <sstream>
#include "HAL/HAL.h"
#include "LiveWindow/LiveWindow.h"
#include "WPIErrors.h"
/**
* Construct an analog output on the given channel.
*

View File

@@ -7,12 +7,12 @@
#include "AnalogTrigger.h"
#include <memory>
#include "AnalogInput.h"
#include "HAL/HAL.h"
#include "WPIErrors.h"
#include <memory>
/**
* Constructor for an analog trigger given a channel number.
*

View File

@@ -7,12 +7,12 @@
#include "DigitalOutput.h"
#include "HAL/HAL.h"
#include "WPIErrors.h"
#include <limits>
#include <sstream>
#include "HAL/HAL.h"
#include "WPIErrors.h"
/**
* Create an instance of a digital output.
*

View File

@@ -6,12 +6,13 @@
/*----------------------------------------------------------------------------*/
#include "DoubleSolenoid.h"
#include <sstream>
#include "HAL/HAL.h"
#include "LiveWindow/LiveWindow.h"
#include "WPIErrors.h"
#include <sstream>
/**
* Constructor.
*

View File

@@ -7,12 +7,12 @@
#include "PWM.h"
#include <sstream>
#include "HAL/HAL.h"
#include "Utility.h"
#include "WPIErrors.h"
#include <sstream>
/**
* Allocate a PWM given a channel number.
*

View File

@@ -6,12 +6,13 @@
/*----------------------------------------------------------------------------*/
#include "PowerDistributionPanel.h"
#include <sstream>
#include "HAL/HAL.h"
#include "LiveWindow/LiveWindow.h"
#include "WPIErrors.h"
#include <sstream>
PowerDistributionPanel::PowerDistributionPanel() : PowerDistributionPanel(0) {}
/**

View File

@@ -7,13 +7,13 @@
#include "Relay.h"
#include <sstream>
#include "HAL/HAL.h"
#include "LiveWindow/LiveWindow.h"
#include "MotorSafetyHelper.h"
#include "WPIErrors.h"
#include <sstream>
/**
* Relay constructor given a channel.
*

View File

@@ -7,7 +7,9 @@
#include "RobotDrive.h"
#include <math.h>
#include <algorithm>
#include <cmath>
#include "GenericHID.h"
#include "HAL/HAL.h"
#include "Joystick.h"
@@ -15,9 +17,6 @@
#include "Utility.h"
#include "WPIErrors.h"
#undef max
#include <algorithm>
const int32_t RobotDrive::kMaxNumberOfMotors;
static auto make_shared_nodelete(SpeedController* ptr) {
@@ -223,13 +222,13 @@ void RobotDrive::Drive(float outputMagnitude, float curve) {
}
if (curve < 0) {
float value = log(-curve);
float value = std::log(-curve);
float ratio = (value - m_sensitivity) / (value + m_sensitivity);
if (ratio == 0) ratio = .0000000001;
leftOutput = outputMagnitude / ratio;
rightOutput = outputMagnitude;
} else if (curve > 0) {
float value = log(curve);
float value = std::log(curve);
float ratio = (value - m_sensitivity) / (value + m_sensitivity);
if (ratio == 0) ratio = .0000000001;
leftOutput = outputMagnitude;
@@ -557,11 +556,11 @@ void RobotDrive::MecanumDrive_Polar(float magnitude, float direction,
}
// Normalized for full power along the Cartesian axes.
magnitude = Limit(magnitude) * sqrt(2.0);
magnitude = Limit(magnitude) * std::sqrt(2.0);
// The rollers are at 45 degree angles.
double dirInRad = (direction + 45.0) * 3.14159 / 180.0;
double cosD = cos(dirInRad);
double sinD = sin(dirInRad);
double cosD = std::cos(dirInRad);
double sinD = std::sin(dirInRad);
double wheelSpeeds[kMaxNumberOfMotors];
wheelSpeeds[kFrontLeftMotor] = sinD * magnitude + rotation;
@@ -637,10 +636,10 @@ float RobotDrive::Limit(float num) {
* Normalize all wheel speeds if the magnitude of any wheel is greater than 1.0.
*/
void RobotDrive::Normalize(double* wheelSpeeds) {
double maxMagnitude = fabs(wheelSpeeds[0]);
double maxMagnitude = std::fabs(wheelSpeeds[0]);
int32_t i;
for (i = 1; i < kMaxNumberOfMotors; i++) {
double temp = fabs(wheelSpeeds[i]);
double temp = std::fabs(wheelSpeeds[i]);
if (maxMagnitude < temp) maxMagnitude = temp;
}
if (maxMagnitude > 1.0) {
@@ -654,8 +653,8 @@ void RobotDrive::Normalize(double* wheelSpeeds) {
* Rotate a vector in Cartesian space.
*/
void RobotDrive::RotateVector(double& x, double& y, double angle) {
double cosA = cos(angle * (3.14159 / 180.0));
double sinA = sin(angle * (3.14159 / 180.0));
double cosA = std::cos(angle * (3.14159 / 180.0));
double sinA = std::sin(angle * (3.14159 / 180.0));
double xOut = x * cosA - y * sinA;
double yOut = x * sinA + y * cosA;
x = xOut;

View File

@@ -6,12 +6,13 @@
/*----------------------------------------------------------------------------*/
#include "Solenoid.h"
#include <sstream>
#include "HAL/HAL.h"
#include "LiveWindow/LiveWindow.h"
#include "WPIErrors.h"
#include <sstream>
/**
* Constructor using the default PCM ID (0).
*

View File

@@ -5,19 +5,20 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include "Vision/BaeUtilities.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <cmath>
#include <cstdarg>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "Servo.h"
#include "Timer.h"
#include "Vision/BaeUtilities.h"
/** @file
* Utility functions

View File

@@ -8,6 +8,8 @@
#pragma once
#include <memory>
#include <string>
#include "SmartDashboard/Sendable.h"
class Command;

View File

@@ -5,6 +5,8 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
#include <algorithm>
template <class T>

View File

@@ -8,7 +8,9 @@
#pragma once
#include <list>
#include <string>
#include <vector>
#include "Commands/Command.h"
#include "Commands/CommandGroupEntry.h"

View File

@@ -7,13 +7,14 @@
#pragma once
#include <memory>
#include <string>
#include "Commands/Command.h"
#include "PIDController.h"
#include "PIDOutput.h"
#include "PIDSource.h"
#include <memory>
class PIDCommand : public Command, public PIDOutput, public PIDSource {
public:
PIDCommand(const std::string& name, double p, double i, double d);

View File

@@ -7,13 +7,14 @@
#pragma once
#include <memory>
#include <string>
#include "Commands/Subsystem.h"
#include "PIDController.h"
#include "PIDOutput.h"
#include "PIDSource.h"
#include <memory>
/**
* This class is designed to handle the case where there is a {@link Subsystem}
* which uses a single {@link PIDController} almost constantly (for instance,

View File

@@ -7,6 +7,8 @@
#pragma once
#include <string>
#include "Commands/Command.h"
class WaitCommand : public Command {

View File

@@ -7,6 +7,8 @@
#pragma once
#include <string>
#include "Commands/Command.h"
class WaitForChildren : public Command {

View File

@@ -7,6 +7,8 @@
#pragma once
#include <string>
#include "Commands/Command.h"
class WaitUntilCommand : public Command {

View File

@@ -7,13 +7,14 @@
#pragma once
#include <memory>
#include <string>
#include "LiveWindow/LiveWindowSendable.h"
#include "PIDSource.h"
#include "SensorBase.h"
#include "interfaces/Gyro.h"
#include <memory>
/**
* GyroBase is the common base class for Gyro implementations such as
* AnalogGyro.

View File

@@ -9,7 +9,9 @@
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "Commands/Scheduler.h"
#include "LiveWindow/LiveWindowSendable.h"
#include "tables/ITable.h"

View File

@@ -7,6 +7,8 @@
#pragma once
#include <memory>
#include "tables/ITable.h"
#include "tables/ITableListener.h"

View File

@@ -7,6 +7,11 @@
#pragma once
#include <atomic>
#include <memory>
#include <queue>
#include <string>
#include "Base.h"
#include "Controller.h"
#include "HAL/cpp/priority_mutex.h"
@@ -16,11 +21,6 @@
#include "PIDSource.h"
#include "Timer.h"
#include <memory>
#include <atomic>
#include <queue>
class PIDOutput;
/**

View File

@@ -8,10 +8,12 @@
#pragma once
#include <stdint.h>
#include <memory>
#include <vector>
#include "ErrorBase.h"
#include <memory>
#include <string>
#include <vector>
#include "ErrorBase.h"
#include "HAL/cpp/priority_mutex.h"
/**

View File

@@ -8,7 +8,9 @@
#pragma once
#include <map>
#include <memory>
#include <string>
#include "SensorBase.h"
#include "SmartDashboard/NamedSendable.h"
#include "SmartDashboard/Sendable.h"

View File

@@ -5,7 +5,12 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
#include <atomic>
#include <string>
#include <utility>
#include "HAL/HAL.h"
/**

View File

@@ -181,7 +181,7 @@ void CommandGroup::_Execute() {
m_currentCommandIndex = 0;
}
while ((unsigned)m_currentCommandIndex < m_commands.size()) {
while (static_cast<size_t>(m_currentCommandIndex) < m_commands.size()) {
if (cmd != nullptr) {
if (entry.IsTimedOut()) cmd->_Cancel();
@@ -243,7 +243,7 @@ void CommandGroup::_End() {
// Theoretically, we don't have to check this, but we do if teams override the
// IsFinished method
if (m_currentCommandIndex != -1 &&
(unsigned)m_currentCommandIndex < m_commands.size()) {
static_cast<size_t>(m_currentCommandIndex) < m_commands.size()) {
Command* cmd = m_commands[m_currentCommandIndex].m_command;
cmd->_Cancel();
cmd->Removed();
@@ -273,7 +273,7 @@ void CommandGroup::End() {}
void CommandGroup::Interrupted() {}
bool CommandGroup::IsFinished() {
return (unsigned)m_currentCommandIndex >= m_commands.size() &&
return static_cast<size_t>(m_currentCommandIndex) >= m_commands.size() &&
m_children.empty();
}
@@ -281,7 +281,7 @@ bool CommandGroup::IsInterruptible() const {
if (!Command::IsInterruptible()) return false;
if (m_currentCommandIndex != -1 &&
(unsigned)m_currentCommandIndex < m_commands.size()) {
static_cast<size_t>(m_currentCommandIndex) < m_commands.size()) {
Command* cmd = m_commands[m_currentCommandIndex].m_command;
if (!cmd->IsInterruptible()) return false;
}

View File

@@ -7,7 +7,6 @@
#include "Commands/PIDSubsystem.h"
#include "PIDController.h"
#include "float.h"
/**
* Instantiates a {@link PIDSubsystem} that will use the given p, i and d

View File

@@ -7,11 +7,11 @@
#pragma once
#include <memory>
#include "GyroBase.h"
#include "simulation/SimGyro.h"
#include <memory>
class AnalogInput;
class AnalogModule;

View File

@@ -7,13 +7,14 @@
#pragma once
#include <memory>
#include <string>
#include "LiveWindow/LiveWindowSendable.h"
#include "PIDSource.h"
#include "SensorBase.h"
#include "simulation/SimFloatInput.h"
#include <memory>
/**
* Analog input class.
*

View File

@@ -7,12 +7,13 @@
#pragma once
#include <memory>
#include <string>
#include "AnalogInput.h"
#include "LiveWindow/LiveWindowSendable.h"
#include "interfaces/Potentiometer.h"
#include <memory>
/**
* Class for reading analog potentiometers. Analog potentiometers read
* in an analog voltage that corresponds to a position. Usually the

View File

@@ -7,12 +7,13 @@
#pragma once
#include <memory>
#include <string>
#include "CounterBase.h"
#include "LiveWindow/LiveWindowSendable.h"
#include "SensorBase.h"
#include <memory>
/**
* Class for counting the number of ticks on a digital input channel.
*

View File

@@ -7,11 +7,12 @@
#pragma once
#include <memory>
#include <string>
#include "LiveWindow/LiveWindowSendable.h"
#include "simulation/SimDigitalInput.h"
#include <memory>
/**
* Class to read a digital input.
*

View File

@@ -7,12 +7,13 @@
#pragma once
#include <memory>
#include <string>
#include "LiveWindow/LiveWindowSendable.h"
#include "simulation/SimContinuousOutput.h"
#include "tables/ITableListener.h"
#include <memory>
/**
* DoubleSolenoid class for running 2 channels of high voltage Digital Output
* (PCM).

View File

@@ -7,8 +7,6 @@
#pragma once
#include "simulation/gz_msgs/msgs.h"
#ifdef _WIN32
// Ensure that Winsock2.h is included before Windows.h, which can get
// pulled in by anybody (e.g., Boost).
@@ -16,10 +14,14 @@
#endif
#include <condition_variable>
#include <gazebo/transport/transport.hh>
#include <mutex>
#include <string>
#include <gazebo/transport/transport.hh>
#include "RobotState.h"
#include "SensorBase.h"
#include "simulation/gz_msgs/msgs.h"
struct HALCommonControlData;
class AnalogInput;

View File

@@ -10,6 +10,7 @@
#include <stdint.h>
#include <memory>
#include <string>
#include "CounterBase.h"
#include "LiveWindow/LiveWindowSendable.h"

View File

@@ -7,11 +7,11 @@
#pragma once
#include <set>
#include "ErrorBase.h"
#include "HAL/cpp/priority_mutex.h"
#include <set>
class MotorSafety;
class MotorSafetyHelper : public ErrorBase {

View File

@@ -11,6 +11,7 @@
#include <functional>
#include <list>
#include <thread>
#include <utility>
#include "ErrorBase.h"
#include "HAL/cpp/priority_mutex.h"

View File

@@ -7,13 +7,14 @@
#pragma once
#include <memory>
#include <string>
#include "LiveWindow/LiveWindowSendable.h"
#include "SensorBase.h"
#include "simulation/SimContinuousOutput.h"
#include "tables/ITableListener.h"
#include <memory>
/**
* Class implements the PWM generation in the FPGA.
*

View File

@@ -7,6 +7,9 @@
#pragma once
#include <memory>
#include <string>
#include "LiveWindow/LiveWindowSendable.h"
#include "MotorSafety.h"
#include "SensorBase.h"
@@ -14,8 +17,6 @@
#include "tables/ITable.h"
#include "tables/ITableListener.h"
#include <memory>
class MotorSafetyHelper;
class DigitalModule;

View File

@@ -7,12 +7,13 @@
#pragma once
#include <memory>
#include <string>
#include "LiveWindow/LiveWindowSendable.h"
#include "simulation/SimContinuousOutput.h"
#include "tables/ITableListener.h"
#include <memory>
/**
* Solenoid class for running high voltage Digital Output (PCM).
*

View File

@@ -7,8 +7,11 @@
#pragma once
#include <string>
#include <gazebo/gazebo_client.hh>
#include <gazebo/transport/transport.hh>
#include "simulation/gz_msgs/msgs.h"
using namespace gazebo;

Some files were not shown because too many files have changed in this diff Show More