class RapiroWrapper::RightFootPitch

RightFootPitch class for RAPIRO

Constants

DEFAULT
MAX
MIN
NO

Public Class Methods

new(close: nil, open: nil) click to toggle source
# File lib/rapiro_wrapper/servo_motor/right_foot_pitch.rb, line 9
def initialize(close: nil, open: nil)
  fail ArgumentError if open && close
  if close
    @value = MIN + close
  elsif open
    @value = MAX - open
  else
    @value = DEFAULT
  end
  fail ArgumentError unless @value.between?(MIN, MAX)
end