Sha256: 246c2964d65f813ab997d4844ba62b48da72e4b27853c29688712926434fda78

Contents?: true

Size: 341 Bytes

Versions: 1

Compression:

Stored size: 341 Bytes

Contents

module RapiroWrapper
  # LeftSholderPitch class for RAPIRO
  class LeftSholderPitch < ServoMotor
    NO = 6
    DEFAULT = 50
    MIN = 50
    MAX = 140

    def initialize(up: nil)
      if up
        @value = MIN + up
      else
        @value = DEFAULT
      end
      fail ArgumentError unless @value.between?(MIN, MAX)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rapiro_wrapper-0.1.0 lib/rapiro_wrapper/servo_motor/left_sholder_pitch.rb