mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Reordered headers according to the style guide (#58)
Subsections are alphabetized according to lexographic ordering. Also, HAL includes were moved from headers to source files where possible. This change may cause user code which uses HAL functionality and does not include the relevant HAL header (since it may have been provided by another WPILib header) to fail to compile.
This commit is contained in:
committed by
Peter Johnson
parent
a598e2d09b
commit
d82635bbe1
@@ -5,14 +5,15 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <AnalogInput.h>
|
||||
#include <AnalogOutput.h>
|
||||
#include <AnalogTrigger.h>
|
||||
#include <Counter.h>
|
||||
#include <Timer.h>
|
||||
#include "TestBench.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "AnalogInput.h"
|
||||
#include "AnalogOutput.h"
|
||||
#include "AnalogTrigger.h"
|
||||
#include "Counter.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
|
||||
static const double kDelayTime = 0.01;
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,13 +5,15 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <AnalogOutput.h>
|
||||
#include <AnalogPotentiometer.h>
|
||||
#include <ControllerPower.h>
|
||||
#include <Timer.h>
|
||||
#include "TestBench.h"
|
||||
#include "AnalogPotentiometer.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "AnalogOutput.h"
|
||||
#include "ControllerPower.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
|
||||
static const double kScale = 270.0;
|
||||
static const double kAngle = 180.0;
|
||||
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <BuiltInAccelerometer.h>
|
||||
#include <Timer.h>
|
||||
#include "BuiltInAccelerometer.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Timer.h"
|
||||
|
||||
static constexpr double kAccelerationTolerance = 0.1;
|
||||
/**
|
||||
* There's not much we can automatically test with the on-board accelerometer,
|
||||
|
||||
@@ -5,15 +5,17 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <AnalogOutput.h>
|
||||
#include <CANJaguar.h>
|
||||
#include <DigitalOutput.h>
|
||||
#include <Relay.h>
|
||||
#include <Timer.h>
|
||||
#include <WPIErrors.h>
|
||||
#include "TestBench.h"
|
||||
#include "CANJaguar.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "AnalogOutput.h"
|
||||
#include "DigitalOutput.h"
|
||||
#include "Relay.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
#include "WPIErrors.h"
|
||||
|
||||
static constexpr double kSpikeTime = 0.5;
|
||||
|
||||
static constexpr double kExpectedBusVoltage = 14.0;
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <CANTalon.h>
|
||||
#include <Timer.h>
|
||||
#include "TestBench.h"
|
||||
#include "CANTalon.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
|
||||
const int deviceId = 0;
|
||||
|
||||
TEST(CANTalonTest, QuickTest) {
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <CircularBuffer.h>
|
||||
#include <array>
|
||||
#include "CircularBuffer.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
static const std::array<double, 10> values = {
|
||||
751.848, 766.366, 342.657, 234.252, 716.126,
|
||||
132.344, 445.697, 22.727, 421.125, 799.913};
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "TestBench.h"
|
||||
|
||||
#include "HAL/cpp/priority_condition_variable.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "HAL/cpp/priority_condition_variable.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
#include "TestBench.h"
|
||||
|
||||
namespace wpilib {
|
||||
namespace testing {
|
||||
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <Counter.h>
|
||||
#include <Jaguar.h>
|
||||
#include <Talon.h>
|
||||
#include <Timer.h>
|
||||
#include <Victor.h>
|
||||
#include "TestBench.h"
|
||||
#include "Counter.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Jaguar.h"
|
||||
#include "Talon.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
#include "Victor.h"
|
||||
|
||||
static const double kMotorDelay = 2.5;
|
||||
|
||||
static const double kMaxPeriod = 2.0;
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <Counter.h>
|
||||
#include <DigitalInput.h>
|
||||
#include <DigitalOutput.h>
|
||||
#include <InterruptableSensorBase.h>
|
||||
#include <Timer.h>
|
||||
#include "TestBench.h"
|
||||
#include "DigitalInput.h"
|
||||
#include "DigitalOutput.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Counter.h"
|
||||
#include "InterruptableSensorBase.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
|
||||
static const double kCounterTime = 0.001;
|
||||
|
||||
static const double kDelayTime = 0.1;
|
||||
|
||||
@@ -5,12 +5,14 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <Counter.h>
|
||||
#include <DigitalGlitchFilter.h>
|
||||
#include <DigitalInput.h>
|
||||
#include <Encoder.h>
|
||||
#include "DigitalGlitchFilter.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Counter.h"
|
||||
#include "DigitalInput.h"
|
||||
#include "Encoder.h"
|
||||
|
||||
/**
|
||||
* Tests that configuring inputs to be filtered succeeds.
|
||||
*
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <AnalogOutput.h>
|
||||
#include <AnalogTrigger.h>
|
||||
#include <DigitalOutput.h>
|
||||
#include <Encoder.h>
|
||||
#include <Timer.h>
|
||||
#include "TestBench.h"
|
||||
#include "Encoder.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "AnalogOutput.h"
|
||||
#include "AnalogTrigger.h"
|
||||
#include "DigitalOutput.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
|
||||
static const double kDelayTime = 0.001;
|
||||
|
||||
class FakeEncoderTest : public testing::Test {
|
||||
|
||||
@@ -5,17 +5,18 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <cmath>
|
||||
#include "Filters/LinearDigitalFilter.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <random>
|
||||
#include <thread>
|
||||
|
||||
#include <Filters/LinearDigitalFilter.h>
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Base.h"
|
||||
#include "TestBench.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
enum FilterNoiseTestType { TEST_SINGLE_POLE_IIR, TEST_MOVAVG };
|
||||
|
||||
|
||||
@@ -5,17 +5,18 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <cmath>
|
||||
#include "Filters/LinearDigitalFilter.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <random>
|
||||
#include <thread>
|
||||
|
||||
#include <Filters/LinearDigitalFilter.h>
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Base.h"
|
||||
#include "TestBench.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
enum FilterOutputTestType { TEST_SINGLE_POLE_IIR, TEST_HIGH_PASS, TEST_MOVAVG };
|
||||
|
||||
|
||||
@@ -5,15 +5,16 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <Encoder.h>
|
||||
#include <Jaguar.h>
|
||||
#include <PIDController.h>
|
||||
#include <Talon.h>
|
||||
#include <Timer.h>
|
||||
#include <Victor.h>
|
||||
#include "TestBench.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Encoder.h"
|
||||
#include "Jaguar.h"
|
||||
#include "PIDController.h"
|
||||
#include "Talon.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
#include "Victor.h"
|
||||
|
||||
enum MotorEncoderTestType { TEST_VICTOR, TEST_JAGUAR, TEST_TALON };
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, MotorEncoderTestType const& type) {
|
||||
|
||||
@@ -5,14 +5,15 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <Encoder.h>
|
||||
#include <Jaguar.h>
|
||||
#include <Talon.h>
|
||||
#include <Timer.h>
|
||||
#include <Victor.h>
|
||||
#include "TestBench.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Encoder.h"
|
||||
#include "Jaguar.h"
|
||||
#include "Talon.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
#include "Victor.h"
|
||||
|
||||
enum MotorInvertingTestType { TEST_VICTOR, TEST_JAGUAR, TEST_TALON };
|
||||
static const double motorSpeed = 0.15;
|
||||
static const double delayTime = 0.5;
|
||||
|
||||
@@ -6,13 +6,15 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
#include "TestBench.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
#include <thread>
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "TestBench.h"
|
||||
|
||||
namespace wpilib {
|
||||
namespace testing {
|
||||
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <Notifier.h>
|
||||
#include <Timer.h>
|
||||
#include "TestBench.h"
|
||||
#include "Notifier.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
|
||||
unsigned notifierCounter;
|
||||
|
||||
void notifierHandler(void*) { notifierCounter++; }
|
||||
|
||||
@@ -5,16 +5,17 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <AnalogInput.h>
|
||||
#include <Compressor.h>
|
||||
#include <DigitalInput.h>
|
||||
#include <DigitalOutput.h>
|
||||
#include <DoubleSolenoid.h>
|
||||
#include <Solenoid.h>
|
||||
#include <Timer.h>
|
||||
#include "TestBench.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "AnalogInput.h"
|
||||
#include "Compressor.h"
|
||||
#include "DigitalInput.h"
|
||||
#include "DigitalOutput.h"
|
||||
#include "DoubleSolenoid.h"
|
||||
#include "Solenoid.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
|
||||
/* The PCM switches the compressor up to a couple seconds after the pressure
|
||||
switch changes. */
|
||||
static const double kCompressorDelayTime = 3.0;
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <Timer.h>
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "PIDController.h"
|
||||
#include "PIDOutput.h"
|
||||
#include "PIDSource.h"
|
||||
#include "TestBench.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "Timer.h"
|
||||
|
||||
class PIDToleranceTest : public testing::Test {
|
||||
protected:
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <Jaguar.h>
|
||||
#include <PowerDistributionPanel.h>
|
||||
#include <Talon.h>
|
||||
#include <Timer.h>
|
||||
#include <Victor.h>
|
||||
#include "TestBench.h"
|
||||
#include "PowerDistributionPanel.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Jaguar.h"
|
||||
#include "Talon.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
#include "Victor.h"
|
||||
|
||||
static const double kMotorTime = 0.25;
|
||||
|
||||
class PowerDistributionPanelTest : public testing::Test {
|
||||
|
||||
@@ -5,12 +5,15 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <Preferences.h>
|
||||
#include <Timer.h>
|
||||
#include <cstdio>
|
||||
#include "Preferences.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fstream>
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Timer.h"
|
||||
|
||||
static const char* kFileName = "networktables.ini";
|
||||
static const double kSaveTime = 1.2;
|
||||
|
||||
|
||||
@@ -6,12 +6,13 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "Relay.h"
|
||||
#include <DigitalInput.h>
|
||||
#include <Relay.h>
|
||||
#include <Timer.h>
|
||||
#include "TestBench.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "DigitalInput.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
|
||||
static const double kDelayTime = 0.01;
|
||||
|
||||
class RelayTest : public testing::Test {
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <DriverStation.h>
|
||||
#include <LiveWindow/LiveWindow.h>
|
||||
#include <Timer.h>
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "DriverStation.h"
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
#include "Timer.h"
|
||||
|
||||
class TestEnvironment : public testing::Environment {
|
||||
bool m_alreadySetUp = false;
|
||||
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <ADXL345_SPI.h>
|
||||
#include <AnalogGyro.h>
|
||||
#include <Servo.h>
|
||||
#include <Timer.h>
|
||||
#include "TestBench.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "ADXL345_SPI.h"
|
||||
#include "AnalogGyro.h"
|
||||
#include "Servo.h"
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
|
||||
static constexpr double kServoResetTime = 2.0;
|
||||
|
||||
static constexpr double kTestAngle = 90.0;
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <Timer.h>
|
||||
#include "TestBench.h"
|
||||
#include "Timer.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "TestBench.h"
|
||||
|
||||
static const double kWaitTime = 0.5;
|
||||
|
||||
class TimerTest : public testing::Test {
|
||||
|
||||
@@ -5,15 +5,16 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <Commands/CommandGroup.h>
|
||||
#include <Commands/Scheduler.h>
|
||||
#include <Commands/Subsystem.h>
|
||||
#include <DriverStation.h>
|
||||
#include <RobotState.h>
|
||||
#include <Timer.h>
|
||||
#include "command/MockCommand.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "Commands/CommandGroup.h"
|
||||
#include "Commands/Scheduler.h"
|
||||
#include "Commands/Subsystem.h"
|
||||
#include "DriverStation.h"
|
||||
#include "RobotState.h"
|
||||
#include "Timer.h"
|
||||
#include "command/MockCommand.h"
|
||||
|
||||
class CommandTest : public testing::Test {
|
||||
protected:
|
||||
virtual void SetUp() override {
|
||||
|
||||
Reference in New Issue
Block a user