gluon-setup-mode: provide LED feedback for setup-mode activation#3499
gluon-setup-mode: provide LED feedback for setup-mode activation#3499blocktrron wants to merge 1 commit intofreifunk-gluon:mainfrom
Conversation
|
|
||
| wait_setup_mode() { | ||
| sleep $wait | ||
| /lib/gluon/setup-mode/led.sh confirm |
There was a problem hiding this comment.
There is a race condition here; the shell process could be killed between setting the led and running gluon-enter-setup-mode. Maybe we should move the LED trigger into gluon-enter-setup-mode?
There was a problem hiding this comment.
The problem is the target-specific implementation of the diag.sh script which throws unrelated errors for our case.
On pure DT platforms we would not need it (only real consumer for us is x86 with apu)
There was a problem hiding this comment.
I don't understand how this answers my comment
There was a problem hiding this comment.
Hey, sorry i did not finish it.
So the race condition is for the cause of gluon-enter-setup-mode setting set -eu.
The LED definition is sourced from diag.sh which is included in other contexts where additional variables are set.
Including it within the gluon-enter-setup-mode script results in the script aborting early.
I hope this is more understandable.
There was a problem hiding this comment.
The race condition I meant was wait_setup_mode being killed after /lib/gluon/setup-mode/led.sh confirm, but before gluon-enter-setup-mode, if the button is released at exactly the wrong moment.
There was a problem hiding this comment.
Now i get it. I'll think about how to tackle this.
There was a problem hiding this comment.
The easiest way to fix this would be to call /lib/gluon/setup-mode/led.sh confirm from a subprocess together with gluon-enter-setup-mode instead of wait_setup_mode - either by moving the call into gluon-enter-setup-mode itself, or by introducing a new shell using sh -c for the two commands.
|
I like this idea a lot actually. Since I did it many times I know by now that I can release the button way earlier but this is actual useful feedback for our end-users! |
This adds a fast-blink animation when Gluon started the procedure to enter setup mode. This is helpful, as some devices might not provide feedback by the status LED on reboot. This can lead to unwanted activation of a bootloader recovery procedure. Signed-off-by: David Bauer <mail@david-bauer.net>
c234331 to
fb06163
Compare
|
@blocktrron are you still interested in getting this merged, then it would be good to follow up with the remark by @neocturne and fixing the linting :-) |
This adds a fast-blink animation when Gluon started the procedure to enter setup mode.
This is helpful, as some devices might not provide feedback by the status LED on reboot.
This can lead to unwanted activation of a bootloader recovery procedure in case the reset button is not released prior.