From d7c44d485b7eedb5e988f0d20fcaf94bdc9dcc46 Mon Sep 17 00:00:00 2001 From: Louis Irwin Date: Mon, 23 Aug 2021 16:33:38 +0100 Subject: Closed loop control (#538) * Added basic support for closed loop data collection * Tidied up closed loop control code * Various stability improvements for closed loop control * Added current error to closed loop data collection * Tidied closed loop control files * Reverted changes to cproject * Moved closed-loop recording consts to shared CANlib file * Addressed PR feedback for closed loop control --- src/GCodes/GCodes3.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/GCodes/GCodes3.cpp') diff --git a/src/GCodes/GCodes3.cpp b/src/GCodes/GCodes3.cpp index 900ed34a..029c2a2f 100644 --- a/src/GCodes/GCodes3.cpp +++ b/src/GCodes/GCodes3.cpp @@ -35,6 +35,7 @@ #if SUPPORT_CAN_EXPANSION # include # include +# include #endif #ifdef I2C_IFACE @@ -1378,6 +1379,13 @@ GCodeResult GCodes::ConfigureDriver(GCodeBuffer& gb, const StringRef& reply) THR } #endif +#if SUPPORT_CAN_EXPANSION + case 5: + // In all valid cases, this will be handled by CanInterface::ConfigureRemoteDriver at the top of this function + // However, this is required here to reject the erroneous case of the requested driver not being remote. + return ClosedLoop::StartDataCollection(id, gb, reply); +#endif + case 7: // configure brake return platform.ConfigureDriverBrakePort(gb, reply, id.localDriver); -- cgit v1.2.3