succd: Migrate to KEC1 MODBUS relay board
All checks were successful
/ test (push) Successful in 10s
/ test (pull_request) Successful in 10s

This commit is contained in:
hmelder 2024-11-10 05:11:48 +01:00
parent 0e45650972
commit 606d470577
3 changed files with 61 additions and 63 deletions

View file

@ -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{