You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The gpio_init() function should be changed to return a GPIO_RESULT that is 0 if ok, and non zero on fail. This can then be checked in the caller (and presumably propagated out in the same way by spi_init() using SPI_RESULT, then radio_init() can return a RADIO_RESULT.
radio.py init() must then check the return result, and raise an exception presumably if it is non zero.
This will then cause init.py init() to throw the exception, then calls to energenie.init() will propagate the exception into the main program. The main programs in all demos should then catch this exception and fail with a message and then hit a finally block, that tries to clean up the GPIO state so it is in a sensible default OFF state (thus allowing another run of the code to succeed if the hardware problem is now fixed);
See: Achronite/energenie-ener314rt#8
@Achronite thanks for raising this, added it to my list.
The text was updated successfully, but these errors were encountered: