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:
Diffstat (limited to 'src/CAN/CanInterface.cpp')
-rw-r--r--src/CAN/CanInterface.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/CAN/CanInterface.cpp b/src/CAN/CanInterface.cpp
index 410f6580..b82de902 100644
--- a/src/CAN/CanInterface.cpp
+++ b/src/CAN/CanInterface.cpp
@@ -931,6 +931,17 @@ pre(driver.IsRemote())
}
case 7:
+ if (gb.Seen('C'))
+ {
+ // If a port name if provided, it must match the board ID
+ String<StringLength20> portName;
+ gb.GetQuotedString(portName.GetRef(), false);
+ if (isdigit(portName[0]) && IoPort::RemoveBoardAddress(portName.GetRef()) != driver.boardAddress)
+ {
+ reply.copy("Brake port must be on same board as driver");
+ return GCodeResult::error;
+ }
+ }
{
CanMessageGenericConstructor cons(M569Point7Params);
cons.PopulateFromCommand(gb);