Преглед на файлове

Merge pull request #5524 from thinkyhead/rc_optional_dogm_splitup

Report EEPROM data size, not final index
Scott Lahteine преди 8 години
родител
ревизия
3f6f036f7c
променени са 4 файла, в които са добавени 20 реда и са изтрити 17 реда
  1. 3
    1
      Marlin/Marlin_main.cpp
  2. 4
    3
      Marlin/configuration_store.cpp
  3. 5
    5
      Marlin/planner.cpp
  4. 8
    8
      Marlin/planner.h

+ 3
- 1
Marlin/Marlin_main.cpp Целия файл

@@ -9455,7 +9455,9 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) {
9455 9455
       // For non-interpolated delta calculate every segment
9456 9456
       for (uint16_t s = segments + 1; --s;) {
9457 9457
         DELTA_NEXT(segment_distance[i]);
9458
-        planner.buffer_line_kinematic(DELTA_VAR, _feedrate_mm_s, active_extruder);
9458
+        DELTA_IK();
9459
+        ADJUST_DELTA(DELTA_VAR); // Adjust Z if bed leveling is enabled
9460
+        planner.buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], DELTA_VAR[E_AXIS], _feedrate_mm_s, active_extruder);
9459 9461
       }
9460 9462
 
9461 9463
     #endif

+ 4
- 3
Marlin/configuration_store.cpp Целия файл

@@ -238,8 +238,9 @@ void Config_Postprocess() {
238 238
 
239 239
     eeprom_checksum = 0; // clear before first "real data"
240 240
 
241
-    const uint8_t esteppers = E_STEPPERS;
241
+    const uint8_t esteppers = COUNT(planner.axis_steps_per_mm) - XYZ;
242 242
     EEPROM_WRITE(esteppers);
243
+
243 244
     EEPROM_WRITE(planner.axis_steps_per_mm);
244 245
     EEPROM_WRITE(planner.max_feedrate_mm_s);
245 246
     EEPROM_WRITE(planner.max_acceleration_mm_per_s2);
@@ -439,7 +440,7 @@ void Config_Postprocess() {
439 440
 
440 441
       // Report storage size
441 442
       SERIAL_ECHO_START;
442
-      SERIAL_ECHOPAIR("Settings Stored (", eeprom_size);
443
+      SERIAL_ECHOPAIR("Settings Stored (", eeprom_size - (EEPROM_OFFSET));
443 444
       SERIAL_ECHOLNPGM(" bytes)");
444 445
     }
445 446
   }
@@ -680,7 +681,7 @@ void Config_Postprocess() {
680 681
           Config_Postprocess();
681 682
           SERIAL_ECHO_START;
682 683
           SERIAL_ECHO(version);
683
-          SERIAL_ECHOPAIR(" stored settings retrieved (", eeprom_index);
684
+          SERIAL_ECHOPAIR(" stored settings retrieved (", eeprom_index - (EEPROM_OFFSET));
684 685
           SERIAL_ECHOLNPGM(" bytes)");
685 686
         }
686 687
       }

+ 5
- 5
Marlin/planner.cpp Целия файл

@@ -1372,16 +1372,16 @@ void Planner::_set_position_mm(const float &a, const float &b, const float &c, c
1372 1372
 
1373 1373
 void Planner::set_position_mm_kinematic(const float position[NUM_AXIS]) {
1374 1374
   #if PLANNER_LEVELING
1375
-    float pos[XYZ] = { position[X_AXIS], position[Y_AXIS], position[Z_AXIS] };
1376
-    apply_leveling(pos);
1375
+    float lpos[XYZ] = { position[X_AXIS], position[Y_AXIS], position[Z_AXIS] };
1376
+    apply_leveling(lpos);
1377 1377
   #else
1378
-    const float * const pos = position;
1378
+    const float * const lpos = position;
1379 1379
   #endif
1380 1380
   #if IS_KINEMATIC
1381
-    inverse_kinematics(pos);
1381
+    inverse_kinematics(lpos);
1382 1382
     _set_position_mm(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], position[E_AXIS]);
1383 1383
   #else
1384
-    _set_position_mm(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], position[E_AXIS]);
1384
+    _set_position_mm(lpos[X_AXIS], lpos[Y_AXIS], lpos[Z_AXIS], position[E_AXIS]);
1385 1385
   #endif
1386 1386
 }
1387 1387
 

+ 8
- 8
Marlin/planner.h Целия файл

@@ -308,22 +308,22 @@ class Planner {
308 308
      * The target is cartesian, it's translated to delta/scara if
309 309
      * needed.
310 310
      *
311
-     *  target   - x,y,z,e CARTESIAN target in mm
311
+     *  ltarget  - x,y,z,e CARTESIAN target in mm
312 312
      *  fr_mm_s  - (target) speed of the move (mm/s)
313 313
      *  extruder - target extruder
314 314
      */
315
-    static FORCE_INLINE void buffer_line_kinematic(const float target[XYZE], const float &fr_mm_s, const uint8_t extruder) {
315
+    static FORCE_INLINE void buffer_line_kinematic(const float ltarget[XYZE], const float &fr_mm_s, const uint8_t extruder) {
316 316
       #if PLANNER_LEVELING
317
-        float pos[XYZ] = { target[X_AXIS], target[Y_AXIS], target[Z_AXIS] };
318
-        apply_leveling(pos);
317
+        float lpos[XYZ] = { ltarget[X_AXIS], ltarget[Y_AXIS], ltarget[Z_AXIS] };
318
+        apply_leveling(lpos);
319 319
       #else
320
-        const float * const pos = target;
320
+        const float * const lpos = ltarget;
321 321
       #endif
322 322
       #if IS_KINEMATIC
323
-        inverse_kinematics(pos);
324
-        _buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], target[E_AXIS], fr_mm_s, extruder);
323
+        inverse_kinematics(lpos);
324
+        _buffer_line(delta[A_AXIS], delta[B_AXIS], delta[C_AXIS], ltarget[E_AXIS], fr_mm_s, extruder);
325 325
       #else
326
-        _buffer_line(pos[X_AXIS], pos[Y_AXIS], pos[Z_AXIS], target[E_AXIS], fr_mm_s, extruder);
326
+        _buffer_line(lpos[X_AXIS], lpos[Y_AXIS], lpos[Z_AXIS], ltarget[E_AXIS], fr_mm_s, extruder);
327 327
       #endif
328 328
     }
329 329
 

Loading…
Отказ
Запис