mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[robotpy] Mirror most other subprojects (#8208)
GitOrigin-RevId: ac60fd3cf4a24023184376687da28373d14b781a This mirrors the robotpy files for the following projects: - apriltag - datalog - hal - ntcore - romiVendordep - wpilibc - wpimath - xrpVendordep This excludes cscore and the halsim wrappers for at this time. NOTE: This does not hook these projects up to the build system, just simply mirrors the files. The building will take place in a follow up PR to make it easier to review the changes necessary to build.
This commit is contained in:
56
wpilibc/src/main/python/LICENSE.txt
Normal file
56
wpilibc/src/main/python/LICENSE.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
|
||||
RobotPy code license
|
||||
|
||||
Copyright (c) 2014-2015 Peter Johnson
|
||||
Copyright (c) 2014-2017 Dustin Spicuzza
|
||||
Copyright (c) 2014-2017 Other contributors
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of RobotPy nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY ROBOTPY AND CONTRIBUTORS``AS IS'' AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ROBOTPY OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Code for WPILib was derived from code using the following license:
|
||||
|
||||
* Copyright (c) 2008-2015 FIRST
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the FIRST nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
33
wpilibc/src/main/python/README.md
Normal file
33
wpilibc/src/main/python/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
RobotPy WPILib
|
||||
==============
|
||||
|
||||
This repository contain a python implementation of wrappers for WPILib,
|
||||
the library used to interface with hardware for the FIRST Robotics Competition.
|
||||
Teams can use this library to write their robot code in Python, a powerful dynamic
|
||||
programming language.
|
||||
|
||||
**Note**: RobotPy is officially supported by FIRST. Please see the
|
||||
[FAQ](https://robotpy.github.io/faq/) for more information.
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
All RobotPy documentation can be found at https://robotpy.readthedocs.io
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Installation instructions can be found in the [RobotPy documentation](https://robotpy.readthedocs.io/en/latest/getting_started.html)
|
||||
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
See [LICENSE.txt](LICENSE.txt)
|
||||
|
||||
Contributors
|
||||
============
|
||||
|
||||
RobotPy is a community project, and many people have contributed over the years
|
||||
to make it what it is today. RobotPy's history can be found on our
|
||||
[documentation site](https://robotpy.readthedocs.io/en/stable/faq.html#who-created-robotpy).
|
||||
12
wpilibc/src/main/python/README.rst
Normal file
12
wpilibc/src/main/python/README.rst
Normal file
@@ -0,0 +1,12 @@
|
||||
RobotPy WPILib
|
||||
==============
|
||||
|
||||
Python version of WPILib - the standard library used for programming FRC
|
||||
robots.
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Typically, you don't install this directly, but use the RobotPy installer
|
||||
to install it on your roboRIO, or it is installed by pip as part of the
|
||||
pyfrc setup process.
|
||||
47
wpilibc/src/main/python/native-pyproject.toml
Normal file
47
wpilibc/src/main/python/native-pyproject.toml
Normal file
@@ -0,0 +1,47 @@
|
||||
[build-system]
|
||||
build-backend = "hatchling.build"
|
||||
requires = [
|
||||
"hatchling",
|
||||
"hatch-nativelib~=0.2.0",
|
||||
"hatch-robotpy~=0.2.1",
|
||||
"robotpy-native-wpiutil==2027.0.0a2",
|
||||
"robotpy-native-wpinet==2027.0.0a2",
|
||||
"robotpy-native-ntcore==2027.0.0a2",
|
||||
"robotpy-native-wpimath==2027.0.0a2",
|
||||
"robotpy-native-wpihal==2027.0.0a2",
|
||||
]
|
||||
|
||||
[project]
|
||||
name = "robotpy-native-wpilib"
|
||||
version = "2027.0.0a2"
|
||||
description = "WPILib Robotics Library"
|
||||
license = "BSD-3-Clause"
|
||||
|
||||
dependencies = [
|
||||
"robotpy-native-wpiutil==2027.0.0a2",
|
||||
"robotpy-native-wpinet==2027.0.0a2",
|
||||
"robotpy-native-ntcore==2027.0.0a2",
|
||||
"robotpy-native-wpimath==2027.0.0a2",
|
||||
"robotpy-native-wpihal==2027.0.0a2",
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/native"]
|
||||
|
||||
[[tool.hatch.build.hooks.robotpy.maven_lib_download]]
|
||||
artifact_id = "wpilibc-cpp"
|
||||
group_id = "edu.wpi.first.wpilibc"
|
||||
repo_url = "https://frcmaven.wpi.edu/artifactory/release-2027"
|
||||
version = "2027.0.0-alpha-2"
|
||||
|
||||
extract_to = "src/native/wpilib"
|
||||
libs = ["wpilibc"]
|
||||
|
||||
[[tool.hatch.build.hooks.nativelib.pcfile]]
|
||||
pcfile = "src/native/wpilib/robotpy-native-wpilib.pc"
|
||||
name = "wpilib"
|
||||
|
||||
includedir = "src/native/wpilib/include"
|
||||
libdir = "src/native/wpilib/lib"
|
||||
shared_libraries = ["wpilibc"]
|
||||
requires = ["robotpy-native-wpiutil", "robotpy-native-wpinet", "robotpy-native-ntcore", "robotpy-native-wpimath", "robotpy-native-wpihal"]
|
||||
284
wpilibc/src/main/python/pyproject.toml
Normal file
284
wpilibc/src/main/python/pyproject.toml
Normal file
@@ -0,0 +1,284 @@
|
||||
[build-system]
|
||||
build-backend = "hatchling.build"
|
||||
requires = [
|
||||
"semiwrap~=0.1.7",
|
||||
"hatch-meson~=0.1.0b2",
|
||||
"hatch-robotpy~=0.2.1",
|
||||
"hatchling",
|
||||
"robotpy-native-wpilib==2027.0.0a2",
|
||||
"robotpy-wpiutil==2027.0.0a2",
|
||||
"robotpy-wpimath==2027.0.0a2",
|
||||
"robotpy-hal==2027.0.0a2",
|
||||
"pyntcore==2027.0.0a2",
|
||||
]
|
||||
|
||||
[project]
|
||||
name = "wpilib"
|
||||
version = "2027.0.0a2"
|
||||
description = "Binary wrapper for FRC WPILib"
|
||||
authors = [
|
||||
{name = "RobotPy Development Team", email = "robotpy@googlegroups.com"},
|
||||
]
|
||||
license = "BSD-3-Clause"
|
||||
dependencies = [
|
||||
"robotpy-native-wpilib==2027.0.0a2",
|
||||
"robotpy-wpiutil==2027.0.0a2",
|
||||
"robotpy-wpimath==2027.0.0a2",
|
||||
"robotpy-hal==2027.0.0a2",
|
||||
"pyntcore==2027.0.0a2",
|
||||
"robotpy-cli~=2024.0b"
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
"Source code" = "https://github.com/robotpy/mostrobotpy"
|
||||
|
||||
[project.entry-points.robotpy]
|
||||
run = "wpilib._impl.start:Main"
|
||||
|
||||
|
||||
[tool.hatch.build.hooks.robotpy]
|
||||
version_file = "wpilib/version.py"
|
||||
|
||||
[tool.hatch.build.hooks.semiwrap]
|
||||
|
||||
[tool.hatch.build.hooks.meson]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["wpilib"]
|
||||
|
||||
|
||||
[tool.semiwrap]
|
||||
update_init = [
|
||||
"wpilib",
|
||||
"wpilib.counter",
|
||||
"wpilib.drive",
|
||||
"wpilib.event",
|
||||
"wpilib.interfaces wpilib._wpilib.interfaces",
|
||||
"wpilib.simulation",
|
||||
"wpilib.sysid wpilib._wpilib.sysid",
|
||||
]
|
||||
scan_headers_ignore = [
|
||||
"WPILibVersion.h",
|
||||
|
||||
# needs a python wrapper
|
||||
"frc/AsynchronousInterrupt.h",
|
||||
|
||||
"frc/Filesystem.h",
|
||||
"frc/Notifier.h", # wrapped separately
|
||||
"frc/Resource.h",
|
||||
"frc/ScopedTracer.h", # not useful for python
|
||||
|
||||
"frc/motorcontrol/MotorControllerGroup.h", # wrapped separately
|
||||
|
||||
"frc/smartdashboard/ListenerExecutor.h", # internal detail
|
||||
|
||||
# Internals
|
||||
"rpy/ControlWord.h",
|
||||
"rpy/SmartDashboardData.h",
|
||||
]
|
||||
|
||||
[tool.semiwrap.extension_modules."wpilib._wpilib"]
|
||||
name = "wpilib"
|
||||
wraps = ["robotpy-native-wpilib"]
|
||||
depends = [
|
||||
"wpihal", "wpiutil", "ntcore",
|
||||
"wpimath", "wpimath_geometry", "wpimath_controls",
|
||||
"wpilib_event"
|
||||
]
|
||||
includes = ["wpilib/src"]
|
||||
|
||||
[tool.semiwrap.extension_modules."wpilib._wpilib".defines]
|
||||
DYNAMIC_CAMERA_SERVER = 1
|
||||
|
||||
[tool.semiwrap.extension_modules."wpilib._wpilib".headers]
|
||||
# frc
|
||||
ADXL345_I2C = "frc/ADXL345_I2C.h"
|
||||
AddressableLED = "frc/AddressableLED.h"
|
||||
Alert = "frc/Alert.h"
|
||||
AnalogAccelerometer = "frc/AnalogAccelerometer.h"
|
||||
AnalogEncoder = "frc/AnalogEncoder.h"
|
||||
AnalogGyro = "frc/AnalogGyro.h"
|
||||
AnalogInput = "frc/AnalogInput.h"
|
||||
AnalogPotentiometer = "frc/AnalogPotentiometer.h"
|
||||
CAN = "frc/CAN.h"
|
||||
Compressor = "frc/Compressor.h"
|
||||
CompressorConfigType = "frc/CompressorConfigType.h"
|
||||
DataLogManager = "frc/DataLogManager.h"
|
||||
DSControlWord = "frc/DSControlWord.h"
|
||||
DigitalInput = "frc/DigitalInput.h"
|
||||
DigitalOutput = "frc/DigitalOutput.h"
|
||||
DoubleSolenoid = "frc/DoubleSolenoid.h"
|
||||
DriverStation = "frc/DriverStation.h"
|
||||
DutyCycle = "frc/DutyCycle.h"
|
||||
DutyCycleEncoder = "frc/DutyCycleEncoder.h"
|
||||
Encoder = "frc/Encoder.h"
|
||||
Errors = "frc/Errors.h"
|
||||
Filesystem = "rpy/Filesystem.h"
|
||||
I2C = "frc/I2C.h"
|
||||
IterativeRobotBase = "frc/IterativeRobotBase.h"
|
||||
Joystick = "frc/Joystick.h"
|
||||
LEDPattern = "frc/LEDPattern.h"
|
||||
MotorSafety = "frc/MotorSafety.h"
|
||||
Notifier = "rpy/Notifier.h"
|
||||
OnboardIMU = "frc/OnboardIMU.h"
|
||||
PS4Controller = "frc/PS4Controller.h"
|
||||
PS5Controller = "frc/PS5Controller.h"
|
||||
PWM = "frc/PWM.h"
|
||||
PneumaticHub = "frc/PneumaticHub.h"
|
||||
PneumaticsBase = "frc/PneumaticsBase.h"
|
||||
PneumaticsControlModule = "frc/PneumaticsControlModule.h"
|
||||
PneumaticsModuleType = "frc/PneumaticsModuleType.h"
|
||||
PowerDistribution = "frc/PowerDistribution.h"
|
||||
Preferences = "frc/Preferences.h"
|
||||
RobotBase = "frc/RobotBase.h"
|
||||
RobotController = "frc/RobotController.h"
|
||||
RobotState = "frc/RobotState.h"
|
||||
RuntimeType = "frc/RuntimeType.h"
|
||||
SensorUtil = "frc/SensorUtil.h"
|
||||
SerialPort = "frc/SerialPort.h"
|
||||
Servo = "frc/Servo.h"
|
||||
SharpIR = "frc/SharpIR.h"
|
||||
Solenoid = "frc/Solenoid.h"
|
||||
StadiaController = "frc/StadiaController.h"
|
||||
SystemServer = "frc/SystemServer.h"
|
||||
Threads = "frc/Threads.h"
|
||||
TimedRobot = "frc/TimedRobot.h"
|
||||
Timer = "frc/Timer.h"
|
||||
TimesliceRobot = "frc/TimesliceRobot.h"
|
||||
Tracer = "frc/Tracer.h"
|
||||
Watchdog = "frc/Watchdog.h"
|
||||
XboxController = "frc/XboxController.h"
|
||||
|
||||
# frc (interfaces)
|
||||
CounterBase = "frc/CounterBase.h"
|
||||
GenericHID = "frc/GenericHID.h"
|
||||
MotorController = "frc/motorcontrol/MotorController.h"
|
||||
|
||||
# frc/internal
|
||||
DriverStationModeThread = "frc/internal/DriverStationModeThread.h"
|
||||
|
||||
# frc/motorcontrol
|
||||
DMC60 = "frc/motorcontrol/DMC60.h"
|
||||
Jaguar = "frc/motorcontrol/Jaguar.h"
|
||||
Koors40 = "frc/motorcontrol/Koors40.h"
|
||||
MotorControllerGroup = "rpy/MotorControllerGroup.h"
|
||||
PWMMotorController = "frc/motorcontrol/PWMMotorController.h"
|
||||
PWMSparkFlex = "frc/motorcontrol/PWMSparkFlex.h"
|
||||
PWMSparkMax = "frc/motorcontrol/PWMSparkMax.h"
|
||||
PWMTalonFX = "frc/motorcontrol/PWMTalonFX.h"
|
||||
PWMTalonSRX = "frc/motorcontrol/PWMTalonSRX.h"
|
||||
PWMVenom = "frc/motorcontrol/PWMVenom.h"
|
||||
PWMVictorSPX = "frc/motorcontrol/PWMVictorSPX.h"
|
||||
SD540 = "frc/motorcontrol/SD540.h"
|
||||
Spark = "frc/motorcontrol/Spark.h"
|
||||
SparkMini = "frc/motorcontrol/SparkMini.h"
|
||||
Talon = "frc/motorcontrol/Talon.h"
|
||||
Victor = "frc/motorcontrol/Victor.h"
|
||||
VictorSP = "frc/motorcontrol/VictorSP.h"
|
||||
|
||||
# frc/smartdashboard
|
||||
Field2d = "frc/smartdashboard/Field2d.h"
|
||||
FieldObject2d = "frc/smartdashboard/FieldObject2d.h"
|
||||
Mechanism2d = "frc/smartdashboard/Mechanism2d.h"
|
||||
MechanismLigament2d = "frc/smartdashboard/MechanismLigament2d.h"
|
||||
MechanismObject2d = "frc/smartdashboard/MechanismObject2d.h"
|
||||
MechanismRoot2d = "frc/smartdashboard/MechanismRoot2d.h"
|
||||
SendableBuilderImpl = "frc/smartdashboard/SendableBuilderImpl.h"
|
||||
SendableChooser = "frc/smartdashboard/SendableChooser.h"
|
||||
SendableChooserBase = "frc/smartdashboard/SendableChooserBase.h"
|
||||
SmartDashboard = "frc/smartdashboard/SmartDashboard.h"
|
||||
|
||||
# frc/sysid
|
||||
SysIdRoutineLog = "frc/sysid/SysIdRoutineLog.h"
|
||||
|
||||
# frc/util
|
||||
Color = "frc/util/Color.h"
|
||||
Color8Bit = "frc/util/Color8Bit.h"
|
||||
|
||||
|
||||
[tool.semiwrap.extension_modules."wpilib.counter._counter"]
|
||||
name = "wpilib_counter"
|
||||
wraps = ["robotpy-native-wpilib"]
|
||||
depends = ["wpilib"]
|
||||
yaml_path = "semiwrap/counter"
|
||||
|
||||
[tool.semiwrap.extension_modules."wpilib.counter._counter".headers]
|
||||
# frc/counter
|
||||
EdgeConfiguration = "frc/counter/EdgeConfiguration.h"
|
||||
Tachometer = "frc/counter/Tachometer.h"
|
||||
UpDownCounter = "frc/counter/UpDownCounter.h"
|
||||
|
||||
|
||||
[tool.semiwrap.extension_modules."wpilib.drive._drive"]
|
||||
name = "wpilib_drive"
|
||||
wraps = ["robotpy-native-wpilib"]
|
||||
depends = ["wpilib"]
|
||||
yaml_path = "semiwrap/drive"
|
||||
|
||||
[tool.semiwrap.extension_modules."wpilib.drive._drive".headers]
|
||||
# frc/drive
|
||||
DifferentialDrive = "frc/drive/DifferentialDrive.h"
|
||||
MecanumDrive = "frc/drive/MecanumDrive.h"
|
||||
RobotDriveBase = "frc/drive/RobotDriveBase.h"
|
||||
|
||||
|
||||
[tool.semiwrap.extension_modules."wpilib.event._event"]
|
||||
name = "wpilib_event"
|
||||
wraps = ["robotpy-native-wpilib"]
|
||||
# depends = ["wpilib", "wpimath_filter"]
|
||||
depends = ["wpimath_filter"]
|
||||
yaml_path = "semiwrap/event"
|
||||
|
||||
[tool.semiwrap.extension_modules."wpilib.event._event".headers]
|
||||
# frc/event
|
||||
BooleanEvent = "frc/event/BooleanEvent.h"
|
||||
EventLoop = "frc/event/EventLoop.h"
|
||||
NetworkBooleanEvent = "frc/event/NetworkBooleanEvent.h"
|
||||
|
||||
|
||||
[tool.semiwrap.extension_modules."wpilib.simulation._simulation"]
|
||||
name = "wpilib_simulation"
|
||||
wraps = ["robotpy-native-wpilib"]
|
||||
depends = ["wpilib", "wpimath_controls", "wpimath_geometry", "wpimath_kinematics"]
|
||||
yaml_path = "semiwrap/simulation"
|
||||
|
||||
[tool.semiwrap.extension_modules."wpilib.simulation._simulation".headers]
|
||||
# frc/simulation
|
||||
ADXL345Sim = "frc/simulation/ADXL345Sim.h"
|
||||
AddressableLEDSim = "frc/simulation/AddressableLEDSim.h"
|
||||
AnalogEncoderSim = "frc/simulation/AnalogEncoderSim.h"
|
||||
AnalogInputSim = "frc/simulation/AnalogInputSim.h"
|
||||
BatterySim = "frc/simulation/BatterySim.h"
|
||||
CTREPCMSim = "frc/simulation/CTREPCMSim.h"
|
||||
CallbackStore = "frc/simulation/CallbackStore.h"
|
||||
DCMotorSim = "frc/simulation/DCMotorSim.h"
|
||||
DIOSim = "frc/simulation/DIOSim.h"
|
||||
DifferentialDrivetrainSim = "frc/simulation/DifferentialDrivetrainSim.h"
|
||||
DigitalPWMSim = "frc/simulation/DigitalPWMSim.h"
|
||||
DoubleSolenoidSim = "frc/simulation/DoubleSolenoidSim.h"
|
||||
DriverStationSim = "frc/simulation/DriverStationSim.h"
|
||||
DutyCycleEncoderSim = "frc/simulation/DutyCycleEncoderSim.h"
|
||||
DutyCycleSim = "frc/simulation/DutyCycleSim.h"
|
||||
ElevatorSim = "frc/simulation/ElevatorSim.h"
|
||||
EncoderSim = "frc/simulation/EncoderSim.h"
|
||||
FlywheelSim = "frc/simulation/FlywheelSim.h"
|
||||
GenericHIDSim = "frc/simulation/GenericHIDSim.h"
|
||||
JoystickSim = "frc/simulation/JoystickSim.h"
|
||||
LinearSystemSim = "frc/simulation/LinearSystemSim.h"
|
||||
PS4ControllerSim = "frc/simulation/PS4ControllerSim.h"
|
||||
PS5ControllerSim = "frc/simulation/PS5ControllerSim.h"
|
||||
PWMSim = "frc/simulation/PWMSim.h"
|
||||
PneumaticsBaseSim = "frc/simulation/PneumaticsBaseSim.h"
|
||||
PowerDistributionSim = "frc/simulation/PowerDistributionSim.h"
|
||||
PWMMotorControllerSim = "frc/simulation/PWMMotorControllerSim.h"
|
||||
REVPHSim = "frc/simulation/REVPHSim.h"
|
||||
RoboRioSim = "frc/simulation/RoboRioSim.h"
|
||||
SendableChooserSim = "frc/simulation/SendableChooserSim.h"
|
||||
ServoSim = "frc/simulation/ServoSim.h"
|
||||
SharpIRSim = "frc/simulation/SharpIRSim.h"
|
||||
SimDeviceSim = "frc/simulation/SimDeviceSim.h"
|
||||
SimHooks = "frc/simulation/SimHooks.h"
|
||||
SingleJointedArmSim = "frc/simulation/SingleJointedArmSim.h"
|
||||
SolenoidSim = "frc/simulation/SolenoidSim.h"
|
||||
StadiaControllerSim = "frc/simulation/StadiaControllerSim.h"
|
||||
XboxControllerSim = "frc/simulation/XboxControllerSim.h"
|
||||
30
wpilibc/src/main/python/semiwrap/ADXL345_I2C.yml
Normal file
30
wpilibc/src/main/python/semiwrap/ADXL345_I2C.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
extra_includes:
|
||||
- networktables/NTSendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::ADXL345_I2C:
|
||||
constants:
|
||||
- frc::ADXL345_I2C::Range::kRange_2G
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<ADXL345_I2C>
|
||||
enums:
|
||||
Axes:
|
||||
Range:
|
||||
attributes:
|
||||
kAddress:
|
||||
methods:
|
||||
ADXL345_I2C:
|
||||
GetI2CPort:
|
||||
GetI2CDeviceAddress:
|
||||
SetRange:
|
||||
GetX:
|
||||
GetY:
|
||||
GetZ:
|
||||
GetAcceleration:
|
||||
GetAccelerations:
|
||||
InitSendable:
|
||||
frc::ADXL345_I2C::AllAxes:
|
||||
attributes:
|
||||
XAxis:
|
||||
YAxis:
|
||||
ZAxis:
|
||||
44
wpilibc/src/main/python/semiwrap/AddressableLED.yml
Normal file
44
wpilibc/src/main/python/semiwrap/AddressableLED.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
functions:
|
||||
format_as:
|
||||
ignore: true
|
||||
|
||||
classes:
|
||||
frc::AddressableLED:
|
||||
methods:
|
||||
AddressableLED:
|
||||
SetLength:
|
||||
SetData:
|
||||
overloads:
|
||||
std::span<const LEDData>:
|
||||
std::initializer_list<LEDData>:
|
||||
ignore: true
|
||||
SetColorOrder:
|
||||
GetChannel:
|
||||
SetStart:
|
||||
GetStart:
|
||||
SetGlobalData:
|
||||
enums:
|
||||
ColorOrder:
|
||||
frc::AddressableLED::LEDData:
|
||||
force_no_trampoline: true
|
||||
base_qualnames:
|
||||
HAL_AddressableLEDData: ::HAL_AddressableLEDData
|
||||
methods:
|
||||
LEDData:
|
||||
overloads:
|
||||
'':
|
||||
int, int, int:
|
||||
param_override:
|
||||
_r:
|
||||
name: r
|
||||
_g:
|
||||
name: g
|
||||
_b:
|
||||
name: b
|
||||
SetRGB:
|
||||
SetHSV:
|
||||
SetLED:
|
||||
overloads:
|
||||
const Color&:
|
||||
const Color8Bit&:
|
||||
|
||||
30
wpilibc/src/main/python/semiwrap/Alert.yml
Normal file
30
wpilibc/src/main/python/semiwrap/Alert.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
functions:
|
||||
format_as:
|
||||
ignore: true
|
||||
|
||||
classes:
|
||||
frc::Alert:
|
||||
enums:
|
||||
AlertType:
|
||||
methods:
|
||||
Alert:
|
||||
overloads:
|
||||
std::string_view, AlertType:
|
||||
std::string_view, std::string_view, AlertType:
|
||||
Set:
|
||||
Get:
|
||||
SetText:
|
||||
GetText:
|
||||
GetType:
|
||||
inline_code: |
|
||||
.def("close", [](frc::Alert &self) {
|
||||
py::gil_scoped_release release;
|
||||
self.Set(false);
|
||||
}, py::doc("Disables the alert"))
|
||||
.def("__enter__", [](frc::Alert &self) -> frc::Alert& {
|
||||
return self;
|
||||
})
|
||||
.def("__exit__", [](frc::Alert &self, py::args args) {
|
||||
py::gil_scoped_release release;
|
||||
self.Set(false);
|
||||
})
|
||||
18
wpilibc/src/main/python/semiwrap/AnalogAccelerometer.yml
Normal file
18
wpilibc/src/main/python/semiwrap/AnalogAccelerometer.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::AnalogAccelerometer:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<AnalogAccelerometer>
|
||||
methods:
|
||||
AnalogAccelerometer:
|
||||
overloads:
|
||||
int:
|
||||
AnalogInput*:
|
||||
ignore: true
|
||||
std::shared_ptr<AnalogInput>:
|
||||
GetAcceleration:
|
||||
SetSensitivity:
|
||||
SetZero:
|
||||
InitSendable:
|
||||
28
wpilibc/src/main/python/semiwrap/AnalogEncoder.yml
Normal file
28
wpilibc/src/main/python/semiwrap/AnalogEncoder.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/AnalogInput.h
|
||||
|
||||
classes:
|
||||
frc::AnalogEncoder:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<AnalogEncoder>
|
||||
methods:
|
||||
AnalogEncoder:
|
||||
overloads:
|
||||
int:
|
||||
AnalogInput&:
|
||||
ignore: true
|
||||
AnalogInput*:
|
||||
ignore: true
|
||||
std::shared_ptr<AnalogInput>:
|
||||
int, double, double:
|
||||
AnalogInput&, double, double:
|
||||
ignore: true
|
||||
AnalogInput*, double, double:
|
||||
ignore: true
|
||||
std::shared_ptr<AnalogInput>, double, double:
|
||||
Get:
|
||||
GetChannel:
|
||||
SetVoltagePercentageRange:
|
||||
SetInverted:
|
||||
InitSendable:
|
||||
29
wpilibc/src/main/python/semiwrap/AnalogGyro.yml
Normal file
29
wpilibc/src/main/python/semiwrap/AnalogGyro.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/AnalogInput.h
|
||||
|
||||
classes:
|
||||
frc::AnalogGyro:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<AnalogGyro>
|
||||
methods:
|
||||
AnalogGyro:
|
||||
overloads:
|
||||
int:
|
||||
AnalogInput*:
|
||||
ignore: true
|
||||
std::shared_ptr<AnalogInput>:
|
||||
int, int, double:
|
||||
std::shared_ptr<AnalogInput>, int, double:
|
||||
GetAngle:
|
||||
GetRate:
|
||||
GetCenter:
|
||||
GetOffset:
|
||||
SetSensitivity:
|
||||
SetDeadband:
|
||||
Reset:
|
||||
InitGyro:
|
||||
Calibrate:
|
||||
GetRotation2d:
|
||||
GetAnalogInput:
|
||||
InitSendable:
|
||||
30
wpilibc/src/main/python/semiwrap/AnalogInput.yml
Normal file
30
wpilibc/src/main/python/semiwrap/AnalogInput.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::AnalogInput:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<AnalogInput>
|
||||
methods:
|
||||
AnalogInput:
|
||||
GetValue:
|
||||
GetAverageValue:
|
||||
GetVoltage:
|
||||
GetAverageVoltage:
|
||||
GetChannel:
|
||||
SetAverageBits:
|
||||
GetAverageBits:
|
||||
SetOversampleBits:
|
||||
GetOversampleBits:
|
||||
GetLSBWeight:
|
||||
GetOffset:
|
||||
SetSampleRate:
|
||||
GetSampleRate:
|
||||
SetSimDevice:
|
||||
InitSendable:
|
||||
|
||||
inline_code: |
|
||||
cls_AnalogInput
|
||||
.def("__repr__", [](const AnalogInput &self) {
|
||||
return py::str("<AnalogInput {}>").format(self.GetChannel());
|
||||
});
|
||||
16
wpilibc/src/main/python/semiwrap/AnalogPotentiometer.yml
Normal file
16
wpilibc/src/main/python/semiwrap/AnalogPotentiometer.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::AnalogPotentiometer:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<AnalogPotentiometer>
|
||||
methods:
|
||||
AnalogPotentiometer:
|
||||
overloads:
|
||||
int, double, double:
|
||||
AnalogInput*, double, double:
|
||||
ignore: true
|
||||
std::shared_ptr<AnalogInput>, double, double:
|
||||
Get:
|
||||
InitSendable:
|
||||
20
wpilibc/src/main/python/semiwrap/CAN.yml
Normal file
20
wpilibc/src/main/python/semiwrap/CAN.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
classes:
|
||||
frc::CAN:
|
||||
attributes:
|
||||
kTeamManufacturer:
|
||||
kTeamDeviceType:
|
||||
methods:
|
||||
CAN:
|
||||
overloads:
|
||||
int, int:
|
||||
int, int, int, int:
|
||||
WritePacket:
|
||||
WritePacketNoError:
|
||||
WritePacketRepeating:
|
||||
WritePacketRepeatingNoError:
|
||||
WriteRTRFrame:
|
||||
WriteRTRFrameNoError:
|
||||
StopPacketRepeating:
|
||||
ReadPacketNew:
|
||||
ReadPacketLatest:
|
||||
ReadPacketTimeout:
|
||||
191
wpilibc/src/main/python/semiwrap/Color.yml
Normal file
191
wpilibc/src/main/python/semiwrap/Color.yml
Normal file
@@ -0,0 +1,191 @@
|
||||
extra_includes:
|
||||
- pybind11/operators.h
|
||||
|
||||
classes:
|
||||
frc::Color:
|
||||
force_type_casters:
|
||||
- wpi::ct_string
|
||||
attributes:
|
||||
kDenim:
|
||||
kFirstBlue:
|
||||
kFirstRed:
|
||||
kAliceBlue:
|
||||
kAntiqueWhite:
|
||||
kAqua:
|
||||
kAquamarine:
|
||||
kAzure:
|
||||
kBeige:
|
||||
kBisque:
|
||||
kBlack:
|
||||
kBlanchedAlmond:
|
||||
kBlue:
|
||||
kBlueViolet:
|
||||
kBrown:
|
||||
kBurlywood:
|
||||
kCadetBlue:
|
||||
kChartreuse:
|
||||
kChocolate:
|
||||
kCoral:
|
||||
kCornflowerBlue:
|
||||
kCornsilk:
|
||||
kCrimson:
|
||||
kCyan:
|
||||
kDarkBlue:
|
||||
kDarkCyan:
|
||||
kDarkGoldenrod:
|
||||
kDarkGray:
|
||||
kDarkGreen:
|
||||
kDarkKhaki:
|
||||
kDarkMagenta:
|
||||
kDarkOliveGreen:
|
||||
kDarkOrange:
|
||||
kDarkOrchid:
|
||||
kDarkRed:
|
||||
kDarkSalmon:
|
||||
kDarkSeaGreen:
|
||||
kDarkSlateBlue:
|
||||
kDarkSlateGray:
|
||||
kDarkTurquoise:
|
||||
kDarkViolet:
|
||||
kDeepPink:
|
||||
kDeepSkyBlue:
|
||||
kDimGray:
|
||||
kDodgerBlue:
|
||||
kFirebrick:
|
||||
kFloralWhite:
|
||||
kForestGreen:
|
||||
kFuchsia:
|
||||
kGainsboro:
|
||||
kGhostWhite:
|
||||
kGold:
|
||||
kGoldenrod:
|
||||
kGray:
|
||||
kGreen:
|
||||
kGreenYellow:
|
||||
kHoneydew:
|
||||
kHotPink:
|
||||
kIndianRed:
|
||||
kIndigo:
|
||||
kIvory:
|
||||
kKhaki:
|
||||
kLavender:
|
||||
kLavenderBlush:
|
||||
kLawnGreen:
|
||||
kLemonChiffon:
|
||||
kLightBlue:
|
||||
kLightCoral:
|
||||
kLightCyan:
|
||||
kLightGoldenrodYellow:
|
||||
kLightGray:
|
||||
kLightGreen:
|
||||
kLightPink:
|
||||
kLightSalmon:
|
||||
kLightSeaGreen:
|
||||
kLightSkyBlue:
|
||||
kLightSlateGray:
|
||||
kLightSteelBlue:
|
||||
kLightYellow:
|
||||
kLime:
|
||||
kLimeGreen:
|
||||
kLinen:
|
||||
kMagenta:
|
||||
kMaroon:
|
||||
kMediumAquamarine:
|
||||
kMediumBlue:
|
||||
kMediumOrchid:
|
||||
kMediumPurple:
|
||||
kMediumSeaGreen:
|
||||
kMediumSlateBlue:
|
||||
kMediumSpringGreen:
|
||||
kMediumTurquoise:
|
||||
kMediumVioletRed:
|
||||
kMidnightBlue:
|
||||
kMintcream:
|
||||
kMistyRose:
|
||||
kMoccasin:
|
||||
kNavajoWhite:
|
||||
kNavy:
|
||||
kOldLace:
|
||||
kOlive:
|
||||
kOliveDrab:
|
||||
kOrange:
|
||||
kOrangeRed:
|
||||
kOrchid:
|
||||
kPaleGoldenrod:
|
||||
kPaleGreen:
|
||||
kPaleTurquoise:
|
||||
kPaleVioletRed:
|
||||
kPapayaWhip:
|
||||
kPeachPuff:
|
||||
kPeru:
|
||||
kPink:
|
||||
kPlum:
|
||||
kPowderBlue:
|
||||
kPurple:
|
||||
kRed:
|
||||
kRosyBrown:
|
||||
kRoyalBlue:
|
||||
kSaddleBrown:
|
||||
kSalmon:
|
||||
kSandyBrown:
|
||||
kSeaGreen:
|
||||
kSeashell:
|
||||
kSienna:
|
||||
kSilver:
|
||||
kSkyBlue:
|
||||
kSlateBlue:
|
||||
kSlateGray:
|
||||
kSnow:
|
||||
kSpringGreen:
|
||||
kSteelBlue:
|
||||
kTan:
|
||||
kTeal:
|
||||
kThistle:
|
||||
kTomato:
|
||||
kTurquoise:
|
||||
kViolet:
|
||||
kWheat:
|
||||
kWhite:
|
||||
kWhiteSmoke:
|
||||
kYellow:
|
||||
kYellowGreen:
|
||||
red:
|
||||
access: readonly
|
||||
green:
|
||||
access: readonly
|
||||
blue:
|
||||
access: readonly
|
||||
methods:
|
||||
Color:
|
||||
overloads:
|
||||
'':
|
||||
double, double, double:
|
||||
param_override:
|
||||
r:
|
||||
name: red
|
||||
g:
|
||||
name: green
|
||||
b:
|
||||
name: blue
|
||||
int, int, int:
|
||||
std::string_view:
|
||||
FromHSV:
|
||||
HexString:
|
||||
operator==:
|
||||
|
||||
inline_code: |
|
||||
cls_Color
|
||||
.def("__hash__", [](Color *self) -> size_t {
|
||||
size_t h = (size_t)(
|
||||
std::hash<double>{}(self->red)
|
||||
^ (std::hash<double>{}(self->green) << 1)
|
||||
^ (std::hash<double>{}(self->blue) << 2)
|
||||
);
|
||||
return h != -1 ? h : -2;
|
||||
})
|
||||
.def("__repr__", [](Color *self) {
|
||||
return "Color("
|
||||
"red=" + std::to_string(self->red) + ", "
|
||||
"green=" + std::to_string(self->green) + ", "
|
||||
"blue=" + std::to_string(self->blue) + ")";
|
||||
});
|
||||
46
wpilibc/src/main/python/semiwrap/Color8Bit.yml
Normal file
46
wpilibc/src/main/python/semiwrap/Color8Bit.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
extra_includes:
|
||||
- pybind11/operators.h
|
||||
|
||||
classes:
|
||||
frc::Color8Bit:
|
||||
force_type_casters:
|
||||
- wpi::ct_string
|
||||
attributes:
|
||||
red:
|
||||
access: readonly
|
||||
green:
|
||||
access: readonly
|
||||
blue:
|
||||
access: readonly
|
||||
methods:
|
||||
Color8Bit:
|
||||
overloads:
|
||||
'':
|
||||
int, int, int:
|
||||
param_override:
|
||||
r:
|
||||
name: red
|
||||
g:
|
||||
name: green
|
||||
b:
|
||||
name: blue
|
||||
const Color&:
|
||||
std::string_view:
|
||||
FromHexString:
|
||||
HexString:
|
||||
operator==:
|
||||
|
||||
inline_code: |
|
||||
cls_Color8Bit
|
||||
.def("toColor", [](const Color8Bit &self) -> frc::Color {
|
||||
return self;
|
||||
})
|
||||
.def("__hash__", [](Color8Bit *self) -> size_t {
|
||||
return (self->red) | (self->green << 8) | (self->blue << 16);
|
||||
})
|
||||
.def("__repr__", [](Color8Bit *self) {
|
||||
return "Color8Bit("
|
||||
"red=" + std::to_string(self->red) + ", "
|
||||
"green=" + std::to_string(self->green) + ", "
|
||||
"blue=" + std::to_string(self->blue) + ")";
|
||||
});
|
||||
26
wpilibc/src/main/python/semiwrap/Compressor.yml
Normal file
26
wpilibc/src/main/python/semiwrap/Compressor.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/Compressor.h
|
||||
- frc/Solenoid.h
|
||||
- frc/DoubleSolenoid.h
|
||||
|
||||
classes:
|
||||
frc::Compressor:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<Compressor>
|
||||
methods:
|
||||
Compressor:
|
||||
overloads:
|
||||
int, PneumaticsModuleType:
|
||||
int, int, PneumaticsModuleType:
|
||||
IsEnabled:
|
||||
GetPressureSwitchValue:
|
||||
GetCurrent:
|
||||
GetAnalogVoltage:
|
||||
GetPressure:
|
||||
Disable:
|
||||
EnableDigital:
|
||||
EnableAnalog:
|
||||
EnableHybrid:
|
||||
GetConfigType:
|
||||
InitSendable:
|
||||
@@ -0,0 +1,2 @@
|
||||
enums:
|
||||
CompressorConfigType:
|
||||
15
wpilibc/src/main/python/semiwrap/CounterBase.yml
Normal file
15
wpilibc/src/main/python/semiwrap/CounterBase.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
defaults:
|
||||
subpackage: interfaces
|
||||
|
||||
classes:
|
||||
frc::CounterBase:
|
||||
enums:
|
||||
EncodingType:
|
||||
methods:
|
||||
CounterBase:
|
||||
Get:
|
||||
Reset:
|
||||
GetPeriod:
|
||||
SetMaxPeriod:
|
||||
GetStopped:
|
||||
GetDirection:
|
||||
7
wpilibc/src/main/python/semiwrap/DMC60.yml
Normal file
7
wpilibc/src/main/python/semiwrap/DMC60.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::DMC60:
|
||||
methods:
|
||||
DMC60:
|
||||
24
wpilibc/src/main/python/semiwrap/DSControlWord.yml
Normal file
24
wpilibc/src/main/python/semiwrap/DSControlWord.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
classes:
|
||||
frc::DSControlWord:
|
||||
methods:
|
||||
DSControlWord:
|
||||
IsEnabled:
|
||||
no_release_gil: true
|
||||
IsDisabled:
|
||||
no_release_gil: true
|
||||
IsEStopped:
|
||||
no_release_gil: true
|
||||
IsAutonomous:
|
||||
no_release_gil: true
|
||||
IsAutonomousEnabled:
|
||||
no_release_gil: true
|
||||
IsTeleop:
|
||||
no_release_gil: true
|
||||
IsTeleopEnabled:
|
||||
no_release_gil: true
|
||||
IsTest:
|
||||
no_release_gil: true
|
||||
IsDSAttached:
|
||||
no_release_gil: true
|
||||
IsFMSAttached:
|
||||
no_release_gil: true
|
||||
14
wpilibc/src/main/python/semiwrap/DataLogManager.yml
Normal file
14
wpilibc/src/main/python/semiwrap/DataLogManager.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
extra_includes:
|
||||
- wpi/datalog/DataLog.h
|
||||
|
||||
classes:
|
||||
frc::DataLogManager:
|
||||
methods:
|
||||
Start:
|
||||
Stop:
|
||||
Log:
|
||||
GetLog:
|
||||
return_value_policy: reference
|
||||
GetLogDir:
|
||||
LogNetworkTables:
|
||||
LogConsoleOutput:
|
||||
13
wpilibc/src/main/python/semiwrap/DigitalInput.yml
Normal file
13
wpilibc/src/main/python/semiwrap/DigitalInput.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::DigitalInput:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<DigitalInput>
|
||||
methods:
|
||||
DigitalInput:
|
||||
Get:
|
||||
GetChannel:
|
||||
SetSimDevice:
|
||||
InitSendable:
|
||||
21
wpilibc/src/main/python/semiwrap/DigitalOutput.yml
Normal file
21
wpilibc/src/main/python/semiwrap/DigitalOutput.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::DigitalOutput:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<DigitalOutput>
|
||||
methods:
|
||||
DigitalOutput:
|
||||
Set:
|
||||
Get:
|
||||
GetChannel:
|
||||
Pulse:
|
||||
IsPulsing:
|
||||
SetPWMRate:
|
||||
EnablePPS:
|
||||
EnablePWM:
|
||||
DisablePWM:
|
||||
UpdateDutyCycle:
|
||||
SetSimDevice:
|
||||
InitSendable:
|
||||
22
wpilibc/src/main/python/semiwrap/DoubleSolenoid.yml
Normal file
22
wpilibc/src/main/python/semiwrap/DoubleSolenoid.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::DoubleSolenoid:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<DoubleSolenoid>
|
||||
enums:
|
||||
Value:
|
||||
methods:
|
||||
DoubleSolenoid:
|
||||
overloads:
|
||||
int, PneumaticsModuleType, int, int:
|
||||
int, int, PneumaticsModuleType, int, int:
|
||||
Set:
|
||||
Get:
|
||||
Toggle:
|
||||
GetFwdChannel:
|
||||
GetRevChannel:
|
||||
IsFwdSolenoidDisabled:
|
||||
IsRevSolenoidDisabled:
|
||||
InitSendable:
|
||||
68
wpilibc/src/main/python/semiwrap/DriverStation.yml
Normal file
68
wpilibc/src/main/python/semiwrap/DriverStation.yml
Normal file
@@ -0,0 +1,68 @@
|
||||
extra_includes:
|
||||
- rpy/ControlWord.h
|
||||
- wpi/datalog/DataLog.h
|
||||
|
||||
classes:
|
||||
frc::DriverStation:
|
||||
attributes:
|
||||
kJoystickPorts:
|
||||
enums:
|
||||
Alliance:
|
||||
MatchType:
|
||||
POVDirection:
|
||||
methods:
|
||||
GetStickButton:
|
||||
GetStickButtonPressed:
|
||||
GetStickButtonReleased:
|
||||
GetStickAxis:
|
||||
GetStickPOV:
|
||||
GetStickButtons:
|
||||
GetStickAxisCount:
|
||||
GetStickPOVCount:
|
||||
GetStickButtonCount:
|
||||
GetJoystickType:
|
||||
GetJoystickName:
|
||||
GetJoystickAxisType:
|
||||
IsJoystickConnected:
|
||||
IsEnabled:
|
||||
IsDisabled:
|
||||
IsEStopped:
|
||||
IsAutonomous:
|
||||
IsAutonomousEnabled:
|
||||
IsTeleop:
|
||||
IsTeleopEnabled:
|
||||
IsTest:
|
||||
IsTestEnabled:
|
||||
IsDSAttached:
|
||||
IsFMSAttached:
|
||||
GetGameSpecificMessage:
|
||||
GetEventName:
|
||||
GetMatchType:
|
||||
GetMatchNumber:
|
||||
GetReplayNumber:
|
||||
GetAlliance:
|
||||
GetLocation:
|
||||
WaitForDsConnection:
|
||||
GetMatchTime:
|
||||
GetBatteryVoltage:
|
||||
RefreshData:
|
||||
ProvideRefreshedDataEventHandle:
|
||||
RemoveRefreshedDataEventHandle:
|
||||
SilenceJoystickConnectionWarning:
|
||||
IsJoystickConnectionWarningSilenced:
|
||||
StartDataLog:
|
||||
GetAngle:
|
||||
GetJoystickIsGamepad:
|
||||
inline_code: |
|
||||
.def("getControlState",
|
||||
[](DriverStation *self) -> std::tuple<bool, bool, bool> {
|
||||
py::gil_scoped_release release;
|
||||
return rpy::GetControlState();
|
||||
},
|
||||
py::doc("More efficient way to determine what state the robot is in.\n"
|
||||
"\n"
|
||||
":returns: booleans representing enabled, isautonomous, istest\n"
|
||||
"\n"
|
||||
".. versionadded:: 2019.2.1\n"
|
||||
"\n"
|
||||
".. note:: This function only exists in RobotPy\n"))
|
||||
@@ -0,0 +1,9 @@
|
||||
classes:
|
||||
frc::internal::DriverStationModeThread:
|
||||
rename: _DriverStationModeThread
|
||||
methods:
|
||||
DriverStationModeThread:
|
||||
InAutonomous:
|
||||
InDisabled:
|
||||
InTeleop:
|
||||
InTest:
|
||||
26
wpilibc/src/main/python/semiwrap/DutyCycle.yml
Normal file
26
wpilibc/src/main/python/semiwrap/DutyCycle.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::DutyCycle:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<DutyCycle>
|
||||
methods:
|
||||
DutyCycle:
|
||||
overloads:
|
||||
DigitalSource&:
|
||||
ignore: true
|
||||
DigitalSource*:
|
||||
ignore: true
|
||||
std::shared_ptr<DigitalSource>:
|
||||
GetFrequency:
|
||||
GetOutput:
|
||||
GetHighTime:
|
||||
GetSourceChannel:
|
||||
InitSendable:
|
||||
|
||||
inline_code: |
|
||||
cls_DutyCycle
|
||||
.def("__repr__", [](const DutyCycle &self) {
|
||||
return py::str("<DutyCycle {}>").format(self.GetSourceChannel());
|
||||
});
|
||||
38
wpilibc/src/main/python/semiwrap/DutyCycleEncoder.yml
Normal file
38
wpilibc/src/main/python/semiwrap/DutyCycleEncoder.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/DutyCycle.h
|
||||
|
||||
classes:
|
||||
frc::DutyCycleEncoder:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<DutyCycleEncoder>
|
||||
methods:
|
||||
DutyCycleEncoder:
|
||||
overloads:
|
||||
int:
|
||||
DutyCycle&:
|
||||
ignore: true
|
||||
DutyCycle*:
|
||||
ignore: true
|
||||
std::shared_ptr<DutyCycle>:
|
||||
int, double, double:
|
||||
DutyCycle&, double, double:
|
||||
ignore: true
|
||||
DutyCycle*, double, double:
|
||||
ignore: true
|
||||
std::shared_ptr<DutyCycle>, double, double:
|
||||
GetFrequency:
|
||||
IsConnected:
|
||||
SetConnectedFrequencyThreshold:
|
||||
Get:
|
||||
SetDutyCycleRange:
|
||||
GetSourceChannel:
|
||||
SetAssumedFrequency:
|
||||
SetInverted:
|
||||
InitSendable:
|
||||
|
||||
inline_code: |
|
||||
cls_DutyCycleEncoder
|
||||
.def("__repr__", [](const DutyCycleEncoder &self) {
|
||||
return py::str("<DutyCycleEncoder {}>").format(self.GetSourceChannel());
|
||||
});
|
||||
43
wpilibc/src/main/python/semiwrap/Encoder.yml
Normal file
43
wpilibc/src/main/python/semiwrap/Encoder.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::Encoder:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<Encoder>
|
||||
typealias:
|
||||
- frc::Encoder::EncodingType
|
||||
methods:
|
||||
Encoder:
|
||||
overloads:
|
||||
int, int, bool, EncodingType:
|
||||
param_override:
|
||||
encodingType:
|
||||
default: frc::Encoder::EncodingType::k4X
|
||||
DigitalSource*, DigitalSource*, bool, EncodingType:
|
||||
ignore: true
|
||||
DigitalSource&, DigitalSource&, bool, EncodingType:
|
||||
ignore: true
|
||||
std::shared_ptr<DigitalSource>, std::shared_ptr<DigitalSource>, bool, EncodingType:
|
||||
param_override:
|
||||
encodingType:
|
||||
default: frc::Encoder::EncodingType::k4X
|
||||
Get:
|
||||
Reset:
|
||||
GetPeriod:
|
||||
SetMaxPeriod:
|
||||
GetStopped:
|
||||
GetDirection:
|
||||
GetRaw:
|
||||
GetEncodingScale:
|
||||
GetDistance:
|
||||
GetRate:
|
||||
SetMinRate:
|
||||
SetDistancePerPulse:
|
||||
GetDistancePerPulse:
|
||||
SetReverseDirection:
|
||||
SetSamplesToAverage:
|
||||
GetSamplesToAverage:
|
||||
SetSimDevice:
|
||||
GetFPGAIndex:
|
||||
InitSendable:
|
||||
13
wpilibc/src/main/python/semiwrap/Errors.yml
Normal file
13
wpilibc/src/main/python/semiwrap/Errors.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
functions:
|
||||
GetErrorMessage:
|
||||
ReportErrorV:
|
||||
ignore: true
|
||||
ReportError:
|
||||
ignore: true
|
||||
MakeErrorV:
|
||||
ignore: true
|
||||
MakeError:
|
||||
ignore: true
|
||||
classes:
|
||||
frc::RuntimeError:
|
||||
ignore: true
|
||||
19
wpilibc/src/main/python/semiwrap/Field2d.yml
Normal file
19
wpilibc/src/main/python/semiwrap/Field2d.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
extra_includes:
|
||||
- networktables/NTSendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::Field2d:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<Field2d>
|
||||
methods:
|
||||
Field2d:
|
||||
SetRobotPose:
|
||||
overloads:
|
||||
const Pose2d&:
|
||||
units::meter_t, units::meter_t, Rotation2d:
|
||||
GetRobotPose:
|
||||
GetObject:
|
||||
return_value_policy: reference_internal
|
||||
GetRobotObject:
|
||||
return_value_policy: reference_internal
|
||||
InitSendable:
|
||||
25
wpilibc/src/main/python/semiwrap/FieldObject2d.yml
Normal file
25
wpilibc/src/main/python/semiwrap/FieldObject2d.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
extra_includes:
|
||||
- frc/trajectory/Trajectory.h
|
||||
|
||||
classes:
|
||||
frc::FieldObject2d:
|
||||
nodelete: true
|
||||
methods:
|
||||
FieldObject2d:
|
||||
ignore: true
|
||||
SetPose:
|
||||
overloads:
|
||||
const Pose2d&:
|
||||
units::meter_t, units::meter_t, Rotation2d:
|
||||
GetPose:
|
||||
SetPoses:
|
||||
overloads:
|
||||
std::span<const Pose2d>:
|
||||
std::initializer_list<Pose2d>:
|
||||
ignore: true
|
||||
SetTrajectory:
|
||||
GetPoses:
|
||||
overloads:
|
||||
'[const]':
|
||||
wpi::SmallVectorImpl<Pose2d>& [const]:
|
||||
ignore: true
|
||||
7
wpilibc/src/main/python/semiwrap/Filesystem.yml
Normal file
7
wpilibc/src/main/python/semiwrap/Filesystem.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
functions:
|
||||
GetOperatingDirectory:
|
||||
GetDeployDirectory:
|
||||
GetOperatingDirectoryFs:
|
||||
ignore: true
|
||||
GetDeployDirectoryFs:
|
||||
ignore: true
|
||||
54
wpilibc/src/main/python/semiwrap/GenericHID.yml
Normal file
54
wpilibc/src/main/python/semiwrap/GenericHID.yml
Normal file
@@ -0,0 +1,54 @@
|
||||
defaults:
|
||||
subpackage: interfaces
|
||||
|
||||
extra_includes:
|
||||
- frc/DriverStation.h
|
||||
- frc/event/BooleanEvent.h
|
||||
|
||||
classes:
|
||||
frc::GenericHID:
|
||||
enums:
|
||||
RumbleType:
|
||||
HIDType:
|
||||
methods:
|
||||
GenericHID:
|
||||
GetRawButton:
|
||||
GetRawButtonPressed:
|
||||
GetRawButtonReleased:
|
||||
Button:
|
||||
GetRawAxis:
|
||||
GetPOV:
|
||||
POV:
|
||||
overloads:
|
||||
DriverStation::POVDirection, EventLoop* [const]:
|
||||
int, DriverStation::POVDirection, EventLoop* [const]:
|
||||
POVUp:
|
||||
POVUpRight:
|
||||
POVRight:
|
||||
POVDownRight:
|
||||
POVDown:
|
||||
POVDownLeft:
|
||||
POVLeft:
|
||||
POVUpLeft:
|
||||
POVCenter:
|
||||
AxisLessThan:
|
||||
AxisGreaterThan:
|
||||
GetAxisCount:
|
||||
GetPOVCount:
|
||||
GetButtonCount:
|
||||
IsConnected:
|
||||
GetType:
|
||||
GetName:
|
||||
GetAxisType:
|
||||
GetPort:
|
||||
SetOutput:
|
||||
SetOutputs:
|
||||
SetRumble:
|
||||
|
||||
inline_code: |
|
||||
cls_GenericHID
|
||||
.def("__repr__", [](py::handle self) {
|
||||
py::object type_name = self.get_type().attr("__qualname__");
|
||||
int port = self.cast<GenericHID&>().GetPort();
|
||||
return py::str("<{} {}>").format(type_name, port);
|
||||
});
|
||||
26
wpilibc/src/main/python/semiwrap/I2C.yml
Normal file
26
wpilibc/src/main/python/semiwrap/I2C.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
classes:
|
||||
frc::I2C:
|
||||
enums:
|
||||
Port:
|
||||
methods:
|
||||
I2C:
|
||||
GetPort:
|
||||
GetDeviceAddress:
|
||||
Transaction:
|
||||
buffers:
|
||||
- {type: IN, src: dataToSend, len: sendSize}
|
||||
- {type: OUT, src: dataReceived, len: receiveSize}
|
||||
AddressOnly:
|
||||
Write:
|
||||
WriteBulk:
|
||||
buffers:
|
||||
- {type: IN, src: data, len: count}
|
||||
Read:
|
||||
buffers:
|
||||
- {type: OUT, src: data, len: count}
|
||||
ReadOnly:
|
||||
buffers:
|
||||
- {type: OUT, src: buffer, len: count}
|
||||
VerifySensor:
|
||||
buffers:
|
||||
- {type: IN, src: expected, len: count}
|
||||
66
wpilibc/src/main/python/semiwrap/IterativeRobotBase.yml
Normal file
66
wpilibc/src/main/python/semiwrap/IterativeRobotBase.yml
Normal file
@@ -0,0 +1,66 @@
|
||||
classes:
|
||||
frc::IterativeRobotBase:
|
||||
methods:
|
||||
RobotInit:
|
||||
DriverStationConnected:
|
||||
DisabledInit:
|
||||
AutonomousInit:
|
||||
TeleopInit:
|
||||
TestInit:
|
||||
RobotPeriodic:
|
||||
DisabledPeriodic:
|
||||
AutonomousPeriodic:
|
||||
TeleopPeriodic:
|
||||
TestPeriodic:
|
||||
IterativeRobotBase:
|
||||
overloads:
|
||||
double:
|
||||
ignore: true
|
||||
units::second_t:
|
||||
LoopFunc:
|
||||
SimulationInit:
|
||||
internal: true
|
||||
SimulationPeriodic:
|
||||
internal: true
|
||||
DisabledExit:
|
||||
AutonomousExit:
|
||||
TeleopExit:
|
||||
TestExit:
|
||||
SetNetworkTablesFlushEnabled:
|
||||
GetPeriod:
|
||||
PrintWatchdogEpochs:
|
||||
doc: |
|
||||
IterativeRobotBase implements a specific type of robot program framework,
|
||||
extending the RobotBase class.
|
||||
|
||||
The IterativeRobotBase class does not implement StartCompetition(), so it
|
||||
should not be used by teams directly.
|
||||
|
||||
This class provides the following functions which are called by the main
|
||||
loop, StartCompetition(), at the appropriate times:
|
||||
|
||||
RobotInit() -- provide for initialization at robot power-on
|
||||
|
||||
Init() functions -- each of the following functions is called once when the
|
||||
appropriate mode is entered:
|
||||
|
||||
- DisabledInit() -- called each and every time disabled is entered from another mode
|
||||
- AutonomousInit() -- called each and every time autonomous is entered from another mode
|
||||
- TeleopInit() -- called each and every time teleop is entered from another mode
|
||||
- TestInit() -- called each and every time test is entered from another mode
|
||||
|
||||
Periodic() functions -- each of these functions is called on an interval:
|
||||
|
||||
- RobotPeriodic()
|
||||
- DisabledPeriodic()
|
||||
- AutonomousPeriodic()
|
||||
- TeleopPeriodic()
|
||||
- TestPeriodic()
|
||||
|
||||
Exit() functions -- each of the following functions is called once when the
|
||||
appropriate mode is exited:
|
||||
|
||||
- DisabledExit() -- called each and every time disabled is exited
|
||||
- AutonomousExit() -- called each and every time autonomous is exited
|
||||
- TeleopExit() -- called each and every time teleop is exited
|
||||
- TestExit() -- called each and every time test is exited
|
||||
7
wpilibc/src/main/python/semiwrap/Jaguar.yml
Normal file
7
wpilibc/src/main/python/semiwrap/Jaguar.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::Jaguar:
|
||||
methods:
|
||||
Jaguar:
|
||||
46
wpilibc/src/main/python/semiwrap/Joystick.yml
Normal file
46
wpilibc/src/main/python/semiwrap/Joystick.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
extra_includes:
|
||||
- frc/DriverStation.h
|
||||
|
||||
classes:
|
||||
frc::Joystick:
|
||||
attributes:
|
||||
kDefaultXChannel:
|
||||
kDefaultYChannel:
|
||||
kDefaultZChannel:
|
||||
kDefaultTwistChannel:
|
||||
kDefaultThrottleChannel:
|
||||
enums:
|
||||
AxisType:
|
||||
ButtonType:
|
||||
methods:
|
||||
Joystick:
|
||||
SetXChannel:
|
||||
SetYChannel:
|
||||
SetZChannel:
|
||||
SetTwistChannel:
|
||||
SetThrottleChannel:
|
||||
GetXChannel:
|
||||
GetYChannel:
|
||||
GetZChannel:
|
||||
GetTwistChannel:
|
||||
GetThrottleChannel:
|
||||
GetX:
|
||||
GetY:
|
||||
GetZ:
|
||||
GetTwist:
|
||||
GetThrottle:
|
||||
GetTrigger:
|
||||
GetTriggerPressed:
|
||||
GetTriggerReleased:
|
||||
Trigger:
|
||||
GetTop:
|
||||
GetTopPressed:
|
||||
GetTopReleased:
|
||||
Top:
|
||||
GetMagnitude:
|
||||
GetDirection:
|
||||
rename: getDirectionRadians
|
||||
inline_code: |
|
||||
.def("getDirectionDegrees", [](const Joystick &self) -> units::degree_t {
|
||||
return self.GetDirection();
|
||||
})
|
||||
4
wpilibc/src/main/python/semiwrap/Koors40.yml
Normal file
4
wpilibc/src/main/python/semiwrap/Koors40.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
classes:
|
||||
frc::Koors40:
|
||||
methods:
|
||||
Koors40:
|
||||
44
wpilibc/src/main/python/semiwrap/LEDPattern.yml
Normal file
44
wpilibc/src/main/python/semiwrap/LEDPattern.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
classes:
|
||||
frc::LEDPattern:
|
||||
enums:
|
||||
GradientType:
|
||||
methods:
|
||||
"Off":
|
||||
LEDPattern:
|
||||
ApplyTo:
|
||||
overloads:
|
||||
std::span<frc::AddressableLED::LEDData> [const]:
|
||||
LEDReader, std::function<void (int, frc::Color)> [const]:
|
||||
std::span<frc::AddressableLED::LEDData>, std::function<void (int, frc::Color)> [const]:
|
||||
Reversed:
|
||||
OffsetBy:
|
||||
ScrollAtRelativeSpeed:
|
||||
ScrollAtAbsoluteSpeed:
|
||||
Blink:
|
||||
overloads:
|
||||
units::second_t, units::second_t:
|
||||
units::second_t:
|
||||
SynchronizedBlink:
|
||||
Breathe:
|
||||
OverlayOn:
|
||||
Blend:
|
||||
Mask:
|
||||
AtBrightness:
|
||||
Solid:
|
||||
ProgressMaskLayer:
|
||||
Steps:
|
||||
overloads:
|
||||
std::span<const std::pair<double, Color>>:
|
||||
std::initializer_list<std::pair<double, Color>>:
|
||||
ignore: true
|
||||
Gradient:
|
||||
overloads:
|
||||
GradientType, std::span<const Color>:
|
||||
GradientType, std::initializer_list<Color>:
|
||||
ignore: true
|
||||
Rainbow:
|
||||
MapIndex:
|
||||
frc::LEDPattern::LEDReader:
|
||||
methods:
|
||||
LEDReader:
|
||||
size:
|
||||
13
wpilibc/src/main/python/semiwrap/Mechanism2d.yml
Normal file
13
wpilibc/src/main/python/semiwrap/Mechanism2d.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::Mechanism2d:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<Mechanism2d>
|
||||
methods:
|
||||
Mechanism2d:
|
||||
GetRoot:
|
||||
return_value_policy: reference_internal
|
||||
SetBackgroundColor:
|
||||
InitSendable:
|
||||
14
wpilibc/src/main/python/semiwrap/MechanismLigament2d.yml
Normal file
14
wpilibc/src/main/python/semiwrap/MechanismLigament2d.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
classes:
|
||||
frc::MechanismLigament2d:
|
||||
methods:
|
||||
MechanismLigament2d:
|
||||
ignore: true
|
||||
SetColor:
|
||||
GetColor:
|
||||
SetLength:
|
||||
GetLength:
|
||||
SetAngle:
|
||||
GetAngle:
|
||||
SetLineWeight:
|
||||
GetLineWeight:
|
||||
UpdateEntries:
|
||||
31
wpilibc/src/main/python/semiwrap/MechanismObject2d.yml
Normal file
31
wpilibc/src/main/python/semiwrap/MechanismObject2d.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
extra_includes:
|
||||
- frc/smartdashboard/MechanismLigament2d.h
|
||||
|
||||
classes:
|
||||
frc::MechanismObject2d:
|
||||
force_type_casters:
|
||||
- units::degree_t
|
||||
attributes:
|
||||
m_mutex:
|
||||
ignore: true
|
||||
methods:
|
||||
GetName:
|
||||
Append:
|
||||
ignore: true
|
||||
MechanismObject2d:
|
||||
ignore: true
|
||||
UpdateEntries:
|
||||
|
||||
# keep this in sync with MechanismRoot2d.yml
|
||||
inline_code: |-
|
||||
cls_MechanismObject2d
|
||||
.def("appendLigament", [](MechanismObject2d *self,
|
||||
std::string_view name, double length, units::degree_t angle,
|
||||
double lineWidth, const frc::Color8Bit& color) {
|
||||
return self->Append<MechanismLigament2d>(name, length, angle, lineWidth, color);
|
||||
},
|
||||
py::arg("name"), py::arg("length"), py::arg("angle"),
|
||||
py::arg("lineWidth") = 6, py::arg("color") = frc::Color8Bit{235, 137, 52},
|
||||
"Append a ligament node",
|
||||
py::return_value_policy::reference_internal)
|
||||
;
|
||||
30
wpilibc/src/main/python/semiwrap/MechanismRoot2d.yml
Normal file
30
wpilibc/src/main/python/semiwrap/MechanismRoot2d.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
extra_includes:
|
||||
- frc/smartdashboard/MechanismLigament2d.h
|
||||
|
||||
classes:
|
||||
frc::MechanismRoot2d:
|
||||
force_type_casters:
|
||||
- units::degree_t
|
||||
methods:
|
||||
MechanismRoot2d:
|
||||
ignore: true
|
||||
SetPosition:
|
||||
GetName:
|
||||
ignore: true
|
||||
Append:
|
||||
ignore: true
|
||||
|
||||
# keep this in sync with MechanismRoot2d.h
|
||||
inline_code: |-
|
||||
cls_MechanismRoot2d
|
||||
.def("getName", [](MechanismRoot2d *self) { return self->GetName(); }, release_gil())
|
||||
.def("appendLigament", [](MechanismRoot2d *self,
|
||||
std::string_view name, double length, units::degree_t angle,
|
||||
double lineWidth, const frc::Color8Bit& color) {
|
||||
return self->Append<MechanismLigament2d>(name, length, angle, lineWidth, color);
|
||||
},
|
||||
py::arg("name"), py::arg("length"), py::arg("angle"),
|
||||
py::arg("lineWidth") = 6, py::arg("color") = frc::Color8Bit{235, 137, 52},
|
||||
release_gil(), "Append a ligament node",
|
||||
py::return_value_policy::reference_internal)
|
||||
;
|
||||
13
wpilibc/src/main/python/semiwrap/MotorController.yml
Normal file
13
wpilibc/src/main/python/semiwrap/MotorController.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
defaults:
|
||||
subpackage: interfaces
|
||||
|
||||
classes:
|
||||
frc::MotorController:
|
||||
methods:
|
||||
Set:
|
||||
SetVoltage:
|
||||
Get:
|
||||
SetInverted:
|
||||
GetInverted:
|
||||
Disable:
|
||||
StopMotor:
|
||||
43
wpilibc/src/main/python/semiwrap/MotorControllerGroup.yml
Normal file
43
wpilibc/src/main/python/semiwrap/MotorControllerGroup.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- pybind11/stl.h
|
||||
|
||||
classes:
|
||||
frc::PyMotorControllerGroup:
|
||||
rename: MotorControllerGroup
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<PyMotorControllerGroup>
|
||||
methods:
|
||||
PyMotorControllerGroup:
|
||||
cpp_code: |
|
||||
[](py::args args) {
|
||||
if (args.size() < 1) {
|
||||
throw py::type_error("requires 1+ arguments");
|
||||
}
|
||||
std::vector<std::shared_ptr<MotorController>> v;
|
||||
v.reserve(args.size());
|
||||
int i = 1;
|
||||
for (auto &arg: args) {
|
||||
try {
|
||||
auto mc = arg.cast<std::shared_ptr<MotorController>>();
|
||||
if (!mc) throw py::cast_error();
|
||||
v.push_back(mc);
|
||||
} catch (py::cast_error &e) {
|
||||
throw py::type_error(py::str("Argument {} must be a MotorController (got '{}')").format(i, py::repr(arg)));
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return std::make_shared<PyMotorControllerGroup>(std::move(v));
|
||||
}
|
||||
keepalive: []
|
||||
param_override:
|
||||
args:
|
||||
ignore: true
|
||||
Set:
|
||||
SetVoltage:
|
||||
Get:
|
||||
SetInverted:
|
||||
GetInverted:
|
||||
Disable:
|
||||
StopMotor:
|
||||
InitSendable:
|
||||
17
wpilibc/src/main/python/semiwrap/MotorSafety.yml
Normal file
17
wpilibc/src/main/python/semiwrap/MotorSafety.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
extra_includes:
|
||||
- wpi/SmallString.h
|
||||
|
||||
classes:
|
||||
frc::MotorSafety:
|
||||
methods:
|
||||
MotorSafety:
|
||||
Feed:
|
||||
SetExpiration:
|
||||
GetExpiration:
|
||||
IsAlive:
|
||||
SetSafetyEnabled:
|
||||
IsSafetyEnabled:
|
||||
Check:
|
||||
CheckMotors:
|
||||
StopMotor:
|
||||
GetDescription:
|
||||
21
wpilibc/src/main/python/semiwrap/Notifier.yml
Normal file
21
wpilibc/src/main/python/semiwrap/Notifier.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
classes:
|
||||
frc::PyNotifier:
|
||||
rename: Notifier
|
||||
methods:
|
||||
PyNotifier:
|
||||
overloads:
|
||||
std::function<void ( )>:
|
||||
SetName:
|
||||
SetCallback:
|
||||
StartSingle:
|
||||
overloads:
|
||||
double:
|
||||
ignore: true
|
||||
units::second_t:
|
||||
StartPeriodic:
|
||||
overloads:
|
||||
double:
|
||||
ignore: true
|
||||
units::second_t:
|
||||
Stop:
|
||||
SetHALThreadPriority:
|
||||
20
wpilibc/src/main/python/semiwrap/OnboardIMU.yml
Normal file
20
wpilibc/src/main/python/semiwrap/OnboardIMU.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
classes:
|
||||
frc::OnboardIMU:
|
||||
enums:
|
||||
MountOrientation:
|
||||
methods:
|
||||
OnboardIMU:
|
||||
GetYaw:
|
||||
ResetYaw:
|
||||
GetRotation2d:
|
||||
GetRotation3d:
|
||||
GetQuaternion:
|
||||
GetAngleX:
|
||||
GetAngleY:
|
||||
GetAngleZ:
|
||||
GetGyroRateX:
|
||||
GetGyroRateY:
|
||||
GetGyroRateZ:
|
||||
GetAccelX:
|
||||
GetAccelY:
|
||||
GetAccelZ:
|
||||
100
wpilibc/src/main/python/semiwrap/PS4Controller.yml
Normal file
100
wpilibc/src/main/python/semiwrap/PS4Controller.yml
Normal file
@@ -0,0 +1,100 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/event/BooleanEvent.h
|
||||
|
||||
classes:
|
||||
frc::PS4Controller:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<PS4Controller>
|
||||
methods:
|
||||
PS4Controller:
|
||||
GetLeftX:
|
||||
GetRightX:
|
||||
GetLeftY:
|
||||
GetRightY:
|
||||
GetL2Axis:
|
||||
GetR2Axis:
|
||||
GetSquareButton:
|
||||
GetSquareButtonPressed:
|
||||
GetSquareButtonReleased:
|
||||
Square:
|
||||
GetCrossButton:
|
||||
GetCrossButtonPressed:
|
||||
GetCrossButtonReleased:
|
||||
Cross:
|
||||
GetCircleButton:
|
||||
GetCircleButtonPressed:
|
||||
GetCircleButtonReleased:
|
||||
Circle:
|
||||
GetTriangleButton:
|
||||
GetTriangleButtonPressed:
|
||||
GetTriangleButtonReleased:
|
||||
Triangle:
|
||||
GetL1Button:
|
||||
GetL1ButtonPressed:
|
||||
GetL1ButtonReleased:
|
||||
L1:
|
||||
GetR1Button:
|
||||
GetR1ButtonPressed:
|
||||
GetR1ButtonReleased:
|
||||
R1:
|
||||
GetL2Button:
|
||||
GetL2ButtonPressed:
|
||||
GetL2ButtonReleased:
|
||||
L2:
|
||||
GetR2Button:
|
||||
GetR2ButtonPressed:
|
||||
GetR2ButtonReleased:
|
||||
R2:
|
||||
GetShareButton:
|
||||
GetShareButtonPressed:
|
||||
GetShareButtonReleased:
|
||||
Share:
|
||||
GetOptionsButton:
|
||||
GetOptionsButtonPressed:
|
||||
GetOptionsButtonReleased:
|
||||
Options:
|
||||
GetL3Button:
|
||||
GetL3ButtonPressed:
|
||||
GetL3ButtonReleased:
|
||||
L3:
|
||||
GetR3Button:
|
||||
GetR3ButtonPressed:
|
||||
GetR3ButtonReleased:
|
||||
R3:
|
||||
GetPSButton:
|
||||
GetPSButtonPressed:
|
||||
GetPSButtonReleased:
|
||||
PS:
|
||||
GetTouchpad:
|
||||
GetTouchpadPressed:
|
||||
GetTouchpadReleased:
|
||||
Touchpad:
|
||||
GetTouchpadButton:
|
||||
GetTouchpadButtonPressed:
|
||||
GetTouchpadButtonReleased:
|
||||
InitSendable:
|
||||
frc::PS4Controller::Button:
|
||||
attributes:
|
||||
kSquare:
|
||||
kCross:
|
||||
kCircle:
|
||||
kTriangle:
|
||||
kL1:
|
||||
kR1:
|
||||
kL2:
|
||||
kR2:
|
||||
kShare:
|
||||
kOptions:
|
||||
kL3:
|
||||
kR3:
|
||||
kPS:
|
||||
kTouchpad:
|
||||
frc::PS4Controller::Axis:
|
||||
attributes:
|
||||
kLeftX:
|
||||
kLeftY:
|
||||
kRightX:
|
||||
kRightY:
|
||||
kL2:
|
||||
kR2:
|
||||
99
wpilibc/src/main/python/semiwrap/PS5Controller.yml
Normal file
99
wpilibc/src/main/python/semiwrap/PS5Controller.yml
Normal file
@@ -0,0 +1,99 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::PS5Controller:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<PS5Controller>
|
||||
methods:
|
||||
PS5Controller:
|
||||
GetLeftX:
|
||||
GetRightX:
|
||||
GetLeftY:
|
||||
GetRightY:
|
||||
GetL2Axis:
|
||||
GetR2Axis:
|
||||
GetSquareButton:
|
||||
GetSquareButtonPressed:
|
||||
GetSquareButtonReleased:
|
||||
Square:
|
||||
GetCrossButton:
|
||||
GetCrossButtonPressed:
|
||||
GetCrossButtonReleased:
|
||||
Cross:
|
||||
GetCircleButton:
|
||||
GetCircleButtonPressed:
|
||||
GetCircleButtonReleased:
|
||||
Circle:
|
||||
GetTriangleButton:
|
||||
GetTriangleButtonPressed:
|
||||
GetTriangleButtonReleased:
|
||||
Triangle:
|
||||
GetL1Button:
|
||||
GetL1ButtonPressed:
|
||||
GetL1ButtonReleased:
|
||||
L1:
|
||||
GetR1Button:
|
||||
GetR1ButtonPressed:
|
||||
GetR1ButtonReleased:
|
||||
R1:
|
||||
GetL2Button:
|
||||
GetL2ButtonPressed:
|
||||
GetL2ButtonReleased:
|
||||
L2:
|
||||
GetR2Button:
|
||||
GetR2ButtonPressed:
|
||||
GetR2ButtonReleased:
|
||||
R2:
|
||||
GetCreateButton:
|
||||
GetCreateButtonPressed:
|
||||
GetCreateButtonReleased:
|
||||
Create:
|
||||
GetOptionsButton:
|
||||
GetOptionsButtonPressed:
|
||||
GetOptionsButtonReleased:
|
||||
Options:
|
||||
GetL3Button:
|
||||
GetL3ButtonPressed:
|
||||
GetL3ButtonReleased:
|
||||
L3:
|
||||
GetR3Button:
|
||||
GetR3ButtonPressed:
|
||||
GetR3ButtonReleased:
|
||||
R3:
|
||||
GetPSButton:
|
||||
GetPSButtonPressed:
|
||||
GetPSButtonReleased:
|
||||
PS:
|
||||
GetTouchpad:
|
||||
GetTouchpadPressed:
|
||||
GetTouchpadReleased:
|
||||
Touchpad:
|
||||
GetTouchpadButton:
|
||||
GetTouchpadButtonPressed:
|
||||
GetTouchpadButtonReleased:
|
||||
InitSendable:
|
||||
frc::PS5Controller::Button:
|
||||
attributes:
|
||||
kSquare:
|
||||
kCross:
|
||||
kCircle:
|
||||
kTriangle:
|
||||
kL1:
|
||||
kR1:
|
||||
kL2:
|
||||
kR2:
|
||||
kCreate:
|
||||
kOptions:
|
||||
kL3:
|
||||
kR3:
|
||||
kPS:
|
||||
kTouchpad:
|
||||
frc::PS5Controller::Axis:
|
||||
attributes:
|
||||
kLeftX:
|
||||
kLeftY:
|
||||
kRightX:
|
||||
kRightY:
|
||||
kL2:
|
||||
kR2:
|
||||
28
wpilibc/src/main/python/semiwrap/PWM.yml
Normal file
28
wpilibc/src/main/python/semiwrap/PWM.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/AddressableLED.h
|
||||
- wpi/SmallString.h
|
||||
|
||||
classes:
|
||||
frc::PWM:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<PWM>
|
||||
enums:
|
||||
OutputPeriod:
|
||||
methods:
|
||||
PWM:
|
||||
SetPulseTime:
|
||||
GetPulseTime:
|
||||
SetDisabled:
|
||||
GetChannel:
|
||||
InitSendable:
|
||||
SetOutputPeriod:
|
||||
SetSimDevice:
|
||||
|
||||
inline_code: |
|
||||
cls_PWM
|
||||
.def("__repr__", [](py::handle self) {
|
||||
py::object type_name = self.get_type().attr("__qualname__");
|
||||
int channel = self.cast<PWM&>().GetChannel();
|
||||
return py::str("<{} {}>").format(type_name, channel);
|
||||
});
|
||||
33
wpilibc/src/main/python/semiwrap/PWMMotorController.yml
Normal file
33
wpilibc/src/main/python/semiwrap/PWMMotorController.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::PWMMotorController:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<PWMMotorController>
|
||||
attributes:
|
||||
m_pwm:
|
||||
methods:
|
||||
Set:
|
||||
SetVoltage:
|
||||
Get:
|
||||
GetVoltage:
|
||||
SetInverted:
|
||||
GetInverted:
|
||||
Disable:
|
||||
StopMotor:
|
||||
GetDescription:
|
||||
GetChannel:
|
||||
EnableDeadbandElimination:
|
||||
AddFollower:
|
||||
overloads:
|
||||
PWMMotorController&:
|
||||
keepalive:
|
||||
- [1, 2]
|
||||
T&&:
|
||||
ignore: true
|
||||
PWMMotorController:
|
||||
InitSendable:
|
||||
SetSpeed:
|
||||
GetSpeed:
|
||||
SetBounds:
|
||||
4
wpilibc/src/main/python/semiwrap/PWMSparkFlex.yml
Normal file
4
wpilibc/src/main/python/semiwrap/PWMSparkFlex.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
classes:
|
||||
frc::PWMSparkFlex:
|
||||
methods:
|
||||
PWMSparkFlex:
|
||||
7
wpilibc/src/main/python/semiwrap/PWMSparkMax.yml
Normal file
7
wpilibc/src/main/python/semiwrap/PWMSparkMax.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::PWMSparkMax:
|
||||
methods:
|
||||
PWMSparkMax:
|
||||
7
wpilibc/src/main/python/semiwrap/PWMTalonFX.yml
Normal file
7
wpilibc/src/main/python/semiwrap/PWMTalonFX.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::PWMTalonFX:
|
||||
methods:
|
||||
PWMTalonFX:
|
||||
7
wpilibc/src/main/python/semiwrap/PWMTalonSRX.yml
Normal file
7
wpilibc/src/main/python/semiwrap/PWMTalonSRX.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::PWMTalonSRX:
|
||||
methods:
|
||||
PWMTalonSRX:
|
||||
7
wpilibc/src/main/python/semiwrap/PWMVenom.yml
Normal file
7
wpilibc/src/main/python/semiwrap/PWMVenom.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::PWMVenom:
|
||||
methods:
|
||||
PWMVenom:
|
||||
7
wpilibc/src/main/python/semiwrap/PWMVictorSPX.yml
Normal file
7
wpilibc/src/main/python/semiwrap/PWMVictorSPX.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::PWMVictorSPX:
|
||||
methods:
|
||||
PWMVictorSPX:
|
||||
91
wpilibc/src/main/python/semiwrap/PneumaticHub.yml
Normal file
91
wpilibc/src/main/python/semiwrap/PneumaticHub.yml
Normal file
@@ -0,0 +1,91 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/Compressor.h
|
||||
- frc/Solenoid.h
|
||||
- frc/DoubleSolenoid.h
|
||||
|
||||
classes:
|
||||
frc::PneumaticHub:
|
||||
methods:
|
||||
PneumaticHub:
|
||||
overloads:
|
||||
int:
|
||||
int, int:
|
||||
GetCompressor:
|
||||
DisableCompressor:
|
||||
EnableCompressorDigital:
|
||||
EnableCompressorAnalog:
|
||||
EnableCompressorHybrid:
|
||||
GetCompressorConfigType:
|
||||
GetPressureSwitch:
|
||||
GetCompressorCurrent:
|
||||
SetSolenoids:
|
||||
GetSolenoids:
|
||||
GetModuleNumber:
|
||||
GetSolenoidDisabledList:
|
||||
FireOneShot:
|
||||
SetOneShotDuration:
|
||||
CheckSolenoidChannel:
|
||||
CheckAndReserveSolenoids:
|
||||
UnreserveSolenoids:
|
||||
ReserveCompressor:
|
||||
UnreserveCompressor:
|
||||
MakeSolenoid:
|
||||
MakeDoubleSolenoid:
|
||||
MakeCompressor:
|
||||
GetVersion:
|
||||
GetFaults:
|
||||
GetStickyFaults:
|
||||
ClearStickyFaults:
|
||||
GetInputVoltage:
|
||||
Get5VRegulatedVoltage:
|
||||
GetSolenoidsTotalCurrent:
|
||||
GetSolenoidsVoltage:
|
||||
GetAnalogVoltage:
|
||||
GetPressure:
|
||||
ReportUsage:
|
||||
frc::PneumaticHub::Version:
|
||||
attributes:
|
||||
FirmwareMajor:
|
||||
FirmwareMinor:
|
||||
FirmwareFix:
|
||||
HardwareMinor:
|
||||
HardwareMajor:
|
||||
UniqueId:
|
||||
frc::PneumaticHub::Faults:
|
||||
attributes:
|
||||
Channel0Fault:
|
||||
Channel1Fault:
|
||||
Channel2Fault:
|
||||
Channel3Fault:
|
||||
Channel4Fault:
|
||||
Channel5Fault:
|
||||
Channel6Fault:
|
||||
Channel7Fault:
|
||||
Channel8Fault:
|
||||
Channel9Fault:
|
||||
Channel10Fault:
|
||||
Channel11Fault:
|
||||
Channel12Fault:
|
||||
Channel13Fault:
|
||||
Channel14Fault:
|
||||
Channel15Fault:
|
||||
CompressorOverCurrent:
|
||||
CompressorOpen:
|
||||
SolenoidOverCurrent:
|
||||
Brownout:
|
||||
CanWarning:
|
||||
HardwareFault:
|
||||
methods:
|
||||
GetChannelFault:
|
||||
frc::PneumaticHub::StickyFaults:
|
||||
attributes:
|
||||
CompressorOverCurrent:
|
||||
CompressorOpen:
|
||||
SolenoidOverCurrent:
|
||||
Brownout:
|
||||
CanWarning:
|
||||
CanBusOff:
|
||||
HasReset:
|
||||
HardwareFault:
|
||||
FirmwareFault:
|
||||
37
wpilibc/src/main/python/semiwrap/PneumaticsBase.yml
Normal file
37
wpilibc/src/main/python/semiwrap/PneumaticsBase.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/Compressor.h
|
||||
- frc/Solenoid.h
|
||||
- frc/DoubleSolenoid.h
|
||||
|
||||
|
||||
classes:
|
||||
frc::PneumaticsBase:
|
||||
methods:
|
||||
GetCompressor:
|
||||
GetPressureSwitch:
|
||||
GetCompressorCurrent:
|
||||
DisableCompressor:
|
||||
EnableCompressorDigital:
|
||||
EnableCompressorAnalog:
|
||||
EnableCompressorHybrid:
|
||||
GetCompressorConfigType:
|
||||
SetSolenoids:
|
||||
GetSolenoids:
|
||||
GetModuleNumber:
|
||||
GetSolenoidDisabledList:
|
||||
FireOneShot:
|
||||
SetOneShotDuration:
|
||||
CheckSolenoidChannel:
|
||||
CheckAndReserveSolenoids:
|
||||
UnreserveSolenoids:
|
||||
ReserveCompressor:
|
||||
UnreserveCompressor:
|
||||
GetAnalogVoltage:
|
||||
GetPressure:
|
||||
MakeSolenoid:
|
||||
MakeDoubleSolenoid:
|
||||
MakeCompressor:
|
||||
GetForType:
|
||||
GetDefaultForType:
|
||||
ReportUsage:
|
||||
47
wpilibc/src/main/python/semiwrap/PneumaticsControlModule.yml
Normal file
47
wpilibc/src/main/python/semiwrap/PneumaticsControlModule.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/Compressor.h
|
||||
- frc/Solenoid.h
|
||||
- frc/DoubleSolenoid.h
|
||||
|
||||
classes:
|
||||
frc::PneumaticsControlModule:
|
||||
methods:
|
||||
PneumaticsControlModule:
|
||||
overloads:
|
||||
int:
|
||||
int, int:
|
||||
GetCompressor:
|
||||
DisableCompressor:
|
||||
EnableCompressorDigital:
|
||||
EnableCompressorAnalog:
|
||||
EnableCompressorHybrid:
|
||||
GetCompressorConfigType:
|
||||
GetPressureSwitch:
|
||||
GetCompressorCurrent:
|
||||
GetCompressorCurrentTooHighFault:
|
||||
GetCompressorCurrentTooHighStickyFault:
|
||||
GetCompressorShortedFault:
|
||||
GetCompressorShortedStickyFault:
|
||||
GetCompressorNotConnectedFault:
|
||||
GetCompressorNotConnectedStickyFault:
|
||||
GetSolenoidVoltageFault:
|
||||
GetSolenoidVoltageStickyFault:
|
||||
ClearAllStickyFaults:
|
||||
SetSolenoids:
|
||||
GetSolenoids:
|
||||
GetModuleNumber:
|
||||
GetSolenoidDisabledList:
|
||||
FireOneShot:
|
||||
SetOneShotDuration:
|
||||
CheckSolenoidChannel:
|
||||
CheckAndReserveSolenoids:
|
||||
UnreserveSolenoids:
|
||||
ReserveCompressor:
|
||||
UnreserveCompressor:
|
||||
GetAnalogVoltage:
|
||||
GetPressure:
|
||||
MakeSolenoid:
|
||||
MakeDoubleSolenoid:
|
||||
MakeCompressor:
|
||||
ReportUsage:
|
||||
@@ -0,0 +1,2 @@
|
||||
enums:
|
||||
PneumaticsModuleType:
|
||||
107
wpilibc/src/main/python/semiwrap/PowerDistribution.yml
Normal file
107
wpilibc/src/main/python/semiwrap/PowerDistribution.yml
Normal file
@@ -0,0 +1,107 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::PowerDistribution:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<PowerDistribution>
|
||||
attributes:
|
||||
kDefaultModule:
|
||||
enums:
|
||||
ModuleType:
|
||||
methods:
|
||||
PowerDistribution:
|
||||
overloads:
|
||||
int:
|
||||
int, int, ModuleType:
|
||||
GetVoltage:
|
||||
GetTemperature:
|
||||
GetCurrent:
|
||||
GetTotalCurrent:
|
||||
GetTotalPower:
|
||||
GetTotalEnergy:
|
||||
ResetTotalEnergy:
|
||||
ClearStickyFaults:
|
||||
GetModule:
|
||||
GetType:
|
||||
GetSwitchableChannel:
|
||||
SetSwitchableChannel:
|
||||
GetVersion:
|
||||
GetFaults:
|
||||
GetStickyFaults:
|
||||
GetNumChannels:
|
||||
GetAllCurrents:
|
||||
InitSendable:
|
||||
frc::PowerDistribution::Version:
|
||||
attributes:
|
||||
FirmwareMajor:
|
||||
FirmwareMinor:
|
||||
FirmwareFix:
|
||||
HardwareMinor:
|
||||
HardwareMajor:
|
||||
UniqueId:
|
||||
frc::PowerDistribution::Faults:
|
||||
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:
|
||||
methods:
|
||||
GetBreakerFault:
|
||||
frc::PowerDistribution::StickyFaults:
|
||||
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:
|
||||
methods:
|
||||
GetBreakerFault:
|
||||
25
wpilibc/src/main/python/semiwrap/Preferences.yml
Normal file
25
wpilibc/src/main/python/semiwrap/Preferences.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
classes:
|
||||
frc::Preferences:
|
||||
methods:
|
||||
GetKeys:
|
||||
GetString:
|
||||
GetInt:
|
||||
GetDouble:
|
||||
GetFloat:
|
||||
GetBoolean:
|
||||
GetLong:
|
||||
SetString:
|
||||
InitString:
|
||||
SetInt:
|
||||
InitInt:
|
||||
SetDouble:
|
||||
InitDouble:
|
||||
SetFloat:
|
||||
InitFloat:
|
||||
SetBoolean:
|
||||
InitBoolean:
|
||||
SetLong:
|
||||
InitLong:
|
||||
ContainsKey:
|
||||
Remove:
|
||||
RemoveAll:
|
||||
62
wpilibc/src/main/python/semiwrap/RobotBase.yml
Normal file
62
wpilibc/src/main/python/semiwrap/RobotBase.yml
Normal file
@@ -0,0 +1,62 @@
|
||||
extra_includes:
|
||||
- frc/DriverStation.h
|
||||
- rpy/ControlWord.h
|
||||
|
||||
functions:
|
||||
# TODO
|
||||
RunHALInitialization:
|
||||
ignore: true
|
||||
RunRobot:
|
||||
ignore: true
|
||||
StartRobot:
|
||||
ignore: true
|
||||
ResetMotorSafety:
|
||||
ignore: true
|
||||
classes:
|
||||
frc::RobotBase:
|
||||
attributes:
|
||||
m_threadId:
|
||||
ignore: true
|
||||
connListenerHandle:
|
||||
ignore: true
|
||||
methods:
|
||||
IsEnabled:
|
||||
IsDisabled:
|
||||
IsAutonomous:
|
||||
IsAutonomousEnabled:
|
||||
IsTeleop:
|
||||
IsTeleopEnabled:
|
||||
IsTest:
|
||||
IsTestEnabled:
|
||||
GetThreadId:
|
||||
ignore: true
|
||||
StartCompetition:
|
||||
EndCompetition:
|
||||
GetRuntimeType:
|
||||
IsReal:
|
||||
IsSimulation:
|
||||
RobotBase:
|
||||
inline_code: |
|
||||
.def_static("main",
|
||||
[](py::object robot_cls) -> py::object {
|
||||
auto start = py::module::import("wpilib._impl.start");
|
||||
auto starter = start.attr("RobotStarter")();
|
||||
return starter.attr("run")(robot_cls);
|
||||
},
|
||||
py::arg("robot_cls"), py::doc("Starting point for the application"))
|
||||
.def(
|
||||
"getControlState",
|
||||
[](RobotBase *self) -> std::tuple<bool, bool, bool> {
|
||||
py::gil_scoped_release release;
|
||||
return rpy::GetControlState();
|
||||
},
|
||||
py::doc("More efficient way to determine what state the robot is in.\n"
|
||||
"\n"
|
||||
":returns: booleans representing enabled, isautonomous, istest\n"
|
||||
"\n"
|
||||
".. versionadded:: 2019.2.1\n"
|
||||
"\n"
|
||||
".. note:: This function only exists in RobotPy\n"));
|
||||
|
||||
auto logger = py::module::import("logging").attr("getLogger")("robot");
|
||||
cls_RobotBase.attr("logger") = logger;
|
||||
36
wpilibc/src/main/python/semiwrap/RobotController.yml
Normal file
36
wpilibc/src/main/python/semiwrap/RobotController.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
classes:
|
||||
frc::CANStatus:
|
||||
attributes:
|
||||
percentBusUtilization:
|
||||
busOffCount:
|
||||
txFullCount:
|
||||
receiveErrorCount:
|
||||
transmitErrorCount:
|
||||
frc::RobotController:
|
||||
nodelete: true
|
||||
methods:
|
||||
GetFPGAVersion:
|
||||
GetFPGARevision:
|
||||
GetSerialNumber:
|
||||
GetComments:
|
||||
GetTeamNumber:
|
||||
SetTimeSource:
|
||||
GetTime:
|
||||
GetFPGATime:
|
||||
IsSysActive:
|
||||
IsBrownedOut:
|
||||
GetRSLState:
|
||||
IsSystemTimeValid:
|
||||
GetInputVoltage:
|
||||
GetVoltage3V3:
|
||||
GetCurrent3V3:
|
||||
SetEnabled3V3:
|
||||
GetEnabled3V3:
|
||||
GetFaultCount3V3:
|
||||
GetBatteryVoltage:
|
||||
GetBrownoutVoltage:
|
||||
SetBrownoutVoltage:
|
||||
GetCPUTemp:
|
||||
GetCANStatus:
|
||||
GetCommsDisableCount:
|
||||
ResetRailFaultCounts:
|
||||
10
wpilibc/src/main/python/semiwrap/RobotState.yml
Normal file
10
wpilibc/src/main/python/semiwrap/RobotState.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
classes:
|
||||
frc::RobotState:
|
||||
nodelete: true
|
||||
methods:
|
||||
IsDisabled:
|
||||
IsEnabled:
|
||||
IsEStopped:
|
||||
IsTeleop:
|
||||
IsAutonomous:
|
||||
IsTest:
|
||||
2
wpilibc/src/main/python/semiwrap/RuntimeType.yml
Normal file
2
wpilibc/src/main/python/semiwrap/RuntimeType.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
enums:
|
||||
RuntimeType:
|
||||
7
wpilibc/src/main/python/semiwrap/SD540.yml
Normal file
7
wpilibc/src/main/python/semiwrap/SD540.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::SD540:
|
||||
methods:
|
||||
SD540:
|
||||
49
wpilibc/src/main/python/semiwrap/SendableBuilderImpl.yml
Normal file
49
wpilibc/src/main/python/semiwrap/SendableBuilderImpl.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
classes:
|
||||
frc::SendableBuilderImpl:
|
||||
methods:
|
||||
SendableBuilderImpl:
|
||||
SetTable:
|
||||
GetTable:
|
||||
IsPublished:
|
||||
IsActuator:
|
||||
Update:
|
||||
StartListeners:
|
||||
StopListeners:
|
||||
ClearProperties:
|
||||
SetSmartDashboardType:
|
||||
SetActuator:
|
||||
SetUpdateTable:
|
||||
cpp_code: |
|
||||
[](SendableBuilderImpl *self, std::function<void()> func) {
|
||||
self->SetUpdateTable(std::move(func));
|
||||
}
|
||||
GetTopic:
|
||||
AddBooleanProperty:
|
||||
PublishConstBoolean:
|
||||
AddIntegerProperty:
|
||||
PublishConstInteger:
|
||||
AddFloatProperty:
|
||||
PublishConstFloat:
|
||||
AddDoubleProperty:
|
||||
PublishConstDouble:
|
||||
AddStringProperty:
|
||||
PublishConstString:
|
||||
AddBooleanArrayProperty:
|
||||
PublishConstBooleanArray:
|
||||
AddIntegerArrayProperty:
|
||||
PublishConstIntegerArray:
|
||||
AddFloatArrayProperty:
|
||||
PublishConstFloatArray:
|
||||
AddDoubleArrayProperty:
|
||||
PublishConstDoubleArray:
|
||||
AddStringArrayProperty:
|
||||
PublishConstStringArray:
|
||||
AddRawProperty:
|
||||
PublishConstRaw:
|
||||
AddSmallStringProperty:
|
||||
AddSmallBooleanArrayProperty:
|
||||
AddSmallIntegerArrayProperty:
|
||||
AddSmallFloatArrayProperty:
|
||||
AddSmallDoubleArrayProperty:
|
||||
AddSmallStringArrayProperty:
|
||||
AddSmallRawProperty:
|
||||
42
wpilibc/src/main/python/semiwrap/SendableChooser.yml
Normal file
42
wpilibc/src/main/python/semiwrap/SendableChooser.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
extra_includes:
|
||||
- gilsafe_object.h
|
||||
|
||||
classes:
|
||||
frc::SendableChooser:
|
||||
template_params:
|
||||
- T
|
||||
methods:
|
||||
SendableChooser:
|
||||
AddOption:
|
||||
SetDefaultOption:
|
||||
GetSelected:
|
||||
# weirdness because return type
|
||||
cpp_code: |
|
||||
[](frc::SendableChooser<T> * __that) -> py::object {
|
||||
auto v = __that->GetSelected();
|
||||
if (!v) {
|
||||
return py::none();
|
||||
}
|
||||
return v;
|
||||
}
|
||||
OnChange:
|
||||
# more weirdness
|
||||
cpp_code: |
|
||||
[](frc::SendableChooser<T> *self, std::function<void(T)> fn) {
|
||||
self->OnChange([fn](T v) {
|
||||
py::gil_scoped_acquire lock;
|
||||
if (v) {
|
||||
fn(v);
|
||||
} else {
|
||||
fn(py::none());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
InitSendable:
|
||||
|
||||
templates:
|
||||
SendableChooser:
|
||||
qualname: frc::SendableChooser
|
||||
params:
|
||||
- semiwrap::gilsafe_object
|
||||
25
wpilibc/src/main/python/semiwrap/SendableChooserBase.yml
Normal file
25
wpilibc/src/main/python/semiwrap/SendableChooserBase.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::SendableChooserBase:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<SendableChooserBase>
|
||||
attributes:
|
||||
kDefault:
|
||||
kOptions:
|
||||
kSelected:
|
||||
kActive:
|
||||
kInstance:
|
||||
m_defaultChoice:
|
||||
m_selected:
|
||||
m_haveSelected:
|
||||
m_mutex:
|
||||
ignore: true
|
||||
m_instance:
|
||||
m_previousVal:
|
||||
s_instances:
|
||||
ignore: true
|
||||
methods:
|
||||
SendableChooserBase:
|
||||
ignore: true
|
||||
12
wpilibc/src/main/python/semiwrap/SensorUtil.yml
Normal file
12
wpilibc/src/main/python/semiwrap/SensorUtil.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
classes:
|
||||
frc::SensorUtil:
|
||||
nodelete: true
|
||||
methods:
|
||||
CheckDigitalChannel:
|
||||
CheckPWMChannel:
|
||||
CheckAnalogInputChannel:
|
||||
GetDefaultCTREPCMModule:
|
||||
GetDefaultREVPHModule:
|
||||
GetNumDigitalChannels:
|
||||
GetNumAnalogInputs:
|
||||
GetNumPwmChannels:
|
||||
50
wpilibc/src/main/python/semiwrap/SerialPort.yml
Normal file
50
wpilibc/src/main/python/semiwrap/SerialPort.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
classes:
|
||||
frc::SerialPort:
|
||||
enums:
|
||||
Parity:
|
||||
StopBits:
|
||||
FlowControl:
|
||||
WriteBufferMode:
|
||||
Port:
|
||||
methods:
|
||||
SerialPort:
|
||||
overloads:
|
||||
int, Port, int, Parity, StopBits:
|
||||
param_override:
|
||||
port:
|
||||
default: frc::SerialPort::Port::kOnboard
|
||||
parity:
|
||||
default: frc::SerialPort::Parity::kParity_None
|
||||
stopBits:
|
||||
default: frc::SerialPort::StopBits::kStopBits_One
|
||||
int, std::string_view, Port, int, Parity, StopBits:
|
||||
param_override:
|
||||
port:
|
||||
default: frc::SerialPort::Port::kOnboard
|
||||
parity:
|
||||
default: frc::SerialPort::Parity::kParity_None
|
||||
stopBits:
|
||||
default: frc::SerialPort::StopBits::kStopBits_One
|
||||
SetFlowControl:
|
||||
EnableTermination:
|
||||
param_override:
|
||||
terminator:
|
||||
default: "'\\n'"
|
||||
DisableTermination:
|
||||
GetBytesReceived:
|
||||
Read:
|
||||
buffers:
|
||||
- {type: OUT, src: buffer, len: count}
|
||||
Write:
|
||||
overloads:
|
||||
const char*, int:
|
||||
buffers:
|
||||
- {type: IN, src: buffer, len: count}
|
||||
std::string_view:
|
||||
ignore: true
|
||||
SetTimeout:
|
||||
SetReadBufferSize:
|
||||
SetWriteBufferSize:
|
||||
SetWriteBufferMode:
|
||||
Flush:
|
||||
Reset:
|
||||
15
wpilibc/src/main/python/semiwrap/Servo.yml
Normal file
15
wpilibc/src/main/python/semiwrap/Servo.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::Servo:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<Servo>
|
||||
methods:
|
||||
Servo:
|
||||
Set:
|
||||
Get:
|
||||
SetAngle:
|
||||
GetAngle:
|
||||
InitSendable:
|
||||
GetChannel:
|
||||
16
wpilibc/src/main/python/semiwrap/SharpIR.yml
Normal file
16
wpilibc/src/main/python/semiwrap/SharpIR.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::SharpIR:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<SharpIR>
|
||||
methods:
|
||||
GP2Y0A02YK0F:
|
||||
GP2Y0A21YK0F:
|
||||
GP2Y0A41SK0F:
|
||||
GP2Y0A51SK0F:
|
||||
SharpIR:
|
||||
GetChannel:
|
||||
GetRange:
|
||||
InitSendable:
|
||||
171
wpilibc/src/main/python/semiwrap/SmartDashboard.yml
Normal file
171
wpilibc/src/main/python/semiwrap/SmartDashboard.yml
Normal file
@@ -0,0 +1,171 @@
|
||||
extra_includes:
|
||||
- src/rpy/SmartDashboardData.h
|
||||
- frc/Errors.h
|
||||
- wpi/sendable/SendableRegistry.h
|
||||
|
||||
classes:
|
||||
frc::SmartDashboard:
|
||||
methods:
|
||||
init:
|
||||
ContainsKey:
|
||||
GetKeys:
|
||||
SetPersistent:
|
||||
ClearPersistent:
|
||||
IsPersistent:
|
||||
GetEntry:
|
||||
PutData:
|
||||
# overrides ensure data doesn't die if this is the only reference
|
||||
overloads:
|
||||
std::string_view, wpi::Sendable*:
|
||||
cpp_code: |
|
||||
[](py::str &key, std::shared_ptr<wpi::Sendable> data) {
|
||||
if (!data) {
|
||||
throw FRC_MakeError(err::NullParameter, "{}", "value");
|
||||
}
|
||||
|
||||
// convert key to a raw string so that we can create a StringRef
|
||||
Py_ssize_t raw_size;
|
||||
const char *raw_str = PyUnicode_AsUTF8AndSize(key.ptr(), &raw_size);
|
||||
if (raw_str == NULL) {
|
||||
throw py::error_already_set();
|
||||
}
|
||||
|
||||
std::string_view keyRef(raw_str, raw_size);
|
||||
frc::SmartDashboard::PutData(keyRef, data.get());
|
||||
|
||||
// this comes after the PutData to ensure that the original object doesn't die
|
||||
// while PutData is called
|
||||
rpy::addSmartDashboardData(key, data);
|
||||
}
|
||||
wpi::Sendable*:
|
||||
cpp_code: |
|
||||
[](std::shared_ptr<wpi::Sendable> value) {
|
||||
frc::SmartDashboard::PutData(value.get());
|
||||
// this comes after the PutData to ensure that the original object doesn't die
|
||||
// while PutData is called
|
||||
auto name = wpi::SendableRegistry::GetName(value.get());
|
||||
if (!name.empty()) {
|
||||
py::str key(name);
|
||||
rpy::addSmartDashboardData(key, value);
|
||||
}
|
||||
}
|
||||
GetData:
|
||||
PutBoolean:
|
||||
SetDefaultBoolean:
|
||||
GetBoolean:
|
||||
cpp_code: |
|
||||
[](std::string_view key, py::object defaultValue) -> py::object {
|
||||
nt::Value value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
auto entry = frc::SmartDashboard::GetEntry(key);
|
||||
value = nt::GetEntryValue(entry.GetHandle());
|
||||
}
|
||||
if (!value || value.type() != NT_BOOLEAN) return defaultValue;
|
||||
return py::cast(value.GetBoolean());
|
||||
}
|
||||
PutNumber:
|
||||
SetDefaultNumber:
|
||||
GetNumber:
|
||||
cpp_code: |
|
||||
[](std::string_view key, py::object defaultValue) -> py::object {
|
||||
nt::Value value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
auto entry = frc::SmartDashboard::GetEntry(key);
|
||||
value = nt::GetEntryValue(entry.GetHandle());
|
||||
}
|
||||
if (!value || value.type() != NT_DOUBLE) return defaultValue;
|
||||
return py::cast(value.GetDouble());
|
||||
}
|
||||
PutString:
|
||||
SetDefaultString:
|
||||
GetString:
|
||||
cpp_code: |
|
||||
[](std::string_view key, py::object defaultValue) -> py::object {
|
||||
nt::Value value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
auto entry = frc::SmartDashboard::GetEntry(key);
|
||||
value = nt::GetEntryValue(entry.GetHandle());
|
||||
}
|
||||
if (!value || value.type() != NT_STRING) return defaultValue;
|
||||
return py::cast(value.GetString());
|
||||
}
|
||||
PutBooleanArray:
|
||||
SetDefaultBooleanArray:
|
||||
GetBooleanArray:
|
||||
cpp_code: |
|
||||
[](std::string_view key, py::object defaultValue) -> py::object {
|
||||
nt::Value value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
auto entry = frc::SmartDashboard::GetEntry(key);
|
||||
value = nt::GetEntryValue(entry.GetHandle());
|
||||
}
|
||||
if (!value || value.type() != NT_BOOLEAN_ARRAY) return defaultValue;
|
||||
// ntcore will return bit vector by default. Convert to List[bool]
|
||||
auto v = value.value();
|
||||
py::list l(v.data.arr_boolean.size);
|
||||
for (size_t i = 0; i < v.data.arr_boolean.size; i++) {
|
||||
auto b = py::bool_(v.data.arr_boolean.arr[i]);
|
||||
PyList_SET_ITEM(l.ptr(), i, b.release().ptr());
|
||||
}
|
||||
return l;
|
||||
}
|
||||
PutNumberArray:
|
||||
SetDefaultNumberArray:
|
||||
GetNumberArray:
|
||||
cpp_code: |
|
||||
[](std::string_view key, py::object defaultValue) -> py::object {
|
||||
nt::Value value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
auto entry = frc::SmartDashboard::GetEntry(key);
|
||||
value = nt::GetEntryValue(entry.GetHandle());
|
||||
}
|
||||
if (!value || value.type() != NT_DOUBLE_ARRAY) return defaultValue;
|
||||
return py::cast(value.GetDoubleArray());
|
||||
}
|
||||
PutStringArray:
|
||||
SetDefaultStringArray:
|
||||
GetStringArray:
|
||||
cpp_code: |
|
||||
[](std::string_view key, py::object defaultValue) -> py::object {
|
||||
nt::Value value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
auto entry = frc::SmartDashboard::GetEntry(key);
|
||||
value = nt::GetEntryValue(entry.GetHandle());
|
||||
}
|
||||
if (!value || value.type() != NT_STRING_ARRAY) return defaultValue;
|
||||
return py::cast(value.GetStringArray());
|
||||
}
|
||||
PutRaw:
|
||||
SetDefaultRaw:
|
||||
GetRaw:
|
||||
cpp_code: |
|
||||
[](std::string_view key, py::object defaultValue) -> py::object {
|
||||
nt::Value value;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
auto entry = frc::SmartDashboard::GetEntry(key);
|
||||
value = nt::GetEntryValue(entry.GetHandle());
|
||||
}
|
||||
if (!value || value.type() != NT_STRING) return defaultValue;
|
||||
return py::cast(value.GetString());
|
||||
}
|
||||
PutValue:
|
||||
SetDefaultValue:
|
||||
GetValue:
|
||||
PostListenerTask:
|
||||
UpdateValues:
|
||||
|
||||
inline_code: |-
|
||||
// ensure that the smart dashboard data is released when python shuts down
|
||||
static int unused; // the capsule needs something to reference
|
||||
py::capsule cleanup(&unused, [](void *) {
|
||||
rpy::destroySmartDashboardData();
|
||||
});
|
||||
m.add_object("_sd_cleanup", cleanup);
|
||||
m.def("_clearSmartDashboardData", &rpy::clearSmartDashboardData);
|
||||
20
wpilibc/src/main/python/semiwrap/Solenoid.yml
Normal file
20
wpilibc/src/main/python/semiwrap/Solenoid.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::Solenoid:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<Solenoid>
|
||||
methods:
|
||||
Solenoid:
|
||||
overloads:
|
||||
int, PneumaticsModuleType, int:
|
||||
int, int, PneumaticsModuleType, int:
|
||||
Set:
|
||||
Get:
|
||||
Toggle:
|
||||
GetChannel:
|
||||
IsDisabled:
|
||||
SetPulseDuration:
|
||||
StartPulse:
|
||||
InitSendable:
|
||||
7
wpilibc/src/main/python/semiwrap/Spark.yml
Normal file
7
wpilibc/src/main/python/semiwrap/Spark.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::Spark:
|
||||
methods:
|
||||
Spark:
|
||||
4
wpilibc/src/main/python/semiwrap/SparkMini.yml
Normal file
4
wpilibc/src/main/python/semiwrap/SparkMini.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
classes:
|
||||
frc::SparkMini:
|
||||
methods:
|
||||
SparkMini:
|
||||
103
wpilibc/src/main/python/semiwrap/StadiaController.yml
Normal file
103
wpilibc/src/main/python/semiwrap/StadiaController.yml
Normal file
@@ -0,0 +1,103 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::StadiaController:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<StadiaController>
|
||||
methods:
|
||||
StadiaController:
|
||||
GetLeftX:
|
||||
GetRightX:
|
||||
GetLeftY:
|
||||
GetRightY:
|
||||
GetLeftBumper:
|
||||
GetRightBumper:
|
||||
GetLeftBumperPressed:
|
||||
GetRightBumperPressed:
|
||||
GetLeftBumperReleased:
|
||||
GetRightBumperReleased:
|
||||
LeftBumper:
|
||||
RightBumper:
|
||||
GetLeftStickButton:
|
||||
GetRightStickButton:
|
||||
GetLeftStickButtonPressed:
|
||||
GetRightStickButtonPressed:
|
||||
GetLeftStickButtonReleased:
|
||||
GetRightStickButtonReleased:
|
||||
LeftStick:
|
||||
RightStick:
|
||||
GetAButton:
|
||||
GetAButtonPressed:
|
||||
GetAButtonReleased:
|
||||
A:
|
||||
GetBButton:
|
||||
GetBButtonPressed:
|
||||
GetBButtonReleased:
|
||||
B:
|
||||
GetXButton:
|
||||
GetXButtonPressed:
|
||||
GetXButtonReleased:
|
||||
X:
|
||||
GetYButton:
|
||||
GetYButtonPressed:
|
||||
GetYButtonReleased:
|
||||
Y:
|
||||
GetEllipsesButton:
|
||||
GetEllipsesButtonPressed:
|
||||
GetEllipsesButtonReleased:
|
||||
Ellipses:
|
||||
GetHamburgerButton:
|
||||
GetHamburgerButtonPressed:
|
||||
GetHamburgerButtonReleased:
|
||||
Hamburger:
|
||||
GetStadiaButton:
|
||||
GetStadiaButtonPressed:
|
||||
GetStadiaButtonReleased:
|
||||
Stadia:
|
||||
GetGoogleButton:
|
||||
GetGoogleButtonPressed:
|
||||
GetGoogleButtonReleased:
|
||||
Google:
|
||||
GetFrameButton:
|
||||
GetFrameButtonPressed:
|
||||
GetFrameButtonReleased:
|
||||
Frame:
|
||||
GetLeftTriggerButton:
|
||||
GetLeftTriggerButtonPressed:
|
||||
GetLeftTriggerButtonReleased:
|
||||
LeftTrigger:
|
||||
GetRightTriggerButton:
|
||||
GetRightTriggerButtonPressed:
|
||||
GetRightTriggerButtonReleased:
|
||||
RightTrigger:
|
||||
GetLeftBumperButton:
|
||||
GetLeftBumperButtonPressed:
|
||||
GetLeftBumperButtonReleased:
|
||||
GetRightBumperButton:
|
||||
GetRightBumperButtonPressed:
|
||||
GetRightBumperButtonReleased:
|
||||
InitSendable:
|
||||
frc::StadiaController::Button:
|
||||
attributes:
|
||||
kA:
|
||||
kB:
|
||||
kX:
|
||||
kY:
|
||||
kLeftBumper:
|
||||
kRightBumper:
|
||||
kLeftStick:
|
||||
kRightStick:
|
||||
kEllipses:
|
||||
kHamburger:
|
||||
kStadia:
|
||||
kRightTrigger:
|
||||
kLeftTrigger:
|
||||
kGoogle:
|
||||
kFrame:
|
||||
frc::StadiaController::Axis:
|
||||
attributes:
|
||||
kLeftX:
|
||||
kRightX:
|
||||
kLeftY:
|
||||
kRightY:
|
||||
35
wpilibc/src/main/python/semiwrap/SysIdRoutineLog.yml
Normal file
35
wpilibc/src/main/python/semiwrap/SysIdRoutineLog.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
defaults:
|
||||
subpackage: sysid
|
||||
|
||||
enums:
|
||||
State:
|
||||
inline_code: |
|
||||
.def("__str__", &SysIdRoutineLog::StateEnumToString)
|
||||
|
||||
classes:
|
||||
frc::sysid::SysIdRoutineLog:
|
||||
methods:
|
||||
SysIdRoutineLog:
|
||||
RecordState:
|
||||
Motor:
|
||||
StateEnumToString:
|
||||
frc::sysid::SysIdRoutineLog::MotorLog:
|
||||
methods:
|
||||
value:
|
||||
voltage:
|
||||
position:
|
||||
overloads:
|
||||
units::meter_t:
|
||||
units::turn_t:
|
||||
rename: angularPosition
|
||||
velocity:
|
||||
overloads:
|
||||
units::meters_per_second_t:
|
||||
units::turns_per_second_t:
|
||||
rename: angularVelocity
|
||||
acceleration:
|
||||
overloads:
|
||||
units::meters_per_second_squared_t:
|
||||
units::turns_per_second_squared_t:
|
||||
rename: angularAcceleration
|
||||
current:
|
||||
4
wpilibc/src/main/python/semiwrap/SystemServer.yml
Normal file
4
wpilibc/src/main/python/semiwrap/SystemServer.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
classes:
|
||||
frc::SystemServer:
|
||||
methods:
|
||||
GetSystemServer:
|
||||
7
wpilibc/src/main/python/semiwrap/Talon.yml
Normal file
7
wpilibc/src/main/python/semiwrap/Talon.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::Talon:
|
||||
methods:
|
||||
Talon:
|
||||
7
wpilibc/src/main/python/semiwrap/Threads.yml
Normal file
7
wpilibc/src/main/python/semiwrap/Threads.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
functions:
|
||||
GetThreadPriority:
|
||||
ignore: true
|
||||
GetCurrentThreadPriority:
|
||||
SetThreadPriority:
|
||||
ignore: true
|
||||
SetCurrentThreadPriority:
|
||||
17
wpilibc/src/main/python/semiwrap/TimedRobot.yml
Normal file
17
wpilibc/src/main/python/semiwrap/TimedRobot.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
classes:
|
||||
frc::TimedRobot:
|
||||
attributes:
|
||||
kDefaultPeriod:
|
||||
methods:
|
||||
StartCompetition:
|
||||
EndCompetition:
|
||||
GetLoopStartTime:
|
||||
AddPeriodic:
|
||||
param_override:
|
||||
offset:
|
||||
default: 0_s
|
||||
TimedRobot:
|
||||
overloads:
|
||||
double:
|
||||
ignore: true
|
||||
units::second_t:
|
||||
18
wpilibc/src/main/python/semiwrap/Timer.yml
Normal file
18
wpilibc/src/main/python/semiwrap/Timer.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
functions:
|
||||
Wait:
|
||||
GetTime:
|
||||
classes:
|
||||
frc::Timer:
|
||||
methods:
|
||||
Timer:
|
||||
Get:
|
||||
Reset:
|
||||
Start:
|
||||
Restart:
|
||||
Stop:
|
||||
GetFPGATimestamp:
|
||||
GetMatchTime:
|
||||
HasElapsed:
|
||||
AdvanceIfElapsed:
|
||||
IsRunning:
|
||||
GetTimestamp:
|
||||
5
wpilibc/src/main/python/semiwrap/TimesliceRobot.yml
Normal file
5
wpilibc/src/main/python/semiwrap/TimesliceRobot.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
classes:
|
||||
frc::TimesliceRobot:
|
||||
methods:
|
||||
TimesliceRobot:
|
||||
Schedule:
|
||||
31
wpilibc/src/main/python/semiwrap/Tracer.yml
Normal file
31
wpilibc/src/main/python/semiwrap/Tracer.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
extra_includes:
|
||||
- wpi/SmallString.h
|
||||
- wpi/raw_ostream.h
|
||||
|
||||
classes:
|
||||
frc::Tracer:
|
||||
methods:
|
||||
Tracer:
|
||||
ResetTimer:
|
||||
ClearEpochs:
|
||||
AddEpoch:
|
||||
PrintEpochs:
|
||||
overloads:
|
||||
'':
|
||||
wpi::raw_ostream&:
|
||||
ignore: true
|
||||
|
||||
inline_code: |-
|
||||
cls_Tracer
|
||||
.def("getEpochs",
|
||||
[](Tracer * self) -> py::str {
|
||||
wpi::SmallString<128> buf;
|
||||
wpi::raw_svector_ostream s(buf);
|
||||
self->PrintEpochs(s);
|
||||
return py::cast(s.str());
|
||||
},
|
||||
"Retreives list of epochs added so far as a string\n"
|
||||
"\n"
|
||||
".. versionadded:: 2021.1.2\n"
|
||||
"\n"
|
||||
".. note:: This function only exists in RobotPy\n");
|
||||
7
wpilibc/src/main/python/semiwrap/Victor.yml
Normal file
7
wpilibc/src/main/python/semiwrap/Victor.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::Victor:
|
||||
methods:
|
||||
Victor:
|
||||
7
wpilibc/src/main/python/semiwrap/VictorSP.yml
Normal file
7
wpilibc/src/main/python/semiwrap/VictorSP.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
|
||||
classes:
|
||||
frc::VictorSP:
|
||||
methods:
|
||||
VictorSP:
|
||||
22
wpilibc/src/main/python/semiwrap/Watchdog.yml
Normal file
22
wpilibc/src/main/python/semiwrap/Watchdog.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
classes:
|
||||
frc::Watchdog:
|
||||
methods:
|
||||
Watchdog:
|
||||
overloads:
|
||||
units::second_t, std::function<void ()>:
|
||||
units::second_t, Callable&&, Arg&&, Args&&...:
|
||||
ignore: true
|
||||
GetTime:
|
||||
SetTimeout:
|
||||
overloads:
|
||||
double:
|
||||
ignore: true
|
||||
units::second_t:
|
||||
GetTimeout:
|
||||
IsExpired:
|
||||
AddEpoch:
|
||||
PrintEpochs:
|
||||
Reset:
|
||||
Enable:
|
||||
Disable:
|
||||
SuppressTimeoutMessage:
|
||||
92
wpilibc/src/main/python/semiwrap/XboxController.yml
Normal file
92
wpilibc/src/main/python/semiwrap/XboxController.yml
Normal file
@@ -0,0 +1,92 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/DriverStation.h
|
||||
- frc/event/BooleanEvent.h
|
||||
|
||||
classes:
|
||||
frc::XboxController:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<XboxController>
|
||||
methods:
|
||||
XboxController:
|
||||
GetLeftX:
|
||||
GetRightX:
|
||||
GetLeftY:
|
||||
GetRightY:
|
||||
GetLeftTriggerAxis:
|
||||
GetRightTriggerAxis:
|
||||
GetLeftBumper:
|
||||
GetRightBumper:
|
||||
GetLeftBumperPressed:
|
||||
GetRightBumperPressed:
|
||||
GetLeftBumperReleased:
|
||||
GetRightBumperReleased:
|
||||
LeftBumper:
|
||||
RightBumper:
|
||||
GetLeftStickButton:
|
||||
GetRightStickButton:
|
||||
GetLeftStickButtonPressed:
|
||||
GetRightStickButtonPressed:
|
||||
GetLeftStickButtonReleased:
|
||||
GetRightStickButtonReleased:
|
||||
LeftStick:
|
||||
RightStick:
|
||||
GetAButton:
|
||||
GetAButtonPressed:
|
||||
GetAButtonReleased:
|
||||
A:
|
||||
GetBButton:
|
||||
GetBButtonPressed:
|
||||
GetBButtonReleased:
|
||||
B:
|
||||
GetXButton:
|
||||
GetXButtonPressed:
|
||||
GetXButtonReleased:
|
||||
X:
|
||||
GetYButton:
|
||||
GetYButtonPressed:
|
||||
GetYButtonReleased:
|
||||
Y:
|
||||
GetBackButton:
|
||||
GetBackButtonPressed:
|
||||
GetBackButtonReleased:
|
||||
Back:
|
||||
GetStartButton:
|
||||
GetStartButtonPressed:
|
||||
GetStartButtonReleased:
|
||||
Start:
|
||||
LeftTrigger:
|
||||
overloads:
|
||||
double, EventLoop* [const]:
|
||||
EventLoop* [const]:
|
||||
RightTrigger:
|
||||
overloads:
|
||||
double, EventLoop* [const]:
|
||||
EventLoop* [const]:
|
||||
GetLeftBumperButton:
|
||||
GetLeftBumperButtonPressed:
|
||||
GetLeftBumperButtonReleased:
|
||||
GetRightBumperButton:
|
||||
GetRightBumperButtonPressed:
|
||||
GetRightBumperButtonReleased:
|
||||
InitSendable:
|
||||
frc::XboxController::Button:
|
||||
attributes:
|
||||
kLeftBumper:
|
||||
kRightBumper:
|
||||
kLeftStick:
|
||||
kRightStick:
|
||||
kA:
|
||||
kB:
|
||||
kX:
|
||||
kY:
|
||||
kBack:
|
||||
kStart:
|
||||
frc::XboxController::Axis:
|
||||
attributes:
|
||||
kLeftX:
|
||||
kRightX:
|
||||
kLeftY:
|
||||
kRightY:
|
||||
kLeftTrigger:
|
||||
kRightTrigger:
|
||||
@@ -0,0 +1,2 @@
|
||||
enums:
|
||||
EdgeConfiguration:
|
||||
19
wpilibc/src/main/python/semiwrap/counter/Tachometer.yml
Normal file
19
wpilibc/src/main/python/semiwrap/counter/Tachometer.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
classes:
|
||||
frc::Tachometer:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<Tachometer>
|
||||
methods:
|
||||
Tachometer:
|
||||
overloads:
|
||||
DigitalSource&:
|
||||
std::shared_ptr<DigitalSource>:
|
||||
GetFrequency:
|
||||
GetPeriod:
|
||||
GetEdgesPerRevolution:
|
||||
SetEdgesPerRevolution:
|
||||
GetRevolutionsPerSecond:
|
||||
GetRevolutionsPerMinute:
|
||||
GetStopped:
|
||||
SetMaxPeriod:
|
||||
InitSendable:
|
||||
SetEdgeConfiguration:
|
||||
13
wpilibc/src/main/python/semiwrap/counter/UpDownCounter.yml
Normal file
13
wpilibc/src/main/python/semiwrap/counter/UpDownCounter.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
classes:
|
||||
frc::UpDownCounter:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<UpDownCounter>
|
||||
methods:
|
||||
UpDownCounter:
|
||||
overloads:
|
||||
DigitalSource&, DigitalSource&:
|
||||
std::shared_ptr<DigitalSource>, std::shared_ptr<DigitalSource>:
|
||||
GetCount:
|
||||
Reset:
|
||||
InitSendable:
|
||||
SetEdgeConfiguration:
|
||||
109
wpilibc/src/main/python/semiwrap/drive/DifferentialDrive.yml
Normal file
109
wpilibc/src/main/python/semiwrap/drive/DifferentialDrive.yml
Normal file
@@ -0,0 +1,109 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/motorcontrol/MotorController.h
|
||||
|
||||
classes:
|
||||
frc::DifferentialDrive:
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<DifferentialDrive>
|
||||
methods:
|
||||
DifferentialDrive:
|
||||
overloads:
|
||||
MotorController&, MotorController&:
|
||||
keepalive:
|
||||
- [1, 2]
|
||||
- [1, 3]
|
||||
std::function<void (double)>, std::function<void (double)>:
|
||||
ArcadeDrive:
|
||||
CurvatureDrive:
|
||||
TankDrive:
|
||||
ArcadeDriveIK:
|
||||
CurvatureDriveIK:
|
||||
TankDriveIK:
|
||||
StopMotor:
|
||||
GetDescription:
|
||||
InitSendable:
|
||||
doc: |
|
||||
A class for driving differential drive/skid-steer drive platforms such as
|
||||
the Kit of Parts drive base, "tank drive", or West Coast Drive.
|
||||
|
||||
These drive bases typically have drop-center / skid-steer with two or more
|
||||
wheels per side (e.g., 6WD or 8WD). This class takes a MotorController per
|
||||
side. For four and six motor drivetrains, construct and pass in
|
||||
:class:`MotorControllerGroup` instances as follows.
|
||||
|
||||
Four motor drivetrain::
|
||||
|
||||
import wpilib.drive
|
||||
|
||||
class Robot(wpilib.TimedRobot):
|
||||
def robotInit(self):
|
||||
self.front_left = wpilib.PWMVictorSPX(1)
|
||||
self.rear_left = wpilib.PWMVictorSPX(2)
|
||||
self.left = wpilib.MotorControllerGroup(self.front_left, self.rear_left)
|
||||
|
||||
self.front_right = wpilib.PWMVictorSPX(3)
|
||||
self.rear_right = wpilib.PWMVictorSPX(4)
|
||||
self.right = wpilib.MotorControllerGroup(self.front_right, self.rear_right)
|
||||
|
||||
self.drive = wpilib.drive.DifferentialDrive(self.left, self.right)
|
||||
|
||||
Six motor drivetrain::
|
||||
|
||||
import wpilib.drive
|
||||
|
||||
class Robot(wpilib.TimedRobot):
|
||||
def robotInit(self):
|
||||
self.front_left = wpilib.PWMVictorSPX(1)
|
||||
self.mid_left = wpilib.PWMVictorSPX(2)
|
||||
self.rear_left = wpilib.PWMVictorSPX(3)
|
||||
self.left = wpilib.MotorControllerGroup(self.front_left, self.mid_left, self.rear_left)
|
||||
|
||||
self.front_right = wpilib.PWMVictorSPX(4)
|
||||
self.mid_right = wpilib.PWMVictorSPX(5)
|
||||
self.rear_right = wpilib.PWMVictorSPX(6)
|
||||
self.right = wpilib.MotorControllerGroup(self.front_right, self.mid_right, self.rear_right)
|
||||
|
||||
self.drive = wpilib.drive.DifferentialDrive(self.left, self.right)
|
||||
|
||||
A differential drive robot has left and right wheels separated by an
|
||||
arbitrary width.
|
||||
|
||||
Drive base diagram::
|
||||
|
||||
|_______|
|
||||
| | | |
|
||||
| |
|
||||
|_|___|_|
|
||||
| |
|
||||
|
||||
Each Drive() function provides different inverse kinematic relations for a
|
||||
differential drive robot. Motor outputs for the right side are negated, so
|
||||
motor direction inversion by the user is usually unnecessary.
|
||||
|
||||
This library uses the NED axes convention (North-East-Down as external
|
||||
reference in the world frame):
|
||||
http://www.nuclearprojects.com/ins/images/axis_big.png.
|
||||
|
||||
The positive X axis points ahead, the positive Y axis points to the right,
|
||||
and the positive Z axis points down. Rotations follow the right-hand rule,
|
||||
so clockwise rotation around the Z axis is positive.
|
||||
|
||||
Inputs smaller then 0.02 will be set to 0, and larger values will be scaled
|
||||
so that the full range is still used. This deadband value can be changed
|
||||
with SetDeadband().
|
||||
|
||||
RobotDrive porting guide:
|
||||
|
||||
* :meth:`tankDrive` is equivalent to ``RobotDrive.tankDrive``
|
||||
if a deadband of 0 is used.
|
||||
* :meth:`arcadeDrive` is equivalent to ``RobotDrive.arcadeDrive``
|
||||
if a deadband of 0 is used and the the rotation input is inverted,
|
||||
e.g. ``arcadeDrive(y, -rotation, squareInputs=False)``
|
||||
* :meth:`curvatureDrive` is similar in concept to
|
||||
``RobotDrive.drive`` with the addition of a quick turn
|
||||
mode. However, it is not designed to give exactly the same response.
|
||||
frc::DifferentialDrive::WheelSpeeds:
|
||||
attributes:
|
||||
left:
|
||||
right:
|
||||
38
wpilibc/src/main/python/semiwrap/drive/MecanumDrive.yml
Normal file
38
wpilibc/src/main/python/semiwrap/drive/MecanumDrive.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
extra_includes:
|
||||
- wpi/sendable/SendableBuilder.h
|
||||
- frc/motorcontrol/MotorController.h
|
||||
|
||||
classes:
|
||||
frc::MecanumDrive:
|
||||
force_type_casters:
|
||||
- units::radian_t
|
||||
ignored_bases:
|
||||
- wpi::SendableHelper<MecanumDrive>
|
||||
methods:
|
||||
MecanumDrive:
|
||||
overloads:
|
||||
MotorController&, MotorController&, MotorController&, MotorController&:
|
||||
keepalive:
|
||||
- [1, 2]
|
||||
- [1, 3]
|
||||
- [1, 4]
|
||||
- [1, 5]
|
||||
std::function<void (double)>, std::function<void (double)>, std::function<void (double)>, std::function<void (double)>:
|
||||
DriveCartesian:
|
||||
param_override:
|
||||
gyroAngle:
|
||||
default: frc::Rotation2d(0_rad)
|
||||
DrivePolar:
|
||||
DriveCartesianIK:
|
||||
param_override:
|
||||
gyroAngle:
|
||||
default: frc::Rotation2d(0_rad)
|
||||
StopMotor:
|
||||
GetDescription:
|
||||
InitSendable:
|
||||
frc::MecanumDrive::WheelSpeeds:
|
||||
attributes:
|
||||
frontLeft:
|
||||
frontRight:
|
||||
rearLeft:
|
||||
rearRight:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user