mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[cmd3,wpilib] Add CommandGamepad for V3 commands (#8311)
Also fix typo. Co-authored-by: Dan Katzuv <31829093+katzuv@users.noreply.github.com>
This commit is contained in:
@@ -107,20 +107,20 @@ BooleanEvent Gamepad::WestFace(EventLoop* loop) const {
|
||||
return BooleanEvent(loop, [this]() { return this->GetWestFaceButton(); });
|
||||
}
|
||||
|
||||
bool Gamepad::GetNorthFacenButton() const {
|
||||
return GetRawButton(Button::kNorthFacen);
|
||||
bool Gamepad::GetNorthFaceButton() const {
|
||||
return GetRawButton(Button::kNorthFace);
|
||||
}
|
||||
|
||||
bool Gamepad::GetNorthFacenButtonPressed() {
|
||||
return GetRawButtonPressed(Button::kNorthFacen);
|
||||
bool Gamepad::GetNorthFaceButtonPressed() {
|
||||
return GetRawButtonPressed(Button::kNorthFace);
|
||||
}
|
||||
|
||||
bool Gamepad::GetNorthFacenButtonReleased() {
|
||||
return GetRawButtonReleased(Button::kNorthFacen);
|
||||
bool Gamepad::GetNorthFaceButtonReleased() {
|
||||
return GetRawButtonReleased(Button::kNorthFace);
|
||||
}
|
||||
|
||||
BooleanEvent Gamepad::NorthFacen(EventLoop* loop) const {
|
||||
return BooleanEvent(loop, [this]() { return this->GetNorthFacenButton(); });
|
||||
BooleanEvent Gamepad::NorthFace(EventLoop* loop) const {
|
||||
return BooleanEvent(loop, [this]() { return this->GetNorthFaceButton(); });
|
||||
}
|
||||
|
||||
bool Gamepad::GetBackButton() const {
|
||||
@@ -512,8 +512,8 @@ void Gamepad::InitSendable(wpi::SendableBuilder& builder) {
|
||||
"WestFace", [this] { return GetButtonForSendable(Button::kWestFace); },
|
||||
nullptr);
|
||||
builder.AddBooleanProperty(
|
||||
"NorthFacen",
|
||||
[this] { return GetButtonForSendable(Button::kNorthFacen); }, nullptr);
|
||||
"NorthFace", [this] { return GetButtonForSendable(Button::kNorthFace); },
|
||||
nullptr);
|
||||
builder.AddBooleanProperty(
|
||||
"Back", [this] { return GetButtonForSendable(Button::kBack); }, nullptr);
|
||||
builder.AddBooleanProperty(
|
||||
|
||||
@@ -57,8 +57,8 @@ void GamepadSim::SetWestFaceButton(bool value) {
|
||||
SetRawButton(Gamepad::Button::kWestFace, value);
|
||||
}
|
||||
|
||||
void GamepadSim::SetNorthFacenButton(bool value) {
|
||||
SetRawButton(Gamepad::Button::kNorthFacen, value);
|
||||
void GamepadSim::SetNorthFaceButton(bool value) {
|
||||
SetRawButton(Gamepad::Button::kNorthFace, value);
|
||||
}
|
||||
|
||||
void GamepadSim::SetBackButton(bool value) {
|
||||
|
||||
Reference in New Issue
Block a user