From 3d5970f0a30eac6f72dda3266aeb3bfbce990ccd Mon Sep 17 00:00:00 2001 From: joBr99 <29555657+joBr99@users.noreply.github.com> Date: Tue, 29 Nov 2022 17:44:46 +0100 Subject: [PATCH] potential fix for #601 --- tasmota/autoexec-beta.be | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/autoexec-beta.be b/tasmota/autoexec-beta.be index 60510544..d8ba378a 100644 --- a/tasmota/autoexec-beta.be +++ b/tasmota/autoexec-beta.be @@ -138,8 +138,7 @@ class Nextion : Driver if (self.flash_written==self.flash_size) log("FLH: Flashing complete - Time elapsed: %d", (tasmota.millis()-self.flash_start_millis)/1000) self.flash_mode = 0 - self.ser = nil - tasmota.gc() + self.ser.deinit() self.ser = serial(17, 16, 115200, serial.SERIAL_8N1) end @@ -163,6 +162,7 @@ class Nextion : Driver self.sendnx(string.format("whmi-wris %d,%d,res0",self.flash_size,self.flash_proto_baud)) end if self.flash_proto_baud != 115200 + self.ser.deinit() self.ser = serial(17, 16, self.flash_proto_baud, serial.SERIAL_8N1) end elif size(msg)==1 && msg[0]==0x08