diff --git a/hal/include/HAL/AnalogAccumulator.h b/hal/include/HAL/AnalogAccumulator.h index 0a1edd5e0a..06de2bdce9 100644 --- a/hal/include/HAL/AnalogAccumulator.h +++ b/hal/include/HAL/AnalogAccumulator.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include extern "C" { diff --git a/hal/include/HAL/AnalogInput.h b/hal/include/HAL/AnalogInput.h index fdd0aa5698..53f43143a4 100644 --- a/hal/include/HAL/AnalogInput.h +++ b/hal/include/HAL/AnalogInput.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include extern "C" { diff --git a/hal/include/HAL/AnalogOutput.h b/hal/include/HAL/AnalogOutput.h index 203e1d9c0f..c86d27ee85 100644 --- a/hal/include/HAL/AnalogOutput.h +++ b/hal/include/HAL/AnalogOutput.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include extern "C" { diff --git a/hal/include/HAL/AnalogTrigger.h b/hal/include/HAL/AnalogTrigger.h index 1500121fb5..63446d88c3 100644 --- a/hal/include/HAL/AnalogTrigger.h +++ b/hal/include/HAL/AnalogTrigger.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include enum AnalogTriggerType { diff --git a/hal/include/HAL/CAN.h b/hal/include/HAL/CAN.h index 26e36a06e4..61c56d2f9a 100644 --- a/hal/include/HAL/CAN.h +++ b/hal/include/HAL/CAN.h @@ -8,6 +8,7 @@ #pragma once #include + #include "FRC_NetworkCommunication/CANSessionMux.h" void canTxSend(uint32_t arbID, uint8_t length, diff --git a/hal/include/HAL/Counter.h b/hal/include/HAL/Counter.h index 620d4be685..65d86b1e34 100644 --- a/hal/include/HAL/Counter.h +++ b/hal/include/HAL/Counter.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include enum Mode { diff --git a/hal/include/HAL/DIO.h b/hal/include/HAL/DIO.h index 56649f078d..a904c0dcb7 100644 --- a/hal/include/HAL/DIO.h +++ b/hal/include/HAL/DIO.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include extern "C" { diff --git a/hal/include/HAL/Encoder.h b/hal/include/HAL/Encoder.h index 50e872d77c..1dd46fa2ee 100644 --- a/hal/include/HAL/Encoder.h +++ b/hal/include/HAL/Encoder.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include extern "C" { diff --git a/hal/include/HAL/HAL.h b/hal/include/HAL/HAL.h index 8f167834ca..3de7646e25 100644 --- a/hal/include/HAL/HAL.h +++ b/hal/include/HAL/HAL.h @@ -7,8 +7,8 @@ #pragma once +#include #include -#include #include "Accelerometer.h" #include "AnalogAccumulator.h" @@ -29,10 +29,9 @@ #include "Relay.h" #include "SPI.h" #include "SPIAccumulator.h" +#include "Semaphore.h" #include "SerialPort.h" #include "Solenoid.h" - -#include "Semaphore.h" #include "Task.h" #include "Utilities.h" diff --git a/hal/include/HAL/I2C.h b/hal/include/HAL/I2C.h index 9058243925..4b56eac915 100644 --- a/hal/include/HAL/I2C.h +++ b/hal/include/HAL/I2C.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include extern "C" { diff --git a/hal/include/HAL/Interrupts.h b/hal/include/HAL/Interrupts.h index b5c559cc5d..4271e8d5c6 100644 --- a/hal/include/HAL/Interrupts.h +++ b/hal/include/HAL/Interrupts.h @@ -7,10 +7,10 @@ #pragma once +#include #include #include -#include "errno.h" extern "C" { typedef void (*InterruptHandlerFunction)(uint32_t interruptAssertedMask, diff --git a/hal/include/HAL/PWM.h b/hal/include/HAL/PWM.h index 3accb1f7c6..fb75cb8d65 100644 --- a/hal/include/HAL/PWM.h +++ b/hal/include/HAL/PWM.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include extern "C" { diff --git a/hal/include/HAL/Relay.h b/hal/include/HAL/Relay.h index 183b0685c9..eda5ece608 100644 --- a/hal/include/HAL/Relay.h +++ b/hal/include/HAL/Relay.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include extern "C" { diff --git a/hal/include/HAL/SPI.h b/hal/include/HAL/SPI.h index f1c74c24b9..d7f155580f 100644 --- a/hal/include/HAL/SPI.h +++ b/hal/include/HAL/SPI.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include #include "HAL/cpp/priority_mutex.h" diff --git a/hal/include/HAL/SPIAccumulator.h b/hal/include/HAL/SPIAccumulator.h index 889157881d..1e31c403b8 100644 --- a/hal/include/HAL/SPIAccumulator.h +++ b/hal/include/HAL/SPIAccumulator.h @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #pragma once + #include extern "C" { diff --git a/hal/include/HAL/cpp/Resource.h b/hal/include/HAL/cpp/Resource.h index 9cca6a0afb..1a585948f5 100644 --- a/hal/include/HAL/cpp/Resource.h +++ b/hal/include/HAL/cpp/Resource.h @@ -8,11 +8,12 @@ #pragma once #include -#include "../Errors.h" -#include "HAL/cpp/priority_mutex.h" #include +#include "../Errors.h" +#include "HAL/cpp/priority_mutex.h" + // TODO: Replace this with something appropriate to avoid conflicts with // wpilibC++ Resource class (which performs an essentially identical function). namespace hal { diff --git a/hal/include/HAL/cpp/Semaphore.h b/hal/include/HAL/cpp/Semaphore.h index 336d4927d6..82af7cc5d6 100644 --- a/hal/include/HAL/cpp/Semaphore.h +++ b/hal/include/HAL/cpp/Semaphore.h @@ -7,8 +7,9 @@ #pragma once +#include + #include -#include #include "HAL/cpp/priority_mutex.h" diff --git a/hal/include/HAL/cpp/priority_condition_variable.h b/hal/include/HAL/cpp/priority_condition_variable.h index cfcd023b4f..1fc0eea6ef 100644 --- a/hal/include/HAL/cpp/priority_condition_variable.h +++ b/hal/include/HAL/cpp/priority_condition_variable.h @@ -18,6 +18,7 @@ #include #include + #include "priority_mutex.h" class priority_condition_variable { diff --git a/hal/lib/athena/Accelerometer.cpp b/hal/lib/athena/Accelerometer.cpp index d2b5e898f1..f4cca4bd5e 100644 --- a/hal/lib/athena/Accelerometer.cpp +++ b/hal/lib/athena/Accelerometer.cpp @@ -10,6 +10,7 @@ #include #include #include + #include "ChipObject.h" // The 7-bit I2C address with a 0 "send" bit diff --git a/hal/lib/athena/Compressor.cpp b/hal/lib/athena/Compressor.cpp index e462a317cb..fdcb650bdf 100644 --- a/hal/lib/athena/Compressor.cpp +++ b/hal/lib/athena/Compressor.cpp @@ -6,7 +6,9 @@ /*----------------------------------------------------------------------------*/ #include "HAL/Compressor.h" + #include + #include "ctre/PCM.h" static const int NUM_MODULE_NUMBERS = 63; diff --git a/hal/lib/athena/Digital.cpp b/hal/lib/athena/Digital.cpp index 7097a61164..781a0f3726 100644 --- a/hal/lib/athena/Digital.cpp +++ b/hal/lib/athena/Digital.cpp @@ -5,22 +5,23 @@ /* the project. */ /*----------------------------------------------------------------------------*/ +#include +#include + +#include + +#include "ChipObject.h" +#include "FRC_NetworkCommunication/LoadOut.h" #include "HAL/Counter.h" #include "HAL/DIO.h" #include "HAL/Encoder.h" +#include "HAL/HAL.h" #include "HAL/I2C.h" #include "HAL/PWM.h" +#include "HAL/Port.h" #include "HAL/Relay.h" #include "HAL/SPI.h" #include "HAL/SPIAccumulator.h" - -#include -#include -#include -#include "ChipObject.h" -#include "FRC_NetworkCommunication/LoadOut.h" -#include "HAL/HAL.h" -#include "HAL/Port.h" #include "HAL/cpp/Resource.h" #include "HAL/cpp/priority_mutex.h" #include "i2clib/i2c-lib.h" diff --git a/hal/lib/athena/HALAthena.cpp b/hal/lib/athena/HALAthena.cpp index bcd289c627..d8c6679212 100644 --- a/hal/lib/athena/HALAthena.cpp +++ b/hal/lib/athena/HALAthena.cpp @@ -8,12 +8,14 @@ #include "HAL/HAL.h" #include // linux for kill +#include #include #include -#include + #include #include #include + #include "ChipObject.h" #include "FRC_NetworkCommunication/CANSessionMux.h" #include "FRC_NetworkCommunication/FRCComm.h" @@ -23,6 +25,7 @@ #include "HAL/Port.h" #include "ctre/ctre.h" #include "visa/visa.h" + const uint32_t solenoid_kNumDO7_0Elements = 8; const uint32_t dio_kNumSystems = tDIO::kNumSystems; const uint32_t interrupt_kNumSystems = tInterrupt::kNumSystems; diff --git a/hal/lib/athena/Interrupts.cpp b/hal/lib/athena/Interrupts.cpp index 274a3418e1..c308a92e3e 100644 --- a/hal/lib/athena/Interrupts.cpp +++ b/hal/lib/athena/Interrupts.cpp @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #include "HAL/Interrupts.h" + #include "ChipObject.h" extern void remapDigitalSource(bool analogTrigger, uint32_t& pin, diff --git a/hal/lib/athena/Notifier.cpp b/hal/lib/athena/Notifier.cpp index 29dfb2d426..686f9b388a 100644 --- a/hal/lib/athena/Notifier.cpp +++ b/hal/lib/athena/Notifier.cpp @@ -6,9 +6,12 @@ /*----------------------------------------------------------------------------*/ #include "HAL/Notifier.h" + +#include + #include -#include #include + #include "ChipObject.h" #include "HAL/HAL.h" #include "HAL/cpp/priority_mutex.h" diff --git a/hal/lib/athena/PDP.cpp b/hal/lib/athena/PDP.cpp index e043018948..7dfd91b0c3 100644 --- a/hal/lib/athena/PDP.cpp +++ b/hal/lib/athena/PDP.cpp @@ -6,8 +6,8 @@ /*----------------------------------------------------------------------------*/ #include "HAL/PDP.h" + #include "ctre/PDP.h" -// static PDP pdp; static const int NUM_MODULE_NUMBERS = 63; diff --git a/hal/lib/athena/Power.cpp b/hal/lib/athena/Power.cpp index 571c5d3625..f2e09c7021 100644 --- a/hal/lib/athena/Power.cpp +++ b/hal/lib/athena/Power.cpp @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #include "HAL/Power.h" + #include "ChipObject.h" static tPower* power = NULL; diff --git a/hal/lib/athena/SerialPort.cpp b/hal/lib/athena/SerialPort.cpp index 0e3dea3826..9cb9a5af07 100644 --- a/hal/lib/athena/SerialPort.cpp +++ b/hal/lib/athena/SerialPort.cpp @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #include "HAL/SerialPort.h" + #include "visa/visa.h" static uint32_t m_resourceManagerHandle; diff --git a/hal/lib/athena/Task.cpp b/hal/lib/athena/Task.cpp index e34ee35af2..82f34cdb4a 100644 --- a/hal/lib/athena/Task.cpp +++ b/hal/lib/athena/Task.cpp @@ -7,6 +7,8 @@ #include "HAL/Task.h" +#include + #ifndef OK #define OK 0 #endif /* OK */ @@ -14,8 +16,6 @@ #define ERROR (-1) #endif /* ERROR */ -#include - extern "C" { STATUS verifyTaskID(TASK task) { diff --git a/hal/lib/athena/Utilities.cpp b/hal/lib/athena/Utilities.cpp index 189c2ce4d2..59bae55559 100644 --- a/hal/lib/athena/Utilities.cpp +++ b/hal/lib/athena/Utilities.cpp @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #include "HAL/Utilities.h" + #include const int32_t HAL_NO_WAIT = 0; diff --git a/hal/lib/athena/cpp/Resource.cpp b/hal/lib/athena/cpp/Resource.cpp index 8a2d0ecd0b..25fb93e53c 100644 --- a/hal/lib/athena/cpp/Resource.cpp +++ b/hal/lib/athena/cpp/Resource.cpp @@ -6,7 +6,9 @@ /*----------------------------------------------------------------------------*/ #include "HAL/cpp/Resource.h" -#include + +#include + #include "HAL/Errors.h" #include "HAL/cpp/priority_mutex.h" diff --git a/hal/lib/shared/HAL.cpp b/hal/lib/shared/HAL.cpp index 8ab8dd8fb8..74440e7d14 100644 --- a/hal/lib/shared/HAL.cpp +++ b/hal/lib/shared/HAL.cpp @@ -5,11 +5,10 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -// This file must compile on ALL PLATFORMS. Be very careful what you put in -// here. - #include "HAL/HAL.h" + #include + #include "FRC_NetworkCommunication/FRCComm.h" struct HALJoystickAxesInt { diff --git a/wpilibc/athena/include/ADXL345_I2C.h b/wpilibc/athena/include/ADXL345_I2C.h index 175196bc70..d57e6bfc28 100644 --- a/wpilibc/athena/include/ADXL345_I2C.h +++ b/wpilibc/athena/include/ADXL345_I2C.h @@ -8,6 +8,7 @@ #pragma once #include + #include "I2C.h" #include "LiveWindow/LiveWindowSendable.h" #include "interfaces/Accelerometer.h" diff --git a/wpilibc/athena/include/ADXL345_SPI.h b/wpilibc/athena/include/ADXL345_SPI.h index 24df32e4f1..5c4e29fb96 100644 --- a/wpilibc/athena/include/ADXL345_SPI.h +++ b/wpilibc/athena/include/ADXL345_SPI.h @@ -7,13 +7,13 @@ #pragma once +#include + #include "LiveWindow/LiveWindowSendable.h" #include "SPI.h" #include "SensorBase.h" #include "interfaces/Accelerometer.h" -#include - class DigitalInput; class DigitalOutput; diff --git a/wpilibc/athena/include/ADXL362.h b/wpilibc/athena/include/ADXL362.h index 7266278ef3..66f1e5d95d 100644 --- a/wpilibc/athena/include/ADXL362.h +++ b/wpilibc/athena/include/ADXL362.h @@ -7,13 +7,13 @@ #pragma once +#include + #include "LiveWindow/LiveWindowSendable.h" #include "SPI.h" #include "SensorBase.h" #include "interfaces/Accelerometer.h" -#include - class DigitalInput; class DigitalOutput; diff --git a/wpilibc/athena/include/ADXRS450_Gyro.h b/wpilibc/athena/include/ADXRS450_Gyro.h index 36daaa75d8..94222dc278 100644 --- a/wpilibc/athena/include/ADXRS450_Gyro.h +++ b/wpilibc/athena/include/ADXRS450_Gyro.h @@ -7,13 +7,13 @@ #pragma once +#include + #include "GyroBase.h" #include "HAL/cpp/priority_mutex.h" #include "Notifier.h" #include "SPI.h" -#include - /** * Use a rate gyro to return the robots heading relative to a starting position. * The Gyro class tracks the robots heading based on the starting position. As diff --git a/wpilibc/athena/include/AnalogAccelerometer.h b/wpilibc/athena/include/AnalogAccelerometer.h index faa3c3a56b..a93407ebe8 100644 --- a/wpilibc/athena/include/AnalogAccelerometer.h +++ b/wpilibc/athena/include/AnalogAccelerometer.h @@ -7,13 +7,13 @@ #pragma once +#include + #include "AnalogInput.h" #include "LiveWindow/LiveWindowSendable.h" #include "PIDSource.h" #include "SensorBase.h" -#include - /** * Handle operation of an analog accelerometer. * The accelerometer reads acceleration directly through the sensor. Many diff --git a/wpilibc/athena/include/AnalogInput.h b/wpilibc/athena/include/AnalogInput.h index 56b957d412..699c4cdf10 100644 --- a/wpilibc/athena/include/AnalogInput.h +++ b/wpilibc/athena/include/AnalogInput.h @@ -7,13 +7,12 @@ #pragma once -#include "HAL/HAL.h" +#include + #include "LiveWindow/LiveWindowSendable.h" #include "PIDSource.h" #include "SensorBase.h" -#include - /** * Analog input class. * diff --git a/wpilibc/athena/include/AnalogOutput.h b/wpilibc/athena/include/AnalogOutput.h index affbe463b1..ff8861b953 100644 --- a/wpilibc/athena/include/AnalogOutput.h +++ b/wpilibc/athena/include/AnalogOutput.h @@ -7,9 +7,10 @@ #pragma once -#include +#include + #include -#include "HAL/HAL.h" + #include "LiveWindow/LiveWindowSendable.h" #include "SensorBase.h" diff --git a/wpilibc/athena/include/AnalogPotentiometer.h b/wpilibc/athena/include/AnalogPotentiometer.h index 4c9a98b9c2..8b5bfd1c09 100644 --- a/wpilibc/athena/include/AnalogPotentiometer.h +++ b/wpilibc/athena/include/AnalogPotentiometer.h @@ -5,12 +5,12 @@ /* the project. */ /*----------------------------------------------------------------------------*/ +#include + #include "AnalogInput.h" #include "LiveWindow/LiveWindowSendable.h" #include "interfaces/Potentiometer.h" -#include - /** * Class for reading analog potentiometers. Analog potentiometers read * in an analog voltage that corresponds to a position. The position is diff --git a/wpilibc/athena/include/AnalogTrigger.h b/wpilibc/athena/include/AnalogTrigger.h index ff28985bb1..178b77810a 100644 --- a/wpilibc/athena/include/AnalogTrigger.h +++ b/wpilibc/athena/include/AnalogTrigger.h @@ -8,7 +8,6 @@ #pragma once #include "AnalogTriggerOutput.h" -#include "HAL/HAL.h" #include "SensorBase.h" class AnalogInput; diff --git a/wpilibc/athena/include/AnalogTriggerOutput.h b/wpilibc/athena/include/AnalogTriggerOutput.h index c9a9916dfe..024e3c84eb 100644 --- a/wpilibc/athena/include/AnalogTriggerOutput.h +++ b/wpilibc/athena/include/AnalogTriggerOutput.h @@ -8,6 +8,7 @@ #pragma once #include "DigitalSource.h" +#include "HAL/AnalogTrigger.h" class AnalogTrigger; diff --git a/wpilibc/athena/include/BuiltInAccelerometer.h b/wpilibc/athena/include/BuiltInAccelerometer.h index a652cbf01c..53bb7aaec3 100644 --- a/wpilibc/athena/include/BuiltInAccelerometer.h +++ b/wpilibc/athena/include/BuiltInAccelerometer.h @@ -7,12 +7,12 @@ #pragma once +#include + #include "LiveWindow/LiveWindowSendable.h" #include "SensorBase.h" #include "interfaces/Accelerometer.h" -#include - /** * Built-in accelerometer. * diff --git a/wpilibc/athena/include/CANJaguar.h b/wpilibc/athena/include/CANJaguar.h index b6ffa3cace..7ac25ce301 100644 --- a/wpilibc/athena/include/CANJaguar.h +++ b/wpilibc/athena/include/CANJaguar.h @@ -7,11 +7,16 @@ #pragma once +#include +#include +#include +#include + #include "CAN/can_proto.h" #include "CANSpeedController.h" #include "ErrorBase.h" -#include "HAL/HAL.h" #include "HAL/cpp/Semaphore.h" +#include "HAL/cpp/priority_mutex.h" #include "LiveWindow/LiveWindowSendable.h" #include "MotorSafety.h" #include "MotorSafetyHelper.h" @@ -20,12 +25,6 @@ #include "Resource.h" #include "tables/ITableListener.h" -#include -#include -#include -#include -#include "HAL/cpp/priority_mutex.h" - /** * Luminary Micro / Vex Robotics Jaguar Speed Control */ diff --git a/wpilibc/athena/include/CANTalon.h b/wpilibc/athena/include/CANTalon.h index b831595503..deebcf49d0 100644 --- a/wpilibc/athena/include/CANTalon.h +++ b/wpilibc/athena/include/CANTalon.h @@ -7,6 +7,8 @@ #pragma once +#include + #include "CANSpeedController.h" #include "HAL/CanTalonSRX.h" #include "LiveWindow/LiveWindowSendable.h" @@ -17,8 +19,6 @@ #include "SafePWM.h" #include "tables/ITable.h" -#include - /** * CTRE Talon SRX Speed Controller with CAN Control */ diff --git a/wpilibc/athena/include/CameraServer.h b/wpilibc/athena/include/CameraServer.h index c9a4869a71..ba47937809 100644 --- a/wpilibc/athena/include/CameraServer.h +++ b/wpilibc/athena/include/CameraServer.h @@ -7,17 +7,17 @@ #pragma once -#include "ErrorBase.h" -#include "NIIMAQdx.h" -#include "USBCamera.h" -#include "nivision.h" - #include #include #include #include #include + +#include "ErrorBase.h" #include "HAL/cpp/priority_mutex.h" +#include "NIIMAQdx.h" +#include "USBCamera.h" +#include "nivision.h" class CameraServer : public ErrorBase { private: diff --git a/wpilibc/athena/include/Compressor.h b/wpilibc/athena/include/Compressor.h index 7e7db8610b..2c9527501e 100644 --- a/wpilibc/athena/include/Compressor.h +++ b/wpilibc/athena/include/Compressor.h @@ -8,13 +8,12 @@ #ifndef Compressor_H_ #define Compressor_H_ -#include "HAL/HAL.h" +#include + #include "LiveWindow/LiveWindowSendable.h" #include "SensorBase.h" #include "tables/ITableListener.h" -#include - /** * PCM compressor */ diff --git a/wpilibc/athena/include/Counter.h b/wpilibc/athena/include/Counter.h index aea6f852ba..54a4a06d5b 100644 --- a/wpilibc/athena/include/Counter.h +++ b/wpilibc/athena/include/Counter.h @@ -7,14 +7,14 @@ #pragma once -#include "AnalogTriggerOutput.h" +#include + +#include "AnalogTrigger.h" #include "CounterBase.h" -#include "HAL/HAL.h" +#include "HAL/Counter.h" #include "LiveWindow/LiveWindowSendable.h" #include "SensorBase.h" -#include - class DigitalGlitchFilter; /** diff --git a/wpilibc/athena/include/DigitalInput.h b/wpilibc/athena/include/DigitalInput.h index 81f7cbc5c8..9e90242ce7 100644 --- a/wpilibc/athena/include/DigitalInput.h +++ b/wpilibc/athena/include/DigitalInput.h @@ -7,12 +7,13 @@ #pragma once +#include + +#include + #include "DigitalSource.h" #include "LiveWindow/LiveWindowSendable.h" -#include -#include - class DigitalGlitchFilter; /** diff --git a/wpilibc/athena/include/DigitalOutput.h b/wpilibc/athena/include/DigitalOutput.h index 4b6d3493e4..82863477d7 100644 --- a/wpilibc/athena/include/DigitalOutput.h +++ b/wpilibc/athena/include/DigitalOutput.h @@ -7,12 +7,12 @@ #pragma once +#include + #include "DigitalSource.h" #include "LiveWindow/LiveWindowSendable.h" #include "tables/ITableListener.h" -#include - /** * Class to write to digital outputs. * Write values to the digital output channels. Other devices implemented diff --git a/wpilibc/athena/include/DoubleSolenoid.h b/wpilibc/athena/include/DoubleSolenoid.h index ddf44a7e45..b389da157b 100644 --- a/wpilibc/athena/include/DoubleSolenoid.h +++ b/wpilibc/athena/include/DoubleSolenoid.h @@ -7,12 +7,12 @@ #pragma once +#include + #include "LiveWindow/LiveWindowSendable.h" #include "SolenoidBase.h" #include "tables/ITableListener.h" -#include - /** * DoubleSolenoid class for running 2 channels of high voltage Digital Output * (PCM). diff --git a/wpilibc/athena/include/DriverStation.h b/wpilibc/athena/include/DriverStation.h index c11f4c0c7e..90db3c09b5 100644 --- a/wpilibc/athena/include/DriverStation.h +++ b/wpilibc/athena/include/DriverStation.h @@ -9,8 +9,7 @@ #include #include -#include -#include "HAL/HAL.h" + #include "HAL/cpp/Semaphore.h" #include "HAL/cpp/priority_condition_variable.h" #include "HAL/cpp/priority_mutex.h" diff --git a/wpilibc/athena/include/Encoder.h b/wpilibc/athena/include/Encoder.h index 45d3bb09f6..05eae51525 100644 --- a/wpilibc/athena/include/Encoder.h +++ b/wpilibc/athena/include/Encoder.h @@ -7,15 +7,14 @@ #pragma once +#include + #include "Counter.h" #include "CounterBase.h" -#include "HAL/HAL.h" #include "LiveWindow/LiveWindowSendable.h" #include "PIDSource.h" #include "SensorBase.h" -#include - class DigitalSource; class DigitalGlitchFilter; diff --git a/wpilibc/athena/include/GearTooth.h b/wpilibc/athena/include/GearTooth.h index e70da710fd..73c3ceb893 100644 --- a/wpilibc/athena/include/GearTooth.h +++ b/wpilibc/athena/include/GearTooth.h @@ -8,6 +8,7 @@ #pragma once #include + #include "Counter.h" /** diff --git a/wpilibc/athena/include/InterruptableSensorBase.h b/wpilibc/athena/include/InterruptableSensorBase.h index d4d0aeaf70..1ca4549c6b 100644 --- a/wpilibc/athena/include/InterruptableSensorBase.h +++ b/wpilibc/athena/include/InterruptableSensorBase.h @@ -7,12 +7,12 @@ #pragma once -#include "HAL/HAL.h" +#include + +#include "HAL/Interrupts.h" #include "Resource.h" #include "SensorBase.h" -#include - class InterruptableSensorBase : public SensorBase { public: enum WaitResult { diff --git a/wpilibc/athena/include/Joystick.h b/wpilibc/athena/include/Joystick.h index 634f099ac1..b40e37ed20 100644 --- a/wpilibc/athena/include/Joystick.h +++ b/wpilibc/athena/include/Joystick.h @@ -8,9 +8,11 @@ #ifndef JOYSTICK_H_ #define JOYSTICK_H_ -#include +#include + #include #include + #include "ErrorBase.h" #include "GenericHID.h" diff --git a/wpilibc/athena/include/MotorSafetyHelper.h b/wpilibc/athena/include/MotorSafetyHelper.h index 161c072dd4..60cd4c3b4f 100644 --- a/wpilibc/athena/include/MotorSafetyHelper.h +++ b/wpilibc/athena/include/MotorSafetyHelper.h @@ -7,11 +7,11 @@ #pragma once +#include + #include "ErrorBase.h" #include "HAL/cpp/priority_mutex.h" -#include - class MotorSafety; class MotorSafetyHelper : public ErrorBase { diff --git a/wpilibc/athena/include/PWM.h b/wpilibc/athena/include/PWM.h index a803dbcdfc..33312dceeb 100644 --- a/wpilibc/athena/include/PWM.h +++ b/wpilibc/athena/include/PWM.h @@ -7,12 +7,12 @@ #pragma once +#include + #include "LiveWindow/LiveWindowSendable.h" #include "SensorBase.h" #include "tables/ITableListener.h" -#include - /** * Class implements the PWM generation in the FPGA. * diff --git a/wpilibc/athena/include/PowerDistributionPanel.h b/wpilibc/athena/include/PowerDistributionPanel.h index c9295856f1..702eb9f98d 100644 --- a/wpilibc/athena/include/PowerDistributionPanel.h +++ b/wpilibc/athena/include/PowerDistributionPanel.h @@ -9,11 +9,11 @@ #ifndef __WPILIB_POWER_DISTRIBUTION_PANEL_H__ #define __WPILIB_POWER_DISTRIBUTION_PANEL_H__ +#include + #include "LiveWindow/LiveWindowSendable.h" #include "SensorBase.h" -#include - /** * Class for getting voltage, current, temperature, power and energy from the * CAN PDP. diff --git a/wpilibc/athena/include/Preferences.h b/wpilibc/athena/include/Preferences.h index 30130d467b..204a60bd16 100644 --- a/wpilibc/athena/include/Preferences.h +++ b/wpilibc/athena/include/Preferences.h @@ -10,6 +10,7 @@ #include #include #include + #include "ErrorBase.h" #include "HAL/cpp/Semaphore.h" #include "Task.h" diff --git a/wpilibc/athena/include/Relay.h b/wpilibc/athena/include/Relay.h index ba1ecacff4..91e0974724 100644 --- a/wpilibc/athena/include/Relay.h +++ b/wpilibc/athena/include/Relay.h @@ -7,14 +7,14 @@ #pragma once +#include + #include "LiveWindow/LiveWindowSendable.h" #include "MotorSafety.h" #include "SensorBase.h" #include "tables/ITable.h" #include "tables/ITableListener.h" -#include - class MotorSafetyHelper; /** diff --git a/wpilibc/athena/include/RobotDrive.h b/wpilibc/athena/include/RobotDrive.h index fb1f37c08a..b63238bdf4 100644 --- a/wpilibc/athena/include/RobotDrive.h +++ b/wpilibc/athena/include/RobotDrive.h @@ -8,10 +8,11 @@ #pragma once #include + #include #include + #include "ErrorBase.h" -#include "HAL/HAL.h" #include "MotorSafety.h" #include "MotorSafetyHelper.h" diff --git a/wpilibc/athena/include/SPI.h b/wpilibc/athena/include/SPI.h index b5db63587b..3b05e997b7 100644 --- a/wpilibc/athena/include/SPI.h +++ b/wpilibc/athena/include/SPI.h @@ -7,7 +7,6 @@ #pragma once -#include "HAL/HAL.h" #include "SensorBase.h" class DigitalOutput; diff --git a/wpilibc/athena/include/SafePWM.h b/wpilibc/athena/include/SafePWM.h index 5ee4ad0bf0..f12096234b 100644 --- a/wpilibc/athena/include/SafePWM.h +++ b/wpilibc/athena/include/SafePWM.h @@ -9,6 +9,7 @@ #include #include + #include "MotorSafety.h" #include "MotorSafetyHelper.h" #include "PWM.h" diff --git a/wpilibc/athena/include/SerialPort.h b/wpilibc/athena/include/SerialPort.h index 58fe096382..c8d40c692f 100644 --- a/wpilibc/athena/include/SerialPort.h +++ b/wpilibc/athena/include/SerialPort.h @@ -8,7 +8,6 @@ #pragma once #include "ErrorBase.h" -#include "HAL/HAL.h" /** * Driver for the RS-232 serial port on the RoboRIO. diff --git a/wpilibc/athena/include/Servo.h b/wpilibc/athena/include/Servo.h index f33a82e1f0..f1185f3a2b 100644 --- a/wpilibc/athena/include/Servo.h +++ b/wpilibc/athena/include/Servo.h @@ -7,11 +7,11 @@ #pragma once +#include + #include "SafePWM.h" #include "SpeedController.h" -#include - /** * Standard hobby style servo. * diff --git a/wpilibc/athena/include/Solenoid.h b/wpilibc/athena/include/Solenoid.h index 82e2ecb89e..17bc52cfbf 100644 --- a/wpilibc/athena/include/Solenoid.h +++ b/wpilibc/athena/include/Solenoid.h @@ -7,12 +7,12 @@ #pragma once +#include + #include "LiveWindow/LiveWindowSendable.h" #include "SolenoidBase.h" #include "tables/ITableListener.h" -#include - /** * Solenoid class for running high voltage Digital Output (PCM). * diff --git a/wpilibc/athena/include/SolenoidBase.h b/wpilibc/athena/include/SolenoidBase.h index 02dfb6d8d4..ec539936e5 100644 --- a/wpilibc/athena/include/SolenoidBase.h +++ b/wpilibc/athena/include/SolenoidBase.h @@ -7,13 +7,11 @@ #pragma once -#include "HAL/HAL.h" -#include "HAL/Port.h" +#include + #include "Resource.h" #include "SensorBase.h" -#include - /** * SolenoidBase class is the common base class for the Solenoid and * DoubleSolenoid classes. diff --git a/wpilibc/athena/include/SpeedController.h b/wpilibc/athena/include/SpeedController.h index c9f4b2eca5..331e5547f3 100644 --- a/wpilibc/athena/include/SpeedController.h +++ b/wpilibc/athena/include/SpeedController.h @@ -7,7 +7,6 @@ #pragma once -#include "HAL/HAL.h" #include "PIDOutput.h" /** diff --git a/wpilibc/athena/include/USBCamera.h b/wpilibc/athena/include/USBCamera.h index 0024a13e10..5cf247687c 100644 --- a/wpilibc/athena/include/USBCamera.h +++ b/wpilibc/athena/include/USBCamera.h @@ -7,13 +7,13 @@ #pragma once +#include + #include "ErrorBase.h" #include "HAL/cpp/priority_mutex.h" #include "NIIMAQdx.h" #include "nivision.h" -#include - typedef enum whiteBalance_enum { kFixedIndoor = 3000, kFixedOutdoor1 = 4000, diff --git a/wpilibc/athena/include/Ultrasonic.h b/wpilibc/athena/include/Ultrasonic.h index 08c6d3456a..9d0dbf9adc 100644 --- a/wpilibc/athena/include/Ultrasonic.h +++ b/wpilibc/athena/include/Ultrasonic.h @@ -10,6 +10,7 @@ #include #include #include + #include "Counter.h" #include "LiveWindow/LiveWindowSendable.h" #include "PIDSource.h" diff --git a/wpilibc/athena/include/Vision/AxisCamera.h b/wpilibc/athena/include/Vision/AxisCamera.h index e9036c4ac8..0887e0222c 100644 --- a/wpilibc/athena/include/Vision/AxisCamera.h +++ b/wpilibc/athena/include/Vision/AxisCamera.h @@ -9,9 +9,9 @@ #include #include -#include "HAL/cpp/priority_mutex.h" #include "ErrorBase.h" +#include "HAL/cpp/priority_mutex.h" #include "Vision/ColorImage.h" #include "Vision/HSLImage.h" #include "nivision.h" diff --git a/wpilibc/athena/include/Vision/BinaryImage.h b/wpilibc/athena/include/Vision/BinaryImage.h index 1c30e732fc..c0a677ad69 100644 --- a/wpilibc/athena/include/Vision/BinaryImage.h +++ b/wpilibc/athena/include/Vision/BinaryImage.h @@ -7,6 +7,9 @@ #pragma once +#include +#include + #include "MonoImage.h" /** * Included for ParticleAnalysisReport definition @@ -14,9 +17,6 @@ */ #include "Vision/VisionAPI.h" -#include -#include - class BinaryImage : public MonoImage { public: virtual ~BinaryImage() = default; diff --git a/wpilibc/athena/include/Vision/ImageBase.h b/wpilibc/athena/include/Vision/ImageBase.h index 03e34b74dc..d7797052f6 100644 --- a/wpilibc/athena/include/Vision/ImageBase.h +++ b/wpilibc/athena/include/Vision/ImageBase.h @@ -8,6 +8,7 @@ #pragma once #include + #include "ErrorBase.h" #include "nivision.h" diff --git a/wpilibc/athena/include/Vision/MonoImage.h b/wpilibc/athena/include/Vision/MonoImage.h index 57c3108068..6a9b6b605a 100644 --- a/wpilibc/athena/include/Vision/MonoImage.h +++ b/wpilibc/athena/include/Vision/MonoImage.h @@ -7,10 +7,10 @@ #pragma once -#include "ImageBase.h" - #include +#include "ImageBase.h" + class MonoImage : public ImageBase { public: MonoImage(); diff --git a/wpilibc/athena/include/WPILib.h b/wpilibc/athena/include/WPILib.h index 6f92c549c9..2a8e7b1eba 100644 --- a/wpilibc/athena/include/WPILib.h +++ b/wpilibc/athena/include/WPILib.h @@ -9,9 +9,6 @@ #define REAL -#include -#include "string.h" - #include "ADXL345_I2C.h" #include "ADXL345_SPI.h" #include "ADXL362.h" diff --git a/wpilibc/athena/src/ADXL345_SPI.cpp b/wpilibc/athena/src/ADXL345_SPI.cpp index b4899c7d3a..5d9d6ee0da 100644 --- a/wpilibc/athena/src/ADXL345_SPI.cpp +++ b/wpilibc/athena/src/ADXL345_SPI.cpp @@ -8,6 +8,7 @@ #include "ADXL345_SPI.h" #include "DigitalInput.h" #include "DigitalOutput.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" const uint8_t ADXL345_SPI::kPowerCtlRegister; diff --git a/wpilibc/athena/src/ADXL362.cpp b/wpilibc/athena/src/ADXL362.cpp index c6e364d257..b675a4564d 100644 --- a/wpilibc/athena/src/ADXL362.cpp +++ b/wpilibc/athena/src/ADXL362.cpp @@ -9,6 +9,7 @@ #include "DigitalInput.h" #include "DigitalOutput.h" #include "DriverStation.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" static uint8_t kRegWrite = 0x0A; diff --git a/wpilibc/athena/src/AnalogAccelerometer.cpp b/wpilibc/athena/src/AnalogAccelerometer.cpp index 842b952281..a6ccc5debf 100644 --- a/wpilibc/athena/src/AnalogAccelerometer.cpp +++ b/wpilibc/athena/src/AnalogAccelerometer.cpp @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #include "AnalogAccelerometer.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" #include "WPIErrors.h" diff --git a/wpilibc/athena/src/AnalogGyro.cpp b/wpilibc/athena/src/AnalogGyro.cpp index 5b085283c5..8e193f1745 100644 --- a/wpilibc/athena/src/AnalogGyro.cpp +++ b/wpilibc/athena/src/AnalogGyro.cpp @@ -6,11 +6,15 @@ /*----------------------------------------------------------------------------*/ #include "AnalogGyro.h" -#include + +#include + #include "AnalogInput.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" #include "Timer.h" #include "WPIErrors.h" + const uint32_t AnalogGyro::kOversampleBits; const uint32_t AnalogGyro::kAverageBits; constexpr float AnalogGyro::kSamplesPerSecond; diff --git a/wpilibc/athena/src/AnalogInput.cpp b/wpilibc/athena/src/AnalogInput.cpp index 9ea9f0a223..69d21a046e 100644 --- a/wpilibc/athena/src/AnalogInput.cpp +++ b/wpilibc/athena/src/AnalogInput.cpp @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #include "AnalogInput.h" +#include "HAL/HAL.h" #include "HAL/Port.h" #include "LiveWindow/LiveWindow.h" #include "Resource.h" diff --git a/wpilibc/athena/src/AnalogOutput.cpp b/wpilibc/athena/src/AnalogOutput.cpp index a2b7a5ed38..a1756249c8 100644 --- a/wpilibc/athena/src/AnalogOutput.cpp +++ b/wpilibc/athena/src/AnalogOutput.cpp @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #include "AnalogOutput.h" +#include "HAL/HAL.h" #include "HAL/Port.h" #include "LiveWindow/LiveWindow.h" #include "Resource.h" diff --git a/wpilibc/athena/src/AnalogTrigger.cpp b/wpilibc/athena/src/AnalogTrigger.cpp index 56818c2f98..67788cdbfe 100644 --- a/wpilibc/athena/src/AnalogTrigger.cpp +++ b/wpilibc/athena/src/AnalogTrigger.cpp @@ -8,6 +8,7 @@ #include "AnalogTrigger.h" #include "AnalogInput.h" +#include "HAL/HAL.h" #include "HAL/Port.h" #include "Resource.h" #include "WPIErrors.h" diff --git a/wpilibc/athena/src/AnalogTriggerOutput.cpp b/wpilibc/athena/src/AnalogTriggerOutput.cpp index 077c15a034..1f90fb1357 100644 --- a/wpilibc/athena/src/AnalogTriggerOutput.cpp +++ b/wpilibc/athena/src/AnalogTriggerOutput.cpp @@ -7,6 +7,7 @@ #include "AnalogTriggerOutput.h" #include "AnalogTrigger.h" +#include "HAL/HAL.h" #include "WPIErrors.h" /** diff --git a/wpilibc/athena/src/CANJaguar.cpp b/wpilibc/athena/src/CANJaguar.cpp index a58aa371fc..dd32123e7c 100644 --- a/wpilibc/athena/src/CANJaguar.cpp +++ b/wpilibc/athena/src/CANJaguar.cpp @@ -6,14 +6,18 @@ /*----------------------------------------------------------------------------*/ #include "CANJaguar.h" -#include "Timer.h" -#define tNIRIO_i32 int -#include -#include + +#include +#include + +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" #include "NetworkCommunication/CANSessionMux.h" +#include "Timer.h" #include "WPIErrors.h" +#define tNIRIO_i32 int + /* we are on ARM-LE now, not Freescale so no need to swap */ #define swap16(x) (x) #define swap32(x) (x) diff --git a/wpilibc/athena/src/CANTalon.cpp b/wpilibc/athena/src/CANTalon.cpp index 2d3f5f36ab..3fd3a0f088 100644 --- a/wpilibc/athena/src/CANTalon.cpp +++ b/wpilibc/athena/src/CANTalon.cpp @@ -6,8 +6,12 @@ /*----------------------------------------------------------------------------*/ #include "CANTalon.h" + #include // usleep + #include + +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" #include "WPIErrors.h" diff --git a/wpilibc/athena/src/CameraServer.cpp b/wpilibc/athena/src/CameraServer.cpp index d66774ab38..d2642a1063 100644 --- a/wpilibc/athena/src/CameraServer.cpp +++ b/wpilibc/athena/src/CameraServer.cpp @@ -6,16 +6,18 @@ /*----------------------------------------------------------------------------*/ #include "CameraServer.h" -#include "Utility.h" -#include "WPIErrors.h" #include +#include #include #include + #include -#include #include +#include "Utility.h" +#include "WPIErrors.h" + constexpr uint8_t CameraServer::kMagicNumber[]; CameraServer* CameraServer::GetInstance() { diff --git a/wpilibc/athena/src/Compressor.cpp b/wpilibc/athena/src/Compressor.cpp index 369cf6eda5..0ee8841bca 100644 --- a/wpilibc/athena/src/Compressor.cpp +++ b/wpilibc/athena/src/Compressor.cpp @@ -3,6 +3,8 @@ */ #include "Compressor.h" + +#include "HAL/HAL.h" #include "WPIErrors.h" /** diff --git a/wpilibc/athena/src/ControllerPower.cpp b/wpilibc/athena/src/ControllerPower.cpp index 145c545037..ed1ac1a207 100644 --- a/wpilibc/athena/src/ControllerPower.cpp +++ b/wpilibc/athena/src/ControllerPower.cpp @@ -8,6 +8,7 @@ #include "ControllerPower.h" #include + #include "ErrorBase.h" #include "HAL/HAL.h" #include "HAL/Power.h" diff --git a/wpilibc/athena/src/Counter.cpp b/wpilibc/athena/src/Counter.cpp index 59ea902879..067d21dcac 100644 --- a/wpilibc/athena/src/Counter.cpp +++ b/wpilibc/athena/src/Counter.cpp @@ -6,8 +6,10 @@ /*----------------------------------------------------------------------------*/ #include "Counter.h" + #include "AnalogTrigger.h" #include "DigitalInput.h" +#include "HAL/HAL.h" #include "Resource.h" #include "WPIErrors.h" diff --git a/wpilibc/athena/src/DigitalGlitchFilter.cpp b/wpilibc/athena/src/DigitalGlitchFilter.cpp index bcc75cbcaf..39276270de 100644 --- a/wpilibc/athena/src/DigitalGlitchFilter.cpp +++ b/wpilibc/athena/src/DigitalGlitchFilter.cpp @@ -5,12 +5,14 @@ /* the project. */ /*----------------------------------------------------------------------------*/ +#include "DigitalGlitchFilter.h" + #include #include #include "Counter.h" -#include "DigitalGlitchFilter.h" #include "Encoder.h" +#include "HAL/HAL.h" #include "Resource.h" #include "Utility.h" #include "WPIErrors.h" diff --git a/wpilibc/athena/src/DigitalInput.cpp b/wpilibc/athena/src/DigitalInput.cpp index 3d004cbee5..1e2e4ae1b9 100644 --- a/wpilibc/athena/src/DigitalInput.cpp +++ b/wpilibc/athena/src/DigitalInput.cpp @@ -6,13 +6,15 @@ /*----------------------------------------------------------------------------*/ #include "DigitalInput.h" -#include "LiveWindow/LiveWindow.h" -#include "Resource.h" -#include "WPIErrors.h" #include #include +#include "HAL/HAL.h" +#include "LiveWindow/LiveWindow.h" +#include "Resource.h" +#include "WPIErrors.h" + /** * Create an instance of a Digital Input class. * diff --git a/wpilibc/athena/src/DigitalOutput.cpp b/wpilibc/athena/src/DigitalOutput.cpp index eadd44adc5..e72726f646 100644 --- a/wpilibc/athena/src/DigitalOutput.cpp +++ b/wpilibc/athena/src/DigitalOutput.cpp @@ -6,6 +6,8 @@ /*----------------------------------------------------------------------------*/ #include "DigitalOutput.h" + +#include "HAL/HAL.h" #include "Resource.h" #include "WPIErrors.h" diff --git a/wpilibc/athena/src/DoubleSolenoid.cpp b/wpilibc/athena/src/DoubleSolenoid.cpp index 8b7cb854af..1f6d192079 100644 --- a/wpilibc/athena/src/DoubleSolenoid.cpp +++ b/wpilibc/athena/src/DoubleSolenoid.cpp @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #include "DoubleSolenoid.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" #include "WPIErrors.h" diff --git a/wpilibc/athena/src/Encoder.cpp b/wpilibc/athena/src/Encoder.cpp index 0dc461cf1c..597c63ae88 100644 --- a/wpilibc/athena/src/Encoder.cpp +++ b/wpilibc/athena/src/Encoder.cpp @@ -7,6 +7,7 @@ #include "Encoder.h" #include "DigitalInput.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" #include "Resource.h" #include "WPIErrors.h" diff --git a/wpilibc/athena/src/InterruptableSensorBase.cpp b/wpilibc/athena/src/InterruptableSensorBase.cpp index 4ecfc239ea..ce391a2529 100644 --- a/wpilibc/athena/src/InterruptableSensorBase.cpp +++ b/wpilibc/athena/src/InterruptableSensorBase.cpp @@ -6,6 +6,8 @@ /*----------------------------------------------------------------------------*/ #include "InterruptableSensorBase.h" + +#include "HAL/HAL.h" #include "Utility.h" #include "WPIErrors.h" diff --git a/wpilibc/athena/src/Jaguar.cpp b/wpilibc/athena/src/Jaguar.cpp index 9379c5a19e..3f614cf5c5 100644 --- a/wpilibc/athena/src/Jaguar.cpp +++ b/wpilibc/athena/src/Jaguar.cpp @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #include "Jaguar.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibc/athena/src/RobotBase.cpp b/wpilibc/athena/src/RobotBase.cpp index bbc933cd1b..d59c2fce95 100644 --- a/wpilibc/athena/src/RobotBase.cpp +++ b/wpilibc/athena/src/RobotBase.cpp @@ -7,8 +7,9 @@ #include "RobotBase.h" -#include -#include +#include +#include + #include "DriverStation.h" #include "HAL/HAL.h" #include "HLUsageReporting.h" diff --git a/wpilibc/athena/src/RobotDrive.cpp b/wpilibc/athena/src/RobotDrive.cpp index ac482a1094..e1fce4ff53 100644 --- a/wpilibc/athena/src/RobotDrive.cpp +++ b/wpilibc/athena/src/RobotDrive.cpp @@ -9,6 +9,7 @@ #include #include "GenericHID.h" +#include "HAL/HAL.h" #include "Joystick.h" #include "Talon.h" #include "Utility.h" diff --git a/wpilibc/athena/src/SD540.cpp b/wpilibc/athena/src/SD540.cpp index d069f0ec77..6ee31b4736 100644 --- a/wpilibc/athena/src/SD540.cpp +++ b/wpilibc/athena/src/SD540.cpp @@ -7,6 +7,7 @@ #include "SD540.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibc/athena/src/SPI.cpp b/wpilibc/athena/src/SPI.cpp index 5a6f37c180..47e12d846c 100644 --- a/wpilibc/athena/src/SPI.cpp +++ b/wpilibc/athena/src/SPI.cpp @@ -6,11 +6,12 @@ /*----------------------------------------------------------------------------*/ #include "SPI.h" -#include "HAL/HAL.h" -#include "WPIErrors.h" #include +#include "HAL/HAL.h" +#include "WPIErrors.h" + /** * Constructor * diff --git a/wpilibc/athena/src/Solenoid.cpp b/wpilibc/athena/src/Solenoid.cpp index 9051339eac..177159c7e2 100644 --- a/wpilibc/athena/src/Solenoid.cpp +++ b/wpilibc/athena/src/Solenoid.cpp @@ -6,6 +6,7 @@ /*----------------------------------------------------------------------------*/ #include "Solenoid.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" #include "WPIErrors.h" diff --git a/wpilibc/athena/src/SolenoidBase.cpp b/wpilibc/athena/src/SolenoidBase.cpp index d7325db6a3..c83e0928d7 100644 --- a/wpilibc/athena/src/SolenoidBase.cpp +++ b/wpilibc/athena/src/SolenoidBase.cpp @@ -7,6 +7,8 @@ #include "SolenoidBase.h" +#include "HAL/HAL.h" + void* SolenoidBase::m_ports[m_maxModules][m_maxPorts]; std::unique_ptr SolenoidBase::m_allocated; diff --git a/wpilibc/athena/src/Spark.cpp b/wpilibc/athena/src/Spark.cpp index 5a8683719a..68b1628118 100644 --- a/wpilibc/athena/src/Spark.cpp +++ b/wpilibc/athena/src/Spark.cpp @@ -7,6 +7,7 @@ #include "Spark.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibc/athena/src/Talon.cpp b/wpilibc/athena/src/Talon.cpp index 251f1ca9e5..3ab5e00768 100644 --- a/wpilibc/athena/src/Talon.cpp +++ b/wpilibc/athena/src/Talon.cpp @@ -7,6 +7,7 @@ #include "Talon.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibc/athena/src/TalonSRX.cpp b/wpilibc/athena/src/TalonSRX.cpp index 07bea8f282..b8432617bb 100644 --- a/wpilibc/athena/src/TalonSRX.cpp +++ b/wpilibc/athena/src/TalonSRX.cpp @@ -7,6 +7,7 @@ #include "TalonSRX.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibc/athena/src/Utility.cpp b/wpilibc/athena/src/Utility.cpp index 58e2d2ed18..1d258d98a1 100644 --- a/wpilibc/athena/src/Utility.cpp +++ b/wpilibc/athena/src/Utility.cpp @@ -7,14 +7,15 @@ #include "Utility.h" -//#include "NetworkCommunication/FRCComm.h" #include #include -#include -#include -#include +#include +#include +#include + #include #include + #include "HAL/HAL.h" #include "Task.h" #include "nivision.h" diff --git a/wpilibc/athena/src/Victor.cpp b/wpilibc/athena/src/Victor.cpp index 0595a55b74..775889041b 100644 --- a/wpilibc/athena/src/Victor.cpp +++ b/wpilibc/athena/src/Victor.cpp @@ -7,6 +7,7 @@ #include "Victor.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibc/athena/src/VictorSP.cpp b/wpilibc/athena/src/VictorSP.cpp index d39dcf19cd..8e7b6b7926 100644 --- a/wpilibc/athena/src/VictorSP.cpp +++ b/wpilibc/athena/src/VictorSP.cpp @@ -7,6 +7,7 @@ #include "VictorSP.h" +#include "HAL/HAL.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibc/athena/src/Vision/AxisCamera.cpp b/wpilibc/athena/src/Vision/AxisCamera.cpp index 499337354e..a8f9e8ebb9 100644 --- a/wpilibc/athena/src/Vision/AxisCamera.cpp +++ b/wpilibc/athena/src/Vision/AxisCamera.cpp @@ -7,18 +7,19 @@ #include "Vision/AxisCamera.h" -#include "WPIErrors.h" - -#include #include #include +#include #include #include #include -#include + #include #include +#include "Timer.h" +#include "WPIErrors.h" + static const unsigned int kMaxPacketSize = 1536; static const unsigned int kImageBufferAllocationIncrement = 1000; diff --git a/wpilibc/athena/src/Vision/BinaryImage.cpp b/wpilibc/athena/src/Vision/BinaryImage.cpp index 76c2e39a6b..3104586cf0 100644 --- a/wpilibc/athena/src/Vision/BinaryImage.cpp +++ b/wpilibc/athena/src/Vision/BinaryImage.cpp @@ -6,7 +6,9 @@ /*----------------------------------------------------------------------------*/ #include "Vision/BinaryImage.h" -#include + +#include + #include "WPIErrors.h" using namespace std; diff --git a/wpilibc/shared/include/CircularBuffer.h b/wpilibc/shared/include/CircularBuffer.h index 749fbdc09b..a8d76e2334 100644 --- a/wpilibc/shared/include/CircularBuffer.h +++ b/wpilibc/shared/include/CircularBuffer.h @@ -7,7 +7,8 @@ #pragma once -#include +#include + #include /** diff --git a/wpilibc/shared/include/WPIErrors.h b/wpilibc/shared/include/WPIErrors.h index c16ae92def..0a73a7adae 100644 --- a/wpilibc/shared/include/WPIErrors.h +++ b/wpilibc/shared/include/WPIErrors.h @@ -7,7 +7,7 @@ #pragma once -#include "stdint.h" +#include #ifdef WPI_ERRORS_DEFINE_STRINGS #define S(label, offset, message) \ diff --git a/wpilibc/shared/src/Error.cpp b/wpilibc/shared/src/Error.cpp index 74e84fcca7..7287d59378 100644 --- a/wpilibc/shared/src/Error.cpp +++ b/wpilibc/shared/src/Error.cpp @@ -7,9 +7,9 @@ #include "Error.h" -#include -#include -#include +#include +#include + #include #include diff --git a/wpilibc/shared/src/ErrorBase.cpp b/wpilibc/shared/src/ErrorBase.cpp index 35394b361e..c805ff92dc 100644 --- a/wpilibc/shared/src/ErrorBase.cpp +++ b/wpilibc/shared/src/ErrorBase.cpp @@ -6,14 +6,16 @@ /*----------------------------------------------------------------------------*/ #include "ErrorBase.h" -#define WPI_ERRORS_DEFINE_STRINGS -#include "WPIErrors.h" #include -#include -#include +#include +#include + #include +#define WPI_ERRORS_DEFINE_STRINGS +#include "WPIErrors.h" + priority_mutex ErrorBase::_globalErrorMutex; Error ErrorBase::_globalError; diff --git a/wpilibc/shared/src/Filters/LinearDigitalFilter.cpp b/wpilibc/shared/src/Filters/LinearDigitalFilter.cpp index 81f46588a3..e8a24335c9 100644 --- a/wpilibc/shared/src/Filters/LinearDigitalFilter.cpp +++ b/wpilibc/shared/src/Filters/LinearDigitalFilter.cpp @@ -6,8 +6,9 @@ /*----------------------------------------------------------------------------*/ #include "Filters/LinearDigitalFilter.h" -#include -#include + +#include +#include /** * Create a linear FIR or IIR filter. diff --git a/wpilibc/sim/include/Counter.h b/wpilibc/sim/include/Counter.h index 319a93ce83..971f50ccf0 100644 --- a/wpilibc/sim/include/Counter.h +++ b/wpilibc/sim/include/Counter.h @@ -8,7 +8,6 @@ #pragma once #include "CounterBase.h" -#include "HAL/HAL.h" #include "LiveWindow/LiveWindowSendable.h" #include "SensorBase.h" diff --git a/wpilibc/sim/include/Encoder.h b/wpilibc/sim/include/Encoder.h index 9e338b8649..9db1695fc5 100644 --- a/wpilibc/sim/include/Encoder.h +++ b/wpilibc/sim/include/Encoder.h @@ -7,7 +7,8 @@ #pragma once -#include +#include + #include #include "CounterBase.h" diff --git a/wpilibc/sim/src/RobotBase.cpp b/wpilibc/sim/src/RobotBase.cpp index 7ebaba02f0..16677f65dd 100644 --- a/wpilibc/sim/src/RobotBase.cpp +++ b/wpilibc/sim/src/RobotBase.cpp @@ -9,7 +9,7 @@ #include "RobotState.h" #include "Utility.h" -#include +#include RobotBase* RobotBase::m_instance = nullptr; diff --git a/wpilibc/sim/src/Utility.cpp b/wpilibc/sim/src/Utility.cpp index 70c31dadfb..c272d3ec96 100644 --- a/wpilibc/sim/src/Utility.cpp +++ b/wpilibc/sim/src/Utility.cpp @@ -8,13 +8,9 @@ #include "Utility.h" #include +#include #include -#include "Timer.h" -#include "simulation/simTime.h" -#include -#include -#include #include #include #if not defined(_WIN32) @@ -22,6 +18,9 @@ #include #endif +#include "Timer.h" +#include "simulation/simTime.h" + static bool stackTraceEnabled = false; static bool suspendOnAssertEnabled = false; diff --git a/wpilibcIntegrationTests/include/TestBench.h b/wpilibcIntegrationTests/include/TestBench.h index eb1ef63195..aa875407f6 100644 --- a/wpilibcIntegrationTests/include/TestBench.h +++ b/wpilibcIntegrationTests/include/TestBench.h @@ -7,7 +7,7 @@ #pragma once -#include +#include class TestBench { public: diff --git a/wpilibcIntegrationTests/src/AnalogLoopTest.cpp b/wpilibcIntegrationTests/src/AnalogLoopTest.cpp index 799142a779..aa9fb4d66a 100644 --- a/wpilibcIntegrationTests/src/AnalogLoopTest.cpp +++ b/wpilibcIntegrationTests/src/AnalogLoopTest.cpp @@ -5,14 +5,15 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#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; /** diff --git a/wpilibcIntegrationTests/src/AnalogPotentiometerTest.cpp b/wpilibcIntegrationTests/src/AnalogPotentiometerTest.cpp index 3beb874d7a..2b204ff963 100644 --- a/wpilibcIntegrationTests/src/AnalogPotentiometerTest.cpp +++ b/wpilibcIntegrationTests/src/AnalogPotentiometerTest.cpp @@ -5,13 +5,15 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#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; diff --git a/wpilibcIntegrationTests/src/BuiltInAccelerometerTest.cpp b/wpilibcIntegrationTests/src/BuiltInAccelerometerTest.cpp index f8bee87a84..9db12cd016 100644 --- a/wpilibcIntegrationTests/src/BuiltInAccelerometerTest.cpp +++ b/wpilibcIntegrationTests/src/BuiltInAccelerometerTest.cpp @@ -5,10 +5,12 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include +#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, diff --git a/wpilibcIntegrationTests/src/CANJaguarTest.cpp b/wpilibcIntegrationTests/src/CANJaguarTest.cpp index be581f8116..5099adec79 100644 --- a/wpilibcIntegrationTests/src/CANJaguarTest.cpp +++ b/wpilibcIntegrationTests/src/CANJaguarTest.cpp @@ -5,15 +5,17 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#include -#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; diff --git a/wpilibcIntegrationTests/src/CANTalonTest.cpp b/wpilibcIntegrationTests/src/CANTalonTest.cpp index 255f91002a..777980be86 100644 --- a/wpilibcIntegrationTests/src/CANTalonTest.cpp +++ b/wpilibcIntegrationTests/src/CANTalonTest.cpp @@ -5,11 +5,13 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include "TestBench.h" +#include "CANTalon.h" + #include "gtest/gtest.h" +#include "TestBench.h" +#include "Timer.h" + const int deviceId = 0; TEST(CANTalonTest, QuickTest) { diff --git a/wpilibcIntegrationTests/src/CircularBufferTest.cpp b/wpilibcIntegrationTests/src/CircularBufferTest.cpp index 20209d14dc..80a5ccd304 100644 --- a/wpilibcIntegrationTests/src/CircularBufferTest.cpp +++ b/wpilibcIntegrationTests/src/CircularBufferTest.cpp @@ -5,10 +5,12 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include +#include "CircularBuffer.h" + #include "gtest/gtest.h" +#include + static const std::array values = { 751.848, 766.366, 342.657, 234.252, 716.126, 132.344, 445.697, 22.727, 421.125, 799.913}; diff --git a/wpilibcIntegrationTests/src/ConditionVariableTest.cpp b/wpilibcIntegrationTests/src/ConditionVariableTest.cpp index 41c638fa37..a6979b853e 100644 --- a/wpilibcIntegrationTests/src/ConditionVariableTest.cpp +++ b/wpilibcIntegrationTests/src/ConditionVariableTest.cpp @@ -5,18 +5,18 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include "TestBench.h" - -#include "HAL/cpp/priority_condition_variable.h" -#include "HAL/cpp/priority_mutex.h" - #include #include #include #include #include + #include "gtest/gtest.h" +#include "HAL/cpp/priority_condition_variable.h" +#include "HAL/cpp/priority_mutex.h" +#include "TestBench.h" + namespace wpilib { namespace testing { diff --git a/wpilibcIntegrationTests/src/CounterTest.cpp b/wpilibcIntegrationTests/src/CounterTest.cpp index 3d65483f37..d6e89eff73 100644 --- a/wpilibcIntegrationTests/src/CounterTest.cpp +++ b/wpilibcIntegrationTests/src/CounterTest.cpp @@ -5,14 +5,16 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#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; diff --git a/wpilibcIntegrationTests/src/DIOLoopTest.cpp b/wpilibcIntegrationTests/src/DIOLoopTest.cpp index 284aed1df7..e7d64d4821 100644 --- a/wpilibcIntegrationTests/src/DIOLoopTest.cpp +++ b/wpilibcIntegrationTests/src/DIOLoopTest.cpp @@ -5,14 +5,16 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#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; diff --git a/wpilibcIntegrationTests/src/DigitalGlitchFilterTest.cpp b/wpilibcIntegrationTests/src/DigitalGlitchFilterTest.cpp index 46dc6ebff2..db4db469d4 100644 --- a/wpilibcIntegrationTests/src/DigitalGlitchFilterTest.cpp +++ b/wpilibcIntegrationTests/src/DigitalGlitchFilterTest.cpp @@ -5,12 +5,14 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include +#include "DigitalGlitchFilter.h" + #include "gtest/gtest.h" +#include "Counter.h" +#include "DigitalInput.h" +#include "Encoder.h" + /** * Tests that configuring inputs to be filtered succeeds. * diff --git a/wpilibcIntegrationTests/src/FakeEncoderTest.cpp b/wpilibcIntegrationTests/src/FakeEncoderTest.cpp index 79919266e7..ccb2c042e9 100644 --- a/wpilibcIntegrationTests/src/FakeEncoderTest.cpp +++ b/wpilibcIntegrationTests/src/FakeEncoderTest.cpp @@ -5,14 +5,16 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#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 { diff --git a/wpilibcIntegrationTests/src/FilterNoiseTest.cpp b/wpilibcIntegrationTests/src/FilterNoiseTest.cpp index f3ff0c4f9c..7a789c1fdc 100644 --- a/wpilibcIntegrationTests/src/FilterNoiseTest.cpp +++ b/wpilibcIntegrationTests/src/FilterNoiseTest.cpp @@ -5,17 +5,18 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include +#include "Filters/LinearDigitalFilter.h" + +#include #include #include #include #include -#include +#include "gtest/gtest.h" #include "Base.h" #include "TestBench.h" -#include "gtest/gtest.h" enum FilterNoiseTestType { TEST_SINGLE_POLE_IIR, TEST_MOVAVG }; diff --git a/wpilibcIntegrationTests/src/FilterOutputTest.cpp b/wpilibcIntegrationTests/src/FilterOutputTest.cpp index 1cbb4a6d44..9e4122adea 100644 --- a/wpilibcIntegrationTests/src/FilterOutputTest.cpp +++ b/wpilibcIntegrationTests/src/FilterOutputTest.cpp @@ -5,17 +5,18 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include +#include "Filters/LinearDigitalFilter.h" + +#include #include #include #include #include -#include +#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 }; diff --git a/wpilibcIntegrationTests/src/MotorEncoderTest.cpp b/wpilibcIntegrationTests/src/MotorEncoderTest.cpp index 55fdeb7c02..44b346a7bb 100644 --- a/wpilibcIntegrationTests/src/MotorEncoderTest.cpp +++ b/wpilibcIntegrationTests/src/MotorEncoderTest.cpp @@ -5,15 +5,16 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#include -#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) { diff --git a/wpilibcIntegrationTests/src/MotorInvertingTest.cpp b/wpilibcIntegrationTests/src/MotorInvertingTest.cpp index 2e9c27e74e..2d7a041519 100644 --- a/wpilibcIntegrationTests/src/MotorInvertingTest.cpp +++ b/wpilibcIntegrationTests/src/MotorInvertingTest.cpp @@ -5,14 +5,15 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#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; diff --git a/wpilibcIntegrationTests/src/MutexTest.cpp b/wpilibcIntegrationTests/src/MutexTest.cpp index a87602ab97..d637030a1e 100644 --- a/wpilibcIntegrationTests/src/MutexTest.cpp +++ b/wpilibcIntegrationTests/src/MutexTest.cpp @@ -6,13 +6,15 @@ /*----------------------------------------------------------------------------*/ #include "HAL/cpp/priority_mutex.h" -#include "TestBench.h" #include #include #include + #include "gtest/gtest.h" +#include "TestBench.h" + namespace wpilib { namespace testing { diff --git a/wpilibcIntegrationTests/src/NotifierTest.cpp b/wpilibcIntegrationTests/src/NotifierTest.cpp index 02926aa1df..7d97278f5c 100644 --- a/wpilibcIntegrationTests/src/NotifierTest.cpp +++ b/wpilibcIntegrationTests/src/NotifierTest.cpp @@ -5,11 +5,13 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include "TestBench.h" +#include "Notifier.h" + #include "gtest/gtest.h" +#include "TestBench.h" +#include "Timer.h" + unsigned notifierCounter; void notifierHandler(void*) { notifierCounter++; } diff --git a/wpilibcIntegrationTests/src/PCMTest.cpp b/wpilibcIntegrationTests/src/PCMTest.cpp index 20b659b1e1..7a1a3279c6 100644 --- a/wpilibcIntegrationTests/src/PCMTest.cpp +++ b/wpilibcIntegrationTests/src/PCMTest.cpp @@ -5,16 +5,17 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#include -#include -#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; diff --git a/wpilibcIntegrationTests/src/PIDToleranceTest.cpp b/wpilibcIntegrationTests/src/PIDToleranceTest.cpp index 83586f8f47..7e5b33d382 100644 --- a/wpilibcIntegrationTests/src/PIDToleranceTest.cpp +++ b/wpilibcIntegrationTests/src/PIDToleranceTest.cpp @@ -5,12 +5,13 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include +#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: diff --git a/wpilibcIntegrationTests/src/PowerDistributionPanelTest.cpp b/wpilibcIntegrationTests/src/PowerDistributionPanelTest.cpp index 1a71f571f7..4e43e47d7a 100644 --- a/wpilibcIntegrationTests/src/PowerDistributionPanelTest.cpp +++ b/wpilibcIntegrationTests/src/PowerDistributionPanelTest.cpp @@ -5,14 +5,16 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#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 { diff --git a/wpilibcIntegrationTests/src/PreferencesTest.cpp b/wpilibcIntegrationTests/src/PreferencesTest.cpp index 8e6f342550..d88a06f3ad 100644 --- a/wpilibcIntegrationTests/src/PreferencesTest.cpp +++ b/wpilibcIntegrationTests/src/PreferencesTest.cpp @@ -5,12 +5,15 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include +#include "Preferences.h" + +#include #include + #include "gtest/gtest.h" +#include "Timer.h" + static const char* kFileName = "networktables.ini"; static const double kSaveTime = 1.2; diff --git a/wpilibcIntegrationTests/src/RelayTest.cpp b/wpilibcIntegrationTests/src/RelayTest.cpp index 8f4448cbc4..2779f78ddc 100644 --- a/wpilibcIntegrationTests/src/RelayTest.cpp +++ b/wpilibcIntegrationTests/src/RelayTest.cpp @@ -6,12 +6,13 @@ /*----------------------------------------------------------------------------*/ #include "Relay.h" -#include -#include -#include -#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 { diff --git a/wpilibcIntegrationTests/src/TestEnvironment.cpp b/wpilibcIntegrationTests/src/TestEnvironment.cpp index c1ba3cc50e..a0babee86e 100644 --- a/wpilibcIntegrationTests/src/TestEnvironment.cpp +++ b/wpilibcIntegrationTests/src/TestEnvironment.cpp @@ -5,11 +5,12 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include #include "gtest/gtest.h" +#include "DriverStation.h" +#include "LiveWindow/LiveWindow.h" +#include "Timer.h" + class TestEnvironment : public testing::Environment { bool m_alreadySetUp = false; diff --git a/wpilibcIntegrationTests/src/TiltPanCameraTest.cpp b/wpilibcIntegrationTests/src/TiltPanCameraTest.cpp index d21b54e6e4..dd4d5a06ed 100644 --- a/wpilibcIntegrationTests/src/TiltPanCameraTest.cpp +++ b/wpilibcIntegrationTests/src/TiltPanCameraTest.cpp @@ -5,13 +5,14 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#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; diff --git a/wpilibcIntegrationTests/src/TimerTest.cpp b/wpilibcIntegrationTests/src/TimerTest.cpp index a2b0ba97bc..670387e093 100644 --- a/wpilibcIntegrationTests/src/TimerTest.cpp +++ b/wpilibcIntegrationTests/src/TimerTest.cpp @@ -5,10 +5,12 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include "TestBench.h" +#include "Timer.h" + #include "gtest/gtest.h" +#include "TestBench.h" + static const double kWaitTime = 0.5; class TimerTest : public testing::Test { diff --git a/wpilibcIntegrationTests/src/command/CommandTest.cpp b/wpilibcIntegrationTests/src/command/CommandTest.cpp index d6de4102d3..f7f905c204 100644 --- a/wpilibcIntegrationTests/src/command/CommandTest.cpp +++ b/wpilibcIntegrationTests/src/command/CommandTest.cpp @@ -5,15 +5,16 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#include -#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 { diff --git a/wpilibj/src/athena/cpp/lib/HALUtil.cpp b/wpilibj/src/athena/cpp/lib/HALUtil.cpp index e89dd85deb..5acf61853d 100644 --- a/wpilibj/src/athena/cpp/lib/HALUtil.cpp +++ b/wpilibj/src/athena/cpp/lib/HALUtil.cpp @@ -6,16 +6,18 @@ /*----------------------------------------------------------------------------*/ #include "HALUtil.h" + #include +#include #include -#include + #include #include + #include "FRC_NetworkCommunication/CANSessionMux.h" #include "HAL/HAL.h" #include "Log.h" #include "edu_wpi_first_wpilibj_hal_HALUtil.h" -#include "errno.h" // set the logging level TLogLevel halUtilLogLevel = logWARNING;