Add 'power' button to buttons which enable gluon-setup-mode.

Unlike other AVM devices, the Fritz!Box 3370 has got a 'Power' button
instead of 'WPS', 'DECT' or similar.
However, for a complete implementation of gluon it must be possible to
reboot the device into setup mode via pressing a button.

Notes:
1. The power button is used both for rebooting to setup mode (long press > 3s)
and switching off the device (short press).
This works because wait_setup_mode() is already started by 'power pressed', whereas
poweroff would be called later upon 'power released'.
2. Adding yet another button for setup mode isn't very pretty, esp. for the sake of one device.
However,
- there are only few devices (21/784) with a power button
- 302/784 devices have more than one button (reset + wps|phone) assigned to setup-mode,
  so the confusion is already there anyway.
This commit is contained in:
dzzinstant 2020-05-16 23:37:28 +02:00
parent ea09c97d2f
commit 11a2358760

View File

@ -12,7 +12,8 @@ wait_setup_mode() {
} }
if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || [ "$BUTTON" = phone ]; then if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] ||
[ "$BUTTON" = phone ] || [ "$BUTTON" = power ]; then
case "$ACTION" in case "$ACTION" in
pressed) pressed)
wait_setup_mode & wait_setup_mode &