diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-12-27 17:06:26 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-12-27 17:06:26 +0300 |
commit | c8d3ab8be56bbbc9e4ced2234392353606f1b891 (patch) | |
tree | a258beb68b1b23541a37a2af4d63ad01ae083bcc /src/CAN | |
parent | 0a46d5ad95faadd5c023cf52db06a9aa184b12b8 (diff) |
Added SUPPORT_REMOTE_COMMANDS
Diffstat (limited to 'src/CAN')
-rw-r--r-- | src/CAN/CommandProcessor.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/CAN/CommandProcessor.cpp b/src/CAN/CommandProcessor.cpp index 201b188b..304beb57 100644 --- a/src/CAN/CommandProcessor.cpp +++ b/src/CAN/CommandProcessor.cpp @@ -287,7 +287,7 @@ static void HandleInputStateChanged(const CanMessageInputChanged& msg, CanAddres } } -#ifndef DUET3_ATE +#if SUPPORT_REMOTE_COMMANDS static GCodeResult EutGetInfo(const CanMessageReturnInfo& msg, const StringRef& reply, uint8_t& extra) { @@ -311,9 +311,7 @@ static GCodeResult EutGetInfo(const CanMessageReturnInfo& msg, const StringRef& case CanMessageReturnInfo::typeM408: // For now we ignore the parameter and always return the same set of info // This command is currently only used by the ATE, which needs the board type and the voltages - reply.copy("{\"firmwareElectronics\":\"Duet 3 "); - reply.cat(BOARD_NAME); - reply.cat("\""); + reply.printf("{\"firmwareElectronics\":\"Duet 3 %.0s\"", BOARD_NAME); #if HAS_VOLTAGE_MONITOR { const MinMaxCurrent voltages = reprap.GetPlatform().GetPowerVoltages(); @@ -380,7 +378,7 @@ void CommandProcessor::ProcessReceivedMessage(CanMessageBuffer *buf) noexcept if (buf->id.Src() != CanInterface::GetCanAddress()) // I don't think we should receive our own broadcasts, but in case we do... { const CanMessageType id = buf->id.MsgType(); -#ifndef DUET3_ATE +#if SUPPORT_REMOTE_COMMANDS if (CanInterface::InEutMode()) { String<StringLength500> reply; |