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
path: root/src/CAN
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2021-08-22 11:24:23 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-08-22 11:24:23 +0300
commit4a94d6063fabc4f0f6e3466555041b3da1390499 (patch)
tree5d2866ec7414f6e4e6b66a8e9b98fec8f1358352 /src/CAN
parent65510a271617119f47395e28b8ba42740776e66e (diff)
Added check on brake port board number
Diffstat (limited to 'src/CAN')
-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);