power: use the default_vals keyword to init gpios
The "default_val" keyword argument is not available in libgpiod version 1.2. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
a3ba4b4169
commit
53291f6887
|
@ -479,11 +479,11 @@ class GpioDevice(PowerDevice):
|
|||
self.line.request(
|
||||
consumer="moonraker", type=gpiod.LINE_REQ_DIR_OUT,
|
||||
flags=gpiod.LINE_REQ_FLAG_ACTIVE_LOW,
|
||||
default_val=int(self.initial_state))
|
||||
default_vals=[int(self.initial_state)])
|
||||
else:
|
||||
self.line.request(
|
||||
consumer="moonraker", type=gpiod.LINE_REQ_DIR_OUT,
|
||||
default_val=int(self.initial_state))
|
||||
default_vals=[int(self.initial_state)])
|
||||
except Exception:
|
||||
self.state = "error"
|
||||
logging.exception(
|
||||
|
|
Loading…
Reference in New Issue