|
@@ -138,20 +138,18 @@ float cartes[XYZ];
|
138
|
138
|
* The workspace can be offset by some commands, or
|
139
|
139
|
* these offsets may be omitted to save on computation.
|
140
|
140
|
*/
|
141
|
|
-#if HAS_WORKSPACE_OFFSET
|
142
|
|
- #if HAS_POSITION_SHIFT
|
143
|
|
- // The distance that XYZ has been offset by G92. Reset by G28.
|
144
|
|
- float position_shift[XYZ] = { 0 };
|
145
|
|
- #endif
|
146
|
|
- #if HAS_HOME_OFFSET
|
147
|
|
- // This offset is added to the configured home position.
|
148
|
|
- // Set by M206, M428, or menu item. Saved to EEPROM.
|
149
|
|
- float home_offset[XYZ] = { 0 };
|
150
|
|
- #endif
|
151
|
|
- #if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
|
152
|
|
- // The above two are combined to save on computes
|
153
|
|
- float workspace_offset[XYZ] = { 0 };
|
154
|
|
- #endif
|
|
141
|
+#if HAS_POSITION_SHIFT
|
|
142
|
+ // The distance that XYZ has been offset by G92. Reset by G28.
|
|
143
|
+ float position_shift[XYZ] = { 0 };
|
|
144
|
+#endif
|
|
145
|
+#if HAS_HOME_OFFSET
|
|
146
|
+ // This offset is added to the configured home position.
|
|
147
|
+ // Set by M206, M428, or menu item. Saved to EEPROM.
|
|
148
|
+ float home_offset[XYZ] = { 0 };
|
|
149
|
+#endif
|
|
150
|
+#if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
|
|
151
|
+ // The above two are combined to save on computes
|
|
152
|
+ float workspace_offset[XYZ] = { 0 };
|
155
|
153
|
#endif
|
156
|
154
|
|
157
|
155
|
#if OLDSCHOOL_ABL
|
|
@@ -1518,7 +1516,7 @@ void homeaxis(const AxisEnum axis) {
|
1518
|
1516
|
* at the same positions relative to the machine.
|
1519
|
1517
|
*/
|
1520
|
1518
|
void update_software_endstops(const AxisEnum axis) {
|
1521
|
|
- #if HAS_HOME_OFFSET && HAS_POSITION_SHIFT
|
|
1519
|
+ #if HAS_HOME_OFFSET
|
1522
|
1520
|
workspace_offset[axis] = home_offset[axis] + position_shift[axis];
|
1523
|
1521
|
#endif
|
1524
|
1522
|
|