Method: I2c_export#initialize

Defined in:
lib/class/I2C/I2c_export.rb

#initialize(api, chip) ⇒ I2c_export

Returns a new instance of I2c_export.



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/class/I2C/I2c_export.rb', line 15

def initialize(api, chip)
  super()
  @i2c_export_gui = Ui_Generic_export.new
  centerWindow(self)
  @i2c_export_gui.setupUi(self)
  @i2c_export_gui.lbl_chip.setText(chip.chip_reference)
  inputRestrict(@i2c_export_gui.lie_start, 0)
  inputRestrict(@i2c_export_gui.lie_stop, 0)
  @api = api
  @chip_settings = I2C.find_by(i2c_chip: chip.chip_id)
end