From af46034b7f87bd28b7bbf5177d80a6983fa1cde2 Mon Sep 17 00:00:00 2001 From: Thad House Date: Sat, 30 Dec 2023 07:16:59 -0800 Subject: [PATCH] [wpilib] Document only first party controllers are guaranteed to have correct mapping (#6112) --- wpilibc/src/main/native/include/frc/PS4Controller.h | 6 +++++- wpilibc/src/main/native/include/frc/PS5Controller.h | 6 +++++- wpilibc/src/main/native/include/frc/XboxController.h | 4 ++++ .../src/main/java/edu/wpi/first/wpilibj/PS4Controller.java | 4 ++++ .../src/main/java/edu/wpi/first/wpilibj/PS5Controller.java | 4 ++++ .../src/main/java/edu/wpi/first/wpilibj/XboxController.java | 4 ++++ 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/wpilibc/src/main/native/include/frc/PS4Controller.h b/wpilibc/src/main/native/include/frc/PS4Controller.h index 9487634e7cf..0a72f7fb727 100644 --- a/wpilibc/src/main/native/include/frc/PS4Controller.h +++ b/wpilibc/src/main/native/include/frc/PS4Controller.h @@ -11,10 +11,14 @@ namespace frc { /** * Handle input from PS4 controllers connected to the Driver Station. * - *

This class handles PS4 input that comes from the Driver Station. Each time + * This class handles PS4 input that comes from the Driver Station. Each time * a value is requested the most recent value is returned. There is a single * class instance for each controller and the mapping of ports to hardware * buttons depends on the code in the Driver Station. + * + * Only first party controllers from Sony are guaranteed to have the correct + * mapping, and only through the official NI DS. Sim is not guaranteed to have + * the same mapping, as well as any 3rd party controllers. */ class PS4Controller : public GenericHID { public: diff --git a/wpilibc/src/main/native/include/frc/PS5Controller.h b/wpilibc/src/main/native/include/frc/PS5Controller.h index 9b07bd99b19..15a0a0515e8 100644 --- a/wpilibc/src/main/native/include/frc/PS5Controller.h +++ b/wpilibc/src/main/native/include/frc/PS5Controller.h @@ -11,10 +11,14 @@ namespace frc { /** * Handle input from PS5 controllers connected to the Driver Station. * - *

This class handles PS5 input that comes from the Driver Station. Each time + * This class handles PS5 input that comes from the Driver Station. Each time * a value is requested the most recent value is returned. There is a single * class instance for each controller and the mapping of ports to hardware * buttons depends on the code in the Driver Station. + * + * Only first party controllers from Sony are guaranteed to have the correct + * mapping, and only through the official NI DS. Sim is not guaranteed to have + * the same mapping, as well as any 3rd party controllers. */ class PS5Controller : public GenericHID { public: diff --git a/wpilibc/src/main/native/include/frc/XboxController.h b/wpilibc/src/main/native/include/frc/XboxController.h index 3caba1ae6df..775e84d03b5 100644 --- a/wpilibc/src/main/native/include/frc/XboxController.h +++ b/wpilibc/src/main/native/include/frc/XboxController.h @@ -16,6 +16,10 @@ namespace frc { * value is requested the most recent value is returned. There is a single class * instance for each controller and the mapping of ports to hardware buttons * depends on the code in the Driver Station. + * + * Only first party controllers from Microsoft are guaranteed to have the + * correct mapping, and only through the official NI DS. Sim is not guaranteed + * to have the same mapping, as well as any 3rd party controllers. */ class XboxController : public GenericHID { public: diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/PS4Controller.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/PS4Controller.java index ccb236e2356..3958b695f1c 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/PS4Controller.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/PS4Controller.java @@ -15,6 +15,10 @@ *

This class handles PS4 input that comes from the Driver Station. Each time a value is * requested the most recent value is returned. There is a single class instance for each controller * and the mapping of ports to hardware buttons depends on the code in the Driver Station. + * + *

Only first party controllers from Sony are guaranteed to have the correct mapping, and only + * through the official NI DS. Sim is not guaranteed to have the same mapping, as well as any 3rd + * party controllers. */ public class PS4Controller extends GenericHID { /** diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/PS5Controller.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/PS5Controller.java index 2802d2c80c8..b95ce022f65 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/PS5Controller.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/PS5Controller.java @@ -13,6 +13,10 @@ *

This class handles PS5 input that comes from the Driver Station. Each time a value is * requested the most recent value is returned. There is a single class instance for each controller * and the mapping of ports to hardware buttons depends on the code in the Driver Station. + * + *

Only first party controllers from Sony are guaranteed to have the correct mapping, and only + * through the official NI DS. Sim is not guaranteed to have the same mapping, as well as any 3rd + * party controllers. */ public class PS5Controller extends GenericHID { /** diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/XboxController.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/XboxController.java index c346ae3c825..6e3a0dfd545 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/XboxController.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/XboxController.java @@ -15,6 +15,10 @@ *

This class handles Xbox input that comes from the Driver Station. Each time a value is * requested the most recent value is returned. There is a single class instance for each controller * and the mapping of ports to hardware buttons depends on the code in the Driver Station. + * + *

Only first party controllers from Microsoft are guaranteed to have the correct mapping, and + * only through the official NI DS. Sim is not guaranteed to have the same mapping, as well as any + * 3rd party controllers. */ public class XboxController extends GenericHID { /** Represents a digital button on an XboxController. */