From f67f53d223156c52eee5b8585494c24f8fdd6ec3 Mon Sep 17 00:00:00 2001 From: ollo Date: Thu, 18 Apr 2019 20:34:28 +0200 Subject: [PATCH] Flash tool works with Nodemcu 2.2 --- tools/remoteFlash.sh | 3 ++- tools/tcpFlash.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/remoteFlash.sh b/tools/remoteFlash.sh index 4aaaaeb..fa8e440 100755 --- a/tools/remoteFlash.sh +++ b/tools/remoteFlash.sh @@ -26,7 +26,8 @@ if [ $? -ne 0 ]; then fi echo "Upgrading $IP" -echo "stopWordclock()" | nc $IP 80 +echo "stopWordclock()" > /tmp/wordClockCMD.txt +$FLASHTOOL -f /tmp/wordClockCMD.txt -t $IP -v FILES="displayword.lua main.lua timecore.lua webpage.html webserver.lua wordclock.lua init.lua" diff --git a/tools/tcpFlash.py b/tools/tcpFlash.py index 5a82873..6059719 100755 --- a/tools/tcpFlash.py +++ b/tools/tcpFlash.py @@ -112,7 +112,7 @@ def main(nodeip, luafile, volatile=None): sys.exit(4) # Check if the file exists: - if (not sendRecv(s, "=file.open(\"" + luafile + "\")", "true")): + if (not sendRecv(s, "=file.exists(\"" + luafile + "\")", "true")): print("Cannot send " + luafile + " to the ESP") sys.exit(4) else: