SCRIPT: wpiformat

This commit is contained in:
PJ Reiniger
2025-11-07 19:57:55 -05:00
committed by Peter Johnson
parent c48b722dac
commit 1e7604f81c
1218 changed files with 2709 additions and 3267 deletions

View File

@@ -5,12 +5,11 @@
#include "wpi/hardware/accelerometer/AnalogAccelerometer.hpp"
#include "wpi/hal/UsageReporting.h"
#include "wpi/system/Errors.hpp"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/system/Errors.hpp"
using namespace frc;
AnalogAccelerometer::AnalogAccelerometer(int channel)

View File

@@ -2,15 +2,14 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/CAN.h"
#include "wpi/hardware/bus/CAN.hpp"
#include <utility>
#include "wpi/hal/CAN.h"
#include "wpi/hal/CANAPI.h"
#include "wpi/hal/Errors.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/system/Errors.hpp"
using namespace frc;

View File

@@ -2,13 +2,12 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/I2C.h"
#include "wpi/hardware/bus/I2C.hpp"
#include <algorithm>
#include "wpi/hal/I2C.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/system/Errors.hpp"
using namespace frc;

View File

@@ -2,13 +2,12 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/SerialPort.h"
#include "wpi/hardware/bus/SerialPort.hpp"
#include <string>
#include "wpi/hal/SerialPort.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/system/Errors.hpp"
using namespace frc;

View File

@@ -2,22 +2,21 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/AnalogInput.h"
#include "wpi/hardware/discrete/AnalogInput.hpp"
#include <string>
#include "wpi/hal/AnalogInput.h"
#include "wpi/hal/HALBase.h"
#include "wpi/hal/Ports.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/system/Errors.hpp"
#include "wpi/system/Timer.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/util/StackTrace.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/system/Timer.hpp"
using namespace frc;
AnalogInput::AnalogInput(int channel) {

View File

@@ -10,13 +10,12 @@
#include "wpi/hal/HALBase.h"
#include "wpi/hal/Ports.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/util/StackTrace.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
using namespace frc;
DigitalInput::DigitalInput(int channel) {

View File

@@ -10,13 +10,12 @@
#include "wpi/hal/HALBase.h"
#include "wpi/hal/Ports.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/util/StackTrace.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
using namespace frc;
DigitalOutput::DigitalOutput(int channel) {

View File

@@ -2,21 +2,20 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/PWM.h"
#include "wpi/hardware/discrete/PWM.hpp"
#include <utility>
#include "wpi/hal/HALBase.h"
#include "wpi/hal/PWM.h"
#include "wpi/hal/Ports.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/util/StackTrace.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
using namespace frc;
PWM::PWM(int channel, bool registerSendable) {

View File

@@ -5,7 +5,6 @@
#include "wpi/hardware/imu/OnboardIMU.hpp"
#include "wpi/hal/IMU.h"
#include "wpi/system/Errors.hpp"
using namespace frc;

View File

@@ -2,19 +2,18 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/AddressableLED.h"
#include "wpi/hardware/led/AddressableLED.hpp"
#include <algorithm>
#include "wpi/hal/AddressableLED.h"
#include "wpi/hal/HALBase.h"
#include "wpi/hal/PWM.h"
#include "wpi/hal/Ports.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/util/StackTrace.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/util/StackTrace.hpp"
using namespace frc;

View File

@@ -11,11 +11,10 @@
#include <utility>
#include <vector>
#include "wpi/math/util/MathUtil.hpp"
#include "wpi/util/MathExtras.hpp"
#include "wpi/util/timestamp.h"
#include "wpi/math/util/MathUtil.hpp"
using namespace frc;
LEDPattern::LEDPattern(std::function<void(frc::LEDPattern::LEDReader,

View File

@@ -7,13 +7,12 @@
#include <algorithm>
#include <utility>
#include "wpi/driverstation/DriverStation.hpp"
#include "wpi/hal/DriverStation.h"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SafeThread.hpp"
#include "wpi/util/SmallPtrSet.hpp"
#include "wpi/driverstation/DriverStation.hpp"
#include "wpi/system/Errors.hpp"
using namespace frc;
namespace {

View File

@@ -4,14 +4,12 @@
#include "wpi/hardware/pneumatic/Compressor.hpp"
#include "wpi/hardware/pneumatic/PneumaticHub.hpp"
#include "wpi/hal/Ports.h"
#include "wpi/hardware/pneumatic/PneumaticHub.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/system/Errors.hpp"
using namespace frc;
Compressor::Compressor(int busId, int module, PneumaticsModuleType moduleType)

View File

@@ -7,13 +7,12 @@
#include <utility>
#include "wpi/hal/Ports.h"
#include "wpi/system/Errors.hpp"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
using namespace frc;
DoubleSolenoid::DoubleSolenoid(int busId, int module,

View File

@@ -10,18 +10,18 @@
#include <string>
#include <fmt/format.h>
#include "wpi/hal/Ports.h"
#include "wpi/hal/REVPH.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/StackTrace.hpp"
#include "wpi/hardware/pneumatic/Compressor.hpp"
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/opmode/RobotBase.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/hardware/pneumatic/Solenoid.hpp"
#include "wpi/opmode/RobotBase.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/util/StackTrace.hpp"
using namespace frc;

View File

@@ -7,10 +7,9 @@
#include <memory>
#include "wpi/hal/REVPH.h"
#include "wpi/system/Errors.hpp"
#include "wpi/hardware/pneumatic/PneumaticHub.hpp"
#include "wpi/hardware/pneumatic/PneumaticsControlModule.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
using namespace frc;

View File

@@ -8,17 +8,17 @@
#include <string>
#include <fmt/format.h>
#include "wpi/hal/CTREPCM.h"
#include "wpi/hal/Ports.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/StackTrace.hpp"
#include "wpi/hardware/pneumatic/Compressor.hpp"
#include "wpi/hardware/pneumatic/DoubleSolenoid.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/hardware/pneumatic/Solenoid.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/util/StackTrace.hpp"
using namespace frc;

View File

@@ -6,13 +6,12 @@
#include <utility>
#include "wpi/system/Errors.hpp"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
using namespace frc;
Solenoid::Solenoid(int busId, int module, PneumaticsModuleType moduleType,

View File

@@ -2,20 +2,20 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/PowerDistribution.h"
#include "wpi/hardware/power/PowerDistribution.hpp"
#include <vector>
#include <fmt/format.h>
#include "wpi/hal/Ports.h"
#include "wpi/hal/PowerDistribution.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/system/Errors.hpp"
#include "wpi/util/StackTrace.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/system/Errors.hpp"
static_assert(static_cast<HAL_PowerDistributionType>(
frc::PowerDistribution::ModuleType::kCTRE) ==
HAL_PowerDistributionType::HAL_PowerDistributionType_kCTRE);

View File

@@ -7,12 +7,11 @@
#include <algorithm>
#include "wpi/hal/UsageReporting.h"
#include "wpi/hardware/discrete/AnalogInput.hpp"
#include "wpi/units/length.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/hardware/discrete/AnalogInput.hpp"
using namespace frc;
SharpIR SharpIR::GP2Y0A02YK0F(int channel) {

View File

@@ -7,12 +7,11 @@
#include <utility>
#include "wpi/hal/UsageReporting.h"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/hardware/discrete/AnalogInput.hpp"
#include "wpi/math/util/MathUtil.hpp"
#include "wpi/system/RobotController.hpp"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
using namespace frc;

View File

@@ -7,12 +7,11 @@
#include <memory>
#include <utility>
#include "wpi/system/RobotController.hpp"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/system/RobotController.hpp"
using namespace frc;
AnalogPotentiometer::AnalogPotentiometer(int channel, double fullRange,

View File

@@ -2,21 +2,20 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/DutyCycle.h"
#include "wpi/hardware/rotation/DutyCycle.hpp"
#include <string>
#include <utility>
#include "wpi/hal/DutyCycle.h"
#include "wpi/hal/HALBase.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/system/Errors.hpp"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/SensorUtil.hpp"
#include "wpi/util/StackTrace.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/SensorUtil.hpp"
using namespace frc;
DutyCycle::DutyCycle(int channel) : m_channel{channel} {

View File

@@ -7,12 +7,11 @@
#include <memory>
#include <utility>
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/hardware/discrete/DigitalInput.hpp"
#include "wpi/hardware/rotation/DutyCycle.hpp"
#include "wpi/math/util/MathUtil.hpp"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
using namespace frc;

View File

@@ -2,20 +2,19 @@
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "wpi/hal/Encoder.h"
#include "wpi/hardware/rotation/Encoder.hpp"
#include <memory>
#include <utility>
#include "wpi/hal/Encoder.h"
#include "wpi/hal/UsageReporting.h"
#include "wpi/hardware/discrete/DigitalInput.hpp"
#include "wpi/system/Errors.hpp"
#include "wpi/util/NullDeleter.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
#include "wpi/util/sendable/SendableRegistry.hpp"
#include "wpi/hardware/discrete/DigitalInput.hpp"
#include "wpi/system/Errors.hpp"
using namespace frc;
Encoder::Encoder(int aChannel, int bChannel, bool reverseDirection,