[hal,wpilib] Add Touchpad support (#8401)

This commit is contained in:
Thad House
2025-11-21 13:57:11 -08:00
committed by GitHub
parent 8546d301e3
commit 32fc543dc8
34 changed files with 1319 additions and 437 deletions

View File

@@ -13,4 +13,18 @@ struct format_descriptor<HAL_JoystickPOV> {
static std::string format() { return std::string(1, c); }
};
}
template <>
struct format_descriptor<HAL_JoystickTouchpad> {
static constexpr const char c = 'B';
static constexpr const char value[2] = {c, '\0'};
static std::string format() { return std::string(1, c); }
};
template <>
struct format_descriptor<HAL_JoystickTouchpadFinger> {
static constexpr const char c = 'B';
static constexpr const char value[2] = {c, '\0'};
static std::string format() { return std::string(1, c); }
};
}

View File

@@ -41,3 +41,4 @@ functions:
HAL_ObserveUserProgramTeleop:
HAL_ObserveUserProgramTest:
HAL_GetJoystickIsGamepad:
HAL_GetJoystickTouchpads:

View File

@@ -49,3 +49,16 @@ classes:
replayNumber:
gameSpecificMessage:
gameSpecificMessageSize:
HAL_JoystickTouchpadFinger:
attributes:
down:
x:
y:
HAL_JoystickTouchpad:
attributes:
count:
fingers:
HAL_JoystickTouchpads:
attributes:
count:
touchpads:

View File

@@ -116,3 +116,10 @@ functions:
HALSIM_SetJoystickPOVsAvailable:
HALSIM_SetJoystickButtonsAvailable:
HALSIM_GetJoystickAvailables:
HALSIM_RegisterJoystickTouchpadsCallback:
ignore: true
HALSIM_CancelJoystickTouchpadsCallback:
HALSIM_GetJoystickTouchpads:
HALSIM_SetJoystickTouchpads:
HALSIM_SetJoystickTouchpadCounts:
HALSIM_SetJoystickTouchpadFinger: