diff options
Diffstat (limited to 'src/CAN/CanInterface.cpp')
-rw-r--r-- | src/CAN/CanInterface.cpp | 11 |
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); |