Przeglądaj źródła

Patch type for max_acceleration_mm_per_s2 save/restore

Scott Lahteine 8 lat temu
rodzic
commit
0d0aa6c20d
2 zmienionych plików z 5 dodań i 5 usunięć
  1. 3
    3
      Marlin/configuration_store.cpp
  2. 2
    2
      Marlin/planner.h

+ 3
- 3
Marlin/configuration_store.cpp Wyświetl plik

@@ -479,9 +479,9 @@ void Config_Postprocess() {
479 479
       // Get only the number of E stepper parameters previously stored
480 480
       // Any steppers added later are set to their defaults
481 481
       const float def1[] = DEFAULT_AXIS_STEPS_PER_UNIT, def2[] = DEFAULT_MAX_FEEDRATE;
482
-      const long def3[] = DEFAULT_MAX_ACCELERATION;
482
+      const uint32_t def3[] = DEFAULT_MAX_ACCELERATION;
483 483
       float tmp1[XYZ + esteppers], tmp2[XYZ + esteppers];
484
-      long tmp3[XYZ + esteppers];
484
+      uint32_t tmp3[XYZ + esteppers];
485 485
       EEPROM_READ(tmp1);
486 486
       EEPROM_READ(tmp2);
487 487
       EEPROM_READ(tmp3);
@@ -710,7 +710,7 @@ void Config_Postprocess() {
710 710
  */
711 711
 void Config_ResetDefault() {
712 712
   const float tmp1[] = DEFAULT_AXIS_STEPS_PER_UNIT, tmp2[] = DEFAULT_MAX_FEEDRATE;
713
-  const long tmp3[] = DEFAULT_MAX_ACCELERATION;
713
+  const uint32_t tmp3[] = DEFAULT_MAX_ACCELERATION;
714 714
   LOOP_XYZE_N(i) {
715 715
     planner.axis_steps_per_mm[i]          = tmp1[i < COUNT(tmp1) ? i : COUNT(tmp1) - 1];
716 716
     planner.max_feedrate_mm_s[i]          = tmp2[i < COUNT(tmp2) ? i : COUNT(tmp2) - 1];

+ 2
- 2
Marlin/planner.h Wyświetl plik

@@ -148,8 +148,8 @@ class Planner {
148 148
     static float max_feedrate_mm_s[XYZE_N],     // Max speeds in mm per second
149 149
                  axis_steps_per_mm[XYZE_N],
150 150
                  steps_to_mm[XYZE_N];
151
-    static unsigned long max_acceleration_steps_per_s2[XYZE_N],
152
-                         max_acceleration_mm_per_s2[XYZE_N]; // Use M201 to override by software
151
+    static uint32_t max_acceleration_steps_per_s2[XYZE_N],
152
+                    max_acceleration_mm_per_s2[XYZE_N]; // Use M201 to override by software
153 153
 
154 154
     static millis_t min_segment_time;
155 155
     static float min_feedrate_mm_s,

Ładowanie…
Anuluj
Zapisz