Răsfoiți Sursa

fix mini config

Tuan Nguyen 11 luni în urmă
părinte
comite
c9619ea94f

+ 1 - 0
.gitignore

@@ -5,3 +5,4 @@ __pycache__/
 .env
 .idea
 *.json
+venv/

+ 4 - 1
dune_weaver_flask/modules/core/pattern_manager.py

@@ -155,7 +155,10 @@ def move_polar(theta, rho):
         
     offset = x_increment * (x_total_steps * x_scaling_factor / (state.gear_ratio * y_total_steps * y_scaling_factor))
 
-    y_increment += offset
+    if state.gear_ratio == 6.25:
+        y_increment -= offset
+    else:
+        y_increment += offset
     
     new_x_abs = state.machine_x + x_increment
     new_y_abs = state.machine_y + y_increment

+ 4 - 4
firmware/dune_weaver_mini/config.yaml

@@ -12,7 +12,7 @@ axes:
   shared_stepper_disable_pin: gpio.13
   x:
     steps_per_mm: 256
-    max_rate_mm_per_min: 300
+    max_rate_mm_per_min: 200
     acceleration_mm_per_sec2: 10
     max_travel_mm: 4000
     motor0:
@@ -28,16 +28,16 @@ axes:
       limit_all_pin: NO_PIN
   y:
     steps_per_mm: 180
-    max_rate_mm_per_min: 300
+    max_rate_mm_per_min: 200
     acceleration_mm_per_sec2: 10
     max_travel_mm: 6.25
     motor0:
       hard_limits: false
       unipolar:
         phase0_pin: gpio.16
-        phase1_pin: gpio.19
+        phase1_pin: gpio.17
         phase2_pin: gpio.18
-        phase3_pin: gpio.17
+        phase3_pin: gpio.19
         half_step: false
       limit_neg_pin: NO_PIN
       limit_pos_pin: NO_PIN