Skip to content

Commit eef08fc

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 0788848 + 72128af commit eef08fc

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

src/guide/opmodes/teleop.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ override fun onStartButtonPressed() {
108108
frontRightMotor,
109109
backLeftMotor,
110110
backRightMotor,
111-
Gamepads.gamepad1.leftStickY,
111+
-Gamepads.gamepad1.leftStickY,
112112
Gamepads.gamepad1.leftStickX,
113113
Gamepads.gamepad1.rightStickX
114114
)
@@ -132,7 +132,7 @@ public void onStartButtonPressed() {
132132
frontRightMotor,
133133
backLeftMotor,
134134
backRightMotor,
135-
Gamepads.gamepad1().leftStickY(),
135+
Gamepads.gamepad1().leftStickY().negate(),
136136
Gamepads.gamepad1().leftStickX(),
137137
Gamepads.gamepad1().rightStickX()
138138
);
@@ -306,7 +306,7 @@ class TeleOpProgram : NextFTCOpMode() {
306306
frontRightMotor,
307307
backLeftMotor,
308308
backRightMotor,
309-
Gamepads.gamepad1.leftStickY,
309+
-Gamepads.gamepad1.leftStickY,
310310
Gamepads.gamepad1.leftStickX,
311311
Gamepads.gamepad1.rightStickX
312312
)
@@ -350,7 +350,7 @@ public class TeleOpProgram extends NextFTCOpMode {
350350
frontRightMotor,
351351
backLeftMotor,
352352
backRightMotor,
353-
Gamepads.gamepad1().leftStickY(),
353+
Gamepads.gamepad1().leftStickY().negate(),
354354
Gamepads.gamepad1().leftStickX(),
355355
Gamepads.gamepad1().rightStickX()
356356
);

src/nextftc/hardware/drivetrain-commands/holonomic.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ driverControlled = MecanumDriverControlled(
7979
frontRightMotor,
8080
backLeftMotor,
8181
backRightMotor,
82-
Gamepads.gamepad1.leftStickY,
82+
-Gamepads.gamepad1.leftStickY,
8383
Gamepads.gamepad1.leftStickX,
8484
Gamepads.gamepad1.rightStickX
8585
)
@@ -94,7 +94,7 @@ driverControlled = new MecanumDriverControlled(
9494
frontRightMotor,
9595
backLeftMotor,
9696
backRightMotor,
97-
Gamepads.gamepad1().leftStickY(),
97+
Gamepads.gamepad1().leftStickY().negate(),
9898
Gamepads.gamepad1().leftStickX(),
9999
Gamepads.gamepad1().rightStickX()
100100
);
@@ -114,7 +114,7 @@ driverControlled = MecanumDriverControlled(
114114
frontRightMotor,
115115
backLeftMotor,
116116
backRightMotor,
117-
Gamepads.gamepad1.leftStickY,
117+
-Gamepads.gamepad1.leftStickY,
118118
Gamepads.gamepad1.leftStickX,
119119
Gamepads.gamepad1.rightStickX,
120120
HolonomicMode.FieldCentric(imu)
@@ -130,15 +130,22 @@ driverControlled = new MecanumDriverControlled(
130130
frontRightMotor,
131131
backLeftMotor,
132132
backRightMotor,
133-
Gamepads.gamepad1().leftStickY(),
133+
Gamepads.gamepad1().leftStickY().negate(),
134134
Gamepads.gamepad1().leftStickX(),
135135
Gamepads.gamepad1().rightStickX(),
136136
new HolonomicMode.FieldCentric(imu)
137137
);
138138
driverControlled.schedule();
139139
```
140140

141+
> [!NOTE]
142+
> In both robot-centric and field-centric modes we negate `leftStickY`. This is
143+
> a common FTC convention because gamepads report a negative Y when the stick is
144+
> pushed forward and a positive Y when it’s pulled back. Use the `.negate()`
145+
> helper (for example `Gamepads.gamepad1.leftStickY.negate()`) to apply this
146+
> adjustment.
147+
141148
:::
142149

143150
That's it! Now you are able to control your holonomic drivetrain using a
144-
gamepad.
151+
gamepad.

0 commit comments

Comments
 (0)