AForge.Robotics.Lego.RCXBrick.SetMotorDirection C# (CSharp) Method

SetMotorDirection() public method

Set direction of specified motors.
public SetMotorDirection ( Motor motors, bool isForward ) : bool
motors Motor Motors to set direction of.
isForward bool True to set forward direction, false to set backward.
return bool
        public bool SetMotorDirection( Motor motors, bool isForward )
        {
            return SendCommand( new byte[] { (byte) RCXCommand.SetMotorDirection,
                (byte) ( (byte) motors | ( isForward ? 0x80 : 0 ) ) }, new byte[1], 1 );
        }