diff --git a/.readthedocs.yml b/.readthedocs.yml index 505d10819..183f59a17 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,8 +9,7 @@ build: python: "3.11" jobs: post_install: - - python -m robotpy_sphinx.download_and_install robotpy mostrobotpy main dist pypi-other-X64-3.11 - - python -m robotpy_sphinx.download_and_install robotpy mostrobotpy main dist pypi-Linux-X64-3.11 + - python -m robotpy_sphinx.download_and_install robotpy mostrobotpy main dist pypi-meson-Linux-X64-3.11 post_build: - mkdir --parents _readthedocs/htmlzip - cp --recursive _readthedocs/html _readthedocs/$READTHEDOCS_PROJECT diff --git a/README.md b/README.md index 4c19db9a9..256fb651d 100644 --- a/README.md +++ b/README.md @@ -31,12 +31,15 @@ Next install dependencies using pip: pip install -r rdev_requirements.txt pip install numpy -Then run this command to build all the wheels. +Then run these commands to build all the wheels for the current operating system. - ./rdev.sh ci run + ./rdev.sh ci build-other-wheels + ./rdev.sh ci build-meson-wheels All the resulting wheels are in `dist`, which can be installed using `pip`. +To build wheels for the robot platform, you need to use a crossenv docker image. +See `.github/workflows/dist.yml` for details. Development environment ----------------------- diff --git a/subprojects/robotpy-hal/pyproject.toml b/subprojects/robotpy-hal/pyproject.toml index d6ae6053e..d0c468dae 100644 --- a/subprojects/robotpy-hal/pyproject.toml +++ b/subprojects/robotpy-hal/pyproject.toml @@ -40,31 +40,12 @@ packages = ["hal"] [tool.semiwrap] update_init = [] + +# NOTE: By default we ignore all HAL APIs, as most of them are exposed in WPILib +# somewhere. If you find something that you need, file a bug and we can add it! + scan_headers_ignore = [ - "wpi/hal/Errors.h", - "wpi/hal/HAL.h", - "wpi/hal/IMU.h", - "wpi/hal/IMUTypes.h", - "wpi/hal/SystemServer.h", - "wpi/hal/Types.h", - "wpi/hal/Value.h", - - "wpi/hal/cpp/fpga_clock.h", - - "wpi/hal/handles/DigitalHandleResource.h", - "wpi/hal/handles/IndexedClassedHandleResource.h", - "wpi/hal/handles/IndexedHandleResource.h", - "wpi/hal/handles/LimitedClassedHandleResource.h", - "wpi/hal/handles/LimitedHandleResource.h", - "wpi/hal/handles/UnlimitedHandleResource.h", - - "wpi/hal/proto/*", - - "wpi/hal/simulation/CanData.h", - "wpi/hal/simulation/I2CData.h", - "wpi/hal/simulation/NotifyListener.h", - "wpi/hal/simulation/SimCallbackRegistry.h", - "wpi/hal/simulation/SimDataValue.h", + "wpi/hal/*", # TODO: might want this in the future "mrc/*", @@ -81,55 +62,16 @@ depends = ["wpiutil", "ntcore"] [tool.semiwrap.extension_modules."hal._wpiHal".headers] # hal -AddressableLED = "wpi/hal/AddressableLED.h" -AddressableLEDTypes = "wpi/hal/AddressableLEDTypes.h" -AnalogInput = "wpi/hal/AnalogInput.h" -CAN = "wpi/hal/CAN.h" -CANAPI = "wpi/hal/CANAPI.h" CANAPITypes = "wpi/hal/CANAPITypes.h" -CTREPCM = "wpi/hal/CTREPCM.h" -Constants = "wpi/hal/Constants.h" -Counter = "wpi/hal/Counter.h" -DIO = "wpi/hal/DIO.h" -# DMA = "hal/DMA.h" DriverStation = "wpi/hal/DriverStation.h" DriverStationTypes = "wpi/hal/DriverStationTypes.h" -DutyCycle = "wpi/hal/DutyCycle.h" -Encoder = "wpi/hal/Encoder.h" -# Errors = "wpi/hal/Errors.h" Extensions = "wpi/hal/Extensions.h" -# HAL = "wpi/hal/HAL.h" HALBase = "wpi/hal/HALBase.h" -I2C = "wpi/hal/I2C.h" -I2CTypes = "wpi/hal/I2CTypes.h" -# IMU = "wpi/hal/IMU.h" -# IMUTypes = "wpi/hal/IMUTypes.h" Main = "wpi/hal/Main.h" Notifier = "wpi/hal/Notifier.h" -PWM = "wpi/hal/PWM.h" -Ports = "wpi/hal/Ports.h" -Power = "wpi/hal/Power.h" -PowerDistribution = "wpi/hal/PowerDistribution.h" -REVPH = "wpi/hal/REVPH.h" -SerialPort = "wpi/hal/SerialPort.h" SimDevice = "wpi/hal/SimDevice.h" -UsageReporting = "wpi/hal/UsageReporting.h" Threads = "wpi/hal/Threads.h" -# Types = "wpi/hal/Types.h" -# Value = "wpi/hal/Value.h" - -# hal/cpp -# fpga_clock = "wpi/hal/cpp/fpga_clock.h" - -# hal/handles -# DigitalHandleResource = "wpi/hal/handles/DigitalHandleResource.h" -HandlesInternal = "wpi/hal/handles/HandlesInternal.h" -# IndexedClassedHandleResource = "wpi/hal/handles/IndexedClassedHandleResource.h" -# IndexedHandleResource = "wpi/hal/handles/IndexedHandleResource.h" -# LimitedClassedHandleResource = "wpi/hal/handles/LimitedClassedHandleResource.h" -# LimitedHandleResource = "wpi/hal/handles/LimitedHandleResource.h" -# UnlimitedHandleResource = "wpi/hal/handles/UnlimitedHandleResource.h" - +UsageReporting = "wpi/hal/UsageReporting.h" [tool.semiwrap.extension_modules."hal.simulation._simulation"] name = "hal_simulation" @@ -138,24 +80,8 @@ depends = ["wpiutil", "ntcore"] yaml_path = "semiwrap/simulation" [tool.semiwrap.extension_modules."hal.simulation._simulation".headers] -AddressableLEDData = "wpi/hal/simulation/AddressableLEDData.h" -AnalogInData = "wpi/hal/simulation/AnalogInData.h" -CTREPCMData = "wpi/hal/simulation/CTREPCMData.h" -# CanData = "wpi/hal/simulation/CanData.h" -DIOData = "wpi/hal/simulation/DIOData.h" -DigitalPWMData = "wpi/hal/simulation/DigitalPWMData.h" DriverStationData = "wpi/hal/simulation/DriverStationData.h" -DutyCycleData = "wpi/hal/simulation/DutyCycleData.h" -EncoderData = "wpi/hal/simulation/EncoderData.h" -# I2CData = "wpi/hal/simulation/I2CData.h" MockHooks = "wpi/hal/simulation/MockHooks.h" NotifierData = "wpi/hal/simulation/NotifierData.h" -# NotifyListener = "wpi/hal/simulation/NotifyListener.h" -PWMData = "wpi/hal/simulation/PWMData.h" -PowerDistributionData = "wpi/hal/simulation/PowerDistributionData.h" -REVPHData = "wpi/hal/simulation/REVPHData.h" Reset = "wpi/hal/simulation/Reset.h" -RoboRioData = "wpi/hal/simulation/RoboRioData.h" -# SimCallbackRegistry = "wpi/hal/simulation/SimCallbackRegistry.h" -# SimDataValue = "wpi/hal/simulation/SimDataValue.h" SimDeviceData = "wpi/hal/simulation/SimDeviceData.h" diff --git a/subprojects/robotpy-hal/semiwrap/AddressableLED.yml b/subprojects/robotpy-hal/semiwrap/AddressableLED.yml deleted file mode 100644 index b211a42ac..000000000 --- a/subprojects/robotpy-hal/semiwrap/AddressableLED.yml +++ /dev/null @@ -1,9 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_InitializeAddressableLED: - HAL_FreeAddressableLED: - HAL_SetAddressableLEDLength: - HAL_SetAddressableLEDStart: - HAL_SetAddressableLEDData: diff --git a/subprojects/robotpy-hal/semiwrap/AddressableLEDTypes.yml b/subprojects/robotpy-hal/semiwrap/AddressableLEDTypes.yml deleted file mode 100644 index e53f0a0da..000000000 --- a/subprojects/robotpy-hal/semiwrap/AddressableLEDTypes.yml +++ /dev/null @@ -1,14 +0,0 @@ -strip_prefixes: -- HAL_ - -classes: - HAL_AddressableLEDData: - attributes: - b: - g: - r: -enums: - HAL_AddressableLEDColorOrder: -functions: - format_as: - ignore: true diff --git a/subprojects/robotpy-hal/semiwrap/AnalogInput.yml b/subprojects/robotpy-hal/semiwrap/AnalogInput.yml deleted file mode 100644 index c1e831f14..000000000 --- a/subprojects/robotpy-hal/semiwrap/AnalogInput.yml +++ /dev/null @@ -1,23 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_InitializeAnalogInputPort: - HAL_FreeAnalogInputPort: - HAL_CheckAnalogModule: - HAL_CheckAnalogInputChannel: - HAL_SetAnalogInputSimDevice: - HAL_SetAnalogSampleRate: - HAL_GetAnalogSampleRate: - HAL_SetAnalogAverageBits: - HAL_GetAnalogAverageBits: - HAL_SetAnalogOversampleBits: - HAL_GetAnalogOversampleBits: - HAL_GetAnalogValue: - HAL_GetAnalogAverageValue: - HAL_GetAnalogVoltsToValue: - HAL_GetAnalogVoltage: - HAL_GetAnalogAverageVoltage: - HAL_GetAnalogLSBWeight: - HAL_GetAnalogOffset: - HAL_GetAnalogValueToVolts: diff --git a/subprojects/robotpy-hal/semiwrap/CAN.yml b/subprojects/robotpy-hal/semiwrap/CAN.yml deleted file mode 100644 index 5ee43184a..000000000 --- a/subprojects/robotpy-hal/semiwrap/CAN.yml +++ /dev/null @@ -1,16 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_CAN_SendMessage: - HAL_CAN_ReceiveMessage: - HAL_CAN_OpenStreamSession: - HAL_CAN_CloseStreamSession: - HAL_CAN_ReadStreamSession: - ignore: true # TODO: an array of messages - HAL_CAN_GetCANStatus: -classes: - HAL_CANStreamMessage: - attributes: - messageId: - message: diff --git a/subprojects/robotpy-hal/semiwrap/CANAPI.yml b/subprojects/robotpy-hal/semiwrap/CANAPI.yml deleted file mode 100644 index 146c19e50..000000000 --- a/subprojects/robotpy-hal/semiwrap/CANAPI.yml +++ /dev/null @@ -1,13 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_InitializeCAN: - HAL_CleanCAN: - HAL_WriteCANPacket: - HAL_WriteCANPacketRepeating: - HAL_WriteCANRTRFrame: - HAL_StopCANPacketRepeating: - HAL_ReadCANPacketNew: - HAL_ReadCANPacketLatest: - HAL_ReadCANPacketTimeout: diff --git a/subprojects/robotpy-hal/semiwrap/CTREPCM.yml b/subprojects/robotpy-hal/semiwrap/CTREPCM.yml deleted file mode 100644 index 941493239..000000000 --- a/subprojects/robotpy-hal/semiwrap/CTREPCM.yml +++ /dev/null @@ -1,26 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_InitializeCTREPCM: - HAL_FreeCTREPCM: - HAL_CheckCTREPCMSolenoidChannel: - HAL_GetCTREPCMCompressor: - HAL_SetCTREPCMClosedLoopControl: - HAL_GetCTREPCMClosedLoopControl: - HAL_GetCTREPCMPressureSwitch: - HAL_GetCTREPCMCompressorCurrent: - HAL_GetCTREPCMCompressorCurrentTooHighFault: - HAL_GetCTREPCMCompressorCurrentTooHighStickyFault: - HAL_GetCTREPCMCompressorShortedStickyFault: - HAL_GetCTREPCMCompressorShortedFault: - HAL_GetCTREPCMCompressorNotConnectedStickyFault: - HAL_GetCTREPCMCompressorNotConnectedFault: - HAL_GetCTREPCMSolenoids: - HAL_SetCTREPCMSolenoids: - HAL_GetCTREPCMSolenoidDisabledList: - HAL_GetCTREPCMSolenoidVoltageStickyFault: - HAL_GetCTREPCMSolenoidVoltageFault: - HAL_ClearAllCTREPCMStickyFaults: - HAL_FireCTREPCMOneShot: - HAL_SetCTREPCMOneShotDuration: diff --git a/subprojects/robotpy-hal/semiwrap/Constants.yml b/subprojects/robotpy-hal/semiwrap/Constants.yml deleted file mode 100644 index bf0a5b4b8..000000000 --- a/subprojects/robotpy-hal/semiwrap/Constants.yml +++ /dev/null @@ -1,5 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_GetSystemClockTicksPerMicrosecond: diff --git a/subprojects/robotpy-hal/semiwrap/Counter.yml b/subprojects/robotpy-hal/semiwrap/Counter.yml deleted file mode 100644 index 70389caa1..000000000 --- a/subprojects/robotpy-hal/semiwrap/Counter.yml +++ /dev/null @@ -1,12 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_InitializeCounter: - HAL_FreeCounter: - HAL_ResetCounter: - HAL_GetCounter: - HAL_GetCounterPeriod: - HAL_SetCounterMaxPeriod: - HAL_GetCounterStopped: - HAL_SetCounterEdgeConfiguration: diff --git a/subprojects/robotpy-hal/semiwrap/DIO.yml b/subprojects/robotpy-hal/semiwrap/DIO.yml deleted file mode 100644 index 6bae8e757..000000000 --- a/subprojects/robotpy-hal/semiwrap/DIO.yml +++ /dev/null @@ -1,22 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_InitializeDIOPort: - HAL_CheckDIOChannel: - HAL_FreeDIOPort: - HAL_SetDIOSimDevice: - HAL_AllocateDigitalPWM: - HAL_FreeDigitalPWM: - HAL_SetDigitalPWMRate: - HAL_SetDigitalPWMDutyCycle: - HAL_SetDigitalPWMPPS: - HAL_SetDigitalPWMOutputChannel: - HAL_SetDIO: - HAL_SetDIODirection: - HAL_GetDIO: - HAL_GetDIODirection: - HAL_Pulse: - HAL_PulseMultiple: - HAL_IsPulsing: - HAL_IsAnyPulsing: diff --git a/subprojects/robotpy-hal/semiwrap/DutyCycle.yml b/subprojects/robotpy-hal/semiwrap/DutyCycle.yml deleted file mode 100644 index b3369df5d..000000000 --- a/subprojects/robotpy-hal/semiwrap/DutyCycle.yml +++ /dev/null @@ -1,11 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_InitializeDutyCycle: - HAL_FreeDutyCycle: - HAL_SetDutyCycleSimDevice: - ifndef: __FRC_SYSTEMCORE__ - HAL_GetDutyCycleFrequency: - HAL_GetDutyCycleOutput: - HAL_GetDutyCycleHighTime: diff --git a/subprojects/robotpy-hal/semiwrap/Encoder.yml b/subprojects/robotpy-hal/semiwrap/Encoder.yml deleted file mode 100644 index 3e440e11b..000000000 --- a/subprojects/robotpy-hal/semiwrap/Encoder.yml +++ /dev/null @@ -1,31 +0,0 @@ -strip_prefixes: -- HAL_ - -enums: - HAL_EncoderIndexingType: - value_prefix: HAL - HAL_EncoderEncodingType: - value_prefix: HAL -functions: - HAL_InitializeEncoder: - HAL_FreeEncoder: - HAL_SetEncoderSimDevice: - HAL_GetEncoder: - HAL_GetEncoderRaw: - HAL_GetEncoderEncodingScale: - HAL_ResetEncoder: - HAL_GetEncoderPeriod: - HAL_SetEncoderMaxPeriod: - HAL_GetEncoderStopped: - HAL_GetEncoderDirection: - HAL_GetEncoderDistance: - HAL_GetEncoderRate: - HAL_SetEncoderMinRate: - HAL_SetEncoderDistancePerPulse: - HAL_SetEncoderReverseDirection: - HAL_SetEncoderSamplesToAverage: - HAL_GetEncoderSamplesToAverage: - HAL_GetEncoderFPGAIndex: - HAL_GetEncoderDecodingScaleFactor: - HAL_GetEncoderDistancePerPulse: - HAL_GetEncoderEncodingType: diff --git a/subprojects/robotpy-hal/semiwrap/HandlesInternal.yml b/subprojects/robotpy-hal/semiwrap/HandlesInternal.yml deleted file mode 100644 index 8fd81e0f9..000000000 --- a/subprojects/robotpy-hal/semiwrap/HandlesInternal.yml +++ /dev/null @@ -1,15 +0,0 @@ -strip_prefixes: -- HAL_ - -enums: - HAL_HandleEnum: -functions: - getHandleIndex: - getHandleType: - isHandleType: - isHandleCorrectVersion: - getHandleTypedIndex: - createHandle: -classes: - wpi::hal::HandleBase: - ignore: true diff --git a/subprojects/robotpy-hal/semiwrap/I2C.yml b/subprojects/robotpy-hal/semiwrap/I2C.yml deleted file mode 100644 index 9a6e02070..000000000 --- a/subprojects/robotpy-hal/semiwrap/I2C.yml +++ /dev/null @@ -1,16 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_InitializeI2C: - HAL_TransactionI2C: - buffers: - - {type: IN, src: dataToSend, len: sendSize} - - {type: OUT, src: dataReceived, len: receiveSize} - HAL_WriteI2C: - buffers: - - {type: IN, src: dataToSend, len: sendSize} - HAL_ReadI2C: - buffers: - - {type: OUT, src: buffer, len: count} - HAL_CloseI2C: diff --git a/subprojects/robotpy-hal/semiwrap/I2CTypes.yml b/subprojects/robotpy-hal/semiwrap/I2CTypes.yml deleted file mode 100644 index 6286d100e..000000000 --- a/subprojects/robotpy-hal/semiwrap/I2CTypes.yml +++ /dev/null @@ -1,6 +0,0 @@ -strip_prefixes: -- HAL_ - -enums: - HAL_I2CPort: - value_prefix: HAL_I2C diff --git a/subprojects/robotpy-hal/semiwrap/PWM.yml b/subprojects/robotpy-hal/semiwrap/PWM.yml deleted file mode 100644 index 099db20b3..000000000 --- a/subprojects/robotpy-hal/semiwrap/PWM.yml +++ /dev/null @@ -1,11 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_InitializePWMPort: - HAL_FreePWMPort: - HAL_CheckPWMChannel: - HAL_SetPWMPulseTimeMicroseconds: - HAL_GetPWMPulseTimeMicroseconds: - HAL_SetPWMSimDevice: - HAL_SetPWMOutputPeriod: diff --git a/subprojects/robotpy-hal/semiwrap/Ports.yml b/subprojects/robotpy-hal/semiwrap/Ports.yml deleted file mode 100644 index f3e422dd4..000000000 --- a/subprojects/robotpy-hal/semiwrap/Ports.yml +++ /dev/null @@ -1,22 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_GetNumAnalogInputs: - HAL_GetNumCounters: - HAL_GetNumDigitalChannels: - HAL_GetNumPWMChannels: - HAL_GetNumDigitalPWMOutputs: - HAL_GetNumEncoders: - HAL_GetNumInterrupts: - HAL_GetNumDutyCycles: - HAL_GetNumAddressableLEDs: - HAL_GetNumCTREPCMModules: - HAL_GetNumCTRESolenoidChannels: - HAL_GetNumCTREPDPModules: - HAL_GetNumCTREPDPChannels: - HAL_GetNumREVPDHModules: - HAL_GetNumREVPDHChannels: - HAL_GetNumREVPHModules: - HAL_GetNumREVPHChannels: - HAL_GetNumCanBuses: diff --git a/subprojects/robotpy-hal/semiwrap/Power.yml b/subprojects/robotpy-hal/semiwrap/Power.yml deleted file mode 100644 index a133b8886..000000000 --- a/subprojects/robotpy-hal/semiwrap/Power.yml +++ /dev/null @@ -1,14 +0,0 @@ -strip_prefixes: -- HAL_ - -functions: - HAL_GetVinVoltage: - HAL_GetUserVoltage3V3: - HAL_GetUserCurrent3V3: - HAL_GetUserActive3V3: - HAL_GetUserCurrentFaults3V3: - HAL_SetUserRailEnabled3V3: - HAL_GetBrownoutVoltage: - HAL_SetBrownoutVoltage: - HAL_GetCPUTemp: - HAL_ResetUserCurrentFaults: diff --git a/subprojects/robotpy-hal/semiwrap/PowerDistribution.yml b/subprojects/robotpy-hal/semiwrap/PowerDistribution.yml deleted file mode 100644 index 271495d7a..000000000 --- a/subprojects/robotpy-hal/semiwrap/PowerDistribution.yml +++ /dev/null @@ -1,105 +0,0 @@ -strip_prefixes: -- HAL_ - -enums: - HAL_PowerDistributionType: -functions: - HAL_InitializePowerDistribution: - HAL_GetPowerDistributionModuleNumber: - HAL_CleanPowerDistribution: - HAL_CheckPowerDistributionChannel: - HAL_CheckPowerDistributionModule: - HAL_GetPowerDistributionType: - HAL_GetPowerDistributionNumChannels: - HAL_GetPowerDistributionTemperature: - HAL_GetPowerDistributionVoltage: - HAL_GetPowerDistributionChannelCurrent: - HAL_GetPowerDistributionAllChannelCurrents: - HAL_GetPowerDistributionTotalCurrent: - HAL_GetPowerDistributionTotalPower: - HAL_GetPowerDistributionTotalEnergy: - HAL_ResetPowerDistributionTotalEnergy: - HAL_ClearPowerDistributionStickyFaults: - HAL_SetPowerDistributionSwitchableChannel: - HAL_GetPowerDistributionSwitchableChannel: - HAL_GetPowerDistributionVersion: - HAL_GetPowerDistributionFaults: - HAL_GetPowerDistributionStickyFaults: - HAL_StartPowerDistributionStream: - ifdef: __FRC_SYSTEMCORE__ - HAL_GetPowerDistributionStreamData: - ifdef: __FRC_SYSTEMCORE__ - HAL_FreePowerDistributionStreamData: - ifdef: __FRC_SYSTEMCORE__ - HAL_StopPowerDistributionStream: - ifdef: __FRC_SYSTEMCORE__ -classes: - HAL_PowerDistributionVersion: - attributes: - firmwareMajor: - firmwareMinor: - firmwareFix: - hardwareMinor: - hardwareMajor: - uniqueId: - HAL_PowerDistributionFaults: - attributes: - channel0BreakerFault: - channel1BreakerFault: - channel2BreakerFault: - channel3BreakerFault: - channel4BreakerFault: - channel5BreakerFault: - channel6BreakerFault: - channel7BreakerFault: - channel8BreakerFault: - channel9BreakerFault: - channel10BreakerFault: - channel11BreakerFault: - channel12BreakerFault: - channel13BreakerFault: - channel14BreakerFault: - channel15BreakerFault: - channel16BreakerFault: - channel17BreakerFault: - channel18BreakerFault: - channel19BreakerFault: - channel20BreakerFault: - channel21BreakerFault: - channel22BreakerFault: - channel23BreakerFault: - brownout: - canWarning: - hardwareFault: - HAL_PowerDistributionStickyFaults: - attributes: - channel0BreakerFault: - channel1BreakerFault: - channel2BreakerFault: - channel3BreakerFault: - channel4BreakerFault: - channel5BreakerFault: - channel6BreakerFault: - channel7BreakerFault: - channel8BreakerFault: - channel9BreakerFault: - channel10BreakerFault: - channel11BreakerFault: - channel12BreakerFault: - channel13BreakerFault: - channel14BreakerFault: - channel15BreakerFault: - channel16BreakerFault: - channel17BreakerFault: - channel18BreakerFault: - channel19BreakerFault: - channel20BreakerFault: - channel21BreakerFault: - channel22BreakerFault: - channel23BreakerFault: - brownout: - canWarning: - canBusOff: - hasReset: - hardwareFault: - firmwareFault: diff --git a/subprojects/robotpy-hal/semiwrap/REVPH.yml b/subprojects/robotpy-hal/semiwrap/REVPH.yml deleted file mode 100644 index 32532b9c1..000000000 --- a/subprojects/robotpy-hal/semiwrap/REVPH.yml +++ /dev/null @@ -1,82 +0,0 @@ -strip_prefixes: -- HAL_ - -enums: - HAL_REVPHCompressorConfigType: -functions: - HAL_InitializeREVPH: - HAL_FreeREVPH: - HAL_CheckREVPHSolenoidChannel: - HAL_CheckREVPHModuleNumber: - HAL_GetREVPHCompressor: - HAL_SetREVPHCompressorConfig: - HAL_SetREVPHClosedLoopControlDisabled: - HAL_SetREVPHClosedLoopControlDigital: - HAL_SetREVPHClosedLoopControlAnalog: - HAL_SetREVPHClosedLoopControlHybrid: - HAL_GetREVPHCompressorConfig: - HAL_GetREVPHPressureSwitch: - HAL_GetREVPHCompressorCurrent: - HAL_GetREVPHAnalogVoltage: - HAL_GetREVPHVoltage: - HAL_GetREVPH5VVoltage: - HAL_GetREVPHSolenoidCurrent: - HAL_GetREVPHSolenoidVoltage: - HAL_GetREVPHVersion: - HAL_GetREVPHSolenoids: - HAL_SetREVPHSolenoids: - HAL_FireREVPHOneShot: - HAL_GetREVPHFaults: - HAL_GetREVPHStickyFaults: - HAL_ClearREVPHStickyFaults: - HAL_GetREVPHSolenoidDisabledList: -classes: - HAL_REVPHVersion: - attributes: - firmwareMajor: - firmwareMinor: - firmwareFix: - hardwareMinor: - hardwareMajor: - uniqueId: - HAL_REVPHCompressorConfig: - attributes: - minAnalogVoltage: - maxAnalogVoltage: - forceDisable: - useDigital: - HAL_REVPHFaults: - attributes: - channel0Fault: - channel1Fault: - channel2Fault: - channel3Fault: - channel4Fault: - channel5Fault: - channel6Fault: - channel7Fault: - channel8Fault: - channel9Fault: - channel10Fault: - channel11Fault: - channel12Fault: - channel13Fault: - channel14Fault: - channel15Fault: - compressorOverCurrent: - compressorOpen: - solenoidOverCurrent: - brownout: - canWarning: - hardwareFault: - HAL_REVPHStickyFaults: - attributes: - compressorOverCurrent: - compressorOpen: - solenoidOverCurrent: - brownout: - canWarning: - canBusOff: - hasReset: - hardwareFault: - firmwareFault: diff --git a/subprojects/robotpy-hal/semiwrap/SerialPort.yml b/subprojects/robotpy-hal/semiwrap/SerialPort.yml deleted file mode 100644 index fb197b3dd..000000000 --- a/subprojects/robotpy-hal/semiwrap/SerialPort.yml +++ /dev/null @@ -1,30 +0,0 @@ -strip_prefixes: -- HAL_ - -enums: - HAL_SerialPort: -functions: - HAL_InitializeSerialPort: - HAL_InitializeSerialPortDirect: - HAL_GetSerialFD: - HAL_SetSerialBaudRate: - HAL_SetSerialDataBits: - HAL_SetSerialParity: - HAL_SetSerialStopBits: - HAL_SetSerialWriteMode: - HAL_SetSerialFlowControl: - HAL_SetSerialTimeout: - HAL_EnableSerialTermination: - HAL_DisableSerialTermination: - HAL_SetSerialReadBufferSize: - HAL_SetSerialWriteBufferSize: - HAL_GetSerialBytesReceived: - HAL_ReadSerial: - buffers: - - {type: OUT, src: buffer, len: count} - HAL_WriteSerial: - buffers: - - {type: IN, src: buffer, len: count} - HAL_FlushSerial: - HAL_ClearSerial: - HAL_CloseSerial: diff --git a/subprojects/robotpy-hal/semiwrap/simulation/AddressableLEDData.yml b/subprojects/robotpy-hal/semiwrap/simulation/AddressableLEDData.yml deleted file mode 100644 index 324cd325c..000000000 --- a/subprojects/robotpy-hal/semiwrap/simulation/AddressableLEDData.yml +++ /dev/null @@ -1,31 +0,0 @@ -strip_prefixes: -- HALSIM_ - -functions: - HALSIM_ResetAddressableLEDData: - HALSIM_RegisterAddressableLEDInitializedCallback: - ignore: true - HALSIM_CancelAddressableLEDInitializedCallback: - ignore: true - HALSIM_GetAddressableLEDInitialized: - HALSIM_SetAddressableLEDInitialized: - HALSIM_RegisterAddressableLEDStartCallback: - ignore: true - HALSIM_CancelAddressableLEDStartCallback: - ignore: true - HALSIM_GetAddressableLEDStart: - HALSIM_SetAddressableLEDStart: - HALSIM_RegisterAddressableLEDLengthCallback: - ignore: true - HALSIM_CancelAddressableLEDLengthCallback: - ignore: true - HALSIM_GetAddressableLEDLength: - HALSIM_SetAddressableLEDLength: - HALSIM_RegisterAddressableLEDDataCallback: - ignore: true - HALSIM_CancelAddressableLEDDataCallback: - ignore: true - HALSIM_GetAddressableLEDData: - HALSIM_SetAddressableLEDData: - HALSIM_RegisterAddressableLEDAllCallbacks: - ignore: true diff --git a/subprojects/robotpy-hal/semiwrap/simulation/AnalogInData.yml b/subprojects/robotpy-hal/semiwrap/simulation/AnalogInData.yml deleted file mode 100644 index 5b0593357..000000000 --- a/subprojects/robotpy-hal/semiwrap/simulation/AnalogInData.yml +++ /dev/null @@ -1,28 +0,0 @@ -strip_prefixes: -- HALSIM_ - -functions: - HALSIM_ResetAnalogInData: - HALSIM_RegisterAnalogInInitializedCallback: - ignore: true - HALSIM_CancelAnalogInInitializedCallback: - HALSIM_GetAnalogInInitialized: - HALSIM_SetAnalogInInitialized: - HALSIM_GetAnalogInSimDevice: - HALSIM_RegisterAnalogInAverageBitsCallback: - ignore: true - HALSIM_CancelAnalogInAverageBitsCallback: - HALSIM_GetAnalogInAverageBits: - HALSIM_SetAnalogInAverageBits: - HALSIM_RegisterAnalogInOversampleBitsCallback: - ignore: true - HALSIM_CancelAnalogInOversampleBitsCallback: - HALSIM_GetAnalogInOversampleBits: - HALSIM_SetAnalogInOversampleBits: - HALSIM_RegisterAnalogInVoltageCallback: - ignore: true - HALSIM_CancelAnalogInVoltageCallback: - HALSIM_GetAnalogInVoltage: - HALSIM_SetAnalogInVoltage: - HALSIM_RegisterAnalogInAllCallbacks: - ignore: true diff --git a/subprojects/robotpy-hal/semiwrap/simulation/CTREPCMData.yml b/subprojects/robotpy-hal/semiwrap/simulation/CTREPCMData.yml deleted file mode 100644 index 10c803937..000000000 --- a/subprojects/robotpy-hal/semiwrap/simulation/CTREPCMData.yml +++ /dev/null @@ -1,47 +0,0 @@ -strip_prefixes: -- HALSIM_ - -functions: - HALSIM_ResetCTREPCMData: - HALSIM_RegisterCTREPCMInitializedCallback: - ignore: true - HALSIM_CancelCTREPCMInitializedCallback: - ignore: true - HALSIM_GetCTREPCMInitialized: - HALSIM_SetCTREPCMInitialized: - HALSIM_RegisterCTREPCMSolenoidOutputCallback: - ignore: true - HALSIM_CancelCTREPCMSolenoidOutputCallback: - ignore: true - HALSIM_GetCTREPCMSolenoidOutput: - HALSIM_SetCTREPCMSolenoidOutput: - HALSIM_RegisterCTREPCMCompressorOnCallback: - ignore: true - HALSIM_CancelCTREPCMCompressorOnCallback: - ignore: true - HALSIM_GetCTREPCMCompressorOn: - HALSIM_SetCTREPCMCompressorOn: - HALSIM_RegisterCTREPCMClosedLoopEnabledCallback: - ignore: true - HALSIM_CancelCTREPCMClosedLoopEnabledCallback: - ignore: true - HALSIM_GetCTREPCMClosedLoopEnabled: - HALSIM_SetCTREPCMClosedLoopEnabled: - HALSIM_RegisterCTREPCMPressureSwitchCallback: - ignore: true - HALSIM_CancelCTREPCMPressureSwitchCallback: - ignore: true - HALSIM_GetCTREPCMPressureSwitch: - HALSIM_SetCTREPCMPressureSwitch: - HALSIM_RegisterCTREPCMCompressorCurrentCallback: - ignore: true - HALSIM_CancelCTREPCMCompressorCurrentCallback: - ignore: true - HALSIM_GetCTREPCMCompressorCurrent: - HALSIM_SetCTREPCMCompressorCurrent: - HALSIM_GetCTREPCMAllSolenoids: - HALSIM_SetCTREPCMAllSolenoids: - HALSIM_RegisterCTREPCMAllNonSolenoidCallbacks: - ignore: true - HALSIM_RegisterCTREPCMAllSolenoidCallbacks: - ignore: true diff --git a/subprojects/robotpy-hal/semiwrap/simulation/DIOData.yml b/subprojects/robotpy-hal/semiwrap/simulation/DIOData.yml deleted file mode 100644 index 54829bc36..000000000 --- a/subprojects/robotpy-hal/semiwrap/simulation/DIOData.yml +++ /dev/null @@ -1,33 +0,0 @@ -strip_prefixes: -- HALSIM_ - -functions: - HALSIM_ResetDIOData: - HALSIM_RegisterDIOInitializedCallback: - ignore: true - HALSIM_CancelDIOInitializedCallback: - HALSIM_GetDIOInitialized: - HALSIM_SetDIOInitialized: - HALSIM_GetDIOSimDevice: - HALSIM_RegisterDIOValueCallback: - ignore: true - HALSIM_CancelDIOValueCallback: - HALSIM_GetDIOValue: - HALSIM_SetDIOValue: - HALSIM_RegisterDIOPulseLengthCallback: - ignore: true - HALSIM_CancelDIOPulseLengthCallback: - HALSIM_GetDIOPulseLength: - HALSIM_SetDIOPulseLength: - HALSIM_RegisterDIOIsInputCallback: - ignore: true - HALSIM_CancelDIOIsInputCallback: - HALSIM_GetDIOIsInput: - HALSIM_SetDIOIsInput: - HALSIM_RegisterDIOFilterIndexCallback: - ignore: true - HALSIM_CancelDIOFilterIndexCallback: - HALSIM_GetDIOFilterIndex: - HALSIM_SetDIOFilterIndex: - HALSIM_RegisterDIOAllCallbacks: - ignore: true diff --git a/subprojects/robotpy-hal/semiwrap/simulation/DigitalPWMData.yml b/subprojects/robotpy-hal/semiwrap/simulation/DigitalPWMData.yml deleted file mode 100644 index 0a32ac222..000000000 --- a/subprojects/robotpy-hal/semiwrap/simulation/DigitalPWMData.yml +++ /dev/null @@ -1,23 +0,0 @@ -strip_prefixes: -- HALSIM_ - -functions: - HALSIM_FindDigitalPWMForChannel: - HALSIM_ResetDigitalPWMData: - HALSIM_RegisterDigitalPWMInitializedCallback: - ignore: true - HALSIM_CancelDigitalPWMInitializedCallback: - HALSIM_GetDigitalPWMInitialized: - HALSIM_SetDigitalPWMInitialized: - HALSIM_RegisterDigitalPWMDutyCycleCallback: - ignore: true - HALSIM_CancelDigitalPWMDutyCycleCallback: - HALSIM_GetDigitalPWMDutyCycle: - HALSIM_SetDigitalPWMDutyCycle: - HALSIM_RegisterDigitalPWMPinCallback: - ignore: true - HALSIM_CancelDigitalPWMPinCallback: - HALSIM_GetDigitalPWMPin: - HALSIM_SetDigitalPWMPin: - HALSIM_RegisterDigitalPWMAllCallbacks: - ignore: true diff --git a/subprojects/robotpy-hal/semiwrap/simulation/DutyCycleData.yml b/subprojects/robotpy-hal/semiwrap/simulation/DutyCycleData.yml deleted file mode 100644 index f9eae6b35..000000000 --- a/subprojects/robotpy-hal/semiwrap/simulation/DutyCycleData.yml +++ /dev/null @@ -1,23 +0,0 @@ -strip_prefixes: -- HALSIM_ - -functions: - HALSIM_ResetDutyCycleData: - HALSIM_RegisterDutyCycleInitializedCallback: - ignore: true - HALSIM_CancelDutyCycleInitializedCallback: - HALSIM_GetDutyCycleInitialized: - HALSIM_SetDutyCycleInitialized: - HALSIM_GetDutyCycleSimDevice: - HALSIM_RegisterDutyCycleOutputCallback: - ignore: true - HALSIM_CancelDutyCycleOutputCallback: - HALSIM_GetDutyCycleOutput: - HALSIM_SetDutyCycleOutput: - HALSIM_RegisterDutyCycleFrequencyCallback: - ignore: true - HALSIM_CancelDutyCycleFrequencyCallback: - HALSIM_GetDutyCycleFrequency: - HALSIM_SetDutyCycleFrequency: - HALSIM_RegisterDutyCycleAllCallbacks: - ignore: true diff --git a/subprojects/robotpy-hal/semiwrap/simulation/EncoderData.yml b/subprojects/robotpy-hal/semiwrap/simulation/EncoderData.yml deleted file mode 100644 index 94aba57c6..000000000 --- a/subprojects/robotpy-hal/semiwrap/simulation/EncoderData.yml +++ /dev/null @@ -1,60 +0,0 @@ -strip_prefixes: -- HALSIM_ - -functions: - HALSIM_FindEncoderForChannel: - HALSIM_ResetEncoderData: - HALSIM_GetEncoderDigitalChannelA: - HALSIM_GetEncoderDigitalChannelB: - HALSIM_RegisterEncoderInitializedCallback: - ignore: true - HALSIM_CancelEncoderInitializedCallback: - HALSIM_GetEncoderInitialized: - HALSIM_SetEncoderInitialized: - HALSIM_GetEncoderSimDevice: - HALSIM_RegisterEncoderCountCallback: - ignore: true - HALSIM_CancelEncoderCountCallback: - HALSIM_GetEncoderCount: - HALSIM_SetEncoderCount: - HALSIM_RegisterEncoderPeriodCallback: - ignore: true - HALSIM_CancelEncoderPeriodCallback: - HALSIM_GetEncoderPeriod: - HALSIM_SetEncoderPeriod: - HALSIM_RegisterEncoderResetCallback: - ignore: true - HALSIM_CancelEncoderResetCallback: - HALSIM_GetEncoderReset: - HALSIM_SetEncoderReset: - HALSIM_RegisterEncoderMaxPeriodCallback: - ignore: true - HALSIM_CancelEncoderMaxPeriodCallback: - HALSIM_GetEncoderMaxPeriod: - HALSIM_SetEncoderMaxPeriod: - HALSIM_RegisterEncoderDirectionCallback: - ignore: true - HALSIM_CancelEncoderDirectionCallback: - HALSIM_GetEncoderDirection: - HALSIM_SetEncoderDirection: - HALSIM_RegisterEncoderReverseDirectionCallback: - ignore: true - HALSIM_CancelEncoderReverseDirectionCallback: - HALSIM_GetEncoderReverseDirection: - HALSIM_SetEncoderReverseDirection: - HALSIM_RegisterEncoderSamplesToAverageCallback: - ignore: true - HALSIM_CancelEncoderSamplesToAverageCallback: - HALSIM_GetEncoderSamplesToAverage: - HALSIM_SetEncoderSamplesToAverage: - HALSIM_RegisterEncoderDistancePerPulseCallback: - ignore: true - HALSIM_CancelEncoderDistancePerPulseCallback: - HALSIM_GetEncoderDistancePerPulse: - HALSIM_SetEncoderDistancePerPulse: - HALSIM_RegisterEncoderAllCallbacks: - ignore: true - HALSIM_SetEncoderDistance: - HALSIM_GetEncoderDistance: - HALSIM_SetEncoderRate: - HALSIM_GetEncoderRate: diff --git a/subprojects/robotpy-hal/semiwrap/simulation/PWMData.yml b/subprojects/robotpy-hal/semiwrap/simulation/PWMData.yml deleted file mode 100644 index cd1c5b1a9..000000000 --- a/subprojects/robotpy-hal/semiwrap/simulation/PWMData.yml +++ /dev/null @@ -1,25 +0,0 @@ -strip_prefixes: -- HALSIM_ - -functions: - HALSIM_ResetPWMData: - HALSIM_RegisterPWMInitializedCallback: - ignore: true - HALSIM_CancelPWMInitializedCallback: - HALSIM_GetPWMInitialized: - HALSIM_SetPWMInitialized: - HALSIM_RegisterPWMPulseMicrosecondCallback: - ignore: true - HALSIM_CancelPWMPulseMicrosecondCallback: - ignore: true - HALSIM_GetPWMPulseMicrosecond: - HALSIM_SetPWMPulseMicrosecond: - HALSIM_RegisterPWMAllCallbacks: - ignore: true - HALSIM_GetPWMSimDevice: - HALSIM_RegisterPWMOutputPeriodCallback: - ignore: true - HALSIM_CancelPWMOutputPeriodCallback: - ignore: true - HALSIM_GetPWMOutputPeriod: - HALSIM_SetPWMOutputPeriod: diff --git a/subprojects/robotpy-hal/semiwrap/simulation/PowerDistributionData.yml b/subprojects/robotpy-hal/semiwrap/simulation/PowerDistributionData.yml deleted file mode 100644 index 5521218bd..000000000 --- a/subprojects/robotpy-hal/semiwrap/simulation/PowerDistributionData.yml +++ /dev/null @@ -1,29 +0,0 @@ -strip_prefixes: -- HALSIM_ - -functions: - HALSIM_ResetPowerDistributionData: - HALSIM_RegisterPowerDistributionInitializedCallback: - ignore: true - HALSIM_CancelPowerDistributionInitializedCallback: - HALSIM_GetPowerDistributionInitialized: - HALSIM_SetPowerDistributionInitialized: - HALSIM_RegisterPowerDistributionTemperatureCallback: - ignore: true - HALSIM_CancelPowerDistributionTemperatureCallback: - HALSIM_GetPowerDistributionTemperature: - HALSIM_SetPowerDistributionTemperature: - HALSIM_RegisterPowerDistributionVoltageCallback: - ignore: true - HALSIM_CancelPowerDistributionVoltageCallback: - HALSIM_GetPowerDistributionVoltage: - HALSIM_SetPowerDistributionVoltage: - HALSIM_RegisterPowerDistributionCurrentCallback: - ignore: true - HALSIM_CancelPowerDistributionCurrentCallback: - HALSIM_GetPowerDistributionCurrent: - HALSIM_SetPowerDistributionCurrent: - HALSIM_GetPowerDistributionAllCurrents: - HALSIM_SetPowerDistributionAllCurrents: - HALSIM_RegisterPowerDistributionAllNonCurrentCallbacks: - ignore: true diff --git a/subprojects/robotpy-hal/semiwrap/simulation/REVPHData.yml b/subprojects/robotpy-hal/semiwrap/simulation/REVPHData.yml deleted file mode 100644 index acaebf35e..000000000 --- a/subprojects/robotpy-hal/semiwrap/simulation/REVPHData.yml +++ /dev/null @@ -1,41 +0,0 @@ -strip_prefixes: -- HALSIM_ - -functions: - HALSIM_ResetREVPHData: - HALSIM_RegisterREVPHInitializedCallback: - ignore: true - HALSIM_CancelREVPHInitializedCallback: - HALSIM_GetREVPHInitialized: - HALSIM_SetREVPHInitialized: - HALSIM_RegisterREVPHSolenoidOutputCallback: - ignore: true - HALSIM_CancelREVPHSolenoidOutputCallback: - HALSIM_GetREVPHSolenoidOutput: - HALSIM_SetREVPHSolenoidOutput: - HALSIM_RegisterREVPHCompressorOnCallback: - ignore: true - HALSIM_CancelREVPHCompressorOnCallback: - HALSIM_GetREVPHCompressorOn: - HALSIM_SetREVPHCompressorOn: - HALSIM_RegisterREVPHCompressorConfigTypeCallback: - ignore: true - HALSIM_CancelREVPHCompressorConfigTypeCallback: - HALSIM_GetREVPHCompressorConfigType: - HALSIM_SetREVPHCompressorConfigType: - HALSIM_RegisterREVPHPressureSwitchCallback: - ignore: true - HALSIM_CancelREVPHPressureSwitchCallback: - HALSIM_GetREVPHPressureSwitch: - HALSIM_SetREVPHPressureSwitch: - HALSIM_RegisterREVPHCompressorCurrentCallback: - ignore: true - HALSIM_CancelREVPHCompressorCurrentCallback: - HALSIM_GetREVPHCompressorCurrent: - HALSIM_SetREVPHCompressorCurrent: - HALSIM_GetREVPHAllSolenoids: - HALSIM_SetREVPHAllSolenoids: - HALSIM_RegisterREVPHAllNonSolenoidCallbacks: - ignore: true - HALSIM_RegisterREVPHAllSolenoidCallbacks: - ignore: true diff --git a/subprojects/robotpy-hal/semiwrap/simulation/RoboRioData.yml b/subprojects/robotpy-hal/semiwrap/simulation/RoboRioData.yml deleted file mode 100644 index e016fed57..000000000 --- a/subprojects/robotpy-hal/semiwrap/simulation/RoboRioData.yml +++ /dev/null @@ -1,97 +0,0 @@ -strip_prefixes: -- HALSIM_ - -functions: - HALSIM_ResetRoboRioData: - HALSIM_RegisterRoboRioFPGAButtonCallback: - ignore: true - HALSIM_CancelRoboRioFPGAButtonCallback: - ignore: true - HALSIM_GetRoboRioFPGAButton: - ignore: true - HALSIM_SetRoboRioFPGAButton: - ignore: true - HALSIM_RegisterRoboRioVInVoltageCallback: - ignore: true - HALSIM_CancelRoboRioVInVoltageCallback: - HALSIM_GetRoboRioVInVoltage: - HALSIM_SetRoboRioVInVoltage: - HALSIM_RegisterRoboRioUserVoltage3V3Callback: - ignore: true - HALSIM_CancelRoboRioUserVoltage3V3Callback: - HALSIM_GetRoboRioUserVoltage3V3: - HALSIM_SetRoboRioUserVoltage3V3: - HALSIM_RegisterRoboRioUserCurrent3V3Callback: - ignore: true - HALSIM_CancelRoboRioUserCurrent3V3Callback: - HALSIM_GetRoboRioUserCurrent3V3: - HALSIM_SetRoboRioUserCurrent3V3: - HALSIM_RegisterRoboRioUserActive3V3Callback: - ignore: true - HALSIM_CancelRoboRioUserActive3V3Callback: - HALSIM_GetRoboRioUserActive3V3: - HALSIM_SetRoboRioUserActive3V3: - HALSIM_RegisterRoboRioUserFaults3V3Callback: - ignore: true - HALSIM_CancelRoboRioUserFaults3V3Callback: - HALSIM_GetRoboRioUserFaults3V3: - HALSIM_SetRoboRioUserFaults3V3: - HALSIM_RegisterRoboRioBrownoutVoltageCallback: - ignore: true - HALSIM_CancelRoboRioBrownoutVoltageCallback: - HALSIM_GetRoboRioBrownoutVoltage: - HALSIM_SetRoboRioBrownoutVoltage: - HALSIM_RegisterRoboRioTeamNumberCallback: - ignore: true - HALSIM_CancelRoboRioTeamNumberCallback: - HALSIM_GetRoboRioTeamNumber: - HALSIM_SetRoboRioTeamNumber: - HALSIM_RegisterRoboRioSerialNumberCallback: - ignore: true - HALSIM_CancelRoboRioSerialNumberCallback: - HALSIM_GetRoboRioSerialNumber: - param_override: - serialNumber: - ignore: true - cpp_code: | - []() { - WPI_String s; - HALSIM_GetRoboRioSerialNumber(&s); - std::string ss(wpi::util::to_string_view(&s)); - WPI_FreeString(&s); - return ss; - } - HALSIM_SetRoboRioSerialNumber: - cpp_code: | - [](std::string_view sv) { - auto s = wpi::util::make_string(sv); - HALSIM_SetRoboRioSerialNumber(&s); - } - HALSIM_RegisterRoboRioCommentsCallback: - ignore: true - HALSIM_CancelRoboRioCommentsCallback: - HALSIM_GetRoboRioComments: - param_override: - comments: - ignore: true - cpp_code: | - []() { - WPI_String s; - HALSIM_GetRoboRioComments(&s); - std::string ss(wpi::util::to_string_view(&s)); - WPI_FreeString(&s); - return ss; - } - HALSIM_SetRoboRioComments: - cpp_code: | - [](std::string_view sv) { - auto s = wpi::util::make_string(sv); - HALSIM_SetRoboRioComments(&s); - } - HALSIM_RegisterRoboRioAllCallbacks: - ignore: true - HALSIM_RegisterRoboRioCPUTempCallback: - ignore: true - HALSIM_CancelRoboRioCPUTempCallback: - HALSIM_GetRoboRioCPUTemp: - HALSIM_SetRoboRioCPUTemp: diff --git a/subprojects/robotpy-wpilib/semiwrap/AddressableLED.yml b/subprojects/robotpy-wpilib/semiwrap/AddressableLED.yml index ac6b1ec16..3643f333a 100644 --- a/subprojects/robotpy-wpilib/semiwrap/AddressableLED.yml +++ b/subprojects/robotpy-wpilib/semiwrap/AddressableLED.yml @@ -21,8 +21,8 @@ classes: ColorOrder: wpi::AddressableLED::LEDData: force_no_trampoline: true - base_qualnames: - HAL_AddressableLEDData: ::HAL_AddressableLEDData + ignored_bases: + - HAL_AddressableLEDData methods: LEDData: overloads: @@ -41,4 +41,11 @@ classes: overloads: const wpi::util::Color&: const wpi::util::Color8Bit&: - + inline_code: | + .def_readwrite("r", &wpi::AddressableLED::LEDData::r) + .def_readwrite("g", &wpi::AddressableLED::LEDData::g) + .def_readwrite("b", &wpi::AddressableLED::LEDData::b) + .def("__eq__", [](wpi::AddressableLED::LEDData &self, wpi::AddressableLED::LEDData &other) { + return self.r == other.r && self.g == other.g && self.b == other.b; + }) + ; diff --git a/subprojects/robotpy-wpilib/semiwrap/simulation/AddressableLEDSim.yml b/subprojects/robotpy-wpilib/semiwrap/simulation/AddressableLEDSim.yml index ac48cce4f..e7e8317a6 100644 --- a/subprojects/robotpy-wpilib/semiwrap/simulation/AddressableLEDSim.yml +++ b/subprojects/robotpy-wpilib/semiwrap/simulation/AddressableLEDSim.yml @@ -5,6 +5,8 @@ classes: wpi::sim::AddressableLEDSim: force_type_casters: - std::function + - std::span + - std::vector methods: AddressableLEDSim: overloads: @@ -18,9 +20,32 @@ classes: SetLength: RegisterDataCallback: GetData: + param_override: + data: + ignore: true + cpp_code: | + [](wpi::sim::AddressableLEDSim &self) { + int len = self.GetData(nullptr); + std::vector data(len); + self.GetData(data.data()); + return data; + } SetData: + param_override: + length: + ignore: true + cpp_code: | + [](wpi::sim::AddressableLEDSim &self, std::span &data) { + if (data.size() != self.GetLength()) { + std::string msg = fmt::format("data must have length {} (got {})", self.GetLength(), data.size()); + throw py::value_error(msg); + } + self.SetData(data.data()); + } RegisterStartCallback: GetStart: SetStart: GetGlobalData: + ignore: true SetGlobalData: + ignore: true diff --git a/subprojects/robotpy-wpilib/tests/test_wpilib_simulation.py b/subprojects/robotpy-wpilib/tests/test_wpilib_simulation.py index 561b2bb05..32ed4bda8 100644 --- a/subprojects/robotpy-wpilib/tests/test_wpilib_simulation.py +++ b/subprojects/robotpy-wpilib/tests/test_wpilib_simulation.py @@ -3,3 +3,23 @@ def test_wpilib_simulation(): pass + + +def test_addressableled_sim(): + led = wpilib.AddressableLED(0) + sim = wpilib.simulation.AddressableLEDSim(led) + assert not sim.getStart() + led.setStart(1) + assert sim.getStart() + + data = [ + wpilib.AddressableLED.LEDData(1, 2, 3), + wpilib.AddressableLED.LEDData(4, 5, 6), + ] + + led.setLength(len(data)) + led.setData(data) + assert sim.getData() == data + + led.setStart(0) + assert not sim.getStart()