Browse Source

Update software endstops if EEPROM is loaded

Scott Lahteine 8 years ago
parent
commit
41b5c48129
3 changed files with 5 additions and 1 deletions
  1. 1
    0
      Marlin/Marlin.h
  2. 1
    1
      Marlin/Marlin_main.cpp
  3. 3
    0
      Marlin/configuration_store.cpp

+ 1
- 0
Marlin/Marlin.h View File

@@ -379,6 +379,7 @@ extern uint8_t active_extruder;
379 379
   extern float mixing_factor[MIXING_STEPPERS];
380 380
 #endif
381 381
 
382
+void update_software_endstops(AxisEnum axis);
382 383
 void calculate_volumetric_multipliers();
383 384
 
384 385
 // Buzzer

+ 1
- 1
Marlin/Marlin_main.cpp View File

@@ -1470,7 +1470,7 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR);
1470 1470
  * the software endstop positions must be refreshed to remain
1471 1471
  * at the same positions relative to the machine.
1472 1472
  */
1473
-static void update_software_endstops(AxisEnum axis) {
1473
+void update_software_endstops(AxisEnum axis) {
1474 1474
   float offs = LOGICAL_POSITION(0, axis);
1475 1475
 
1476 1476
   #if ENABLED(DUAL_X_CARRIAGE)

+ 3
- 0
Marlin/configuration_store.cpp View File

@@ -186,6 +186,9 @@ void Config_Postprocess() {
186 186
   #endif
187 187
 
188 188
   calculate_volumetric_multipliers();
189
+
190
+  // Software endstops depend on home_offset
191
+  LOOP_XYZ(i) update_software_endstops((AxisEnum)i);
189 192
 }
190 193
 
191 194
 #if ENABLED(EEPROM_SETTINGS)

Loading…
Cancel
Save