From f33f9d1b999f228b9ca831b7bb06e5a6d8cddb12 Mon Sep 17 00:00:00 2001 From: tuxflo Date: Sun, 24 Jan 2021 20:55:46 +0100 Subject: [PATCH] force rssi calculation to use 10 as base According to https://stackoverflow.com/questions/24777597/value-too-great-for-base-error-token-is-08 this is one way of preventing the bash script to treat 08 values as numbers with the base of 8. Tested it with the [Bluetooth BLE Presence ](https://github.com/Limych/addon-presence-monitor) --- monitor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor.sh b/monitor.sh index db35f337..dbbf89f4 100755 --- a/monitor.sh +++ b/monitor.sh @@ -1774,7 +1774,7 @@ while true; do rssi_latest=${rssi_latest:--200} #IS RSSI THE SAME? - rssi_change=$((rssi - rssi_latest)) + rssi_change=$((10#$rssi - 10#$rssi_latest)) abs_rssi_change=${rssi_change#-} #DETERMINE MOTION DIRECTION