MonoBrick EV3 Firmware
Public Member Functions | Properties | List of all members
MonoBrickFirmware.Movement.MotorSync Class Reference

Class for synchronizing two motors More...

Inheritance diagram for MonoBrickFirmware.Movement.MotorSync:
MonoBrickFirmware.Movement.MotorBase

Public Member Functions

 MotorSync (OutputBitfield bitfield)
 Initializes a new instance of the MonoBrickFirmware.IO.MotorSync class. More...
 
 MotorSync (MotorPort port1, MotorPort port2)
 Initializes a new instance of the MonoBrickFirmware.IO.MotorSync class. More...
 
WaitHandle StepSync (sbyte speed, Int16 turnRatio, UInt32 steps, bool brake)
 Syncronise steps between two motors More...
 
WaitHandle TimeSync (sbyte speed, Int16 turnRatio, UInt32 timeInMs, bool brake)
 Syncronise time between two motors More...
 
void SetSpeed (sbyte speed, Int16 turnRatio)
 Move both motors with the same speed More...
 
- Public Member Functions inherited from MonoBrickFirmware.Movement.MotorBase
bool IsRunning ()
 Determines whether the motor(s) are running. More...
 
virtual void Brake ()
 Brake the motor (is still on but does not move) More...
 
virtual void Off ()
 Turn the motor off More...
 
virtual void SetPower (sbyte power)
 Sets the power of the motor. More...
 

Properties

new OutputBitfield BitField [get, set]
 Gets or sets the motor bit field. More...
 
- Properties inherited from MonoBrickFirmware.Movement.MotorBase
List< MotorPortPortList [get, set]
 Gets or sets the motor port this is set by the bitfield. Do not set this use the bitfield property instead More...
 
OutputBitfield BitField [get, set]
 Gets or sets the bit field. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MonoBrickFirmware.Movement.MotorBase
void CancelPolling ()
 
WaitHandle WaitForMotorsToStop ()
 
WaitHandle WaitForMotorsToStartAndStop ()
 

Detailed Description

Class for synchronizing two motors

Constructor & Destructor Documentation

MonoBrickFirmware.Movement.MotorSync.MotorSync ( OutputBitfield  bitfield)
inline

Initializes a new instance of the MonoBrickFirmware.IO.MotorSync class.

Parameters
bitfieldBitfield.
MonoBrickFirmware.Movement.MotorSync.MotorSync ( MotorPort  port1,
MotorPort  port2 
)
inline

Initializes a new instance of the MonoBrickFirmware.IO.MotorSync class.

Parameters
port1Port1.
port2Port2.

Member Function Documentation

void MonoBrickFirmware.Movement.MotorSync.SetSpeed ( sbyte  speed,
Int16  turnRatio 
)
inline

Move both motors with the same speed

Parameters
speedSpeed of the motors.
turnRatioTurn ratio (-200 to 200).
WaitHandle MonoBrickFirmware.Movement.MotorSync.StepSync ( sbyte  speed,
Int16  turnRatio,
UInt32  steps,
bool  brake 
)
inline

Syncronise steps between two motors

Parameters
speedSpeed of the motors.
turnRatioTurn ratio (-200 to 200).
stepsSteps to move.
brakeIf set to true motors will brake when done otherwise off.
WaitHandle MonoBrickFirmware.Movement.MotorSync.TimeSync ( sbyte  speed,
Int16  turnRatio,
UInt32  timeInMs,
bool  brake 
)
inline

Syncronise time between two motors

Parameters
speedSpeed of the motors.
turnRatioTurn ratio (-200 to 200).
timeInMsTime in ms to move.
brakeIf set to true motors will brake when done otherwise off.

Property Documentation

new OutputBitfield MonoBrickFirmware.Movement.MotorSync.BitField
getset

Gets or sets the motor bit field.

The bit field.


The documentation for this class was generated from the following file: