Class: Rubycam::CLI::Commands::Reset

Inherits:
VideoCommand
  • Object
show all
Defined in:
lib/rubycam/cli.rb

Instance Method Summary collapse

Instance Method Details

#call(**options) ⇒ Object



131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/rubycam/cli.rb', line 131

def call(**options)
  with_device(options) do |dev|
    dev.controls.each_value do |c|
      next if c.read_only? || c.type == :button

      begin
        c.value = c.default
      rescue SystemCallError
        # inactive controls (e.g. manual exposure in auto mode) reject writes
      end
    end
  end
end