Class: RapiroWrapper::LeftFootYaw
- Inherits:
-
ServoMotor
- Object
- ServoMotor
- RapiroWrapper::LeftFootYaw
- Defined in:
- lib/rapiro_wrapper/servo_motor/left_foot_yaw.rb
Overview
LeftFootYaw class for RAPIRO
Constant Summary collapse
- NO =
10
- DEFAULT =
90
- MIN =
50
- MAX =
110
Instance Method Summary collapse
-
#initialize(close: nil, open: nil) ⇒ LeftFootYaw
constructor
A new instance of LeftFootYaw.
Methods inherited from ServoMotor
Constructor Details
#initialize(close: nil, open: nil) ⇒ LeftFootYaw
Returns a new instance of LeftFootYaw.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rapiro_wrapper/servo_motor/left_foot_yaw.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 |