diff options
Diffstat (limited to 'src/GPIO/GpioPorts.cpp')
-rw-r--r-- | src/GPIO/GpioPorts.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/GPIO/GpioPorts.cpp b/src/GPIO/GpioPorts.cpp index 7498dc8d..7c9cafba 100644 --- a/src/GPIO/GpioPorts.cpp +++ b/src/GPIO/GpioPorts.cpp @@ -71,9 +71,12 @@ GCodeResult GpInputPort::Configure(uint32_t gpinNumber, GCodeBuffer &gb, const S #if SUPPORT_CAN_EXPANSION if (boardAddress != CanId::MasterAddress) { - if (CanInterface::DeleteHandle(boardAddress, handle, reply) != GCodeResult::ok) + const GCodeResult rslt = CanInterface::DeleteHandle(boardAddress, handle, reply); + if (rslt != GCodeResult::ok) { - reprap.GetPlatform().Message(AddWarning(gb.GetResponseMessageType()), reply.c_str()); + reply.cat('\n'); + const MessageType mtype = (rslt == GCodeResult::warning) ? AddWarning(gb.GetResponseMessageType()) : AddError(gb.GetResponseMessageType()); + reprap.GetPlatform().Message(mtype, reply.c_str()); reply.Clear(); } boardAddress = CanId::MasterAddress; |