فهرست منبع

Add support for esp32_TMC2209 firmware flasher. Minor styling fixes

Thokoop 1 سال پیش
والد
کامیت
fe3ee16278
3فایلهای تغییر یافته به همراه10 افزوده شده و 2 حذف شده
  1. 3 1
      app.py
  2. 6 0
      static/css/style.css
  3. 1 1
      templates/index.html

+ 3 - 1
app.py

@@ -1171,7 +1171,7 @@ def flash_firmware():
         bin_file_path = f"{ino_file_path}.bin"  # For ESP32 firmware
 
         # Check the device type
-        if motor_type.lower() == "esp32":
+        if motor_type.lower() in ["esp32", "esp32_tmc2209"]:
             if not os.path.exists(bin_file_path):
                 return jsonify({"success": False, "error": f"Firmware binary not found: {bin_file_path}"}), 404
 
@@ -1244,6 +1244,8 @@ def update_software():
     # Checkout the latest tag
     run_command(["git", "checkout", latest_remote_tag, '--force'], f"Failed to checkout version {latest_remote_tag}")
 
+    run_command(["docker", "compose", "pull"], "Failed to fetch Docker containers")
+
     # Restart Docker containers
     run_command(["docker", "compose", "up", "-d"], "Failed to restart Docker containers")
 

+ 6 - 0
static/css/style.css

@@ -344,6 +344,12 @@ section.version {
     flex-wrap: wrap;
 }
 
+section#settings-container > section{
+    padding-left: 0;
+    padding-right: 0;
+}
+
+
 .version .header {
     width: 100%;
 }

+ 1 - 1
templates/index.html

@@ -356,7 +356,7 @@
                 </div>
                 <div class="button-group">
                     <div id="motor_selection" style="display: none;">
-                        <h3>Select installed motor driver</h3>
+                        <h3>Select installed motor driver: </h3>
                         <select id="manual_motor_type">
                             <option value="TMC2209">Arduino TMC2209</option>
                             <option value="DRV8825">Arduino DRV8825</option>