mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Reordered headers according to the style guide (#58)
Subsections are alphabetized according to lexographic ordering. Also, HAL includes were moved from headers to source files where possible. This change may cause user code which uses HAL functionality and does not include the relevant HAL header (since it may have been provided by another WPILib header) to fail to compile.
This commit is contained in:
committed by
Peter Johnson
parent
a598e2d09b
commit
d82635bbe1
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum AnalogTriggerType {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "FRC_NetworkCommunication/CANSessionMux.h"
|
||||
|
||||
void canTxSend(uint32_t arbID, uint8_t length,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum Mode {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <cmath>
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <iostream>
|
||||
#include "errno.h"
|
||||
|
||||
extern "C" {
|
||||
typedef void (*InterruptHandlerFunction)(uint32_t interruptAssertedMask,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "../Errors.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#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 {
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <condition_variable>
|
||||
#include <cstdint>
|
||||
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <condition_variable>
|
||||
#include <memory>
|
||||
|
||||
#include "priority_mutex.h"
|
||||
|
||||
class priority_condition_variable {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ChipObject.h"
|
||||
|
||||
// The 7-bit I2C address with a 0 "send" bit
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "HAL/Compressor.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "ctre/PCM.h"
|
||||
|
||||
static const int NUM_MODULE_NUMBERS = 63;
|
||||
|
||||
@@ -5,22 +5,23 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#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 <math.h>
|
||||
#include <stdio.h>
|
||||
#include <mutex>
|
||||
#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"
|
||||
|
||||
@@ -8,12 +8,14 @@
|
||||
#include "HAL/HAL.h"
|
||||
|
||||
#include <signal.h> // linux for kill
|
||||
#include <stdlib.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <unistd.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <mutex>
|
||||
|
||||
#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;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "HAL/Interrupts.h"
|
||||
|
||||
#include "ChipObject.h"
|
||||
|
||||
extern void remapDigitalSource(bool analogTrigger, uint32_t& pin,
|
||||
|
||||
@@ -6,9 +6,12 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "HAL/Notifier.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <cstdlib>
|
||||
#include <mutex>
|
||||
|
||||
#include "ChipObject.h"
|
||||
#include "HAL/HAL.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "HAL/PDP.h"
|
||||
|
||||
#include "ctre/PDP.h"
|
||||
// static PDP pdp;
|
||||
|
||||
static const int NUM_MODULE_NUMBERS = 63;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "HAL/Power.h"
|
||||
|
||||
#include "ChipObject.h"
|
||||
|
||||
static tPower* power = NULL;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "HAL/SerialPort.h"
|
||||
|
||||
#include "visa/visa.h"
|
||||
|
||||
static uint32_t m_resourceManagerHandle;
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#include "HAL/Task.h"
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#ifndef OK
|
||||
#define OK 0
|
||||
#endif /* OK */
|
||||
@@ -14,8 +16,6 @@
|
||||
#define ERROR (-1)
|
||||
#endif /* ERROR */
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
STATUS verifyTaskID(TASK task) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "HAL/Utilities.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
const int32_t HAL_NO_WAIT = 0;
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include "HAL/cpp/Resource.h"
|
||||
#include <cstddef>
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "HAL/Errors.h"
|
||||
#include "HAL/cpp/priority_mutex.h"
|
||||
|
||||
|
||||
@@ -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 <cstring>
|
||||
|
||||
#include "FRC_NetworkCommunication/FRCComm.h"
|
||||
|
||||
struct HALJoystickAxesInt {
|
||||
|
||||
Reference in New Issue
Block a user