Skip to content

Commit

Permalink
increased amp ovr, changed shoot leds
Browse files Browse the repository at this point in the history
  • Loading branch information
coder4003 committed Mar 15, 2024
1 parent 9d1736b commit 736018d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions commands/set_amp_override.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def __init__(self, amp: Amp, dir) -> None:
def initialize(self) -> None:
pass


def execute(self) -> None:
#Rate of change set to 0.25 from 0.1
if self.dir == 1:
self.amp.height += 0.25
elif self.dir == -1:
Expand Down
5 changes: 3 additions & 2 deletions robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ def configure_commander_controls(self):
RBM.amp_lift_trap_c2)
amp_set_height_amp.onTrue(SetAmpHeight(self.amp, self.amp.Height.TRAP))

amp_override_up = JoystickButton(self.commander_joystick1,
amp_override_up = JoystickButton(self.commander_joystick2,
RBM.amp_override_up_c2)
amp_override_up.whileTrue(SetAmpOverride(self.amp, self.amp.dir_up))

amp_override_down = JoystickButton(self.commander_joystick1,
amp_override_down = JoystickButton(self.commander_joystick2,
RBM.amp_override_down_c2)
amp_override_down.whileTrue(SetAmpOverride(self.amp, self.amp.dir_down))

Expand Down Expand Up @@ -179,6 +179,7 @@ def configure_commander_controls(self):
shooter_spin.onFalse(InstantCommand(self.shooter.spin_down))

def robotPeriodic(self) -> None:
SmartDashboard.putNumber("Amp Height", self.amp.get_height())
if DriverStation.isDisabled():
self.leds.set_connect_status()

Expand Down
1 change: 1 addition & 0 deletions subsystems/amp.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ def periodic(self) -> None:
limit_reverse_motion=True
).with_limit_reverse_motion(not self.limit_switch.get())
self.lift_motor.set_control(self.request.with_position(self.height))

2 changes: 1 addition & 1 deletion subsystems/leds.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def shooter_empty(self):
pass

def shooter_running(self):
self.set_color(RED, True)
self.set_color(CYAN, True)
pass

def shooter_up_to_speed(self):
Expand Down

0 comments on commit 736018d

Please sign in to comment.