From aee5d6b2b607eb51058e8873e49deb0a9a49e839 Mon Sep 17 00:00:00 2001 From: Thomas Lake Date: Sun, 2 Sep 2018 15:11:03 +0100 Subject: [PATCH] Append to BTScan results, don't replace --- lib/sim800.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sim800.py b/lib/sim800.py index ced8e4a..ebd3da5 100644 --- a/lib/sim800.py +++ b/lib/sim800.py @@ -558,7 +558,7 @@ def btscan(timeout=30000): response = command("AT+BTSCAN=1," + str(int(timeout/1000)), timeout+8000, "+BTSCAN: 1") for entry in extractvals("+BTSCAN: 0,", response): splitentry = entry.split(",") - result = [int(splitentry[0]), splitentry[1].strip("\""), splitentry[2], int(splitentry[3])] + result.append([int(splitentry[0]), splitentry[1].strip("\""), splitentry[2], int(splitentry[3])]) return result # Get the requesting paring device name