From 6205363b9a9fdb73c55e71d140eafa6051f00428 Mon Sep 17 00:00:00 2001 From: ErikCald Date: Thu, 29 Dec 2022 19:59:37 -0500 Subject: [PATCH] Fixing BrakeModeDisabled.java --- .../java/frc/robot/commands/BrakeModeDisabled.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/frc/robot/commands/BrakeModeDisabled.java b/src/main/java/frc/robot/commands/BrakeModeDisabled.java index 0b630d3..be48c4c 100644 --- a/src/main/java/frc/robot/commands/BrakeModeDisabled.java +++ b/src/main/java/frc/robot/commands/BrakeModeDisabled.java @@ -50,6 +50,13 @@ public boolean runsWhenDisabled() { public void initialize() { m_timer.reset(); m_timer.start(); + + if (SubsystemChecker.canSubsystemConstruct(SubsystemType.DiffNeoSubsystem)) { + DiffNeoSubsystem.getInstance().setIdleMode(IdleMode.kBrake); + + } else if (SubsystemChecker.canSubsystemConstruct(SubsystemType.DiffTalonSubsystem)) { + DiffTalonSubsystem.getInstance().setNeutralMode(NeutralMode.Brake); + } } // Called once the command ends or is interrupted. @@ -58,11 +65,10 @@ public void end(boolean interrupted) { m_timer.stop(); if (SubsystemChecker.canSubsystemConstruct(SubsystemType.DiffNeoSubsystem)) { - DiffNeoSubsystem.getInstance().setIdleMode(IdleMode.kBrake); + DiffNeoSubsystem.getInstance().setIdleMode(IdleMode.kCoast); } else if (SubsystemChecker.canSubsystemConstruct(SubsystemType.DiffTalonSubsystem)) { - DiffTalonSubsystem.getInstance().setNeutralMode(NeutralMode.Brake); - + DiffTalonSubsystem.getInstance().setNeutralMode(NeutralMode.Coast); } }