Skip to content

Commit 721c682

Browse files
committed
Fix some motor alignment value references
1 parent 9e51c47 commit 721c682

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

python/ArcadeDrive/robot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This is a demo program for arcade drive in Python with Phoenix 6
44
"""
55
import wpilib
6-
from phoenix6 import CANBus, configs, controls, hardware
6+
from phoenix6 import CANBus, configs, controls, hardware, signals
77

88

99
class MyRobot(wpilib.TimedRobot):
@@ -30,10 +30,10 @@ def robotInit(self):
3030
self.front_right_motor.configurator.apply(cfg)
3131

3232
# Configure the rear motors to follow the front motors
33-
follow_left_request = controls.Follower(0, False)
33+
follow_left_request = controls.Follower(0, signals.MotorAlignmentValue.ALIGNED)
3434
self.rear_left_motor.set_control(follow_left_request)
3535

36-
follow_right_request = controls.Follower(2, False)
36+
follow_right_request = controls.Follower(2, signals.MotorAlignmentValue.ALIGNED)
3737
self.rear_right_motor.set_control(follow_right_request)
3838

3939
# Keep a reference to the DutyCycleOut control request to update periodically

python/VelocityClosedLoop/robot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55
import wpilib
66
from wpilib import Timer, XboxController
7-
from phoenix6 import CANBus, configs, controls, hardware, StatusCode
7+
from phoenix6 import CANBus, configs, controls, hardware, StatusCode, signals
88

99
class MyRobot(wpilib.TimedRobot):
1010
"""
@@ -61,7 +61,7 @@ def robotInit(self):
6161
if not status.is_ok():
6262
print(f"Could not apply configs, error code: {status.name}")
6363

64-
self.talonfx_follower.set_control(controls.Follower(self.talonfx.device_id, False))
64+
self.talonfx_follower.set_control(controls.Follower(self.talonfx.device_id, signals.MotorAlignmentValue.ALIGNED))
6565

6666
def teleopInit(self):
6767
pass

0 commit comments

Comments
 (0)