Skip to content

Commit

Permalink
shooter: Use NeutralOut control signal for 0 speed (#176)
Browse files Browse the repository at this point in the history
This is clearer and more explicit than a 0V output.
  • Loading branch information
auscompgeek authored Mar 10, 2024
1 parent 17cfb9e commit ffbc668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/shooter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from rev import CANSparkMax
from ids import SparkMaxIds, TalonIds, DioChannels

from phoenix6.controls import VelocityVoltage, Follower, VoltageOut
from phoenix6.controls import VelocityVoltage, Follower, NeutralOut
from phoenix6.hardware import TalonFX
from phoenix6.configs import (
MotorOutputConfigs,
Expand Down Expand Up @@ -200,6 +200,6 @@ def execute(self) -> None:
self.inclinator.set(inclinator_speed)

if self.desired_flywheel_speed == 0:
self.flywheel_left.set_control(VoltageOut(0))
self.flywheel_left.set_control(NeutralOut())
else:
self.flywheel_left.set_control(VelocityVoltage(self.desired_flywheel_speed))

0 comments on commit ffbc668

Please sign in to comment.