Browse Source

Send position updates to RH

Send position updates to RH where RH can not know the end position.

For example after G28 RepetierHost assumes to be at the homing-point,
but with a servo probe we are much higher. Now the RH-software-endstops
will prevent us from going down (if activated). With this patch the
internal position of RH is updated with `current_position[]`.
AnHardt 9 years ago
parent
commit
1c6a16d5bb
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      Marlin/Marlin_main.cpp

+ 10
- 0
Marlin/Marlin_main.cpp View File

@@ -461,6 +461,8 @@ void serial_echopair_P(const char* s_P, float v)         { serialprintPGM(s_P);
461 461
 void serial_echopair_P(const char* s_P, double v)        { serialprintPGM(s_P); SERIAL_ECHO(v); }
462 462
 void serial_echopair_P(const char* s_P, unsigned long v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
463 463
 
464
+void gcode_M114();
465
+
464 466
 #if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
465 467
   float extrude_min_temp = EXTRUDE_MINTEMP;
466 468
 #endif
@@ -2696,6 +2698,8 @@ inline void gcode_G28() {
2696 2698
     }
2697 2699
   #endif
2698 2700
 
2701
+  gcode_M114(); // Send end position to RepetierHost
2702
+
2699 2703
 }
2700 2704
 
2701 2705
 #if ENABLED(MESH_BED_LEVELING)
@@ -3332,6 +3336,8 @@ inline void gcode_G28() {
3332 3336
       }
3333 3337
     #endif
3334 3338
 
3339
+    gcode_M114(); // Send end position to RepetierHost
3340
+
3335 3341
   }
3336 3342
 
3337 3343
   #if DISABLED(Z_PROBE_SLED) // could be avoided
@@ -3366,6 +3372,8 @@ inline void gcode_G28() {
3366 3372
         raise_z_for_servo();
3367 3373
       #endif
3368 3374
       stow_z_probe(false); // Retract Z Servo endstop if available. Z_PROBE_SLED is missed her.
3375
+    
3376
+      gcode_M114(); // Send end position to RepetierHost
3369 3377
     }
3370 3378
 
3371 3379
   #endif //!Z_PROBE_SLED
@@ -3932,6 +3940,8 @@ inline void gcode_M42() {
3932 3940
     delay(25);
3933 3941
 
3934 3942
     clean_up_after_endstop_move();
3943
+  
3944
+    gcode_M114(); // Send end position to RepetierHost
3935 3945
   }
3936 3946
 
3937 3947
 #endif // AUTO_BED_LEVELING_FEATURE && Z_MIN_PROBE_REPEATABILITY_TEST

Loading…
Cancel
Save