mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
SCRIPT: wpiformat
This commit is contained in:
committed by
Peter Johnson
parent
c48b722dac
commit
1e7604f81c
@@ -3,10 +3,10 @@
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "wpi/util/SmallString.hpp"
|
||||
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/HALBase.h"
|
||||
#include "wpi/util/SmallString.hpp"
|
||||
|
||||
namespace {
|
||||
struct LastErrorStorage {
|
||||
|
||||
@@ -7,9 +7,8 @@
|
||||
#include <cstdio>
|
||||
#include <limits>
|
||||
|
||||
#include "wpi/util/print.hpp"
|
||||
|
||||
#include "wpi/hal/HALBase.h"
|
||||
#include "wpi/util/print.hpp"
|
||||
|
||||
namespace hal {
|
||||
const fpga_clock::time_point fpga_clock::min_time =
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_AddressableLEDJNI.h"
|
||||
#include "wpi/hal/AddressableLED.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace wpi::java;
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_AnalogJNI.h"
|
||||
#include "wpi/hal/AnalogInput.h"
|
||||
#include "wpi/hal/Ports.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_CANAPIJNI.h"
|
||||
#include "wpi/hal/CAN.h"
|
||||
#include "wpi/hal/CANAPI.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace wpi::java;
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_can_CANJNI.h"
|
||||
#include "wpi/hal/CAN.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace wpi::java;
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_CTREPCMJNI.h"
|
||||
#include "wpi/hal/CTREPCM.h"
|
||||
#include "wpi/hal/Ports.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_CounterJNI.h"
|
||||
#include "wpi/hal/Counter.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -6,14 +6,13 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_DIOJNI.h"
|
||||
#include "wpi/hal/DIO.h"
|
||||
#include "wpi/hal/PWM.h"
|
||||
#include "wpi/hal/Ports.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -7,15 +7,16 @@
|
||||
#include <cassert>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_DriverStationJNI.h"
|
||||
#include "wpi/hal/DriverStation.h"
|
||||
#include "wpi/hal/HALBase.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kUnknownAllianceStation ==
|
||||
HAL_AllianceStationID_kUnknown);
|
||||
static_assert(
|
||||
org_wpilib_hardware_hal_DriverStationJNI_kUnknownAllianceStation ==
|
||||
HAL_AllianceStationID_kUnknown);
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kRed1AllianceStation ==
|
||||
HAL_AllianceStationID_kRed1);
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kRed2AllianceStation ==
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_DutyCycleJNI.h"
|
||||
#include "wpi/hal/DutyCycle.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
#include <cstring>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_HAL.h"
|
||||
#include "wpi/hal/DriverStation.h"
|
||||
#include "wpi/hal/Main.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace wpi::java;
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
#include <string>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "org_wpilib_hardware_hal_HALUtil.h"
|
||||
#include "wpi/hal/CAN.h"
|
||||
#include "wpi/hal/DriverStation.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/HAL.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace wpi::java;
|
||||
|
||||
@@ -30,7 +30,8 @@ using namespace wpi::java;
|
||||
#define kRIOStatusFeatureNotSupported (kRioStatusOffset - 193)
|
||||
#define kRIOStatusResourceNotInitialized -52010
|
||||
|
||||
static_assert(org_wpilib_hardware_hal_HALUtil_RUNTIME_ROBORIO == HAL_Runtime_RoboRIO);
|
||||
static_assert(org_wpilib_hardware_hal_HALUtil_RUNTIME_ROBORIO ==
|
||||
HAL_Runtime_RoboRIO);
|
||||
static_assert(org_wpilib_hardware_hal_HALUtil_RUNTIME_ROBORIO2 ==
|
||||
HAL_Runtime_RoboRIO2);
|
||||
static_assert(org_wpilib_hardware_hal_HALUtil_RUNTIME_SIMULATION ==
|
||||
@@ -73,7 +74,8 @@ static const JExceptionInit exceptions[] = {
|
||||
{"org/wpilib/hardware/hal/util/BoundaryException", &boundaryExCls},
|
||||
{"org/wpilib/hardware/hal/util/AllocationException", &allocationExCls},
|
||||
{"org/wpilib/hardware/hal/util/HalHandleException", &halHandleExCls},
|
||||
{"org/wpilib/hardware/hal/util/UncleanStatusException", &uncleanStatusExCls},
|
||||
{"org/wpilib/hardware/hal/util/UncleanStatusException",
|
||||
&uncleanStatusExCls},
|
||||
{"java/lang/NullPointerException", &nullPointerEx}};
|
||||
|
||||
namespace hal {
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_I2CJNI.h"
|
||||
#include "wpi/hal/I2C.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace wpi::java;
|
||||
|
||||
@@ -7,11 +7,10 @@
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_NotifierJNI.h"
|
||||
#include "wpi/hal/Notifier.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -6,14 +6,13 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_PWMJNI.h"
|
||||
#include "wpi/hal/DIO.h"
|
||||
#include "wpi/hal/PWM.h"
|
||||
#include "wpi/hal/Ports.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_PowerDistributionJNI.h"
|
||||
#include "wpi/hal/Ports.h"
|
||||
#include "wpi/hal/PowerDistribution.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_REVPHJNI.h"
|
||||
#include "wpi/hal/Ports.h"
|
||||
#include "wpi/hal/REVPH.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
static_assert(
|
||||
org_wpilib_hardware_hal_REVPHJNI_COMPRESSOR_CONFIG_TYPE_DISABLED ==
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_SerialPortJNI.h"
|
||||
#include "wpi/hal/SerialPort.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace wpi::java;
|
||||
|
||||
@@ -7,11 +7,10 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "org_wpilib_hardware_hal_SimDeviceJNI.h"
|
||||
#include "wpi/hal/SimDevice.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace wpi::java;
|
||||
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
#include "org_wpilib_hardware_hal_UsageReportingJNI.h"
|
||||
#include "wpi/hal/UsageReporting.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
using namespace wpi::java;
|
||||
|
||||
|
||||
@@ -9,11 +9,10 @@
|
||||
#include <cstdio>
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "SimulatorJNI.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/handles/UnlimitedHandleResource.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace hal::sim;
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "SimulatorJNI.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/Value.h"
|
||||
#include "wpi/hal/handles/UnlimitedHandleResource.h"
|
||||
#include "wpi/hal/simulation/NotifyListener.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
namespace hal::sim {
|
||||
class BufferCallbackStore {
|
||||
|
||||
@@ -9,12 +9,11 @@
|
||||
#include <cstdio>
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "SimulatorJNI.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/Value.h"
|
||||
#include "wpi/hal/handles/UnlimitedHandleResource.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace hal::sim;
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "SimulatorJNI.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/Value.h"
|
||||
#include "wpi/hal/handles/UnlimitedHandleResource.h"
|
||||
#include "wpi/hal/simulation/NotifyListener.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
namespace hal::sim {
|
||||
class CallbackStore {
|
||||
|
||||
@@ -9,11 +9,10 @@
|
||||
#include <cstdio>
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "SimulatorJNI.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/handles/UnlimitedHandleResource.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace hal::sim;
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "SimulatorJNI.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/Value.h"
|
||||
#include "wpi/hal/handles/UnlimitedHandleResource.h"
|
||||
#include "wpi/hal/simulation/NotifyListener.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
namespace hal::sim {
|
||||
class ConstBufferCallbackStore {
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "CallbackStore.h"
|
||||
#include "org_wpilib_hardware_hal_simulation_DriverStationDataJNI.h"
|
||||
#include "wpi/hal/simulation/DriverStationData.h"
|
||||
#include "wpi/hal/simulation/MockHooks.h"
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace wpi::java;
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "CallbackStore.h"
|
||||
#include "org_wpilib_hardware_hal_simulation_RoboRioDataJNI.h"
|
||||
#include "wpi/hal/simulation/RoboRioData.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace wpi::java;
|
||||
|
||||
@@ -12,12 +12,11 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "SimulatorJNI.h"
|
||||
#include "org_wpilib_hardware_hal_simulation_SimDeviceDataJNI.h"
|
||||
#include "wpi/hal/handles/UnlimitedHandleResource.h"
|
||||
#include "wpi/hal/simulation/SimDeviceData.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace hal;
|
||||
using namespace wpi::java;
|
||||
@@ -317,8 +316,8 @@ bool InitializeSimDeviceDataJNI(JNIEnv* env) {
|
||||
return false;
|
||||
}
|
||||
|
||||
simValueInfoCls =
|
||||
JClass(env, "org/wpilib/hardware/hal/simulation/SimDeviceDataJNI$SimValueInfo");
|
||||
simValueInfoCls = JClass(
|
||||
env, "org/wpilib/hardware/hal/simulation/SimDeviceDataJNI$SimValueInfo");
|
||||
if (!simValueInfoCls) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
#include "SimulatorJNI.h"
|
||||
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
#include "BufferCallbackStore.h"
|
||||
#include "CallbackStore.h"
|
||||
#include "ConstBufferCallbackStore.h"
|
||||
@@ -14,6 +12,7 @@
|
||||
#include "wpi/hal/HAL.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/simulation/MockHooks.h"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace wpi::java;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "jni.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
|
||||
using SIM_JniHandle = HAL_Handle; // NOLINT
|
||||
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
// 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/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
#include "wpi/hal/proto/ControlData.h"
|
||||
#include "wpi/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
static_assert(sizeof(mrc::ControlFlags) == sizeof(uint32_t));
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
#include "wpi/hal/proto/ErrorInfo.h"
|
||||
#include "wpi/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
std::optional<mrc::ErrorInfo> wpi::Protobuf<mrc::ErrorInfo>::Unpack(
|
||||
InputStream& Stream) {
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
#include "wpi/hal/proto/JoystickDescriptor.h"
|
||||
#include "wpi/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
std::optional<mrc::JoystickDescriptor>
|
||||
wpi::Protobuf<mrc::JoystickDescriptor>::Unpack(InputStream& Stream) {
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
// 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/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
#include "wpi/hal/proto/JoystickRumbleData.h"
|
||||
#include "wpi/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
std::optional<mrc::JoystickRumbleData>
|
||||
wpi::Protobuf<mrc::JoystickRumbleData>::Unpack(InputStream& Stream) {
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
#include "wpi/hal/proto/MatchInfo.h"
|
||||
#include "wpi/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
std::optional<mrc::MatchInfo> wpi::Protobuf<mrc::MatchInfo>::Unpack(
|
||||
InputStream& Stream) {
|
||||
|
||||
@@ -6,9 +6,8 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
#include "wpi/hal/proto/OpMode.h"
|
||||
#include "wpi/util/protobuf/ProtobufCallbacks.hpp"
|
||||
|
||||
std::optional<mrc::OpMode> wpi::Protobuf<mrc::OpMode>::Unpack(
|
||||
InputStream& Stream) {
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "wpi/hal/Types.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wpi/hal/Types.h"
|
||||
|
||||
/** max length of LED strip supported by device. */
|
||||
#define HAL_kAddressableLEDMaxLength 1024
|
||||
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wpi/hal/CANAPITypes.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @defgroup hal_can CAN Functions
|
||||
|
||||
@@ -8,11 +8,10 @@
|
||||
|
||||
#include <stddef.h> //NOLINT
|
||||
|
||||
#include "wpi/util/Synchronization.h"
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
#include "wpi/hal/DriverStationTypes.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/util/Synchronization.h"
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
/**
|
||||
* @defgroup hal_driverstation Driver Station Functions
|
||||
|
||||
@@ -14,9 +14,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
/**
|
||||
* @defgroup hal_capi WPILib HAL API
|
||||
|
||||
@@ -6,9 +6,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wpi/util/nodiscard.h"
|
||||
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/util/nodiscard.h"
|
||||
|
||||
/**
|
||||
* @defgroup hal_notifier Notifier Functions
|
||||
|
||||
@@ -9,11 +9,10 @@
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
namespace hal {
|
||||
|
||||
|
||||
@@ -6,9 +6,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wpi/util/Synchronization.h"
|
||||
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/util/Synchronization.h"
|
||||
|
||||
/* General Handle Data Layout
|
||||
* Bits 0-15: Handle Index
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
namespace hal {
|
||||
|
||||
|
||||
@@ -9,11 +9,10 @@
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
namespace hal {
|
||||
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
namespace hal {
|
||||
|
||||
|
||||
@@ -9,10 +9,9 @@
|
||||
#include <array>
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
#include "HandlesInternal.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
namespace hal {
|
||||
|
||||
|
||||
@@ -10,10 +10,9 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
namespace hal {
|
||||
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
#include "MrcComm.npb.h"
|
||||
#include "mrc/NetComm.h"
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
template <>
|
||||
struct wpi::Protobuf<mrc::ControlData> {
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
#include "MrcComm.npb.h"
|
||||
#include "mrc/NetComm.h"
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
template <>
|
||||
struct wpi::Protobuf<mrc::ErrorInfo> {
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
#include "MrcComm.npb.h"
|
||||
#include "mrc/NetComm.h"
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
template <>
|
||||
struct wpi::Protobuf<mrc::JoystickDescriptor> {
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
#include "MrcComm.npb.h"
|
||||
#include "mrc/NetComm.h"
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
template <>
|
||||
struct wpi::Protobuf<mrc::JoystickRumbleData> {
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
#include "MrcComm.npb.h"
|
||||
#include "mrc/NetComm.h"
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
template <>
|
||||
struct wpi::Protobuf<mrc::MatchInfo> {
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
#include "MrcComm.npb.h"
|
||||
#include "mrc/NetComm.h"
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
template <>
|
||||
struct wpi::Protobuf<mrc::OpMode> {
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
#include "MrcComm.npb.h"
|
||||
#include "mrc/NetComm.h"
|
||||
#include "wpi/util/protobuf/Protobuf.hpp"
|
||||
|
||||
template <>
|
||||
struct wpi::Protobuf<mrc::VersionInfo> {
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
#include "wpi/hal/DriverStationTypes.h"
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/simulation/NotifyListener.h"
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
typedef void (*HAL_JoystickAxesCallback)(const char* name, void* param,
|
||||
int32_t joystickNum,
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
#include "wpi/hal/Types.h"
|
||||
#include "wpi/hal/simulation/NotifyListener.h"
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
typedef void (*HAL_RoboRioStringCallback)(const char* name, void* param,
|
||||
const char* str, size_t size);
|
||||
|
||||
@@ -7,12 +7,11 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/hal/simulation/NotifyListener.h"
|
||||
#include "wpi/util/Compiler.hpp"
|
||||
#include "wpi/util/UidVector.hpp"
|
||||
#include "wpi/util/spinlock.hpp"
|
||||
|
||||
#include "wpi/hal/simulation/NotifyListener.h"
|
||||
|
||||
namespace hal {
|
||||
|
||||
namespace impl {
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/hal/simulation/NotifyListener.h"
|
||||
#include "wpi/hal/simulation/SimCallbackRegistry.h"
|
||||
#include "wpi/util/Compiler.hpp"
|
||||
#include "wpi/util/UidVector.hpp"
|
||||
#include "wpi/util/spinlock.hpp"
|
||||
|
||||
#include "wpi/hal/simulation/NotifyListener.h"
|
||||
#include "wpi/hal/simulation/SimCallbackRegistry.h"
|
||||
|
||||
namespace hal {
|
||||
|
||||
namespace impl {
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "mockdata/AddressableLEDDataInternal.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/handles/IndexedHandleResource.h"
|
||||
#include "mockdata/AddressableLEDDataInternal.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "mockdata/AnalogInDataInternal.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -7,15 +7,14 @@
|
||||
#include <ctime>
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/util/DenseMap.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "wpi/hal/CAN.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/handles/UnlimitedHandleResource.h"
|
||||
#include "wpi/util/DenseMap.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "mockdata/CTREPCMDataInternal.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/handles/IndexedHandleResource.h"
|
||||
#include "mockdata/CTREPCMDataInternal.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/handles/LimitedHandleResource.h"
|
||||
#include "mockdata/DIODataInternal.h"
|
||||
#include "mockdata/DigitalPWMDataInternal.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/handles/LimitedHandleResource.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -15,15 +15,15 @@
|
||||
#include <string>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "wpi/util/EventVector.hpp"
|
||||
#include "wpi/util/condition_variable.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "mockdata/DriverStationDataInternal.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/cpp/fpga_clock.h"
|
||||
#include "wpi/hal/simulation/MockHooks.h"
|
||||
#include "mockdata/DriverStationDataInternal.h"
|
||||
#include "wpi/util/EventVector.hpp"
|
||||
#include "wpi/util/condition_variable.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
static wpi::mutex msgMutex;
|
||||
static std::atomic<HALSIM_SendErrorHandler> sendErrorHandler{nullptr};
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "mockdata/DutyCycleDataInternal.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/handles/IndexedHandleResource.h"
|
||||
#include "mockdata/DutyCycleDataInternal.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "mockdata/EncoderDataInternal.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/handles/LimitedHandleResource.h"
|
||||
#include "mockdata/EncoderDataInternal.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/spinlock.hpp"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#pragma comment(lib, "Winmm.lib")
|
||||
@@ -26,12 +23,14 @@ NtQueryTimerResolution(PULONG MinimumResolution, PULONG MaximumResolution,
|
||||
#include "ErrorsInternal.h"
|
||||
#include "HALInitializer.h"
|
||||
#include "MockHooksInternal.h"
|
||||
#include "mockdata/RoboRioDataInternal.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/Extensions.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/simulation/DriverStationData.h"
|
||||
#include "wpi/hal/simulation/SimCallbackRegistry.h"
|
||||
#include "mockdata/RoboRioDataInternal.h"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/spinlock.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -8,12 +8,11 @@
|
||||
#include <cstdio>
|
||||
#include <thread>
|
||||
|
||||
#include "wpi/util/print.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
#include "MockHooksInternal.h"
|
||||
#include "NotifierInternal.h"
|
||||
#include "wpi/hal/simulation/NotifierData.h"
|
||||
#include "wpi/util/print.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
static std::atomic<bool> programStarted{false};
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/util/SmallVector.hpp"
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
#include "wpi/util/condition_variable.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "NotifierInternal.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
@@ -24,6 +19,10 @@
|
||||
#include "wpi/hal/cpp/fpga_clock.h"
|
||||
#include "wpi/hal/handles/UnlimitedHandleResource.h"
|
||||
#include "wpi/hal/simulation/NotifierData.h"
|
||||
#include "wpi/util/SmallVector.hpp"
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
#include "wpi/util/condition_variable.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
namespace {
|
||||
struct Notifier {
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "mockdata/PWMDataInternal.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "mockdata/PowerDistributionDataInternal.h"
|
||||
#include "wpi/hal/CANAPI.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "mockdata/PowerDistributionDataInternal.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "mockdata/REVPHDataInternal.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/handles/IndexedHandleResource.h"
|
||||
#include "mockdata/REVPHDataInternal.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/util/spinlock.hpp"
|
||||
|
||||
#include "wpi/hal/simulation/AddressableLEDData.h"
|
||||
#include "wpi/hal/simulation/SimCallbackRegistry.h"
|
||||
#include "wpi/hal/simulation/SimDataValue.h"
|
||||
#include "wpi/util/spinlock.hpp"
|
||||
|
||||
namespace hal {
|
||||
class AddressableLEDData {
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/util/spinlock.hpp"
|
||||
|
||||
#include "wpi/hal/simulation/DriverStationData.h"
|
||||
#include "wpi/hal/simulation/SimCallbackRegistry.h"
|
||||
#include "wpi/hal/simulation/SimDataValue.h"
|
||||
#include "wpi/util/spinlock.hpp"
|
||||
|
||||
namespace hal {
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// 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 "../PortsInternal.h"
|
||||
#include "wpi/hal/simulation/AddressableLEDData.h"
|
||||
#include "wpi/hal/simulation/AnalogInData.h"
|
||||
#include "wpi/hal/simulation/CTREPCMData.h"
|
||||
@@ -18,8 +19,6 @@
|
||||
#include "wpi/hal/simulation/RoboRioData.h"
|
||||
#include "wpi/hal/simulation/SimDeviceData.h"
|
||||
|
||||
#include "../PortsInternal.h"
|
||||
|
||||
extern "C" void HALSIM_ResetAllSimData(void) {
|
||||
for (int32_t i = 0; i < hal::kNumAddressableLEDs; i++) {
|
||||
HALSIM_ResetAddressableLEDData(i);
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
#include "wpi/util/spinlock.hpp"
|
||||
|
||||
#include "wpi/hal/simulation/RoboRioData.h"
|
||||
#include "wpi/hal/simulation/SimDataValue.h"
|
||||
#include "wpi/util/spinlock.hpp"
|
||||
|
||||
namespace hal {
|
||||
class RoboRioData {
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
|
||||
#include "SimDeviceDataInternal.h"
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -11,15 +11,14 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/hal/Value.h"
|
||||
#include "wpi/hal/simulation/SimCallbackRegistry.h"
|
||||
#include "wpi/hal/simulation/SimDeviceData.h"
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
#include "wpi/util/StringMap.hpp"
|
||||
#include "wpi/util/UidVector.hpp"
|
||||
#include "wpi/util/spinlock.hpp"
|
||||
|
||||
#include "wpi/hal/Value.h"
|
||||
#include "wpi/hal/simulation/SimCallbackRegistry.h"
|
||||
#include "wpi/hal/simulation/SimDeviceData.h"
|
||||
|
||||
namespace hal {
|
||||
|
||||
namespace impl {
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include <thread>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
#include "wpi/nt/RawTopic.hpp"
|
||||
|
||||
#include "AddressableLEDSimd.h"
|
||||
#include "HALInitializer.h"
|
||||
@@ -24,6 +22,8 @@
|
||||
#include "wpi/hal/AddressableLEDTypes.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/cpp/fpga_clock.h"
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
#include "wpi/nt/RawTopic.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#pragma once
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/hal/AddressableLEDTypes.h"
|
||||
#include "simd/simd.h"
|
||||
#include "wpi/hal/AddressableLEDTypes.h"
|
||||
|
||||
namespace hal::detail {
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#include <cstdio>
|
||||
#include <thread>
|
||||
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
@@ -16,6 +14,7 @@
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/cpp/fpga_clock.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
namespace hal::init {
|
||||
void InitializeAnalogInput() {}
|
||||
|
||||
@@ -17,12 +17,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "wpi/util/DenseMap.hpp"
|
||||
#include "wpi/util/circular_buffer.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/print.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
#include "PortsInternal.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/Threads.h"
|
||||
@@ -30,6 +24,11 @@
|
||||
#include "wpi/net/EventLoopRunner.hpp"
|
||||
#include "wpi/net/uv/Poll.hpp"
|
||||
#include "wpi/net/uv/Timer.hpp"
|
||||
#include "wpi/util/DenseMap.hpp"
|
||||
#include "wpi/util/circular_buffer.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/print.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -7,15 +7,14 @@
|
||||
#include <ctime>
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/util/DenseMap.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "wpi/hal/CAN.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/handles/UnlimitedHandleResource.h"
|
||||
#include "wpi/util/DenseMap.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <string>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
@@ -16,6 +15,7 @@
|
||||
#include "wpi/hal/CANAPI.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/handles/IndexedHandleResource.h"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -14,6 +14,18 @@
|
||||
#include <vector>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "SystemServerInternal.h"
|
||||
#include "mrc/NtNetComm.h"
|
||||
#include "wpi/hal/DriverStation.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/proto/ControlData.h"
|
||||
#include "wpi/hal/proto/ErrorInfo.h"
|
||||
#include "wpi/hal/proto/JoystickDescriptor.h"
|
||||
#include "wpi/hal/proto/JoystickRumbleData.h"
|
||||
#include "wpi/hal/proto/MatchInfo.h"
|
||||
#include "wpi/hal/proto/OpMode.h"
|
||||
#include "wpi/nt/BooleanTopic.hpp"
|
||||
#include "wpi/nt/IntegerTopic.hpp"
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
@@ -27,18 +39,6 @@
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "SystemServerInternal.h"
|
||||
#include "wpi/hal/DriverStation.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/proto/ControlData.h"
|
||||
#include "wpi/hal/proto/ErrorInfo.h"
|
||||
#include "wpi/hal/proto/JoystickDescriptor.h"
|
||||
#include "wpi/hal/proto/JoystickRumbleData.h"
|
||||
#include "wpi/hal/proto/MatchInfo.h"
|
||||
#include "wpi/hal/proto/OpMode.h"
|
||||
#include "mrc/NtNetComm.h"
|
||||
|
||||
static_assert(sizeof(int32_t) >= sizeof(int),
|
||||
"FRC_NetworkComm status variable is larger than 32 bits");
|
||||
|
||||
|
||||
@@ -17,13 +17,6 @@
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/util/MemoryBuffer.hpp"
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
#include "wpi/util/fs.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/print.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
#include "CANInternal.h"
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
@@ -32,6 +25,12 @@
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/Notifier.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/MemoryBuffer.hpp"
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
#include "wpi/util/fs.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/print.hpp"
|
||||
#include "wpi/util/timestamp.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
#include <cstring>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/print.hpp"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "wpi/hal/DIO.h"
|
||||
#include "wpi/hal/HAL.h"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
#include "wpi/util/print.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
|
||||
#include <numbers>
|
||||
|
||||
#include "wpi/nt/DoubleArrayTopic.hpp"
|
||||
#include "wpi/nt/DoubleTopic.hpp"
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "SystemServerInternal.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/nt/DoubleArrayTopic.hpp"
|
||||
#include "wpi/nt/DoubleTopic.hpp"
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
|
||||
#define IMU_PREFIX "/imu/"
|
||||
|
||||
|
||||
@@ -12,17 +12,16 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "wpi/util/SmallVector.hpp"
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
#include "wpi/util/condition_variable.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/HALBase.h"
|
||||
#include "wpi/hal/cpp/fpga_clock.h"
|
||||
#include "wpi/hal/handles/UnlimitedHandleResource.h"
|
||||
#include "wpi/hal/simulation/NotifierData.h"
|
||||
#include "wpi/util/SmallVector.hpp"
|
||||
#include "wpi/util/StringExtras.hpp"
|
||||
#include "wpi/util/condition_variable.hpp"
|
||||
#include "wpi/util/mutex.hpp"
|
||||
|
||||
namespace {
|
||||
struct Notifier {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <thread>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "wpi/util/print.hpp"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
@@ -19,6 +18,7 @@
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/cpp/fpga_clock.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/util/print.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "wpi/nt/DoubleTopic.hpp"
|
||||
|
||||
#include "HALInitializer.h"
|
||||
#include "SystemServerInternal.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "mrc/NtNetComm.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/nt/DoubleTopic.hpp"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -4,13 +4,6 @@
|
||||
|
||||
#include "REVPDH.h"
|
||||
|
||||
#include "wpi/hal/CAN.h"
|
||||
#include "wpi/hal/CANAPI.h"
|
||||
#include "wpi/hal/CANAPITypes.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/handles/IndexedHandleResource.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
@@ -21,6 +14,12 @@
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "rev/PDHFrames.h"
|
||||
#include "wpi/hal/CAN.h"
|
||||
#include "wpi/hal/CANAPI.h"
|
||||
#include "wpi/hal/CANAPITypes.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/hal/handles/IndexedHandleResource.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
#include "HALInitializer.h"
|
||||
#include "HALInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
#include "rev/PHFrames.h"
|
||||
#include "wpi/hal/CANAPI.h"
|
||||
#include "wpi/hal/Errors.h"
|
||||
#include "wpi/hal/handles/IndexedHandleResource.h"
|
||||
#include "rev/PHFrames.h"
|
||||
|
||||
using namespace hal;
|
||||
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "wpi/nt/IntegerTopic.hpp"
|
||||
|
||||
#include "PortsInternal.h"
|
||||
#include "wpi/hal/handles/DigitalHandleResource.h"
|
||||
#include "wpi/hal/handles/HandlesInternal.h"
|
||||
#include "wpi/nt/IntegerTopic.hpp"
|
||||
|
||||
namespace hal {
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "SystemServerInternal.h"
|
||||
#include "wpi/nt/NetworkTableInstance.hpp"
|
||||
#include "wpi/nt/StringTopic.hpp"
|
||||
#include "wpi/util/StringMap.hpp"
|
||||
#include "wpi/util/string.h"
|
||||
|
||||
#include "SystemServerInternal.h"
|
||||
|
||||
namespace {
|
||||
struct SystemServerUsageReporting {
|
||||
nt::NetworkTableInstance ntInst;
|
||||
|
||||
Reference in New Issue
Block a user