package pcb import ( "fmt" "th7/data/pcb" ) type DummyAdapter struct { table pcb.Table use_led bool } func NewDummyAdapter(led bool) (*DummyAdapter, error) { var adapter DummyAdapter adapter.use_led = led return &adapter, nil } func (d *DummyAdapter) Deinit() error { // turn LED off .. fmt.Println("dummy pcb adapter deinit") return nil } func (d *DummyAdapter) UpdateTable() { d.table.Pivdd = 5.0 d.table.Vadj = 0.9 d.table.Vref = 3.6 } func (d *DummyAdapter) GetTable() pcb.Table { return d.table } func (d *DummyAdapter) ReadChannel(id int) (float64, error) { return -9000.0, nil } func (d *DummyAdapter) ReadPCBTemp() (float64, error) { return 25.0, nil }