[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:
Kevin Jaget
2020-10-03 12:21:03 -04:00
committed by GitHub
parent 9a63cd36cd
commit fa809b2c4b
66 changed files with 72 additions and 166 deletions

View File

@@ -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"

View File

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

View File

@@ -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 {

View File

@@ -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"

View File

@@ -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 {

View File

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

View File

@@ -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"

View File

@@ -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
{

View File

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

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-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,9 +7,11 @@
#include "hal/cpp/fpga_clock.h"
#include <limits>
#include <wpi/raw_ostream.h>
#include "hal/HAL.h"
#include "hal/HALBase.h"
namespace hal {
const fpga_clock::time_point fpga_clock::min_time =

View File

@@ -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. */
@@ -9,8 +9,6 @@
#include <stdint.h>
#include "hal/Types.h"
/**
* @defgroup hal_canstream CAN Stream Functions
* @ingroup hal_capi

View File

@@ -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. */
@@ -10,7 +10,6 @@
#include <stdint.h>
#include "hal/I2CTypes.h"
#include "hal/Types.h"
/**
* @defgroup hal_i2c I2C Functions

View File

@@ -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. */
@@ -7,8 +7,6 @@
#pragma once
#include <stdint.h>
#include "hal/Types.h"
/**

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-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 @@
#pragma once
#include <chrono>
#include <limits>
/** WPILib Hardware Abstraction Layer (HAL) namespace */
namespace hal {

View File

@@ -9,7 +9,6 @@
#include "hal/Types.h"
#include "hal/Value.h"
#include "hal/simulation/NotifyListener.h"
typedef void (*HALSIM_SimDeviceCallback)(const char* name, void* param,
HAL_SimDeviceHandle handle);

View File

@@ -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,13 +7,10 @@
#include "hal/AnalogGyro.h"
#include <chrono>
#include <thread>
#include "AnalogInternal.h"
#include "HALInitializer.h"
#include "PortsInternal.h"
#include "hal/AnalogAccumulator.h"
#include "hal/AnalogInput.h"
#include "hal/Errors.h"
#include "hal/handles/IndexedHandleResource.h"
#include "mockdata/AnalogGyroDataInternal.h"

View File

@@ -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,7 @@
#include "AnalogInternal.h"
#include "PortsInternal.h"
#include "hal/AnalogInput.h"
#include "hal/handles/IndexedHandleResource.h"
namespace hal {
IndexedHandleResource<HAL_AnalogInputHandle, hal::AnalogPort, kNumAnalogInputs,

View File

@@ -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. */
@@ -9,10 +9,8 @@
#include <stdint.h>
#include <memory>
#include "PortsInternal.h"
#include "hal/Ports.h"
#include "hal/handles/HandlesInternal.h"
#include "hal/handles/IndexedHandleResource.h"
namespace hal {

View File

@@ -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,16 +7,13 @@
#include "hal/CANAPI.h"
#include <atomic>
#include <ctime>
#include <wpi/DenseMap.h>
#include "CANAPIInternal.h"
#include "HALInitializer.h"
#include "hal/CAN.h"
#include "hal/Errors.h"
#include "hal/HAL.h"
#include "hal/HALBase.h"
#include "hal/handles/UnlimitedHandleResource.h"
using namespace hal;

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-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. */
@@ -10,7 +10,6 @@
#include "CounterInternal.h"
#include "HALInitializer.h"
#include "PortsInternal.h"
#include "hal/Errors.h"
#include "hal/handles/HandlesInternal.h"
#include "hal/handles/LimitedHandleResource.h"

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2019 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,8 +7,6 @@
#include "hal/DIO.h"
#include <cmath>
#include "DigitalInternal.h"
#include "HALInitializer.h"
#include "PortsInternal.h"

View File

@@ -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,11 +7,11 @@
#include "DigitalInternal.h"
#include "ConstantsInternal.h"
#include "PortsInternal.h"
#include "hal/AnalogTrigger.h"
#include "hal/HAL.h"
#include "hal/Ports.h"
#include "hal/Errors.h"
#include "hal/handles/DigitalHandleResource.h"
#include "hal/handles/HandlesInternal.h"
namespace hal {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2019 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. */
@@ -9,14 +9,9 @@
#include <stdint.h>
#include <memory>
#include "PortsInternal.h"
#include "hal/AnalogTrigger.h"
#include "hal/Ports.h"
#include "hal/Types.h"
#include "hal/handles/DigitalHandleResource.h"
#include "hal/handles/HandlesInternal.h"
namespace hal {
/**

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-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. */
@@ -10,7 +10,6 @@
#include "CounterInternal.h"
#include "HALInitializer.h"
#include "PortsInternal.h"
#include "hal/Counter.h"
#include "hal/Errors.h"
#include "hal/handles/HandlesInternal.h"
#include "hal/handles/LimitedHandleResource.h"

View File

@@ -12,12 +12,9 @@
#include <wpi/Path.h>
#include <wpi/SmallString.h>
#include <wpi/StringRef.h>
#include <wpi/mutex.h>
#include <wpi/raw_ostream.h>
#include <wpi/spinlock.h>
#include "hal/HAL.h"
#if defined(WIN32) || defined(_WIN32)
#include <windows.h>
#else

View File

@@ -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 {

View File

@@ -16,11 +16,11 @@
#include <wpi/SmallVector.h>
#include <wpi/condition_variable.h>
#include <wpi/mutex.h>
#include <wpi/timestamp.h>
#include "HALInitializer.h"
#include "NotifierInternal.h"
#include "hal/HAL.h"
#include "hal/Errors.h"
#include "hal/HALBase.h"
#include "hal/cpp/fpga_clock.h"
#include "hal/handles/UnlimitedHandleResource.h"
#include "hal/simulation/NotifierData.h"

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-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. */
@@ -11,7 +11,7 @@
#include "HALInitializer.h"
#include "PortsInternal.h"
#include "hal/CANAPI.h"
#include "hal/handles/IndexedHandleResource.h"
#include "hal/Errors.h"
#include "mockdata/PDPDataInternal.h"
using namespace hal;

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2019 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. */
@@ -12,7 +12,7 @@
#include "hal/Errors.h"
#include "hal/handles/HandlesInternal.h"
#include "hal/handles/IndexedHandleResource.h"
#include "mockdata/PCMDataInternal.h"
#include "hal/simulation/PCMData.h"
namespace {
struct Solenoid {

View File

@@ -5,9 +5,7 @@
/* the project. */
/*----------------------------------------------------------------------------*/
#include <cstdlib>
#include <cstring>
#include <string>
#include "DriverStationDataInternal.h"
#include "hal/DriverStation.h"

View File

@@ -1,12 +1,10 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-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. */
/*----------------------------------------------------------------------------*/
#include <iostream>
#include "../PortsInternal.h"
#include "I2CDataInternal.h"

View File

@@ -1,12 +1,10 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-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. */
/*----------------------------------------------------------------------------*/
#include <iostream>
#include "../PortsInternal.h"
#include "SPIDataInternal.h"

View File

@@ -9,6 +9,7 @@
#include <hal/FRCUsageReporting.h>
#include "frc/Base.h"
#include "frc/WPIErrors.h"
#include "frc/smartdashboard/SendableBuilder.h"
#include "frc/smartdashboard/SendableRegistry.h"

View File

@@ -8,6 +8,7 @@
#include "frc/AnalogEncoder.h"
#include "frc/AnalogInput.h"
#include "frc/Base.h"
#include "frc/Counter.h"
#include "frc/DriverStation.h"
#include "frc/smartdashboard/SendableBuilder.h"

View File

@@ -15,6 +15,7 @@
#include <hal/FRCUsageReporting.h>
#include "frc/AnalogInput.h"
#include "frc/Base.h"
#include "frc/Timer.h"
#include "frc/WPIErrors.h"
#include "frc/smartdashboard/SendableRegistry.h"

View File

@@ -7,8 +7,6 @@
#include "frc/AnalogInput.h"
#include <utility>
#include <hal/AnalogAccumulator.h>
#include <hal/AnalogInput.h>
#include <hal/FRCUsageReporting.h>

View File

@@ -7,6 +7,7 @@
#include "frc/AnalogPotentiometer.h"
#include "frc/Base.h"
#include "frc/RobotController.h"
#include "frc/smartdashboard/SendableBuilder.h"
#include "frc/smartdashboard/SendableRegistry.h"

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-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. */
@@ -12,6 +12,7 @@
#include <hal/FRCUsageReporting.h>
#include "frc/AnalogInput.h"
#include "frc/Base.h"
#include "frc/DutyCycle.h"
#include "frc/WPIErrors.h"
#include "frc/smartdashboard/SendableRegistry.h"

View File

@@ -13,6 +13,7 @@
#include <hal/FRCUsageReporting.h>
#include "frc/AnalogTrigger.h"
#include "frc/Base.h"
#include "frc/DigitalInput.h"
#include "frc/WPIErrors.h"
#include "frc/smartdashboard/SendableBuilder.h"

View File

@@ -8,7 +8,6 @@
#include "frc/DigitalInput.h"
#include <limits>
#include <utility>
#include <hal/DIO.h>
#include <hal/FRCUsageReporting.h>

View File

@@ -8,7 +8,6 @@
#include "frc/DigitalOutput.h"
#include <limits>
#include <utility>
#include <hal/DIO.h>
#include <hal/FRCUsageReporting.h>

View File

@@ -10,7 +10,6 @@
#include <chrono>
#include <hal/DriverStation.h>
#include <hal/FRCUsageReporting.h>
#include <hal/HALBase.h>
#include <hal/Power.h>
#include <networktables/NetworkTable.h>
@@ -19,10 +18,8 @@
#include <wpi/SmallString.h>
#include <wpi/StringRef.h>
#include "frc/AnalogInput.h"
#include "frc/MotorSafety.h"
#include "frc/Timer.h"
#include "frc/Utility.h"
#include "frc/WPIErrors.h"
namespace frc {

View File

@@ -10,6 +10,7 @@
#include <hal/DutyCycle.h>
#include <hal/FRCUsageReporting.h>
#include "frc/Base.h"
#include "frc/DigitalSource.h"
#include "frc/WPIErrors.h"
#include "frc/smartdashboard/SendableBuilder.h"

View File

@@ -7,6 +7,7 @@
#include "frc/DutyCycleEncoder.h"
#include "frc/Base.h"
#include "frc/Counter.h"
#include "frc/DigitalInput.h"
#include "frc/DigitalSource.h"

View File

@@ -12,6 +12,7 @@
#include <hal/Encoder.h>
#include <hal/FRCUsageReporting.h>
#include "frc/Base.h"
#include "frc/DigitalInput.h"
#include "frc/WPIErrors.h"
#include "frc/smartdashboard/SendableBuilder.h"

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-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. */
@@ -10,9 +10,9 @@
#include <wpi/Path.h>
#include <wpi/StackTrace.h>
#include "frc/Base.h"
#include "frc/DriverStation.h"
#include "frc/Timer.h"
#include "frc/Utility.h"
using namespace frc;

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-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,17 +8,17 @@
#include "frc/ErrorBase.h"
#include <cerrno>
#include <cstdio>
#include <cstring>
#include <set>
#include <utility>
#include <hal/FRCUsageReporting.h>
#include <hal/HALBase.h>
#include <wpi/Format.h>
#include <wpi/SmallString.h>
#include <wpi/mutex.h>
#include <wpi/raw_ostream.h>
#include "frc/WPIErrors.h"
#include "frc/Base.h"
using namespace frc;

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2019 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 "frc/GenericHID.h"
#include <hal/DriverStation.h>
#include <hal/FRCUsageReporting.h>
#include "frc/DriverStation.h"
#include "frc/WPIErrors.h"

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-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,8 +7,6 @@
#include "frc/InterruptableSensorBase.h"
#include <hal/FRCUsageReporting.h>
#include "frc/Utility.h"
#include "frc/WPIErrors.h"

View File

@@ -7,16 +7,12 @@
#include "frc/IterativeRobotBase.h"
#include <cstdio>
#include <hal/DriverStation.h>
#include <hal/FRCUsageReporting.h>
#include <wpi/Format.h>
#include <wpi/SmallString.h>
#include <wpi/raw_ostream.h>
#include "frc/DriverStation.h"
#include "frc/Timer.h"
#include "frc/livewindow/LiveWindow.h"
#include "frc/shuffleboard/Shuffleboard.h"
#include "frc/smartdashboard/SmartDashboard.h"

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-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. */
@@ -12,9 +12,6 @@
#include <hal/FRCUsageReporting.h>
#include <wpi/math>
#include "frc/DriverStation.h"
#include "frc/WPIErrors.h"
using namespace frc;
Joystick::Joystick(int port) : GenericHID(port) {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-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 "frc/RobotController.h"
#include <hal/CAN.h>
#include <hal/FRCUsageReporting.h>
#include <hal/HALBase.h>
#include <hal/Power.h>

View File

@@ -10,7 +10,6 @@
#include <hal/AnalogInput.h>
#include <hal/AnalogOutput.h>
#include <hal/DIO.h>
#include <hal/FRCUsageReporting.h>
#include <hal/PDP.h>
#include <hal/PWM.h>
#include <hal/Ports.h>

View File

@@ -7,13 +7,7 @@
#include "frc/Timer.h"
#include <chrono>
#include <thread>
#include <hal/FRCUsageReporting.h>
#include "frc/DriverStation.h"
#include "frc/RobotController.h"
#include <units/time.h>
namespace frc {

View File

@@ -9,6 +9,7 @@
#include <hal/FRCUsageReporting.h>
#include "frc/Base.h"
#include "frc/Counter.h"
#include "frc/DigitalInput.h"
#include "frc/DigitalOutput.h"

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-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. */
@@ -12,19 +12,13 @@
#include <execinfo.h>
#endif
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <frc/Base.h>
#include <hal/DriverStation.h>
#include <hal/FRCUsageReporting.h>
#include <wpi/Path.h>
#include <wpi/SmallString.h>
#include <wpi/StackTrace.h>
#include <wpi/raw_ostream.h>
#include "frc/ErrorBase.h"
using namespace frc;
bool wpi_assert_impl(bool conditionValue, const wpi::Twine& conditionText,

View File

@@ -10,8 +10,6 @@
#include <chrono>
#include <thread>
#include <hal/FRCUsageReporting.h>
#include "frc/DriverStation.h"
#include "frc/RobotController.h"

View File

@@ -10,7 +10,6 @@
#include <stdint.h>
#include <hal/CANAPITypes.h>
#include <wpi/ArrayRef.h>
#include "frc/ErrorBase.h"

View File

@@ -16,11 +16,9 @@
#include <hal/DriverStationTypes.h>
#include <wpi/Twine.h>
#include <wpi/condition_variable.h>
#include <wpi/deprecated.h>
#include <wpi/mutex.h>
#include "frc/ErrorBase.h"
#include "frc/RobotState.h"
namespace frc {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-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,8 +7,6 @@
#pragma once
#include <stdint.h>
#include <string>
#include <wpi/StringRef.h>
@@ -19,8 +17,6 @@
#undef GetMessage
#endif
#include "frc/Base.h"
namespace frc {
class ErrorBase;

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-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. */
@@ -11,9 +11,7 @@
#include <wpi/StringRef.h>
#include <wpi/Twine.h>
#include <wpi/mutex.h>
#include "frc/Base.h"
#include "frc/Error.h"
// Forward declared manually to avoid needing to pull in entire HAL header.

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-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. */
@@ -9,8 +9,6 @@
#include <array>
#include <wpi/deprecated.h>
#include "frc/GenericHID.h"
namespace frc {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-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,8 +7,6 @@
#pragma once
#include <memory>
namespace frc {
class RobotState {

View File

@@ -7,11 +7,6 @@
#pragma once
#include <units/time.h>
#include <wpi/deprecated.h>
#include <wpi/mutex.h>
#include "frc/Base.h"
#include "frc2/Timer.h"
namespace frc {

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
/* Copyright (c) 2008-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. */
@@ -11,13 +11,8 @@
* @file Contains global utility functions
*/
#include <stdint.h>
#include <string>
#include <wpi/StringRef.h>
#include <wpi/Twine.h>
#include <wpi/deprecated.h>
#define wpi_assert(condition) \
wpi_assert_impl(condition, #condition, "", __FILE__, __LINE__, __FUNCTION__)

View File

@@ -8,11 +8,8 @@
#pragma once
#include <units/time.h>
#include <wpi/deprecated.h>
#include <wpi/mutex.h>
#include "frc/Base.h"
namespace frc2 {
/**