Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #699 from etiennebeaulac/fix-differentialdrive-docs
Browse files Browse the repository at this point in the history
Fix DifferentialDrive docs examples
  • Loading branch information
virtuald committed Jan 26, 2022
2 parents 94ace25 + f44a66f commit a056891
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions gen/drive/DifferentialDrive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ classes:
:class:`MotorControllerGroup` instances as follows.
Four motor drivetrain::
import wpilib
import wpilib.drive
class Robot(wpilib.TimedRobot):
def robotInit(self):
Expand All @@ -52,9 +54,11 @@ classes:
self.rear_right = wpilib.PWMVictorSPX(4)
self.right = wpilib.MotorControllerGroup(self.front_right, self.rear_right)
self.drive = wpilib.DifferentialDrive(self.left, self.right)
self.drive = wpilib.drive.DifferentialDrive(self.left, self.right)
Six motor drivetrain::
import wpilib
import wpilib.drive
class Robot(wpilib.TimedRobot):
def robotInit(self):
Expand All @@ -68,7 +72,7 @@ classes:
self.rear_right = wpilib.PWMVictorSPX(6)
self.right = wpilib.MotorControllerGroup(self.front_right, self.mid_right, self.rear_right)
self.drive = wpilib.DifferentialDrive(self.left, self.right)
self.drive = wpilib.drive.DifferentialDrive(self.left, self.right)
A differential drive robot has left and right wheels separated by an
arbitrary width.
Expand Down

0 comments on commit a056891

Please sign in to comment.