openwrt / procd

[MIRROR] OpenWrt service / process manager
https://git.openwrt.org/?p=project/procd.git;
4 stars 16 forks source link

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

Open wryun opened 3 months ago

wryun commented 3 months ago

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).