HAND FIX: Fix robotpy yaml files

This commit is contained in:
PJ Reiniger
2025-11-07 19:58:22 -05:00
committed by Peter Johnson
parent d3da30d53a
commit cf711a125e
21 changed files with 323 additions and 47 deletions

View File

@@ -41,8 +41,6 @@ packages = ["hal"]
[tool.semiwrap]
update_init = []
scan_headers_ignore = [
"hal/ChipObject.h",
"hal/DMA.h",
"wpi/hal/Errors.h",
"wpi/hal/HAL.h",
"wpi/hal/IMU.h",
@@ -51,8 +49,6 @@ scan_headers_ignore = [
"wpi/hal/Types.h",
"wpi/hal/Value.h",
"hal/cpp/SerialHelper.h",
"hal/cpp/UnsafeDIO.h",
"wpi/hal/cpp/fpga_clock.h",
"wpi/hal/handles/DigitalHandleResource.h",
@@ -62,15 +58,11 @@ scan_headers_ignore = [
"wpi/hal/handles/LimitedHandleResource.h",
"wpi/hal/handles/UnlimitedHandleResource.h",
"hal/proto/*",
"hal/roborio/HMB.h",
"hal/roborio/InterruptManager.h",
"wpi/hal/proto/*",
"wpi/hal/simulation/CanData.h",
"wpi/hal/simulation/I2CData.h",
"wpi/hal/simulation/NotifyListener.h",
"hal/simulation/SPIData.h",
"wpi/hal/simulation/SimCallbackRegistry.h",
"wpi/hal/simulation/SimDataValue.h",

View File

@@ -26,7 +26,6 @@ functions:
WPI_FreeString(&name);
return sname;
}
HAL_GetJoystickAxisType:
HAL_SetJoystickOutputs:
HAL_GetMatchTime:
HAL_GetOutputsEnabled:

View File

@@ -21,27 +21,24 @@ classes:
fmsAttached:
dsAttached:
control_reserved:
watchdogEnabled:
HAL_JoystickAxes:
attributes:
count:
axes:
raw:
available:
HAL_JoystickPOVs:
attributes:
count:
povs:
available:
HAL_JoystickButtons:
attributes:
buttons:
count:
available:
HAL_JoystickDescriptor:
attributes:
type:
name:
axisCount:
axisTypes:
buttonCount:
povCount:
isGamepad:
HAL_MatchInfo:
attributes:

View File

@@ -77,10 +77,6 @@ functions:
HALSIM_SetJoystickAxis:
HALSIM_SetJoystickPOV:
HALSIM_SetJoystickButtonsValue:
HALSIM_SetJoystickAxisCount:
HALSIM_SetJoystickPOVCount:
HALSIM_SetJoystickButtonCount:
HALSIM_GetJoystickCounts:
HALSIM_SetJoystickType:
HALSIM_SetJoystickName:
cpp_code: |
@@ -88,7 +84,6 @@ functions:
auto s = wpi::make_string(sv);
HALSIM_SetJoystickName(stick, &s);
}
HALSIM_SetJoystickAxisType:
HALSIM_SetGameSpecificMessage:
cpp_code: |
[](std::string_view sv) {
@@ -111,3 +106,7 @@ functions:
HALSIM_CancelDriverStationNewDataCallback:
HALSIM_NotifyDriverStationNewData:
HALSIM_SetJoystickIsGamepad:
HALSIM_SetJoystickAxesAvailable:
HALSIM_SetJoystickPOVsAvailable:
HALSIM_SetJoystickButtonsAvailable:
HALSIM_GetJoystickAvailables:

View File

@@ -112,7 +112,12 @@ DutyCycle = "wpi/hardware/rotation/DutyCycle.hpp"
DutyCycleEncoder = "wpi/hardware/rotation/DutyCycleEncoder.hpp"
Encoder = "wpi/hardware/rotation/Encoder.hpp"
Errors = "wpi/system/Errors.hpp"
ExpansionHub = "wpi/ExpansionHub.hpp"
ExpansionHubMotor = "wpi/ExpansionHubMotor.hpp"
ExpansionHubPidConstants = "wpi/ExpansionHubPidConstants.hpp"
ExpansionHubServo = "wpi/ExpansionHubServo.hpp"
Filesystem = "rpy/Filesystem.h"
Gamepad = "wpi/driverstation/Gamepad.hpp"
I2C = "wpi/hardware/bus/I2C.hpp"
IterativeRobotBase = "wpi/opmode/IterativeRobotBase.hpp"
Joystick = "wpi/driverstation/Joystick.hpp"
@@ -256,6 +261,7 @@ DutyCycleSim = "wpi/simulation/DutyCycleSim.hpp"
ElevatorSim = "wpi/simulation/ElevatorSim.hpp"
EncoderSim = "wpi/simulation/EncoderSim.hpp"
FlywheelSim = "wpi/simulation/FlywheelSim.hpp"
GamepadSim = "wpi/simulation/GamepadSim.hpp"
GenericHIDSim = "wpi/simulation/GenericHIDSim.hpp"
JoystickSim = "wpi/simulation/JoystickSim.hpp"
LinearSystemSim = "wpi/simulation/LinearSystemSim.hpp"

View File

@@ -17,12 +17,8 @@ classes:
GetStickAxis:
GetStickPOV:
GetStickButtons:
GetStickAxisCount:
GetStickPOVCount:
GetStickButtonCount:
GetJoystickType:
GetJoystickName:
GetJoystickAxisType:
IsJoystickConnected:
IsEnabled:
IsDisabled:
@@ -52,6 +48,14 @@ classes:
StartDataLog:
GetAngle:
GetJoystickIsGamepad:
GetStickButtonIfAvailable:
GetStickAxisIfAvailable:
GetStickAxesMaximumIndex:
GetStickAxesAvailable:
GetStickPOVsMaximumIndex:
GetStickPOVsAvailable:
GetStickButtonsMaximumIndex:
GetStickButtonsAvailable:
inline_code: |
.def("getControlState",
[](DriverStation *self) -> std::tuple<bool, bool, bool> {

View File

@@ -0,0 +1,16 @@
extra_includes:
- wpi/ExpansionHubMotor.hpp
- wpi/ExpansionHubServo.hpp
classes:
frc::ExpansionHub:
attributes:
NumUsbPorts:
NumServoPorts:
NumMotorPorts:
methods:
ExpansionHub:
MakeServo:
MakeMotor:
IsHubConnected:
GetUsbId:

View File

@@ -0,0 +1,20 @@
classes:
frc::ExpansionHubMotor:
methods:
ExpansionHubMotor:
SetPercentagePower:
SetVoltage:
SetPositionSetpoint:
SetVelocitySetpoint:
SetEnabled:
SetFloatOn0:
GetCurrent:
SetDistancePerCount:
GetEncoderVelocity:
GetEncoderPosition:
SetReversed:
ResetEncoder:
GetVelocityPidConstants:
GetPositionPidConstants:
IsHubConnected:
Follow:

View File

@@ -0,0 +1,7 @@
classes:
frc::ExpansionHubPidConstants:
methods:
SetPID:
SetFF:
EnableContinousInput:
DisableContinousInput:

View File

@@ -0,0 +1,14 @@
classes:
frc::ExpansionHubServo:
methods:
ExpansionHubServo:
Set:
SetAngle:
SetPulseWidth:
SetEnabled:
SetFramePeriod:
IsHubConnected:
SetAngleRange:
SetPWMRange:
SetReversed:
SetContinousRotationMode:

View File

@@ -0,0 +1,161 @@
classes:
frc::Gamepad:
ignored_bases:
- wpi::SendableHelper<Gamepad>
methods:
Gamepad:
GetLeftX:
GetLeftY:
GetRightX:
GetRightY:
GetLeftTriggerAxis:
LeftTrigger:
overloads:
double, EventLoop* [const]:
EventLoop* [const]:
GetRightTriggerAxis:
RightTrigger:
overloads:
double, EventLoop* [const]:
EventLoop* [const]:
GetSouthFaceButton:
GetSouthFaceButtonPressed:
GetSouthFaceButtonReleased:
SouthFace:
GetEastFaceButton:
GetEastFaceButtonPressed:
GetEastFaceButtonReleased:
EastFace:
GetWestFaceButton:
GetWestFaceButtonPressed:
GetWestFaceButtonReleased:
WestFace:
GetNorthFaceButton:
GetNorthFaceButtonPressed:
GetNorthFaceButtonReleased:
NorthFace:
GetBackButton:
GetBackButtonPressed:
GetBackButtonReleased:
Back:
GetGuideButton:
GetGuideButtonPressed:
GetGuideButtonReleased:
Guide:
GetStartButton:
GetStartButtonPressed:
GetStartButtonReleased:
Start:
GetLeftStickButton:
GetLeftStickButtonPressed:
GetLeftStickButtonReleased:
LeftStick:
GetRightStickButton:
GetRightStickButtonPressed:
GetRightStickButtonReleased:
RightStick:
GetLeftShoulderButton:
GetLeftShoulderButtonPressed:
GetLeftShoulderButtonReleased:
LeftShoulder:
GetRightShoulderButton:
GetRightShoulderButtonPressed:
GetRightShoulderButtonReleased:
RightShoulder:
GetDpadUpButton:
GetDpadUpButtonPressed:
GetDpadUpButtonReleased:
DpadUp:
GetDpadDownButton:
GetDpadDownButtonPressed:
GetDpadDownButtonReleased:
DpadDown:
GetDpadLeftButton:
GetDpadLeftButtonPressed:
GetDpadLeftButtonReleased:
DpadLeft:
GetDpadRightButton:
GetDpadRightButtonPressed:
GetDpadRightButtonReleased:
DpadRight:
GetMisc1Button:
GetMisc1ButtonPressed:
GetMisc1ButtonReleased:
Misc1:
GetRightPaddle1Button:
GetRightPaddle1ButtonPressed:
GetRightPaddle1ButtonReleased:
RightPaddle1:
GetLeftPaddle1Button:
GetLeftPaddle1ButtonPressed:
GetLeftPaddle1ButtonReleased:
LeftPaddle1:
GetRightPaddle2Button:
GetRightPaddle2ButtonPressed:
GetRightPaddle2ButtonReleased:
RightPaddle2:
GetLeftPaddle2Button:
GetLeftPaddle2ButtonPressed:
GetLeftPaddle2ButtonReleased:
LeftPaddle2:
GetTouchpadButton:
GetTouchpadButtonPressed:
GetTouchpadButtonReleased:
Touchpad:
GetMisc2Button:
GetMisc2ButtonPressed:
GetMisc2ButtonReleased:
Misc2:
GetMisc3Button:
GetMisc3ButtonPressed:
GetMisc3ButtonReleased:
Misc3:
GetMisc4Button:
GetMisc4ButtonPressed:
GetMisc4ButtonReleased:
Misc4:
GetMisc5Button:
GetMisc5ButtonPressed:
GetMisc5ButtonReleased:
Misc5:
GetMisc6Button:
GetMisc6ButtonPressed:
GetMisc6ButtonReleased:
Misc6:
InitSendable:
frc::Gamepad::Button:
attributes:
kSouthFace:
kEastFace:
kWestFace:
kNorthFace:
kBack:
kGuide:
kStart:
kLeftStick:
kRightStick:
kLeftShoulder:
kRightShoulder:
kDpadUp:
kDpadDown:
kDpadLeft:
kDpadRight:
kMisc1:
kRightPaddle1:
kLeftPaddle1:
kRightPaddle2:
kLeftPaddle2:
kTouchpad:
kMisc2:
kMisc3:
kMisc4:
kMisc5:
kMisc6:
frc::Gamepad::Axis:
attributes:
kLeftX:
kLeftY:
kRightX:
kRightY:
kLeftTrigger:
kRightTrigger:

View File

@@ -33,17 +33,19 @@ classes:
POVCenter:
AxisLessThan:
AxisGreaterThan:
GetAxisCount:
GetPOVCount:
GetButtonCount:
IsConnected:
GetType:
GetName:
GetAxisType:
GetPort:
SetOutput:
SetOutputs:
SetRumble:
GetAxesMaximumIndex:
GetAxesAvailable:
GetPOVsMaximumIndex:
GetPOVsAvailable:
GetButtonsMaximumIndex:
GetButtonsAvailable:
inline_code: |
cls_GenericHID

View File

@@ -12,6 +12,5 @@ classes:
default: 0_s
TimedRobot:
overloads:
double:
ignore: true
units::second_t:
units::hertz_t:

View File

@@ -35,13 +35,8 @@ classes:
SetJoystickButton:
SetJoystickAxis:
SetJoystickPOV:
SetJoystickButtons:
SetJoystickAxisCount:
SetJoystickPOVCount:
SetJoystickButtonCount:
SetJoystickType:
SetJoystickName:
SetJoystickAxisType:
SetGameSpecificMessage:
SetEventName:
SetMatchType:
@@ -49,3 +44,9 @@ classes:
SetReplayNumber:
ResetData:
SetJoystickIsGamepad:
SetJoystickAxesMaximumIndex:
SetJoystickAxesAvailable:
SetJoystickPOVsMaximumIndex:
SetJoystickPOVsAvailable:
SetJoystickButtonsMaximumIndex:
SetJoystickButtonsAvailable:

View File

@@ -0,0 +1,43 @@
extra_includes:
- wpi/driverstation/Gamepad.hpp
classes:
frc::sim::GamepadSim:
force_no_trampoline: true
methods:
GamepadSim:
overloads:
const Gamepad&:
int:
SetLeftX:
SetLeftY:
SetRightX:
SetRightY:
SetLeftTriggerAxis:
SetRightTriggerAxis:
SetSouthFaceButton:
SetEastFaceButton:
SetWestFaceButton:
SetNorthFaceButton:
SetBackButton:
SetGuideButton:
SetStartButton:
SetLeftStickButton:
SetRightStickButton:
SetLeftShoulderButton:
SetRightShoulderButton:
SetDpadUpButton:
SetDpadDownButton:
SetDpadLeftButton:
SetDpadRightButton:
SetMisc1Button:
SetRightPaddle1Button:
SetLeftPaddle1Button:
SetRightPaddle2Button:
SetLeftPaddle2Button:
SetTouchpadButton:
SetMisc2Button:
SetMisc3Button:
SetMisc4Button:
SetMisc5Button:
SetMisc6Button:

View File

@@ -12,12 +12,14 @@ classes:
overloads:
int, DriverStation::POVDirection:
DriverStation::POVDirection:
SetAxisCount:
SetPOVCount:
SetButtonCount:
SetType:
SetName:
SetAxisType:
GetOutput:
GetOutputs:
GetRumble:
SetAxesMaximumIndex:
SetAxesAvailable:
SetPOVsMaximumIndex:
SetPOVsAvailable:
SetButtonsMaximumIndex:
SetButtonsAvailable:

View File

@@ -27,8 +27,13 @@ from ._wpilib import (
DutyCycle,
DutyCycleEncoder,
Encoder,
ExpansionHub,
ExpansionHubMotor,
ExpansionHubPidConstants,
ExpansionHubServo,
Field2d,
FieldObject2d,
Gamepad,
I2C,
IterativeRobotBase,
Joystick,
@@ -114,8 +119,13 @@ __all__ = [
"DutyCycle",
"DutyCycleEncoder",
"Encoder",
"ExpansionHub",
"ExpansionHubMotor",
"ExpansionHubPidConstants",
"ExpansionHubServo",
"Field2d",
"FieldObject2d",
"Gamepad",
"I2C",
"IterativeRobotBase",
"Joystick",

View File

@@ -23,6 +23,7 @@ from ._simulation import (
ElevatorSim,
EncoderSim,
FlywheelSim,
GamepadSim,
GenericHIDSim,
JoystickSim,
LinearSystemSim_1_1_1,
@@ -77,6 +78,7 @@ __all__ = [
"ElevatorSim",
"EncoderSim",
"FlywheelSim",
"GamepadSim",
"GenericHIDSim",
"JoystickSim",
"LinearSystemSim_1_1_1",

View File

@@ -81,11 +81,11 @@ scan_headers_ignore = [
"wpi/math/system/NumericalIntegration.hpp",
"wpi/math/system/NumericalJacobian.hpp",
"frc/proto/*",
"frc/*/proto/*",
"wpi/math/proto/*",
"wpi/math/*/proto/*",
"frc/struct/*",
"frc/*/struct/*",
"wpi/math/struct/*",
"wpi/math/*/struct/*",
"[eE]igen/*",
@@ -96,7 +96,7 @@ scan_headers_ignore = [
"sleipnir/*",
"type_casters/*",
"unsupported/*",
"units/*",
"wpi/units/*",
"wpimath/protobuf/*",
"wpi/math/util/MathShared.hpp",

View File

@@ -41,6 +41,9 @@ classes:
KrakenX60:
KrakenX60FOC:
NeoVortex:
KrakenX44:
KrakenX44FOC:
Minion:
inline_code: |
SetupWPyStruct<frc::DCMotor>(cls_DCMotor);

View File

@@ -1,4 +1,3 @@
classes:
SomeClass:
attributes: