Closed assumptionsoup closed 1 year ago
The issue is that when register_pico_light
returns (which is immediately), pico_button_test
is no longer referenced and is destroyed. You need to save a reference to the inner function.
See the documentation for trigger closures.
This doesn't work, but placing
pico_button_test
outside of the register function does. It would be nice if this was possible.