Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2022-10-06 14:32:32 +0300
committerDavid Crocker <dcrocker@eschertech.com>2022-10-06 15:49:47 +0300
commitbcbb99337daa737218ce16b651e8f3a6dbffafe8 (patch)
tree92ea585db6df774e996eb986e27d2d30631a22e4
parent0c57666e05655f382addb00c574796d3c1f110c4 (diff)
Fix report of spurious driver 6 when using a MB6HC or 6XD as expansion
-rw-r--r--src/CAN/CommandProcessor.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/CAN/CommandProcessor.cpp b/src/CAN/CommandProcessor.cpp
index a430d366..545cc677 100644
--- a/src/CAN/CommandProcessor.cpp
+++ b/src/CAN/CommandProcessor.cpp
@@ -353,14 +353,17 @@ static GCodeResult EutGetInfo(const CanMessageReturnInfo& msg, const StringRef&
extra = LastDiagnosticsPart;
{
const size_t driver = msg.type - (CanMessageReturnInfo::typeDiagnosticsPart0 + 1);
- reply.lcatf("Driver %u: position %" PRIi32 ", %.1f steps/mm"
+ if (driver < NumDirectDrivers) // we have up to 7 drivers on the Duet 3 Mini but only 6 on the 6HC and 6XD
+ {
+ reply.lcatf("Driver %u: position %" PRIi32 ", %.1f steps/mm"
#if HAS_SMART_DRIVERS
- ","
+ ","
#endif
- , driver, reprap.GetMove().GetEndPoint(driver), (double)reprap.GetPlatform().DriveStepsPerUnit(driver));
+ , driver, reprap.GetMove().GetEndPoint(driver), (double)reprap.GetPlatform().DriveStepsPerUnit(driver));
#if HAS_SMART_DRIVERS
- SmartDrivers::AppendDriverStatus(driver, reply);
+ SmartDrivers::AppendDriverStatus(driver, reply);
#endif
+ }
}
break;