1.2.0
This commit is contained in:
+17
-1
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
import json
|
||||
import subprocess
|
||||
import time
|
||||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
from tkinter import filedialog, messagebox
|
||||
@@ -119,6 +120,21 @@ class RP2040UploaderApp:
|
||||
sys.argv = original_argv # Always restore original argv
|
||||
|
||||
if success:
|
||||
|
||||
# --- NEW: Soft reset the board ---
|
||||
self.label.config(text="Resetting board...")
|
||||
print("Resetting board...")
|
||||
self.master.update()
|
||||
|
||||
original_argv = sys.argv
|
||||
sys.argv = ["mpremote", "connect", self.port, "reset"]
|
||||
try:
|
||||
mpremote_main()
|
||||
except SystemExit:
|
||||
pass
|
||||
finally:
|
||||
sys.argv = original_argv
|
||||
time.sleep(0.4)
|
||||
self.label.config(text="DONE")
|
||||
self.master.update()
|
||||
messagebox.showinfo("Success", "All files uploaded successfully!")
|
||||
@@ -128,7 +144,7 @@ class RP2040UploaderApp:
|
||||
if __name__ == "__main__":
|
||||
root = tk.Tk()
|
||||
app = RP2040UploaderApp(root)
|
||||
root.title("RP Loader V1.1.1")
|
||||
root.title("RP Loader V1.2.0")
|
||||
|
||||
root.iconbitmap(r'Resources/icon1.ico')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user