Home→Forums→MonoBrick EV3 Firmware→Motor Control not behaving→Reply To: Motor Control not behaving
Rich Champeaux
So I used Resharper to decompile MonoBrickFirmware.dll and I’ve figured out why MotorSync.On(speed, turnRatio) never returns. It’s calling the On(speed, turnRatio, degrees, brake, waitForCompletion) overload and is passing “true” for waitForCompletion. Therefore it will never return.
public void On(sbyte speed, short turnRatio)
{
this.On(speed, turnRatio, 0U, false, true);
}
public void On(sbyte speed, short turnRatio, uint degrees, bool brake, bool waitForCompletion = true)
{
this.StepSync(speed, turnRatio, degrees, brake, waitForCompletion);
if (!waitForCompletion)
return;
this.WaitForMotorToStop();
}
So, I can just use the 5 parameter overload instead of the two parameter one.
- This reply was modified 10 years, 11 months ago by Rich Champeaux.
Follow