Merge pull request #74 from timwoj/main

Use the correct object for PinAlarm and TouchAlarm
This commit is contained in:
Alec Delaney 2022-07-18 14:58:03 -04:00 committed by GitHub
commit 499526b4a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -373,7 +373,7 @@ class PortalBase:
""" """
if self._alarm: if self._alarm:
return self._alarm.time.PinAlarm(pin, value, edge, pull) return self._alarm.pin.PinAlarm(pin, value, edge, pull)
raise NotImplementedError( raise NotImplementedError(
"Alarms not supported. Make sure you have the latest CircuitPython." "Alarms not supported. Make sure you have the latest CircuitPython."
) )
@ -385,7 +385,7 @@ class PortalBase:
:param microcontroller.Pin pin: The trigger pin. :param microcontroller.Pin pin: The trigger pin.
""" """
if self._alarm: if self._alarm:
return self._alarm.time.TouchAlarm(pin) return self._alarm.touch.TouchAlarm(pin)
raise NotImplementedError( raise NotImplementedError(
"Alarms not supported. Make sure you have the latest CircuitPython." "Alarms not supported. Make sure you have the latest CircuitPython."
) )