Skip to content

Commit

Permalink
Try native pin factory for RPi5 compat.
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Mar 29, 2024
1 parent f73c58a commit f8bc623
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion neon_phal_plugin_switches/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
from ovos_plugin_manager.hardware.switches import AbstractSwitches
from ovos_utils.log import LOG
from ovos_bus_client.message import Message
from gpiozero import Button, pi_info, BadPinFactory
from gpiozero import Button, pi_info, BadPinFactory, Device
from gpiozero.pins.native import NativeFactory


class SwitchValidator:
Expand All @@ -50,6 +51,7 @@ def validate(_=None):


class SwitchInputs(PHALPlugin):
Device.pin_factory = NativeFactory()
validator = SwitchValidator

def __init__(self, bus=None, config=None):
Expand Down

0 comments on commit f8bc623

Please sign in to comment.