diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-03-22 12:39:57 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-03-22 12:39:57 +0300 |
commit | 49adabb3f9fd8a473d8e80a5610384bf3fffc146 (patch) | |
tree | d82b89ba9ac9578e67c73e9d2b0aea1eff14ff52 /src/Endstops | |
parent | a2f869fcfea81591fbf3c48a380786aefbe7eff3 (diff) |
G31 without parameters now reports the Z probe number
Diffstat (limited to 'src/Endstops')
-rw-r--r-- | src/Endstops/ZProbe.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Endstops/ZProbe.cpp b/src/Endstops/ZProbe.cpp index 5f2856d9..66111541 100644 --- a/src/Endstops/ZProbe.cpp +++ b/src/Endstops/ZProbe.cpp @@ -303,15 +303,11 @@ GCodeResult ZProbe::HandleG31(GCodeBuffer& gb, const StringRef& reply) else { const int v0 = GetReading(); + reply.printf("Z probe %u: current reading %d", number, v0); int v1; - switch (GetSecondaryValues(v1)) + if (GetSecondaryValues(v1) == 1) { - case 1: - reply.printf("Current reading %d (%d)", v0, v1); - break; - default: - reply.printf("Current reading %d", v0); - break; + reply.catf(" (%d)", v1); } reply.catf(", threshold %d, trigger height %.3f", adcValue, (double)triggerHeight); if (temperatureCoefficient != 0.0) |