Closed helgibbons closed 2 years ago
I think it should be possible to fix this without needing to change the prototype of warn_led
(as this PR does):
enviro
module pulls in everything from enviro.constants
(so things like WARN_LED_BLINK
are available as enviro.WARN_LED_BLINK
)enviro
module imports enviro.board
, renaming it to board
and...main.py
imports enviro
so warn_led
should be available as enviro.board.warn_led
from main alreadyI've posted an alternate PR for #30 in #32. The method posted here should work too, but I'd be a little nervous about changing warn_led
to expect a string as that would potentially break anyone currently relying on the existing definition.
Thanks - yeah, seemed like there was probably a better way of getting it working than stringifying everything :)
Thank you! This has been fixed in https://github.com/pimoroni/enviro/commit/f078ee1658c8c908b29fe53f16b3b967ccb46213
Here's a (probably hacky) fix for #30 :)