From 1b5ce385df2f000cb7087dd4f693709953d784a0 Mon Sep 17 00:00:00 2001 From: ollo Date: Thu, 18 Apr 2019 21:46:15 +0200 Subject: [PATCH] Clean memory before writing file --- tools/tcpFlash.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/tcpFlash.py b/tools/tcpFlash.py index 6059719..2c32002 100755 --- a/tools/tcpFlash.py +++ b/tools/tcpFlash.py @@ -72,6 +72,8 @@ def main(nodeip, luafile, volatile=None): s.close() sys.exit(3) + sendCmd(s, "for i=0,5 do tmr.stop(i) end") + sendCmd(s, "collectgarbage()") if (volatile is None): print "Flashing " + luafile sendCmd(s, "file.remove(\"" + luafile+"\");", True)