|
Ramping up motor tied to a button
Currently, we have a command tied to a button that will activate a motor, but we want to be able to gradually get that motor up to 100%. The code so far looks like:
void RaiseArm::Execute() {
while(Power < 1)
{
arm->TurnOn(Power);
Power += MOTOR_RAMP_UP_AMT;
}
the command is called in OI via a WhileHeld(). Is there a better way to do this?
|