mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
Merge branch 'main' into 2027
This commit is contained in:
@@ -96,7 +96,7 @@ void {{ ConsoleName }}Controller::InitSendable(wpi::SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("HID");
|
||||
builder.PublishConstString("ControllerType", "{{ ConsoleName }}");
|
||||
{%- for trigger in triggers %}
|
||||
builder.AddDoubleProperty("{{ capitalize_first(trigger.name) }}", [this] { return Get{{ capitalize_first(trigger.name) }}Axis(); }, nullptr);
|
||||
builder.AddDoubleProperty("{{ capitalize_first(trigger.name) }} Axis", [this] { return Get{{ capitalize_first(trigger.name) }}Axis(); }, nullptr);
|
||||
{%- endfor -%}
|
||||
{% for stick in sticks %}
|
||||
builder.AddDoubleProperty("{{ stick.NameParts|map("capitalize")|join }}", [this] { return Get{{ stick.NameParts|map("capitalize")|join }}(); }, nullptr);
|
||||
|
||||
@@ -280,8 +280,8 @@ bool PS4Controller::GetTouchpadReleased() {
|
||||
void PS4Controller::InitSendable(wpi::SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("HID");
|
||||
builder.PublishConstString("ControllerType", "PS4");
|
||||
builder.AddDoubleProperty("L2", [this] { return GetL2Axis(); }, nullptr);
|
||||
builder.AddDoubleProperty("R2", [this] { return GetR2Axis(); }, nullptr);
|
||||
builder.AddDoubleProperty("L2 Axis", [this] { return GetL2Axis(); }, nullptr);
|
||||
builder.AddDoubleProperty("R2 Axis", [this] { return GetR2Axis(); }, nullptr);
|
||||
builder.AddDoubleProperty("LeftX", [this] { return GetLeftX(); }, nullptr);
|
||||
builder.AddDoubleProperty("LeftY", [this] { return GetLeftY(); }, nullptr);
|
||||
builder.AddDoubleProperty("RightX", [this] { return GetRightX(); }, nullptr);
|
||||
|
||||
@@ -280,8 +280,8 @@ bool PS5Controller::GetTouchpadReleased() {
|
||||
void PS5Controller::InitSendable(wpi::SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("HID");
|
||||
builder.PublishConstString("ControllerType", "PS5");
|
||||
builder.AddDoubleProperty("L2", [this] { return GetL2Axis(); }, nullptr);
|
||||
builder.AddDoubleProperty("R2", [this] { return GetR2Axis(); }, nullptr);
|
||||
builder.AddDoubleProperty("L2 Axis", [this] { return GetL2Axis(); }, nullptr);
|
||||
builder.AddDoubleProperty("R2 Axis", [this] { return GetR2Axis(); }, nullptr);
|
||||
builder.AddDoubleProperty("LeftX", [this] { return GetLeftX(); }, nullptr);
|
||||
builder.AddDoubleProperty("LeftY", [this] { return GetLeftY(); }, nullptr);
|
||||
builder.AddDoubleProperty("RightX", [this] { return GetRightX(); }, nullptr);
|
||||
|
||||
@@ -244,8 +244,8 @@ bool XboxController::GetRightBumperReleased() {
|
||||
void XboxController::InitSendable(wpi::SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("HID");
|
||||
builder.PublishConstString("ControllerType", "Xbox");
|
||||
builder.AddDoubleProperty("LeftTrigger", [this] { return GetLeftTriggerAxis(); }, nullptr);
|
||||
builder.AddDoubleProperty("RightTrigger", [this] { return GetRightTriggerAxis(); }, nullptr);
|
||||
builder.AddDoubleProperty("LeftTrigger Axis", [this] { return GetLeftTriggerAxis(); }, nullptr);
|
||||
builder.AddDoubleProperty("RightTrigger Axis", [this] { return GetRightTriggerAxis(); }, nullptr);
|
||||
builder.AddDoubleProperty("LeftX", [this] { return GetLeftX(); }, nullptr);
|
||||
builder.AddDoubleProperty("RightX", [this] { return GetRightX(); }, nullptr);
|
||||
builder.AddDoubleProperty("LeftY", [this] { return GetLeftY(); }, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user