Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotplug: allow button timeout actions to trigger a subsequent timeout #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wryun
Copy link

@wryun wryun commented Jul 24, 2024

This allows visual feedback when timeouts are reached.

In our case, there is a single button which on a normal press/release will initiate DPP, but longer presses will first reboot then factory reset. So users know they've held it down long enough, it's nice to change a status LED.

This also fixes what seems to me a bug, in that you can attach a timeout to a 'release' action but the timing was reset (so you can't distinguish between a released timeout vs a pressed timeout).

This allows visual feedback when timeouts are reached.

In our case, there is a single button which on a normal press/release
will initiate DPP, but longer presses will first reboot then
factory reset. So users know they've held it down long enough,
it's nice to change the state of an LED.

This also fixes what seems to me a bug, in that you can attach
a timeout to a 'release' action but the timing was reset
(so you can't distinguish between a released timeout vs
a pressed timeout).
@wryun wryun force-pushed the hotplug-button-timeouts-can-trigger-timeout branch from 4fb9bc5 to 7e338e2 Compare July 24, 2024 02:24
morse-arienjudge pushed a commit to MorseMicro/openwrt that referenced this pull request Sep 19, 2024
This allows visual feedback when timeouts are reached.

In our case, there is a single button which on a normal
press/release will initiate DPP, but longer presses will
first reboot then factory reset. So users know they've
held it down long enough, it's nice to change a status LED.

This also fixes what seems to me a bug, in that you can
attach a timeout to a 'release' action but the timing was
reset (so you can't distinguish between a released timeout
vs a pressed timeout).

See:

openwrt/procd#10


Approved-by: Sophronia Koilpillai
Approved-by: Arien Judge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant