mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Remove large HAL headers from wpilibc headers (#1386)
Now only includes the types in the wpilib headers. Should immensely clean up intellisense. Closes #1383
This commit is contained in:
committed by
Peter Johnson
parent
f774e47c80
commit
f0b0965f9b
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hal/AnalogOutput.h>
|
||||
#include <hal/Types.h>
|
||||
|
||||
#include "frc/ErrorBase.h"
|
||||
#include "frc/smartdashboard/SendableBase.h"
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hal/AnalogTrigger.h>
|
||||
|
||||
#include "frc/DigitalSource.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <hal/CANAPI.h>
|
||||
#include <hal/CANAPITypes.h>
|
||||
#include <wpi/ArrayRef.h>
|
||||
|
||||
#include "frc/ErrorBase.h"
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <hal/Counter.h>
|
||||
#include <hal/Types.h>
|
||||
|
||||
#include "frc/AnalogTrigger.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#include <hal/DriverStation.h>
|
||||
#include <hal/DriverStationTypes.h>
|
||||
#include <wpi/Twine.h>
|
||||
#include <wpi/condition_variable.h>
|
||||
#include <wpi/deprecated.h>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <hal/Encoder.h>
|
||||
#include <hal/Types.h>
|
||||
|
||||
#include "frc/Counter.h"
|
||||
#include "frc/CounterBase.h"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <hal/I2C.h>
|
||||
#include <hal/I2CTypes.h>
|
||||
|
||||
#include "frc/ErrorBase.h"
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
|
||||
#include <hal/Notifier.h>
|
||||
#include <hal/Types.h>
|
||||
#include <wpi/mutex.h>
|
||||
|
||||
#include "frc/ErrorBase.h"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hal/PDP.h>
|
||||
#include <hal/Types.h>
|
||||
|
||||
#include "frc/ErrorBase.h"
|
||||
#include "frc/smartdashboard/SendableBase.h"
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include <hal/HAL.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
|
||||
#include "frc/Base.h"
|
||||
@@ -18,15 +17,14 @@ namespace frc {
|
||||
|
||||
class DriverStation;
|
||||
|
||||
int RunHALInitialization();
|
||||
|
||||
template <class Robot>
|
||||
int StartRobot() {
|
||||
if (!HAL_Initialize(500, 0)) {
|
||||
wpi::errs() << "FATAL ERROR: HAL could not be initialized\n";
|
||||
return -1;
|
||||
int halInit = RunHALInitialization();
|
||||
if (halInit != 0) {
|
||||
return halInit;
|
||||
}
|
||||
HAL_Report(HALUsageReporting::kResourceType_Language,
|
||||
HALUsageReporting::kLanguage_CPlusPlus);
|
||||
wpi::outs() << "\n********** Robot program starting **********\n";
|
||||
static Robot robot;
|
||||
robot.StartCompetition();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <hal/SPI.h>
|
||||
#include <hal/SPITypes.h>
|
||||
#include <wpi/ArrayRef.h>
|
||||
#include <wpi/deprecated.h>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hal/Notifier.h>
|
||||
#include <hal/Types.h>
|
||||
|
||||
#include "frc/ErrorBase.h"
|
||||
#include "frc/IterativeRobotBase.h"
|
||||
|
||||
Reference in New Issue
Block a user