mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
[wpilibc] Clean up include files (#2708)
Based on run of include-what-you-use.org to identify unused include files in various .h and .cpp files. The changes mostly fall into 3 categories: - Actually unused includes - copy-paste errors, not removing includes after cleaning up code, etc - A too-broad include used where a more specific (and hopefully smaller) header will do - Interface .h files including headers only needed by the .cpp implementation - moving from .h to .cpp will mean that code which uses the .h doesn't pay the price of processing the header file they don't need
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "DigitalInternal.h"
|
||||
#include "HALInitializer.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "hal/AddressableLEDTypes.h"
|
||||
#include "hal/ChipObject.h"
|
||||
#include "hal/handles/HandlesInternal.h"
|
||||
#include "hal/handles/LimitedHandleResource.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include "hal/CANAPI.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <ctime>
|
||||
|
||||
#include <wpi/DenseMap.h>
|
||||
@@ -15,7 +14,6 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "hal/CAN.h"
|
||||
#include "hal/Errors.h"
|
||||
#include "hal/HAL.h"
|
||||
#include "hal/handles/UnlimitedHandleResource.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "HALInitializer.h"
|
||||
|
||||
#include "hal/HAL.h"
|
||||
#include "hal/HALBase.h"
|
||||
|
||||
namespace hal {
|
||||
namespace init {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "PCMInternal.h"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "hal/Errors.h"
|
||||
#include "hal/Solenoid.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "PortsInternal.h"
|
||||
#include "ctre/PCM.h"
|
||||
#include "hal/Errors.h"
|
||||
#include "hal/Ports.h"
|
||||
#include "hal/Solenoid.h"
|
||||
|
||||
namespace hal {
|
||||
|
||||
@@ -7,16 +7,12 @@
|
||||
|
||||
#include "hal/PDP.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "hal/CANAPI.h"
|
||||
#include "hal/Errors.h"
|
||||
#include "hal/Ports.h"
|
||||
#include "hal/handles/IndexedHandleResource.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -7,15 +7,11 @@
|
||||
|
||||
#include "hal/Solenoid.h"
|
||||
|
||||
#include <FRC_NetworkCommunication/LoadOut.h>
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "PCMInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "ctre/PCM.h"
|
||||
#include "hal/ChipObject.h"
|
||||
#include "hal/Errors.h"
|
||||
#include "hal/Ports.h"
|
||||
#include "hal/handles/HandlesInternal.h"
|
||||
#include "hal/handles/IndexedHandleResource.h"
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
#define CtreCanNode_H_
|
||||
#include "ctre.h" //BIT Defines + Typedefs
|
||||
#include <map>
|
||||
#include <string.h> // memcpy
|
||||
#include <sys/time.h>
|
||||
#include <wpi/mutex.h>
|
||||
class CtreCanNode
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#include "PCM.h"
|
||||
#include "FRC_NetworkCommunication/CANSessionMux.h"
|
||||
#include <string.h> // memset
|
||||
/* This can be a constant, as long as nobody needs to update solenoids within
|
||||
1/50 of a second. */
|
||||
static const INT32 kCANPeriod = 20;
|
||||
|
||||
Reference in New Issue
Block a user