Hey everyone!
We’re new to the command based robot programming type, and we are testing the Trigger onFalse and whileTrue commands. From what we can tell, onFalse should only be called when the JoystickButton is released in this piece of code, but it is repeatedly being called. Do you guys know how to make it only call once when the button is released?
arm.setArmOneOutput(-m_armController.getLeftY());
})).onFalse(new RunCommand(()->{System.out.println("stopping");}));
(new JoystickButton(m_armController, 10)).whileTrue(new RunCommand(()->{
arm.setArmTwoOutput(m_armController.getRightY());
})).onFalse(new RunCommand(()->{System.out.println("stopping");}));
Thanks!