Class: RapiroWrapper::LeftFootPitch
- Inherits:
-
ServoMotor
- Object
- ServoMotor
- RapiroWrapper::LeftFootPitch
- Defined in:
- lib/rapiro_wrapper/servo_motor/left_foot_pitch.rb
Overview
LeftFootPitch class for RAPIRO
Constant Summary collapse
- NO =
11
- DEFAULT =
90
- MIN =
70
- MAX =
110
Instance Method Summary collapse
-
#initialize(close: nil, open: nil) ⇒ LeftFootPitch
constructor
A new instance of LeftFootPitch.
Methods inherited from ServoMotor
Constructor Details
#initialize(close: nil, open: nil) ⇒ LeftFootPitch
Returns a new instance of LeftFootPitch.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rapiro_wrapper/servo_motor/left_foot_pitch.rb', line 9 def initialize(close: nil, open: nil) fail ArgumentError if open && close if close @value = MAX - close elsif open @value = MIN + open else @value = DEFAULT end fail ArgumentError unless @value.between?(MIN, MAX) end |