Corrigé le problème de supression des espaces inutiles dans le code lua envoyé au NodeMCU avec luatool.py, ce n'était plus possible alors de comparer leur checksum
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python2
|
||||
# -*- coding: utf-8 -*-
|
||||
version = "0.6.5 zf191021.1558"
|
||||
version = "0.6.6 zf191124.1015"
|
||||
|
||||
print("luatool.py ver " + version)
|
||||
|
||||
@@ -68,6 +68,8 @@ class AbstractTransport:
|
||||
raise NotImplementedError('Function not implemented')
|
||||
|
||||
def writer(self, data):
|
||||
##zzz191124 enlève la fin de ligne afin de ne pas perturber la vérification finale
|
||||
data = data.rstrip('\r\n')
|
||||
self.writeln("file.writeline([==[" + data + "]==])\r")
|
||||
|
||||
def performcheck(self, expected):
|
||||
@@ -80,7 +82,7 @@ class AbstractTransport:
|
||||
raise Exception('No proper answer from MCU')
|
||||
if char == chr(13) or char == chr(10): # LF or CR
|
||||
if line != '':
|
||||
line = line.strip()
|
||||
#zzz191124 line = line.strip()
|
||||
# zzz191021 Affiche ce que l'on a reçu du NodeMCU
|
||||
if args.verbose:
|
||||
print("\n\nzread0957: {" + line + "\n}\n")
|
||||
@@ -354,11 +356,13 @@ if __name__ == '__main__':
|
||||
sys.stderr.write("\r\nStage 3. Start writing data to flash memory...")
|
||||
if args.bar:
|
||||
for i in tqdm(range(0, num_lines)):
|
||||
transport.writer(line.strip())
|
||||
#zzz191124 transport.writer(line.strip())
|
||||
transport.writer(line)
|
||||
line = f.readline()
|
||||
else:
|
||||
while line != '':
|
||||
transport.writer(line.strip())
|
||||
#zzz191124 transport.writer(line.strip())
|
||||
transport.writer(line)
|
||||
line = f.readline()
|
||||
|
||||
# close both files
|
||||
|
||||
@@ -1,3 +1,41 @@
|
||||
|
||||
zz_host_dir2.lua zf191123.1436
|
||||
|
||||
zz_host_dir2.lua
|
||||
z_page4.html
|
||||
z_page3.html
|
||||
z_page2.html
|
||||
z_page1.html
|
||||
z_index.html
|
||||
wifi_init.lua
|
||||
wifi_info.lua
|
||||
web_srv2.lua
|
||||
upload_t.sh
|
||||
upload_s.sh
|
||||
tst_dir
|
||||
tnode
|
||||
thost
|
||||
telnet_srv2.lua
|
||||
set_time.lua
|
||||
secrets_wifi.lua
|
||||
secrets_project.lua
|
||||
oldies
|
||||
luatool.py
|
||||
initz.lua
|
||||
in production
|
||||
head.lua
|
||||
goodies
|
||||
flash_led_xfois.lua
|
||||
dir2.lua
|
||||
cat.lua
|
||||
c.lua
|
||||
boot2.lua
|
||||
boot.lua
|
||||
b.lua
|
||||
_zremote_cmd.txt
|
||||
_secrets_energy.lua_
|
||||
README.md
|
||||
Icon
|
||||
README.md : 2841, 347247457
|
||||
_secrets_energy.lua_ : 574, 14047690
|
||||
_zremote_cmd.txt : 3797, 598457578
|
||||
@@ -6,7 +44,6 @@ boot.lua : 451, 8092291
|
||||
boot2.lua : 1581, 89772835
|
||||
c.lua : 1023, 45354296
|
||||
cat.lua : 522, 9721978
|
||||
dir.lua : 850, 26936375
|
||||
dir2.lua : 1569, 96054383
|
||||
flash_led_xfois.lua : 1143, 44689874
|
||||
head.lua : 567, 11507510
|
||||
@@ -16,7 +53,9 @@ secrets_project.lua : 539, 12833508
|
||||
secrets_wifi.lua : 635, 15410620
|
||||
set_time.lua : 879, 31173858
|
||||
telnet_srv2.lua : 2760, 289194718
|
||||
upload_s.sh : 1855, 144236402
|
||||
thost : 40, 43748
|
||||
tnode : 876, 22073606
|
||||
upload_s.sh : 2198, 202237353
|
||||
upload_t.sh : 1618, 109879609
|
||||
web_srv2.lua : 2960, 297644504
|
||||
wifi_info.lua : 1604, 98582260
|
||||
@@ -26,4 +65,8 @@ z_page1.html : 443, 7731060
|
||||
z_page2.html : 1867, 123937742
|
||||
z_page3.html : 1415, 67091731
|
||||
z_page4.html : 1660, 90364904
|
||||
zz_host_dir2.lua : 1665, 108418146
|
||||
zz_host_dir2.lua : 1756, 122530256
|
||||
|
||||
|
||||
Rappel, sur Atom, sélectionner les deux fichiers à gauche puis CTRL+CMD+C
|
||||
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
b.lua : 4289, 696634446
|
||||
boot.lua : 347, 4916306
|
||||
boot2.lua : 804, 26604889
|
||||
b.lua : 3805, 595030982
|
||||
boot.lua : 431, 7620379
|
||||
boot2.lua : 1277, 66818479
|
||||
c.lua : 1017, 45107208
|
||||
cat.lua : 478, 8669046
|
||||
dir.lua : 386, 5304029
|
||||
dir2.lua : 1569, 96054383
|
||||
dir2.lua : 1425, 84233519
|
||||
flash_led_xfois.lua : 930, 33758481
|
||||
head.lua : 517, 10229636
|
||||
initz.lua : 1751, 132455365
|
||||
initz.lua : 1779, 136762155
|
||||
secrets_project.lua : 527, 12522496
|
||||
secrets_wifi.lua : 585, 13997572
|
||||
set_time.lua : 782, 25726107
|
||||
secrets_wifi.lua : 600, 14520430
|
||||
set_time.lua : 855, 30144894
|
||||
telnet_srv2.lua : 2449, 246557078
|
||||
web_srv2.lua : 2372, 223848934
|
||||
wifi_ap_start.lua : 465, 8567974
|
||||
wifi_cli_conf.lua : 319, 4426045
|
||||
wifi_cli_start.lua : 620, 15235144
|
||||
wifi_info.lua : 1152, 53256387
|
||||
wifi_init.lua : 737, 22342801
|
||||
>
|
||||
wifi_info.lua : 1344, 77679752
|
||||
wifi_init.lua : 461, 9174869
|
||||
z_index.html : 652, 18555106
|
||||
z_page1.html : 431, 7416860
|
||||
z_page2.html : 1503, 92280526
|
||||
z_page3.html : 1077, 46592064
|
||||
z_page4.html : 1219, 60174063
|
||||
>
|
||||
|
||||
@@ -29,7 +29,21 @@ read -p "Est-ce bien vide ?"
|
||||
./luatool.py --port $luatool_tty --bar --delay 0.001 -f set_time.lua
|
||||
./luatool.py --port $luatool_tty --bar --delay 0.001 -f secrets_wifi.lua
|
||||
./luatool.py --port $luatool_tty --bar --delay 0.001 -f secrets_project.lua
|
||||
|
||||
./luatool.py --port $luatool_tty --bar --delay 0.001 -f dir2.lua
|
||||
|
||||
|
||||
./luatool.py --port $luatool_tty -f dir2.lua
|
||||
|
||||
|
||||
|
||||
|
||||
./luatool.py --port $luatool_tty -f t1.lua
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
./luatool.py --port $luatool_tty --bar --delay 0.001 -f cat.lua
|
||||
./luatool.py --port $luatool_tty --bar --delay 0.001 -f c.lua
|
||||
./luatool.py --port $luatool_tty --bar --delay 0.001 -f boot2.lua
|
||||
|
||||
Reference in New Issue
Block a user