mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib,cmd] Cache HID wrappers (#8970)
Store DriverStation-owned GenericHID and Gamepad instances in Java and C++, and expose the cached objects to Python bindings. Move hand-written command gamepad and joystick wrappers to compose cached CommandGenericHID instances plus typed HID wrappers, including a Python CommandGamepad. This will let us remove UserControls, while helping ensure that we don't have state smashing between GenericHID objects. Another bonus is without inheritance, intellisense will no longer show a bunch of annoying methods, and instead just what actually exists. --------- Co-authored-by: Peter Johnson <johnson.peter@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from .commandgenerichid import CommandGenericHID
|
||||
from .commandgamepad import CommandGamepad
|
||||
from .commandjoystick import CommandJoystick
|
||||
from .commandnidsps4controller import CommandNiDsPS4Controller
|
||||
from .commandnidsxboxcontroller import CommandNiDsXboxController
|
||||
@@ -10,6 +11,7 @@ from .trigger import Trigger
|
||||
__all__ = [
|
||||
"Trigger",
|
||||
"CommandGenericHID",
|
||||
"CommandGamepad",
|
||||
"CommandJoystick",
|
||||
"CommandNiDsPS4Controller",
|
||||
"CommandNiDsXboxController",
|
||||
|
||||
Reference in New Issue
Block a user