cap zprobe retract rate to zprobe fast feedrate
authorJim Morris <morris@wolfman.com>
Tue, 23 Sep 2014 21:17:51 +0000 (14:17 -0700)
committerJim Morris <morris@wolfman.com>
Tue, 23 Sep 2014 21:17:51 +0000 (14:17 -0700)
src/modules/tools/zprobe/ZProbe.cpp

index 45bc2e3..3925cdf 100644 (file)
@@ -189,7 +189,9 @@ bool ZProbe::run_probe(int& steps, bool fast)
 bool ZProbe::return_probe(int steps)
 {
     // move probe back to where it was
-    this->current_feedrate = this->slow_feedrate*2 * Z_STEPS_PER_MM; // feedrate in steps/sec
+    float fr= this->slow_feedrate*2; // nominally twice slow feedrate
+    if(fr > this->fast_feedrate) fr= this->fast_feedrate; // unless that is greater than fast feedrate
+    this->current_feedrate = fr * Z_STEPS_PER_MM; // feedrate in steps/sec
     bool dir= steps < 0;
     steps= abs(steps);