Skip to content

Commit

Permalink
Merge pull request #97 from serg3295/fix-file-upload
Browse files Browse the repository at this point in the history
Fix file upload
  • Loading branch information
4refr0nt authored Jul 2, 2024
2 parents fcba1b2 + 88a2ce9 commit 66c62c6
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 66c62c6

Please sign in to comment.