mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-21 15:04:24 +01:00
Switch default flashing method to Nextion 1.1
This commit is contained in:
@@ -214,7 +214,6 @@ class Nextion : Driver
|
||||
#print(host,port,file)
|
||||
|
||||
self.tftd = TftDownloader(host, port, file, 32768)
|
||||
#self.tftd = TftDownloader("192.168.75.30", 8123, "/local/test.tft", 32768)
|
||||
|
||||
# get size of tft file
|
||||
self.flash_size = self.tftd.get_file_size()
|
||||
@@ -265,8 +264,8 @@ class Nextion : Driver
|
||||
log(str, 3)
|
||||
# TODO: add check for firmware versions < 126 and send proto 1.1 command for thoose
|
||||
if (string.find(str,"comok 2")==0)
|
||||
#self.sendnx(string.format("whmi-wri %d,115200,1",self.flash_size)) # Nextion Upload Protocol 1.1
|
||||
self.sendnx(string.format("whmi-wris %d,115200,1",self.flash_size)) # Nextion Upload Protocol 1.2
|
||||
self.sendnx(string.format("whmi-wri %d,115200,1",self.flash_size)) # Nextion Upload Protocol 1.1
|
||||
#self.sendnx(string.format("whmi-wris %d,115200,1",self.flash_size)) # Nextion Upload Protocol 1.2
|
||||
|
||||
# skip to byte (upload protocol 1.2)
|
||||
elif (size(msg)==1 && msg[0]==0x08)
|
||||
@@ -335,4 +334,4 @@ def send_cmd2(cmd, idx, payload, payload_json)
|
||||
tasmota.resp_cmnd_done()
|
||||
end
|
||||
|
||||
tasmota.add_cmd('CustomSend', send_cmd2)
|
||||
tasmota.add_cmd('CustomSend', send_cmd2)
|
||||
|
||||
Reference in New Issue
Block a user