succd: Migrate to KEC1 MODBUS relay board
This commit is contained in:
parent
0e45650972
commit
606d470577
3 changed files with 61 additions and 63 deletions
|
|
@ -48,12 +48,6 @@ func main() {
|
|||
if flagFake {
|
||||
klog.Infof("Starting with fake peripherals")
|
||||
d.adcPirani = &fakeADC{}
|
||||
d.gpioRoughingPump = &fakeGPIO{desc: "rp"}
|
||||
d.gpioDiffusionPump = &fakeGPIO{desc: "~dp"}
|
||||
d.gpioBtnPumpDown = &fakeGPIO{desc: "~pd"}
|
||||
d.gpioBtnVent = &fakeGPIO{desc: "~vent"}
|
||||
d.gpioBelowRough = &fakeGPIO{desc: "~rough"}
|
||||
d.gpioBelowHigh = &fakeGPIO{desc: "~high"}
|
||||
} else {
|
||||
adc, err := newBBADC(0)
|
||||
if err != nil {
|
||||
|
|
@ -65,23 +59,6 @@ func main() {
|
|||
if err != nil {
|
||||
klog.Exitf("Failed to connect to modbus %v", err)
|
||||
}
|
||||
|
||||
for _, c := range []struct {
|
||||
out *gpio
|
||||
num int
|
||||
}{
|
||||
{&d.gpioRoughingPump, 115},
|
||||
{&d.gpioDiffusionPump, 49},
|
||||
{&d.gpioBtnPumpDown, 48},
|
||||
{&d.gpioBtnVent, 60},
|
||||
{&d.gpioBelowRough, 30},
|
||||
{&d.gpioBelowHigh, 7},
|
||||
} {
|
||||
*c.out, err = newBBGPIO(c.num, true)
|
||||
if err != nil {
|
||||
klog.Exitf("Failed to setup GPIO: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
web := webServer{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue