diff options
author | Mathias Kresin <dev@kresin.me> | 2017-06-17 00:17:18 +0200 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2017-06-17 15:38:19 +0200 |
commit | 4cdbf4014b88034a37026234f39f644d620d8db1 (patch) | |
tree | 1d7a92b0d67579c3e85fee427d7b919ecde270df /package/base-files | |
parent | 82f9486142adff9c0d34393a63d3844d1da7ed03 (diff) | |
download | upstream-4cdbf4014b88034a37026234f39f644d620d8db1.tar.gz upstream-4cdbf4014b88034a37026234f39f644d620d8db1.tar.bz2 upstream-4cdbf4014b88034a37026234f39f644d620d8db1.zip |
base-files: make ucidef_set_led_rssi offset and factor optional
The offset and factor are only related for LEDs which can have
different brightness values. But binary LEDs are more common and don't
require any further configuation than setting the factor to 1.
Use offset = 0 and factor = 1 in case nothing else is specified.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'package/base-files')
-rwxr-xr-x | package/base-files/files/lib/functions/uci-defaults.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 6578202269..82ac1d2a4d 100755 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -439,8 +439,8 @@ ucidef_set_led_rssi() { local iface="$4" local minq="$5" local maxq="$6" - local offset="$7" - local factor="$8" + local offset="${7:-0}" + local factor="${8:-1}" _ucidef_set_led_common "$1" "$2" "$3" |