diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-07-23 23:31:51 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-07-23 23:31:51 +0300 |
commit | 107551283f1f69e607125b75bb8cfebf4cb8cd5d (patch) | |
tree | 7db278abd33a1ae764f1222b2544efd140540b4e | |
parent | b1619bb3707567d948d3e9e362b64398a4810b0e (diff) |
More work on speed and acceleration units
-rw-r--r-- | src/Platform/RepRap.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Platform/RepRap.cpp b/src/Platform/RepRap.cpp index b7205959..8854614b 100644 --- a/src/Platform/RepRap.cpp +++ b/src/Platform/RepRap.cpp @@ -1356,7 +1356,7 @@ OutputBuffer *RepRap::GetStatusResponse(uint8_t type, ResponseSource source) con AppendFloatArray(response, "extr", GetExtrudersInUse(), [this](size_t extruder) noexcept { return move->LiveCoordinate(ExtruderToLogicalDrive(extruder), currentTool); }, 1); // Current speeds - response->catf("},\"speeds\":{\"requested\":%.1f,\"top\":%.1f}", (double)move->GetRequestedSpeed(), (double)move->GetTopSpeed()); + response->catf("},\"speeds\":{\"requested\":%.1f,\"top\":%.1f}", (double)GCodeBuffer::InverseConvertSpeedToMm(move->GetRequestedSpeed(), true), (double)GCodeBuffer::InverseConvertSpeedToMm(move->GetTopSpeed(), true)); // Current tool number response->catf(",\"currentTool\":%d", GetCurrentToolNumber()); @@ -1839,7 +1839,7 @@ OutputBuffer *RepRap::GetConfigResponse() noexcept // Accelerations response->cat(','); - AppendFloatArray(response, "accelerations", MaxAxesPlusExtruders, [this](size_t drive) noexcept { return platform->Acceleration(drive); }, 2); + AppendFloatArray(response, "accelerations", MaxAxesPlusExtruders, [this](size_t drive) noexcept { return GCodeBuffer::InverseConvertAcceleration(platform->Acceleration(drive)); }, 2); // Motor currents response->cat(','); @@ -1886,11 +1886,11 @@ OutputBuffer *RepRap::GetConfigResponse() noexcept response->catf(",\"idleTimeout\":%.1f,", (double)(move->IdleTimeout())); // Minimum feedrates - AppendFloatArray(response, "minFeedrates", MaxAxesPlusExtruders, [this](size_t drive) noexcept { return platform->GetInstantDv(drive); }, 2); + AppendFloatArray(response, "minFeedrates", MaxAxesPlusExtruders, [this](size_t drive) noexcept { return GCodeBuffer::InverseConvertSpeedToMm(platform->GetInstantDv(drive), true); }, 2); // Maximum feedrates response->cat(','); - AppendFloatArray(response, "maxFeedrates", MaxAxesPlusExtruders, [this](size_t drive) noexcept { return platform->MaxFeedrate(drive); }, 2); + AppendFloatArray(response, "maxFeedrates", MaxAxesPlusExtruders, [this](size_t drive) noexcept { return GCodeBuffer::InverseConvertSpeedToMm(platform->MaxFeedrate(drive), true); }, 2); // Config file is no longer included, because we can use rr_configfile or M503 instead response->cat('}'); |