diff options
author | Louis Irwin <coding@louisirwin.co.uk> | 2021-08-23 18:33:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-23 18:33:38 +0300 |
commit | d7c44d485b7eedb5e988f0d20fcaf94bdc9dcc46 (patch) | |
tree | de5dd907a431679e80df56b20fc32623f1b3e24b /src/GCodes/GCodes3.cpp | |
parent | 59d8d5b76922cf2dc3ed20ba90034dc1a312070a (diff) |
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
Diffstat (limited to 'src/GCodes/GCodes3.cpp')
-rw-r--r-- | src/GCodes/GCodes3.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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 <CAN/CanInterface.h> # include <CAN/ExpansionManager.h> +# include <ClosedLoop/ClosedLoop.h> #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); |