module Tlapse

Constants

VERSION

Public Instance Methods

check_camera!() click to toggle source
# File lib/tlapse/doctor.rb, line 32
def check_camera!
  cameras = `gphoto2 --auto-detect`

  # Output looks like this:
  #
  #   Model       Port
  #   --------------------
  #   Camera      :usb
  #
  # If there is a third line, a camera was detected

  unless cameras.split("\n").length > 2
    raise "gphoto2 couldn't find a camera :("
  end
end