limitMotorPercent

float limitMotorPercent(float percent)

Limits the given motor percent to be within operating range

Return

The percent within operating range for the motor.

Parameters
  • percent: The percent to limit.

Example

1
float limitedPercent = limitMotorPercent(120.0);

120% will be limited and 100.0 will be returned.

Function Variables

No function variables are used.