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
   extern float mixing_factor[MIXING_STEPPERS];
379
   extern float mixing_factor[MIXING_STEPPERS];
380
 #endif
380
 #endif
381
 
381
 
382
+void update_software_endstops(AxisEnum axis);
382
 void calculate_volumetric_multipliers();
383
 void calculate_volumetric_multipliers();
383
 
384
 
384
 // Buzzer
385
 // Buzzer

+ 1
- 1
Marlin/Marlin_main.cpp View File

1470
  * the software endstop positions must be refreshed to remain
1470
  * the software endstop positions must be refreshed to remain
1471
  * at the same positions relative to the machine.
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
   float offs = LOGICAL_POSITION(0, axis);
1474
   float offs = LOGICAL_POSITION(0, axis);
1475
 
1475
 
1476
   #if ENABLED(DUAL_X_CARRIAGE)
1476
   #if ENABLED(DUAL_X_CARRIAGE)

+ 3
- 0
Marlin/configuration_store.cpp View File

186
   #endif
186
   #endif
187
 
187
 
188
   calculate_volumetric_multipliers();
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
 #if ENABLED(EEPROM_SETTINGS)
194
 #if ENABLED(EEPROM_SETTINGS)

Loading…
Cancel
Save