Skip to content

Commit

Permalink
disable when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnN193 committed Nov 5, 2024
1 parent bf653a3 commit 7ad6b7b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rpi/gpio.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import (
"context"
"fmt"

rpiutils "raspberry-pi/utils"

"github.com/pkg/errors"
"go.viam.com/rdk/components/board"
rdkutils "go.viam.com/rdk/utils"
rpiutils "raspberry-pi/utils"
)

// GPIOConfig tracks what each pin is currently configured as
Expand Down Expand Up @@ -153,6 +154,7 @@ func (pi *piPigpio) SetGPIOBcom(bcom int, high bool) error {
if res != 0 {
return errors.Errorf("pwm set fail %d", res)
}
pin.pwmEnabled = false
}
res := C.set_mode(pi.piID, C.uint(pin.pin), C.PI_OUTPUT)
if res != 0 {
Expand Down

0 comments on commit 7ad6b7b

Please sign in to comment.