C# 클래스 BrickPi.Movement.Motor

This class contains a motor object and all needed functions and properties to pilot it
상속: INotifyPropertyChanged
파일 보기 프로젝트 열기: Ellerbach/BrickPi

공개 메소드들

메소드 설명
GetSpeed ( ) : int

Get the speed

GetTachoCount ( ) : Int32

Gets the tacho count

Motor ( BrickPortMotor port ) : System

Create a motor

Motor ( BrickPortMotor port, int timeout ) : System
SetPolarity ( Polarity polarity ) : void

Change the polatity of the motor

SetSpeed ( int speed ) : void

Set the speed of the motor

SetTachoCount ( Int32 position ) : void

Set Tachometer encoder offset Use this to reset or setup a specific position

Start ( ) : void

Start the motor

Start ( int speed ) : void

Start with the specified speed

Stop ( ) : void

Stop the Motor

UpdateSensor ( object state ) : void

Update the sensor and this will raised an event on the interface

비공개 메소드들

메소드 설명
OnPropertyChanged ( string name ) : void
StopTimerInternal ( ) : void

메소드 상세

GetSpeed() 공개 메소드

Get the speed
public GetSpeed ( ) : int
리턴 int

GetTachoCount() 공개 메소드

Gets the tacho count
public GetTachoCount ( ) : Int32
리턴 System.Int32

Motor() 공개 메소드

Create a motor
public Motor ( BrickPortMotor port ) : System
port BrickPortMotor Motor port
리턴 System

Motor() 공개 메소드

public Motor ( BrickPortMotor port, int timeout ) : System
port BrickPortMotor
timeout int
리턴 System

SetPolarity() 공개 메소드

Change the polatity of the motor
public SetPolarity ( Polarity polarity ) : void
polarity Polarity Polarity of the motor, backward, forward or opposite
리턴 void

SetSpeed() 공개 메소드

Set the speed of the motor
public SetSpeed ( int speed ) : void
speed int speed is between -255 and +255
리턴 void

SetTachoCount() 공개 메소드

Set Tachometer encoder offset Use this to reset or setup a specific position
public SetTachoCount ( Int32 position ) : void
position System.Int32 New offset, 0 to reset
리턴 void

Start() 공개 메소드

Start the motor
public Start ( ) : void
리턴 void

Start() 공개 메소드

Start with the specified speed
public Start ( int speed ) : void
speed int speed is between -255 and +255
리턴 void

Stop() 공개 메소드

Stop the Motor
public Stop ( ) : void
리턴 void

UpdateSensor() 공개 메소드

Update the sensor and this will raised an event on the interface
public UpdateSensor ( object state ) : void
state object
리턴 void