Skip to content

Commit d3961e8

Browse files
authored
Correct Mecanum axes in example (#1676)
1 parent 4a4e278 commit d3961e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/docs/software/hardware-apis/motors/wpi-drive-classes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,15 @@ The MecanumDrive class contains two different default modes of driving your robo
288288
.. code-tab:: java
289289
290290
public void teleopPeriodic() {
291-
m_robotDrive.driveCartesian(m_stick.getX(), -m_stick.getY(), m_stick.getZ());
292-
m_robotDrive.drivePolar(m_stick.getX(), -m_stick.getY(), m_stick.getZ());
291+
m_robotDrive.driveCartesian(-m_stick.getY(), m_stick.getX(), m_stick.getZ());
292+
m_robotDrive.drivePolar(-m_stick.getY(), m_stick.getX(), m_stick.getZ());
293293
}
294294
295295
.. code-tab:: c++
296296
297297
void TeleopPeriodic() override {
298-
m_robotDrive.driveCartesian(m_stick.GetX(), -m_stick.GetY(), m_stick.GetZ());
299-
m_robotDrive.drivePolar(m_stick.GetX(), -m_stick.GetY(), m_stick.GetZ());
298+
m_robotDrive.driveCartesian(-m_stick.GetY(), m_stick.GetX(), m_stick.GetZ());
299+
m_robotDrive.drivePolar(-m_stick.GetY(), m_stick.GetX(), m_stick.GetZ());
300300
}
301301
302302
Field-Oriented Driving

0 commit comments

Comments
 (0)