Hello! First off, thank you very much for this series of articles, it's very helpful and nicely written.
I think I've found a small bug in the button_pressed task: it seems like the modification to the delay value is not saved in the local variable, and subsequent presses on the button don't decrease the value further (pressing the button always set the delay to 1500ms)
I've added the following line right after adjusting the delay value:
Thank you Guilhem! You are absolutely correct! I should have updated the delayval value in the global context after it gets modified in the task. Looks like I missed it when I tested it. I will adjust the post right away to reflect the correct code.
Guilhem Pelissier
Hello! First off, thank you very much for this series of articles, it's very helpful and nicely written.
I think I've found a small bug in the
button_pressedtask: it seems like the modification to the delay value is not saved in the local variable, and subsequent presses on the button don't decrease the value further (pressing the button always set the delay to 1500ms)I've added the following line right after adjusting the delay value:
*ctx.local.delayval = delay;and it seems like it fixes the problem.
Thank you once again for this series