Skip to content

Commit b988437

Browse files
committed
Fix formatting
1 parent c65f34e commit b988437

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

examples/get-set-params/robot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ def robotInit(self):
3030
# CANError.kOk
3131
# CANError.kError
3232
# CANError.kTimeout
33-
if self.motor.setIdleMode(rev.CANSparkMax.IdleMode.kCoast) != rev.REVLibError.kOk:
33+
if (
34+
self.motor.setIdleMode(rev.CANSparkMax.IdleMode.kCoast)
35+
!= rev.REVLibError.kOk
36+
):
3437
wpilib.SmartDashboard.putString("Idle Mode", "Error")
3538

3639
# Similarly, parameters will have a get() method which allows you to

tests/test_cansparkmax.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def test_current_limit():
2020

2121
sm.setSecondaryCurrentLimit(50)
2222

23-
# assert hal_data["CAN"]["sparkmax-1"]["currentChop"] == 50.0
24-
# assert isinstance(hal_data["CAN"]["sparkmax-1"]["currentChop"], float)
25-
# assert hal_data["CAN"]["sparkmax-1"]["currentChopCycles"] == 0
23+
# assert hal_data["CAN"]["sparkmax-1"]["currentChop"] == 50.0
24+
# assert isinstance(hal_data["CAN"]["sparkmax-1"]["currentChop"], float)
25+
# assert hal_data["CAN"]["sparkmax-1"]["currentChopCycles"] == 0
2626

2727
sm.setSecondaryCurrentLimit(52.5, 5)
2828

0 commit comments

Comments
 (0)