Module: MatrixCreator::DriverBase
- Defined in:
- lib/matrix_creator/driver_base.rb
Overview
Module: DriverBase
Base communication for generic drivers
Class Method Summary collapse
-
.detect(base_port, decoder, options = {}, block = nil) ⇒ Array
Detects and returns information from a generic driver.
Class Method Details
.detect(base_port, decoder, options = {}, block = nil) ⇒ Array
Detects and returns information from a generic driver
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/matrix_creator/driver_base.rb', line 28 def self.detect(base_port, decoder, = {}, block = nil) @driver_comm = MatrixCreator::Comm.new(base_port) # Setup Driver config = MatrixMalos::DriverConfig.new( delay_between_updates: [:speed] || 1.0, timeout_after_last_ping: 4.0 ) @driver_comm.send_configuration(config) # Query Driver result = @driver_comm.perform(decoder, , block) # Destroy context @driver_comm.destroy result end |