Module: GPhoto2::Camera::Event

Included in:
GPhoto2::Camera
Defined in:
lib/gphoto2/camera/event.rb

Instance Method Summary collapse

Instance Method Details

#wait(timeout = 2000) ⇒ CameraEvent

Parameters:

  • timeout (Integer) (defaults to: 2000)

    time to wait in milliseconds

Returns:



6
7
8
# File 'lib/gphoto2/camera/event.rb', line 6

def wait(timeout = 2000)
  wait_for_event(timeout)
end

#wait_for(event_type) ⇒ CameraEvent

Parameters:

Returns:



12
13
14
15
16
17
18
# File 'lib/gphoto2/camera/event.rb', line 12

def wait_for(event_type)
  begin
    event = wait
  end until event.type == event_type

  event
end