Modifier and Type | Field and Description |
---|---|
static Servo.Trim |
DEFAULT |
static float |
DEFAULT_90_DELTA |
static float |
DEFAULT_MID |
static Servo.Trim |
MG996R |
static float |
MID_ANGLE |
static Servo.Trim |
TOWERPRO_SG5010 |
static Servo.Trim |
TOWERPRO_SG90 |
Constructor and Description |
---|
Trim(float midPulseWidthMs,
float ninetyDegPulseWidthMs)
Assumes 180 degree range of movement
|
Trim(float midPulseWidthMs,
float ninetyDegPulseWidthMs,
float rangePulseWidthMs) |
Trim(float midPulseWidthMs,
float ninetyDegPulseWidthMs,
float minPulseWidthMs,
float maxPulseWidthMs) |
Modifier and Type | Method and Description |
---|---|
float |
convertAngleToPulseWidthMs(float angle) |
float |
convertPulseWidthMsToAngle(float pulseWidthMs) |
float |
getMaxAngle() |
float |
getMaxPulseWidthMs() |
float |
getMidAngle() |
float |
getMidPulseWidthMs() |
float |
getMinAngle() |
float |
getMinPulseWidthMs() |
float |
getNinetyDegPulseWidthMs() |
public static final float MID_ANGLE
public static final float DEFAULT_MID
public static final float DEFAULT_90_DELTA
public static final Servo.Trim DEFAULT
public static final Servo.Trim TOWERPRO_SG90
public static final Servo.Trim TOWERPRO_SG5010
public static final Servo.Trim MG996R
public Trim(float midPulseWidthMs, float ninetyDegPulseWidthMs)
midPulseWidthMs
- Pulse width in ms corresponding to the centre position (90 degrees)ninetyDegPulseWidthMs
- Pulse width in ms corresponding to a 90 degreee movement in either directionpublic Trim(float midPulseWidthMs, float ninetyDegPulseWidthMs, float rangePulseWidthMs)
public Trim(float midPulseWidthMs, float ninetyDegPulseWidthMs, float minPulseWidthMs, float maxPulseWidthMs)
public float getMidPulseWidthMs()
public float getNinetyDegPulseWidthMs()
public float getMinPulseWidthMs()
public float getMaxPulseWidthMs()
public float getMinAngle()
public float getMaxAngle()
public float getMidAngle()
public float convertPulseWidthMsToAngle(float pulseWidthMs)
public float convertAngleToPulseWidthMs(float angle)
Copyright © 2016–2018 mattjlewis. All rights reserved.