Skip to content

Commit

Permalink
Fix file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
serg3295 committed Jul 2, 2024
1 parent fcba1b2 commit 88a2ce9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/ESPlorer/ESPlorer.java
Original file line number Diff line number Diff line change
Expand Up @@ -12707,9 +12707,6 @@ private void UploadFilesStart() {
}
log("sendPackets=" + Integer.toString(sendPackets.size()));
String cmd = "_up=function(n,l,ll)\n"
+ " if node.chipmodel then\n"
+ " uart.start(0)\n"
+ " end\n"
+ " local cs = 0\n"
+ " local i = 0\n"
+ " local open = file.open or io.open\n"
Expand All @@ -12733,7 +12730,7 @@ private void UploadFilesStart() {
+ " end,0)\n"
+ "end\n"
+ "if node.chipmodel then\n"
+ " uart.stop(0)\n"
+ " uart.start(0)\n"
+ "end\n"
+ "file.remove(\"" + UploadFileName + "\")\n";
sendBuf = cmdPrep(cmd);
Expand Down Expand Up @@ -12935,7 +12932,7 @@ public void serialEvent(SerialPortEvent event) {
}
if (j >= (sendBuf.size() + sendPackets.size())) {
LocalEcho = false;
send(addCR("_up=nil"), false);
send(addCR("_up=nil if node.chipmodel then uart.stop(0)end"), false);
try {
timer.stop();
} catch (Exception e) {
Expand Down

0 comments on commit 88a2ce9

Please sign in to comment.