Activated remote flashing

This commit is contained in:
ollo 2019-04-18 16:41:04 +02:00
parent b38269166b
commit 1543af8777
2 changed files with 6 additions and 3 deletions

View File

@ -25,7 +25,6 @@ if [ $? -ne 0 ]; then
exit 2 exit 2
fi fi
echo "Upgrading $IP" echo "Upgrading $IP"
exit 3
FILES="displayword.lua main.lua timecore.lua webpage.html webserver.lua wordclock.lua init.lua" FILES="displayword.lua main.lua timecore.lua webpage.html webserver.lua wordclock.lua init.lua"
@ -44,7 +43,7 @@ for f in $FILES; do
fi fi
done done
echo "Reboot the ESP" echo "TODO: Reboot the ESP"
echo "node.restart()" | nc $IP 80 #echo "node.restart()" | nc $IP 80
exit 0 exit 0

View File

@ -87,6 +87,10 @@ def main(nodeip, luafile, volatile=None):
print "\rSending " + str(i) + "/" + str(len(contents)) + " ...", print "\rSending " + str(i) + "/" + str(len(contents)) + " ...",
sys.stdout.flush() sys.stdout.flush()
l = line.rstrip() l = line.rstrip()
if ( l.endswith("]") ):
l = l + " "
print "add a space at the end"
if (volatile is None): if (volatile is None):
if (not sendCmd(s, "w([[" + l + "]]);")): if (not sendCmd(s, "w([[" + l + "]]);")):
print "Cannot write line " + str(i) print "Cannot write line " + str(i)