메소드 | 설명 | |
---|---|---|
CalcEndPointPwmDuration ( ServoOrientation orientation ) : float |
Calculates end point PWM duration for the specified servo orientation.
|
|
CalcNeutralPwmDuration ( ) : float |
Calculates the duration of the neutral pwm.
|
|
CalcPwmDuration ( float pos ) : |
Calculates the PWM duration.
|
|
Dispose ( ) : void |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Servos.GenericServo. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Servos.GenericServo in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Servos.GenericServo so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Servos.GenericServo was occupying. |
|
GenericServo ( IServoDriver driver, String name ) : System |
Initializes a new instance of the CyrusBuilt.MonoPi.Components.Servos.GenericServo class with the servo driver and name. This overload will use default property values.
|
|
GenericServo ( IServoDriver driver, String name, String>.Dictionary |
Initializes a new instance of the CyrusBuilt.MonoPi.Components.Servos.GenericServo class with the servo driver, name, and properties.
|
|
SetProperty ( String key, String value ) : void |
Sets the value of the specified property. If the property does not already exist in the property collection, it will be added. Once set, the servo will re-initialize using the new property values.
|
|
ToString ( ) : String |
Returns a System.String that represents the current CyrusBuilt.MonoPi.Components.Servos.GenericServo.
|
메소드 | 설명 | |
---|---|---|
Init ( ) : void |
Initializes the servo.
|
메소드 | 설명 | |
---|---|---|
ValidateEndPoint ( float endpoint, String propName ) : void |
Validates the specified end point. If the end point is invalid an ArgumentOutOfRangeException is thrown.
|
|
ValidatePosition ( float pos ) : void |
Validates the specified position value. If the position is invalid, then an ArgumentOutOfRangeException is thrown.
|
|
ValidateSubTrim ( float subtrim, String propName ) : void |
Validates the specified subtrim value. If the subtrim is invalid, then an ArgumentOutOfRangeException is thrown.
|
public CalcEndPointPwmDuration ( ServoOrientation orientation ) : float | ||
orientation | ServoOrientation | /// The servo orientation. /// |
리턴 | float |
public CalcPwmDuration ( float pos ) : |
||
pos | float | /// Position value between -100 and +100%. /// |
리턴 |
public GenericServo ( IServoDriver driver, String name ) : System | ||
driver | IServoDriver | /// The servo driver to use. /// |
name | String | /// The name of this servo. /// |
리턴 | System |
public GenericServo ( IServoDriver driver, String name, String>.Dictionary |
||
driver | IServoDriver | /// The servo driver to use. /// |
name | String | /// The name of this servo. /// |
props | String>.Dictionary | /// A dictionary containing servo properties. /// |
리턴 | System |
public SetProperty ( String key, String value ) : void | ||
key | String | /// The property name (key). /// |
value | String | /// The value to assign to the property. /// |
리턴 | void |