[copybara] mostrobotpy to allwpilib (#8503)

Resync with `mostrobotpy`

This mostly involves the big "ignore almost everything in the HAL
project" and some fixups for the Addressable LED classes.

Required two small hand fixes to get it building over here with bazel,
and with more compiler warnings on.

I also manually zeroed out the `repo_url` field in the toml files to
avoid unnecessary churn whenever it goes from a release build to a
development build. I already did this with `version` field in there, and
will do a follow up PR that updates the copybara script to do it
automatically.

---------

Co-authored-by: Default email <default@default.com>
This commit is contained in:
PJ Reiniger
2025-12-31 12:06:01 -05:00
committed by GitHub
parent bdc9391738
commit 40fb9ff562
233 changed files with 1796 additions and 4455 deletions

View File

@@ -1,8 +1,5 @@
from . import _init__wpilib
# TODO: robotpy-build subpackage bug
from wpimath._controls._controls import trajectory as _
# autogenerated by 'semiwrap create-imports wpilib wpilib._wpilib'
from ._wpilib import (
ADXL345_I2C,
@@ -12,18 +9,23 @@ from ._wpilib import (
AnalogEncoder,
AnalogInput,
AnalogPotentiometer,
BooleanEvent,
CAN,
CANStatus,
Compressor,
CompressorConfigType,
CounterBase,
DataLogManager,
DifferentialDrive,
DigitalInput,
DigitalOutput,
DoubleSolenoid,
DriverStation,
DutyCycle,
DutyCycleEncoder,
EdgeConfiguration,
Encoder,
EventLoop,
ExpansionHub,
ExpansionHubMotor,
ExpansionHubPidConstants,
@@ -31,18 +33,22 @@ from ._wpilib import (
Field2d,
FieldObject2d,
Gamepad,
GenericHID,
I2C,
IterativeRobotBase,
Joystick,
Koors40,
LEDPattern,
LinearOpMode,
MecanumDrive,
Mechanism2d,
MechanismLigament2d,
MechanismObject2d,
MechanismRoot2d,
MotorController,
MotorControllerGroup,
MotorSafety,
NetworkBooleanEvent,
Notifier,
OnboardIMU,
OpMode,
@@ -66,6 +72,7 @@ from ._wpilib import (
Preferences,
RobotBase,
RobotController,
RobotDriveBase,
RuntimeType,
SendableBuilderImpl,
SendableChooser,
@@ -79,11 +86,13 @@ from ._wpilib import (
SparkMini,
StadiaController,
SystemServer,
Tachometer,
Talon,
TimedRobot,
Timer,
TimesliceRobot,
Tracer,
UpDownCounter,
VictorSP,
Watchdog,
XboxController,
@@ -104,18 +113,23 @@ __all__ = [
"AnalogEncoder",
"AnalogInput",
"AnalogPotentiometer",
"BooleanEvent",
"CAN",
"CANStatus",
"Compressor",
"CompressorConfigType",
"CounterBase",
"DataLogManager",
"DifferentialDrive",
"DigitalInput",
"DigitalOutput",
"DoubleSolenoid",
"DriverStation",
"DutyCycle",
"DutyCycleEncoder",
"EdgeConfiguration",
"Encoder",
"EventLoop",
"ExpansionHub",
"ExpansionHubMotor",
"ExpansionHubPidConstants",
@@ -123,18 +137,22 @@ __all__ = [
"Field2d",
"FieldObject2d",
"Gamepad",
"GenericHID",
"I2C",
"IterativeRobotBase",
"Joystick",
"Koors40",
"LEDPattern",
"LinearOpMode",
"MecanumDrive",
"Mechanism2d",
"MechanismLigament2d",
"MechanismObject2d",
"MechanismRoot2d",
"MotorController",
"MotorControllerGroup",
"MotorSafety",
"NetworkBooleanEvent",
"Notifier",
"OnboardIMU",
"OpMode",
@@ -158,6 +176,7 @@ __all__ = [
"Preferences",
"RobotBase",
"RobotController",
"RobotDriveBase",
"RuntimeType",
"SendableBuilderImpl",
"SendableChooser",
@@ -171,11 +190,13 @@ __all__ = [
"SparkMini",
"StadiaController",
"SystemServer",
"Tachometer",
"Talon",
"TimedRobot",
"Timer",
"TimesliceRobot",
"Tracer",
"UpDownCounter",
"VictorSP",
"Watchdog",
"XboxController",

View File

@@ -1,6 +0,0 @@
from . import _init__counter
# autogenerated by 'semiwrap create-imports wpilib.counter wpilib.counter._counter'
from ._counter import EdgeConfiguration, Tachometer, UpDownCounter
__all__ = ["EdgeConfiguration", "Tachometer", "UpDownCounter"]

View File

@@ -1,7 +0,0 @@
#include "semiwrap_init.wpilib.counter._counter.hpp"
SEMIWRAP_PYBIND11_MODULE(m)
{
initWrapper(m);
}

View File

@@ -1,8 +0,0 @@
from . import _init__drive
# autogenerated by 'semiwrap create-imports wpilib.drive wpilib.drive._drive'
from ._drive import DifferentialDrive, MecanumDrive, RobotDriveBase
__all__ = ["DifferentialDrive", "MecanumDrive", "RobotDriveBase"]
del _init__drive

View File

@@ -1,7 +0,0 @@
#include "semiwrap_init.wpilib.drive._drive.hpp"
SEMIWRAP_PYBIND11_MODULE(m)
{
initWrapper(m);
}

View File

@@ -1,6 +0,0 @@
from . import _init__event
# autogenerated by 'semiwrap create-imports wpilib.event wpilib.event._event'
from ._event import BooleanEvent, EventLoop, NetworkBooleanEvent
__all__ = ["BooleanEvent", "EventLoop", "NetworkBooleanEvent"]

View File

@@ -1,7 +0,0 @@
#include "semiwrap_init.wpilib.event._event.hpp"
SEMIWRAP_PYBIND11_MODULE(m)
{
initWrapper(m);
}

View File

@@ -1,4 +0,0 @@
# autogenerated by 'semiwrap create-imports wpilib.interfaces wpilib._wpilib.interfaces'
from .._wpilib.interfaces import CounterBase, GenericHID, MotorController
__all__ = ["CounterBase", "GenericHID", "MotorController"]

View File

@@ -1,8 +1,5 @@
from . import _init__simulation
# needed for dcmotor return value, TODO fix in robotpy-build
from wpimath._controls._controls import plant as _
# autogenerated by 'semiwrap create-imports wpilib.simulation wpilib.simulation._simulation'
from ._simulation import (
ADXL345Sim,