Class: RoboticArm::ComponentUpDown

Inherits:
ComponentMoving show all
Defined in:
lib/robotic-arm.rb

Direct Known Subclasses

Elbow, Shoulder, Wrist

Instance Method Summary collapse

Methods inherited from ComponentMoving

#initialize, #moving?, #stop

Methods inherited from Component

#active?, #initialize

Constructor Details

This class inherits a constructor from RoboticArm::ComponentMoving

Instance Method Details

#down(seconds = 0) ⇒ Object



261
262
263
264
265
# File 'lib/robotic-arm.rb', line 261

def down(seconds=0)
  return if @active and @moving == :down
  activate(@switch, @downval, seconds)
  @moving = :down
end

#up(seconds = 0) ⇒ Object



255
256
257
258
259
# File 'lib/robotic-arm.rb', line 255

def up(seconds=0)
  return if @active and @moving == :up
  activate(@switch, @upval,   seconds)
  @moving = :up
end