From e391eeaeeda895d3259bffb8dc500075e1002e8f Mon Sep 17 00:00:00 2001 From: Michel-FK Date: Thu, 23 Jul 2020 16:46:32 +0200 Subject: [PATCH] Corrected buggy quick_action scripts --- .../usr/local/sbin/quick_action_bright_down | 4 ++-- .../rootfs-overlay/usr/local/sbin/quick_action_bright_up | 6 +++--- .../usr/local/sbin/quick_action_volume_down | 6 +++--- .../rootfs-overlay/usr/local/sbin/quick_action_volume_up | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_bright_down b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_bright_down index bc5a612..efd8d53 100755 --- a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_bright_down +++ b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_bright_down @@ -1,7 +1,7 @@ #!/bin/sh STEP_BRIGHTNESS=10 -NOTIF_TIME_ON=2 +NOTIF_DURATION=2 # Get current value current_brightness=$(brightness_get) @@ -18,5 +18,5 @@ if [ ${new_brightness} -ne ${current_brightness} ]; then fi # Notif -notif_set ${NOTIF_TIME_ON} " BRIGHTNESS: ${new_brightness}%%" +notif_set ${NOTIF_DURATION} " BRIGHTNESS: ${new_brightness}%%" exit 0 diff --git a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_bright_up b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_bright_up index 12f0142..6241430 100755 --- a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_bright_up +++ b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_bright_up @@ -1,13 +1,13 @@ #!/bin/sh STEP_BRIGHTNESS=10 -NOTIF_TIME_ON=2 +NOTIF_DURATION=2 # Get current value current_brightness=$(brightness_get) # Compute new brightness value -new_brightness=${current_brightness}+${STEP_BRIGHTNESS} +let new_brightness=${current_brightness}+${STEP_BRIGHTNESS} if [ ${new_brightness} -gt 100 ]; then new_brightness=100 fi @@ -18,5 +18,5 @@ if [ ${new_brightness} -ne ${current_brightness} ]; then fi # Notif -notif_set ${NOTIF_TIME_ON} " BRIGHTNESS: ${new_brightness}%%" +notif_set ${NOTIF_DURATION} " BRIGHTNESS: ${new_brightness}%%" exit 0 diff --git a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_volume_down b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_volume_down index 8a77000..db87d23 100755 --- a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_volume_down +++ b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_volume_down @@ -1,7 +1,7 @@ #!/bin/sh STEP_VOLUME=10 -NOTIF_TIME_ON=2 +NOTIF_DURATION=2 # Get current value current_volume=$(volume_get) @@ -9,7 +9,7 @@ current_volume=$(volume_get) # Compute new volume value new_volume=0 if [ ${current_volume} -gt ${STEP_VOLUME} ]; then - new_volume=${current_volume}-${STEP_VOLUME} + let new_volume=${current_volume}-${STEP_VOLUME} fi # Change volume @@ -18,5 +18,5 @@ if [ ${new_volume} -ne ${current_volume} ]; then fi # Notif -notif_set ${NOTIF_TIME_ON} " VOLUME: ${new_volume}%%" +notif_set ${NOTIF_DURATION} " VOLUME: ${new_volume}%%" exit 0 diff --git a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_volume_up b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_volume_up index 49497c7..f33e96c 100755 --- a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_volume_up +++ b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/quick_action_volume_up @@ -1,22 +1,22 @@ #!/bin/sh STEP_VOLUME=10 -NOTIF_TIME_ON=2 +NOTIF_DURATION=2 # Get current value current_volume=$(volume_get) # Compute new volume value -new_volume=${current_volume}+${STEP_VOLUME} +let new_volume=${current_volume}+${STEP_VOLUME} if [ ${new_volume} -gt 100 ]; then new_volume=100 fi # Change volume -if [ ${new_volume} -ne {current_$volume} ]; then +if [ ${new_volume} -ne ${current_volume} ]; then volume_set ${new_volume} fi # Notif -notif_set ${NOTIF_TIME_ON} " VOLUME: ${new_volume}%%" +notif_set ${NOTIF_DURATION} " VOLUME: ${new_volume}%%" exit 0