mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
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>
17 lines
506 B
Java
17 lines
506 B
Java
// Copyright (c) FIRST and other WPILib contributors.
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
// the WPILib BSD license file in the root directory of this project.
|
|
|
|
package org.wpilib.driverstation;
|
|
|
|
/** Interface for device wrappers backed by a GenericHID. */
|
|
@SuppressWarnings("PMD.ImplicitFunctionalInterface")
|
|
public interface HIDDevice {
|
|
/**
|
|
* Get the underlying GenericHID object.
|
|
*
|
|
* @return the wrapped GenericHID object
|
|
*/
|
|
GenericHID getHID();
|
|
}
|