mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Classify other libraries' headers properly and fix committed formatting issues (#620)
This commit is contained in:
committed by
Peter Johnson
parent
a4e781a231
commit
6e4f66cc8b
@@ -9,8 +9,9 @@
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include <FRC_NetworkCommunication/AICalibration.h>
|
||||
|
||||
#include "AnalogInternal.h"
|
||||
#include "FRC_NetworkCommunication/AICalibration.h"
|
||||
#include "HAL/AnalogAccumulator.h"
|
||||
#include "HAL/HAL.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
#include <FRC_NetworkCommunication/LoadOut.h>
|
||||
|
||||
#include "ConstantsInternal.h"
|
||||
#include "FRC_NetworkCommunication/LoadOut.h"
|
||||
#include "HAL/AnalogTrigger.h"
|
||||
#include "HAL/ChipObject.h"
|
||||
#include "HAL/HAL.h"
|
||||
|
||||
@@ -11,11 +11,12 @@
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
|
||||
#include "FRC_NetworkCommunication/FRCComm.h"
|
||||
#include <FRC_NetworkCommunication/FRCComm.h>
|
||||
#include <llvm/raw_ostream.h>
|
||||
|
||||
#include "HAL/DriverStation.h"
|
||||
#include "HAL/cpp/priority_condition_variable.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
#include "llvm/raw_ostream.h"
|
||||
|
||||
static_assert(sizeof(int32_t) >= sizeof(int),
|
||||
"FRC_NetworkComm status variable is larger than 32 bits");
|
||||
|
||||
@@ -17,9 +17,11 @@
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
#include "FRC_NetworkCommunication/CANSessionMux.h"
|
||||
#include "FRC_NetworkCommunication/FRCComm.h"
|
||||
#include "FRC_NetworkCommunication/LoadOut.h"
|
||||
#include <FRC_NetworkCommunication/CANSessionMux.h>
|
||||
#include <FRC_NetworkCommunication/FRCComm.h>
|
||||
#include <FRC_NetworkCommunication/LoadOut.h>
|
||||
#include <llvm/raw_ostream.h>
|
||||
|
||||
#include "HAL/ChipObject.h"
|
||||
#include "HAL/DriverStation.h"
|
||||
#include "HAL/Errors.h"
|
||||
@@ -28,7 +30,6 @@
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
#include "ctre/ctre.h"
|
||||
#include "llvm/raw_ostream.h"
|
||||
#include "visa/visa.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
|
||||
#include "HAL/I2C.h"
|
||||
|
||||
#include <i2clib/i2c-lib.h>
|
||||
|
||||
#include "DigitalInternal.h"
|
||||
#include "HAL/DIO.h"
|
||||
#include "HAL/HAL.h"
|
||||
#include "i2clib/i2c-lib.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <support/SafeThread.h>
|
||||
|
||||
#include "DigitalInternal.h"
|
||||
#include "HAL/ChipObject.h"
|
||||
#include "HAL/Errors.h"
|
||||
@@ -16,7 +18,6 @@
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
#include "HAL/handles/LimitedHandleResource.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "support/SafeThread.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include <llvm/raw_ostream.h>
|
||||
#include <spilib/spi-lib.h>
|
||||
|
||||
#include "DigitalInternal.h"
|
||||
#include "HAL/DIO.h"
|
||||
#include "HAL/HAL.h"
|
||||
@@ -16,8 +19,6 @@
|
||||
#include "HAL/cpp/make_unique.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
#include "llvm/raw_ostream.h"
|
||||
#include "spilib/spi-lib.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
|
||||
#include "HAL/Solenoid.h"
|
||||
|
||||
#include "FRC_NetworkCommunication/LoadOut.h"
|
||||
#include <FRC_NetworkCommunication/LoadOut.h>
|
||||
|
||||
#include "HAL/ChipObject.h"
|
||||
#include "HAL/Errors.h"
|
||||
#include "HAL/Ports.h"
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#include <llvm/StringRef.h>
|
||||
|
||||
#include "../visa/visa.h"
|
||||
#include "HAL/Errors.h"
|
||||
#include "llvm/StringRef.h"
|
||||
|
||||
constexpr const char* OnboardResourceVISA = "ASRL1::INSTR";
|
||||
constexpr const char* MxpResourceVISA = "ASRL2::INSTR";
|
||||
|
||||
@@ -12,31 +12,31 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "FRC_FPGA_ChipObject/RoboRIO_FRC_ChipObject_Aliases.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/nInterfaceGlobals.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAI.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAO.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAccel.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAccumulator.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAlarm.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAnalogTrigger.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tBIST.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tCounter.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tDIO.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tDMA.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tEncoder.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tGlobal.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tInterrupt.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tPWM.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tPower.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tRelay.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tSPI.h"
|
||||
#include "FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tSysWatchdog.h"
|
||||
#include "FRC_FPGA_ChipObject/tDMAChannelDescriptor.h"
|
||||
#include "FRC_FPGA_ChipObject/tDMAManager.h"
|
||||
#include "FRC_FPGA_ChipObject/tInterruptManager.h"
|
||||
#include "FRC_FPGA_ChipObject/tSystem.h"
|
||||
#include "FRC_FPGA_ChipObject/tSystemInterface.h"
|
||||
#include <FRC_FPGA_ChipObject/RoboRIO_FRC_ChipObject_Aliases.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/nInterfaceGlobals.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAI.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAO.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAccel.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAccumulator.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAlarm.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tAnalogTrigger.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tBIST.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tCounter.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tDIO.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tDMA.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tEncoder.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tGlobal.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tInterrupt.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tPWM.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tPower.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tRelay.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tSPI.h>
|
||||
#include <FRC_FPGA_ChipObject/nRoboRIO_FPGANamespace/tSysWatchdog.h>
|
||||
#include <FRC_FPGA_ChipObject/tDMAChannelDescriptor.h>
|
||||
#include <FRC_FPGA_ChipObject/tDMAManager.h>
|
||||
#include <FRC_FPGA_ChipObject/tInterruptManager.h>
|
||||
#include <FRC_FPGA_ChipObject/tSystem.h>
|
||||
#include <FRC_FPGA_ChipObject/tSystemInterface.h>
|
||||
|
||||
namespace hal {
|
||||
using namespace nFPGA;
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "HAL/Types.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#define NativeThreadHandle const HANDLE*
|
||||
@@ -17,6 +15,8 @@
|
||||
#define NativeThreadHandle const pthread_t*
|
||||
#endif
|
||||
|
||||
#include "HAL/Types.h"
|
||||
|
||||
extern "C" {
|
||||
int32_t HAL_GetThreadPriority(NativeThreadHandle handle, HAL_Bool* isRealTime,
|
||||
int32_t* status);
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include <chrono>
|
||||
#include <string>
|
||||
|
||||
#include "llvm/SmallString.h"
|
||||
#include "llvm/raw_ostream.h"
|
||||
#include <llvm/SmallString.h>
|
||||
#include <llvm/raw_ostream.h>
|
||||
|
||||
inline std::string NowTime();
|
||||
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <llvm/SmallString.h>
|
||||
#include <llvm/SmallVector.h>
|
||||
|
||||
#include "HAL/SerialPort.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
#include "llvm/SmallString.h"
|
||||
#include "llvm/SmallVector.h"
|
||||
|
||||
namespace hal {
|
||||
class SerialHelper {
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
|
||||
#include "HAL/cpp/fpga_clock.h"
|
||||
|
||||
#include <llvm/raw_ostream.h>
|
||||
|
||||
#include "HAL/HAL.h"
|
||||
#include "llvm/raw_ostream.h"
|
||||
|
||||
namespace hal {
|
||||
const fpga_clock::time_point fpga_clock::min_time =
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <llvm/SmallVector.h>
|
||||
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
#include "llvm/SmallVector.h"
|
||||
|
||||
namespace hal {
|
||||
static llvm::SmallVector<HandleBase*, 32> globalHandles;
|
||||
|
||||
@@ -176,16 +176,10 @@ void HAL_ObserveUserProgramTest(void) {
|
||||
static pthread_key_t lastCountKey;
|
||||
static pthread_once_t lastCountKeyOnce = PTHREAD_ONCE_INIT;
|
||||
|
||||
static void InitLastCountKey() {
|
||||
pthread_key_create(&lastCountKey, std::free);
|
||||
}
|
||||
static void InitLastCountKey() { pthread_key_create(&lastCountKey, std::free); }
|
||||
#endif
|
||||
|
||||
bool HAL_IsNewControlData(void) {
|
||||
// There is a rollover error condition here. At Packet# = n * (uintmax), this
|
||||
// will return false when instead it should return true. However, this at a
|
||||
// 20ms rate occurs once every 2.7 years of DS connected runtime, so not
|
||||
// worth the cycles to check.
|
||||
#ifdef __APPLE__
|
||||
pthread_once(&lastCountKeyOnce, InitLastCountKey);
|
||||
int* lastCountPtr = static_cast<int*>(pthread_getspecific(lastCountKey));
|
||||
@@ -198,6 +192,10 @@ bool HAL_IsNewControlData(void) {
|
||||
#else
|
||||
thread_local int lastCount{-1};
|
||||
#endif
|
||||
// There is a rollover error condition here. At Packet# = n * (uintmax), this
|
||||
// will return false when instead it should return true. However, this at a
|
||||
// 20ms rate occurs once every 2.7 years of DS connected runtime, so not
|
||||
// worth the cycles to check.
|
||||
int currentCount = 0;
|
||||
{
|
||||
std::unique_lock<hal::priority_mutex> lock(newDSDataAvailableMutex);
|
||||
|
||||
@@ -10,8 +10,9 @@
|
||||
#include <cstdio>
|
||||
#include <thread>
|
||||
|
||||
#include <support/timestamp.h>
|
||||
|
||||
#include "MockHooksInternal.h"
|
||||
#include "support/timestamp.h"
|
||||
|
||||
static std::atomic<bool> programStarted{false};
|
||||
|
||||
|
||||
@@ -10,12 +10,13 @@
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
|
||||
#include <support/SafeThread.h>
|
||||
#include <support/timestamp.h>
|
||||
|
||||
#include "HAL/HAL.h"
|
||||
#include "HAL/cpp/fpga_clock.h"
|
||||
#include "HAL/cpp/make_unique.h"
|
||||
#include "HAL/handles/UnlimitedHandleResource.h"
|
||||
#include "support/SafeThread.h"
|
||||
#include "support/timestamp.h"
|
||||
|
||||
namespace {
|
||||
class NotifierThread : public wpi::SafeThread {
|
||||
|
||||
Reference in New Issue
Block a user