Class Servo.Trim

  • Enclosing class:
    Servo

    public static class Servo.Trim
    extends Object
    • Constructor Detail

      • Trim

        public Trim​(float midPulseWidthMs,
                    float ninetyDegPulseWidthMs)
        Assumes 180 degree range of movement
        Parameters:
        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 direction
      • Trim

        public Trim​(float midPulseWidthMs,
                    float ninetyDegPulseWidthMs,
                    float rangePulseWidthMs)
      • Trim

        public Trim​(float midPulseWidthMs,
                    float ninetyDegPulseWidthMs,
                    float minPulseWidthMs,
                    float maxPulseWidthMs)
    • Method Detail

      • getMidPulseWidthMs

        public float getMidPulseWidthMs()
      • getNinetyDegPulseWidthMs

        public float getNinetyDegPulseWidthMs()
      • getMinPulseWidthMs

        public float getMinPulseWidthMs()
      • getMaxPulseWidthMs

        public float getMaxPulseWidthMs()
      • getMinAngle

        public float getMinAngle()
      • getMaxAngle

        public float getMaxAngle()
      • getMidAngle

        public float getMidAngle()
      • convertPulseWidthMsToAngle

        public float convertPulseWidthMsToAngle​(float pulseWidthMs)
      • convertAngleToPulseWidthMs

        public float convertAngleToPulseWidthMs​(float angle)