Browse Source

Allow NO_WORKSPACE_OFFSETS with DELTA_AUTO_CALIBRATION

- On `DELTA` the `M665 H` option supplants `M206`
- On `DELTA` `NO_WORKSPACE_OFFSETS` only reverts `G92` behavior
- Spawn 4 conditionals based on `NO_WORKSPACE_OFFSETS`
- Optimize coordinate space conversion for `DELTA` workspace
- To keep EEPROM version, retain `home_offset[XYZ]`, just ignore XY
Scott Lahteine 8 years ago
parent
commit
24882adfbf
6 changed files with 106 additions and 68 deletions
  1. 9
    0
      Marlin/Conditionals_post.h
  2. 36
    16
      Marlin/Marlin.h
  3. 50
    35
      Marlin/Marlin_main.cpp
  4. 0
    7
      Marlin/SanityCheck.h
  5. 9
    8
      Marlin/configuration_store.cpp
  6. 2
    2
      Marlin/ultralcd.cpp

+ 9
- 0
Marlin/Conditionals_post.h View File

805
     #define HAS_FOLDER_SORTING (FOLDER_SORTING || ENABLED(SDSORT_GCODE))
805
     #define HAS_FOLDER_SORTING (FOLDER_SORTING || ENABLED(SDSORT_GCODE))
806
   #endif
806
   #endif
807
 
807
 
808
+  // Updated G92 behavior shifts the workspace
809
+  #define HAS_POSITION_SHIFT DISABLED(NO_WORKSPACE_OFFSETS)
810
+  // The home offset also shifts the coordinate space
811
+  #define HAS_HOME_OFFSET (DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DELTA))
812
+  // Either offset yields extra calculations on all moves
813
+  #define HAS_WORKSPACE_OFFSET (HAS_POSITION_SHIFT || HAS_HOME_OFFSET)
814
+  // M206 doesn't apply to DELTA
815
+  #define HAS_M206_COMMAND (HAS_HOME_OFFSET && DISABLED(DELTA))
816
+
808
   // LCD timeout to status screen default is 15s
817
   // LCD timeout to status screen default is 15s
809
   #ifndef LCD_TIMEOUT_TO_STATUS
818
   #ifndef LCD_TIMEOUT_TO_STATUS
810
     #define LCD_TIMEOUT_TO_STATUS 15000
819
     #define LCD_TIMEOUT_TO_STATUS 15000

+ 36
- 16
Marlin/Marlin.h View File

228
 extern float current_position[NUM_AXIS];
228
 extern float current_position[NUM_AXIS];
229
 
229
 
230
 // Workspace offsets
230
 // Workspace offsets
231
-#if DISABLED(NO_WORKSPACE_OFFSETS)
232
-  extern float position_shift[XYZ],
233
-               home_offset[XYZ],
234
-               workspace_offset[XYZ];
235
-  #define LOGICAL_POSITION(POS, AXIS) ((POS) + workspace_offset[AXIS])
236
-  #define RAW_POSITION(POS, AXIS)     ((POS) - workspace_offset[AXIS])
231
+#if HAS_WORKSPACE_OFFSET
232
+  #if HAS_HOME_OFFSET
233
+    extern float home_offset[XYZ];
234
+  #endif
235
+  #if HAS_POSITION_SHIFT
236
+    extern float position_shift[XYZ];
237
+  #endif
238
+#endif
239
+
240
+#if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
241
+  extern float workspace_offset[XYZ];
242
+  #define WORKSPACE_OFFSET(AXIS) workspace_offset[AXIS]
243
+#elif HAS_HOME_OFFSET
244
+  #define WORKSPACE_OFFSET(AXIS) home_offset[AXIS]
245
+#elif HAS_POSITION_SHIFT
246
+  #define WORKSPACE_OFFSET(AXIS) position_shift[AXIS]
247
+#else
248
+  #define WORKSPACE_OFFSET(AXIS) 0
249
+#endif
250
+
251
+#define LOGICAL_POSITION(POS, AXIS) ((POS) + WORKSPACE_OFFSET(AXIS))
252
+#define RAW_POSITION(POS, AXIS)     ((POS) - WORKSPACE_OFFSET(AXIS))
253
+
254
+#if HAS_POSITION_SHIFT || DISABLED(DELTA)
255
+  #define LOGICAL_X_POSITION(POS)   LOGICAL_POSITION(POS, X_AXIS)
256
+  #define LOGICAL_Y_POSITION(POS)   LOGICAL_POSITION(POS, Y_AXIS)
257
+  #define RAW_X_POSITION(POS)       RAW_POSITION(POS, X_AXIS)
258
+  #define RAW_Y_POSITION(POS)       RAW_POSITION(POS, Y_AXIS)
237
 #else
259
 #else
238
-  #define LOGICAL_POSITION(POS, AXIS) (POS)
239
-  #define RAW_POSITION(POS, AXIS)     (POS)
260
+  #define LOGICAL_X_POSITION(POS)   (POS)
261
+  #define LOGICAL_Y_POSITION(POS)   (POS)
262
+  #define RAW_X_POSITION(POS)       (POS)
263
+  #define RAW_Y_POSITION(POS)       (POS)
240
 #endif
264
 #endif
241
 
265
 
242
-#define LOGICAL_X_POSITION(POS)     LOGICAL_POSITION(POS, X_AXIS)
243
-#define LOGICAL_Y_POSITION(POS)     LOGICAL_POSITION(POS, Y_AXIS)
244
 #define LOGICAL_Z_POSITION(POS)     LOGICAL_POSITION(POS, Z_AXIS)
266
 #define LOGICAL_Z_POSITION(POS)     LOGICAL_POSITION(POS, Z_AXIS)
245
-#define RAW_X_POSITION(POS)         RAW_POSITION(POS, X_AXIS)
246
-#define RAW_Y_POSITION(POS)         RAW_POSITION(POS, Y_AXIS)
247
 #define RAW_Z_POSITION(POS)         RAW_POSITION(POS, Z_AXIS)
267
 #define RAW_Z_POSITION(POS)         RAW_POSITION(POS, Z_AXIS)
248
-#define RAW_CURRENT_POSITION(AXIS)  RAW_POSITION(current_position[AXIS], AXIS)
268
+#define RAW_CURRENT_POSITION(A)     RAW_##A##_POSITION(current_position[A##_AXIS])
249
 
269
 
270
+// Hotend Offsets
250
 #if HOTENDS > 1
271
 #if HOTENDS > 1
251
   extern float hotend_offset[XYZ][HOTENDS];
272
   extern float hotend_offset[XYZ][HOTENDS];
252
 #endif
273
 #endif
253
 
274
 
254
 // Software Endstops
275
 // Software Endstops
255
-extern float soft_endstop_min[XYZ];
256
-extern float soft_endstop_max[XYZ];
276
+extern float soft_endstop_min[XYZ], soft_endstop_max[XYZ];
257
 
277
 
258
 #if HAS_SOFTWARE_ENDSTOPS
278
 #if HAS_SOFTWARE_ENDSTOPS
259
   extern bool soft_endstops_enabled;
279
   extern bool soft_endstops_enabled;
263
   #define clamp_to_software_endstops(x) NOOP
283
   #define clamp_to_software_endstops(x) NOOP
264
 #endif
284
 #endif
265
 
285
 
266
-#if DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DUAL_X_CARRIAGE) || ENABLED(DELTA)
286
+#if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE)
267
   void update_software_endstops(const AxisEnum axis);
287
   void update_software_endstops(const AxisEnum axis);
268
 #endif
288
 #endif
269
 
289
 

+ 50
- 35
Marlin/Marlin_main.cpp View File

147
             S<print> T<travel> minimum speeds
147
             S<print> T<travel> minimum speeds
148
             B<minimum segment time>
148
             B<minimum segment time>
149
             X<max X jerk>, Y<max Y jerk>, Z<max Z jerk>, E<max E jerk>
149
             X<max X jerk>, Y<max Y jerk>, Z<max Z jerk>, E<max E jerk>
150
- * M206 - Set additional homing offset.
150
+ * M206 - Set additional homing offset. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
151
  * M207 - Set Retract Length: S<length>, Feedrate: F<units/min>, and Z lift: Z<distance>. (Requires FWRETRACT)
151
  * M207 - Set Retract Length: S<length>, Feedrate: F<units/min>, and Z lift: Z<distance>. (Requires FWRETRACT)
152
  * M208 - Set Recover (unretract) Additional (!) Length: S<length> and Feedrate: F<units/min>. (Requires FWRETRACT)
152
  * M208 - Set Recover (unretract) Additional (!) Length: S<length> and Feedrate: F<units/min>. (Requires FWRETRACT)
153
  * M209 - Turn Automatic Retract Detection on/off: S<0|1> (For slicers that don't support G10/11). (Requires FWRETRACT)
153
  * M209 - Turn Automatic Retract Detection on/off: S<0|1> (For slicers that don't support G10/11). (Requires FWRETRACT)
180
  * M410 - Quickstop. Abort all planned moves.
180
  * M410 - Quickstop. Abort all planned moves.
181
  * M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
181
  * M420 - Enable/Disable Leveling (with current values) S1=enable S0=disable (Requires MESH_BED_LEVELING or ABL)
182
  * M421 - Set a single Z coordinate in the Mesh Leveling grid. X<units> Y<units> Z<units> (Requires MESH_BED_LEVELING or AUTO_BED_LEVELING_UBL)
182
  * M421 - Set a single Z coordinate in the Mesh Leveling grid. X<units> Y<units> Z<units> (Requires MESH_BED_LEVELING or AUTO_BED_LEVELING_UBL)
183
- * M428 - Set the home_offset based on the current_position. Nearest edge applies.
183
+ * M428 - Set the home_offset based on the current_position. Nearest edge applies. (Disabled by NO_WORKSPACE_OFFSETS or DELTA)
184
  * M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS)
184
  * M500 - Store parameters in EEPROM. (Requires EEPROM_SETTINGS)
185
  * M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS)
185
  * M501 - Restore parameters from EEPROM. (Requires EEPROM_SETTINGS)
186
  * M502 - Revert to the default "factory settings". ** Does not write them to EEPROM! **
186
  * M502 - Revert to the default "factory settings". ** Does not write them to EEPROM! **
409
 float filament_size[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(DEFAULT_NOMINAL_FILAMENT_DIA),
409
 float filament_size[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(DEFAULT_NOMINAL_FILAMENT_DIA),
410
       volumetric_multiplier[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(1.0);
410
       volumetric_multiplier[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(1.0);
411
 
411
 
412
-#if DISABLED(NO_WORKSPACE_OFFSETS)
413
-
414
-  // The distance that XYZ has been offset by G92. Reset by G28.
415
-  float position_shift[XYZ] = { 0 };
416
-
417
-  // This offset is added to the configured home position.
418
-  // Set by M206, M428, or menu item. Saved to EEPROM.
419
-  float home_offset[XYZ] = { 0 };
420
-
421
-  // The above two are combined to save on computes
422
-  float workspace_offset[XYZ] = { 0 };
423
-
412
+#if HAS_WORKSPACE_OFFSET
413
+  #if HAS_POSITION_SHIFT
414
+    // The distance that XYZ has been offset by G92. Reset by G28.
415
+    float position_shift[XYZ] = { 0 };
416
+  #endif
417
+  #if HAS_HOME_OFFSET
418
+    // This offset is added to the configured home position.
419
+    // Set by M206, M428, or menu item. Saved to EEPROM.
420
+    float home_offset[XYZ] = { 0 };
421
+  #endif
422
+  #if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
423
+    // The above two are combined to save on computes
424
+    float workspace_offset[XYZ] = { 0 };
425
+  #endif
424
 #endif
426
 #endif
425
 
427
 
426
 // Software Endstops are based on the configured limits.
428
 // Software Endstops are based on the configured limits.
1382
 
1384
 
1383
 #endif // DUAL_X_CARRIAGE
1385
 #endif // DUAL_X_CARRIAGE
1384
 
1386
 
1385
-#if DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DUAL_X_CARRIAGE) || ENABLED(DELTA)
1387
+#if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE)
1386
 
1388
 
1387
   /**
1389
   /**
1388
    * Software endstops can be used to monitor the open end of
1390
    * Software endstops can be used to monitor the open end of
1394
    * at the same positions relative to the machine.
1396
    * at the same positions relative to the machine.
1395
    */
1397
    */
1396
   void update_software_endstops(const AxisEnum axis) {
1398
   void update_software_endstops(const AxisEnum axis) {
1397
-    const float offs = workspace_offset[axis] = home_offset[axis] + position_shift[axis];
1399
+    const float offs = 0.0
1400
+      #if HAS_HOME_OFFSET
1401
+        + home_offset[axis]
1402
+      #endif
1403
+      #if HAS_POSITION_SHIFT
1404
+        + position_shift[axis]
1405
+      #endif
1406
+    ;
1407
+
1408
+    #if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
1409
+      workspace_offset[axis] = offs;
1410
+    #endif
1398
 
1411
 
1399
     #if ENABLED(DUAL_X_CARRIAGE)
1412
     #if ENABLED(DUAL_X_CARRIAGE)
1400
       if (axis == X_AXIS) {
1413
       if (axis == X_AXIS) {
1427
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1440
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1428
       if (DEBUGGING(LEVELING)) {
1441
       if (DEBUGGING(LEVELING)) {
1429
         SERIAL_ECHOPAIR("For ", axis_codes[axis]);
1442
         SERIAL_ECHOPAIR("For ", axis_codes[axis]);
1430
-        #if DISABLED(NO_WORKSPACE_OFFSETS)
1443
+        #if HAS_HOME_OFFSET
1431
           SERIAL_ECHOPAIR(" axis:\n home_offset = ", home_offset[axis]);
1444
           SERIAL_ECHOPAIR(" axis:\n home_offset = ", home_offset[axis]);
1445
+        #endif
1446
+        #if HAS_POSITION_SHIFT
1432
           SERIAL_ECHOPAIR("\n position_shift = ", position_shift[axis]);
1447
           SERIAL_ECHOPAIR("\n position_shift = ", position_shift[axis]);
1433
         #endif
1448
         #endif
1434
         SERIAL_ECHOPAIR("\n soft_endstop_min = ", soft_endstop_min[axis]);
1449
         SERIAL_ECHOPAIR("\n soft_endstop_min = ", soft_endstop_min[axis]);
1442
     #endif
1457
     #endif
1443
   }
1458
   }
1444
 
1459
 
1445
-#endif // NO_WORKSPACE_OFFSETS
1460
+#endif // HAS_WORKSPACE_OFFSET || DUAL_X_CARRIAGE
1446
 
1461
 
1447
-#if DISABLED(NO_WORKSPACE_OFFSETS) && DISABLED(DELTA)
1462
+#if HAS_M206_COMMAND
1448
   /**
1463
   /**
1449
    * Change the home offset for an axis, update the current
1464
    * Change the home offset for an axis, update the current
1450
    * position and the software endstops to retain the same
1465
    * position and the software endstops to retain the same
1458
     home_offset[axis] = v;
1473
     home_offset[axis] = v;
1459
     update_software_endstops(axis);
1474
     update_software_endstops(axis);
1460
   }
1475
   }
1461
-#endif // !NO_WORKSPACE_OFFSETS && !DELTA
1476
+#endif // HAS_M206_COMMAND
1462
 
1477
 
1463
 /**
1478
 /**
1464
  * Set an axis' current position to its home position (after homing).
1479
  * Set an axis' current position to its home position (after homing).
1489
 
1504
 
1490
   axis_known_position[axis] = axis_homed[axis] = true;
1505
   axis_known_position[axis] = axis_homed[axis] = true;
1491
 
1506
 
1492
-  #if DISABLED(NO_WORKSPACE_OFFSETS)
1507
+  #if HAS_POSITION_SHIFT
1493
     position_shift[axis] = 0;
1508
     position_shift[axis] = 0;
1494
     update_software_endstops(axis);
1509
     update_software_endstops(axis);
1495
   #endif
1510
   #endif
1565
 
1580
 
1566
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1581
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1567
     if (DEBUGGING(LEVELING)) {
1582
     if (DEBUGGING(LEVELING)) {
1568
-      #if DISABLED(NO_WORKSPACE_OFFSETS)
1583
+      #if HAS_HOME_OFFSET
1569
         SERIAL_ECHOPAIR("> home_offset[", axis_codes[axis]);
1584
         SERIAL_ECHOPAIR("> home_offset[", axis_codes[axis]);
1570
         SERIAL_ECHOLNPAIR("] = ", home_offset[axis]);
1585
         SERIAL_ECHOLNPAIR("] = ", home_offset[axis]);
1571
       #endif
1586
       #endif
5366
         current_position[i] = code_value_axis_units(i);
5381
         current_position[i] = code_value_axis_units(i);
5367
         if (i != E_AXIS) didXYZ = true;
5382
         if (i != E_AXIS) didXYZ = true;
5368
       #else
5383
       #else
5369
-        #if DISABLED(NO_WORKSPACE_OFFSETS)
5384
+        #if HAS_POSITION_SHIFT
5370
           float p = current_position[i];
5385
           float p = current_position[i];
5371
         #endif
5386
         #endif
5372
         float v = code_value_axis_units(i);
5387
         float v = code_value_axis_units(i);
5375
 
5390
 
5376
         if (i != E_AXIS) {
5391
         if (i != E_AXIS) {
5377
           didXYZ = true;
5392
           didXYZ = true;
5378
-          #if DISABLED(NO_WORKSPACE_OFFSETS)
5393
+          #if HAS_POSITION_SHIFT
5379
             position_shift[i] += v - p; // Offset the coordinate space
5394
             position_shift[i] += v - p; // Offset the coordinate space
5380
             update_software_endstops((AxisEnum)i);
5395
             update_software_endstops((AxisEnum)i);
5381
           #endif
5396
           #endif
7382
   if (code_seen('E')) planner.max_jerk[E_AXIS] = code_value_axis_units(E_AXIS);
7397
   if (code_seen('E')) planner.max_jerk[E_AXIS] = code_value_axis_units(E_AXIS);
7383
 }
7398
 }
7384
 
7399
 
7385
-#if DISABLED(NO_WORKSPACE_OFFSETS) && DISABLED(DELTA)
7400
+#if HAS_M206_COMMAND
7386
 
7401
 
7387
   /**
7402
   /**
7388
    * M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y
7403
    * M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y
7401
     report_current_position();
7416
     report_current_position();
7402
   }
7417
   }
7403
 
7418
 
7404
-#endif // NO_WORKSPACE_OFFSETS
7419
+#endif // HAS_M206_COMMAND
7405
 
7420
 
7406
 #if ENABLED(DELTA)
7421
 #if ENABLED(DELTA)
7407
   /**
7422
   /**
8280
 
8295
 
8281
 #endif
8296
 #endif
8282
 
8297
 
8283
-#if DISABLED(NO_WORKSPACE_OFFSETS) && DISABLED(DELTA)
8298
+#if HAS_M206_COMMAND
8284
 
8299
 
8285
   /**
8300
   /**
8286
    * M428: Set home_offset based on the distance between the
8301
    * M428: Set home_offset based on the distance between the
8322
     }
8337
     }
8323
   }
8338
   }
8324
 
8339
 
8325
-#endif // NO_WORKSPACE_OFFSETS
8340
+#endif // HAS_M206_COMMAND
8326
 
8341
 
8327
 /**
8342
 /**
8328
  * M500: Store settings in EEPROM
8343
  * M500: Store settings in EEPROM
9301
           // The newly-selected extruder XY is actually at...
9316
           // The newly-selected extruder XY is actually at...
9302
           current_position[X_AXIS] += xydiff[X_AXIS];
9317
           current_position[X_AXIS] += xydiff[X_AXIS];
9303
           current_position[Y_AXIS] += xydiff[Y_AXIS];
9318
           current_position[Y_AXIS] += xydiff[Y_AXIS];
9304
-          #if DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DUAL_X_CARRIAGE)
9319
+          #if HAS_WORKSPACE_OFFSET || ENABLED(DUAL_X_CARRIAGE)
9305
             for (uint8_t i = X_AXIS; i <= Y_AXIS; i++) {
9320
             for (uint8_t i = X_AXIS; i <= Y_AXIS; i++) {
9306
-              #if DISABLED(NO_WORKSPACE_OFFSETS)
9321
+              #if HAS_POSITION_SHIFT
9307
                 position_shift[i] += xydiff[i];
9322
                 position_shift[i] += xydiff[i];
9308
               #endif
9323
               #endif
9309
               update_software_endstops((AxisEnum)i);
9324
               update_software_endstops((AxisEnum)i);
9895
         gcode_M205();
9910
         gcode_M205();
9896
         break;
9911
         break;
9897
 
9912
 
9898
-      #if DISABLED(NO_WORKSPACE_OFFSETS) && DISABLED(DELTA)
9913
+      #if HAS_M206_COMMAND
9899
         case 206: // M206: Set home offsets
9914
         case 206: // M206: Set home offsets
9900
           gcode_M206();
9915
           gcode_M206();
9901
           break;
9916
           break;
10063
           break;
10078
           break;
10064
       #endif
10079
       #endif
10065
 
10080
 
10066
-      #if DISABLED(NO_WORKSPACE_OFFSETS) && DISABLED(DELTA)
10081
+      #if HAS_M206_COMMAND
10067
         case 428: // M428: Apply current_position to home_offset
10082
         case 428: // M428: Apply current_position to home_offset
10068
           gcode_M428();
10083
           gcode_M428();
10069
           break;
10084
           break;
10584
    * splitting the move where it crosses mesh borders.
10599
    * splitting the move where it crosses mesh borders.
10585
    */
10600
    */
10586
   void mesh_line_to_destination(float fr_mm_s, uint8_t x_splits = 0xff, uint8_t y_splits = 0xff) {
10601
   void mesh_line_to_destination(float fr_mm_s, uint8_t x_splits = 0xff, uint8_t y_splits = 0xff) {
10587
-    int cx1 = mbl.cell_index_x(RAW_CURRENT_POSITION(X_AXIS)),
10588
-        cy1 = mbl.cell_index_y(RAW_CURRENT_POSITION(Y_AXIS)),
10602
+    int cx1 = mbl.cell_index_x(RAW_CURRENT_POSITION(X)),
10603
+        cy1 = mbl.cell_index_y(RAW_CURRENT_POSITION(Y)),
10589
         cx2 = mbl.cell_index_x(RAW_X_POSITION(destination[X_AXIS])),
10604
         cx2 = mbl.cell_index_x(RAW_X_POSITION(destination[X_AXIS])),
10590
         cy2 = mbl.cell_index_y(RAW_Y_POSITION(destination[Y_AXIS]));
10605
         cy2 = mbl.cell_index_y(RAW_Y_POSITION(destination[Y_AXIS]));
10591
     NOMORE(cx1, GRID_MAX_POINTS_X - 2);
10606
     NOMORE(cx1, GRID_MAX_POINTS_X - 2);
11799
   // This also updates variables in the planner, elsewhere
11814
   // This also updates variables in the planner, elsewhere
11800
   (void)settings.load();
11815
   (void)settings.load();
11801
 
11816
 
11802
-  #if DISABLED(NO_WORKSPACE_OFFSETS)
11817
+  #if HAS_M206_COMMAND
11803
     // Initialize current position based on home_offset
11818
     // Initialize current position based on home_offset
11804
     COPY(current_position, home_offset);
11819
     COPY(current_position, home_offset);
11805
   #else
11820
   #else

+ 0
- 7
Marlin/SanityCheck.h View File

392
 #endif
392
 #endif
393
 
393
 
394
 /**
394
 /**
395
- * Delta Auto calibration
396
- */
397
-#if ENABLED(DELTA_AUTO_CALIBRATION) && ENABLED(NO_WORKSPACE_OFFSETS)
398
-  #error "DELTA_AUTO_CALIBRATION is incompatible with NO_WORKSPACE_OFFSETS."
399
-#endif
400
-
401
-/**
402
  * Allow only one bed leveling option to be defined
395
  * Allow only one bed leveling option to be defined
403
  */
396
  */
404
 static_assert(1 >= 0
397
 static_assert(1 >= 0

+ 9
- 8
Marlin/configuration_store.cpp View File

202
 
202
 
203
   calculate_volumetric_multipliers();
203
   calculate_volumetric_multipliers();
204
 
204
 
205
-  #if DISABLED(NO_WORKSPACE_OFFSETS) || ENABLED(DUAL_X_CARRIAGE) || ENABLED(DELTA)
205
+  #if HAS_HOME_OFFSET || ENABLED(DUAL_X_CARRIAGE)
206
     // Software endstops depend on home_offset
206
     // Software endstops depend on home_offset
207
     LOOP_XYZ(i) update_software_endstops((AxisEnum)i);
207
     LOOP_XYZ(i) update_software_endstops((AxisEnum)i);
208
   #endif
208
   #endif
299
     EEPROM_WRITE(planner.min_travel_feedrate_mm_s);
299
     EEPROM_WRITE(planner.min_travel_feedrate_mm_s);
300
     EEPROM_WRITE(planner.min_segment_time);
300
     EEPROM_WRITE(planner.min_segment_time);
301
     EEPROM_WRITE(planner.max_jerk);
301
     EEPROM_WRITE(planner.max_jerk);
302
-    #if ENABLED(NO_WORKSPACE_OFFSETS)
302
+    #if !HAS_HOME_OFFSET
303
       const float home_offset[XYZ] = { 0 };
303
       const float home_offset[XYZ] = { 0 };
304
     #endif
304
     #endif
305
     #if ENABLED(DELTA)
305
     #if ENABLED(DELTA)
653
       EEPROM_READ(planner.min_segment_time);
653
       EEPROM_READ(planner.min_segment_time);
654
       EEPROM_READ(planner.max_jerk);
654
       EEPROM_READ(planner.max_jerk);
655
 
655
 
656
-      #if ENABLED(NO_WORKSPACE_OFFSETS)
656
+      #if !HAS_HOME_OFFSET
657
         float home_offset[XYZ];
657
         float home_offset[XYZ];
658
       #endif
658
       #endif
659
       EEPROM_READ(home_offset);
659
       EEPROM_READ(home_offset);
999
     planner.z_fade_height = 0.0;
999
     planner.z_fade_height = 0.0;
1000
   #endif
1000
   #endif
1001
 
1001
 
1002
-  #if DISABLED(NO_WORKSPACE_OFFSETS)
1002
+  #if HAS_HOME_OFFSET
1003
     ZERO(home_offset);
1003
     ZERO(home_offset);
1004
   #endif
1004
   #endif
1005
 
1005
 
1039
     delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND;
1039
     delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND;
1040
     COPY(delta_diagonal_rod_trim, drt);
1040
     COPY(delta_diagonal_rod_trim, drt);
1041
     COPY(delta_tower_angle_trim, dta);
1041
     COPY(delta_tower_angle_trim, dta);
1042
-    #if ENABLED(DELTA)
1043
-      home_offset[Z_AXIS] = 0;
1044
-    #endif
1042
+    home_offset[Z_AXIS] = 0;
1043
+
1045
   #elif ENABLED(Z_DUAL_ENDSTOPS)
1044
   #elif ENABLED(Z_DUAL_ENDSTOPS)
1045
+
1046
     float z_endstop_adj =
1046
     float z_endstop_adj =
1047
       #ifdef Z_DUAL_ENDSTOPS_ADJUSTMENT
1047
       #ifdef Z_DUAL_ENDSTOPS_ADJUSTMENT
1048
         Z_DUAL_ENDSTOPS_ADJUSTMENT
1048
         Z_DUAL_ENDSTOPS_ADJUSTMENT
1050
         0
1050
         0
1051
       #endif
1051
       #endif
1052
     ;
1052
     ;
1053
+
1053
   #endif
1054
   #endif
1054
 
1055
 
1055
   #if ENABLED(ULTIPANEL)
1056
   #if ENABLED(ULTIPANEL)
1254
     SERIAL_ECHOPAIR(" E", planner.max_jerk[E_AXIS]);
1255
     SERIAL_ECHOPAIR(" E", planner.max_jerk[E_AXIS]);
1255
     SERIAL_EOL;
1256
     SERIAL_EOL;
1256
 
1257
 
1257
-    #if DISABLED(NO_WORKSPACE_OFFSETS) && DISABLED(DELTA)
1258
+    #if HAS_M206_COMMAND
1258
       CONFIG_ECHO_START;
1259
       CONFIG_ECHO_START;
1259
       if (!forReplay) {
1260
       if (!forReplay) {
1260
         SERIAL_ECHOLNPGM("Home offset (mm)");
1261
         SERIAL_ECHOLNPGM("Home offset (mm)");

+ 2
- 2
Marlin/ultralcd.cpp View File

817
    *
817
    *
818
    */
818
    */
819
 
819
 
820
-  #if DISABLED(NO_WORKSPACE_OFFSETS) && DISABLED(DELTA)
820
+  #if HAS_M206_COMMAND
821
     /**
821
     /**
822
      * Set the home offset based on the current_position
822
      * Set the home offset based on the current_position
823
      */
823
      */
1672
 
1672
 
1673
     #endif
1673
     #endif
1674
 
1674
 
1675
-    #if DISABLED(NO_WORKSPACE_OFFSETS) && DISABLED(DELTA)
1675
+    #if HAS_M206_COMMAND
1676
       //
1676
       //
1677
       // Set Home Offsets
1677
       // Set Home Offsets
1678
       //
1678
       //

Loading…
Cancel
Save