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
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Accelerometers/Accelerometers.cpp57
-rw-r--r--src/Accelerometers/Accelerometers.h3
-rw-r--r--src/CAN/CanInterface.h2
-rw-r--r--src/CAN/CanMessageGenericConstructor.h1
-rw-r--r--src/CAN/ExpansionManager.h1
-rw-r--r--src/Comms/FirmwareUpdater.h3
-rw-r--r--src/Display/Display.h3
-rw-r--r--src/DuetNG/DueXn.h4
-rw-r--r--src/Endstops/EndstopsManager.h1
-rw-r--r--src/Endstops/SwitchEndstop.h1
-rw-r--r--src/Endstops/ZProbe.h1
-rw-r--r--src/Fans/Fan.h5
-rw-r--r--src/Fans/FansManager.h1
-rw-r--r--src/Fans/LedStripDriver.h3
-rw-r--r--src/Fans/RemoteFan.h2
-rw-r--r--src/FilamentMonitors/FilamentMonitor.h2
-rw-r--r--src/GCodes/GCodeBuffer/BinaryParser.h1
-rw-r--r--src/GCodes/GCodeBuffer/GCodeBuffer.h2
-rw-r--r--src/GCodes/GCodeBuffer/StringParser.h1
-rw-r--r--src/GCodes/GCodeInput.h1
-rw-r--r--src/GCodes/GCodeMachineState.h1
-rw-r--r--src/GCodes/GCodes.h1
-rw-r--r--src/GCodes/GCodes2.cpp8
-rw-r--r--src/GCodes/GCodes3.cpp56
-rw-r--r--src/GCodes/ObjectTracker.h1
-rw-r--r--src/GCodes/Trigger.h5
-rw-r--r--src/GPIO/GpInPort.h1
-rw-r--r--src/GPIO/GpOutPort.h1
-rw-r--r--src/Hardware/SoftwareReset.h1
-rw-r--r--src/Heating/Heat.h2
-rw-r--r--src/Heating/Heater.h1
-rw-r--r--src/Heating/LocalHeater.h1
-rw-r--r--src/Heating/Sensors/TemperatureSensor.cpp2
-rw-r--r--src/Heating/Sensors/TemperatureSensor.h7
-rw-r--r--src/Heating/Sensors/TmcDriverTemperatureSensor.h2
-rw-r--r--src/InputMonitors/InputMonitor.h1
-rw-r--r--src/Linux/DataTransfer.h1
-rw-r--r--src/Linux/LinuxInterface.h1
-rw-r--r--src/Linux/LinuxMessageFormats.h1
-rw-r--r--src/Movement/HeightControl/HeightController.h4
-rw-r--r--src/Movement/InputShaper.h1
-rw-r--r--src/Movement/Move.h1
-rw-r--r--src/Movement/StepperDrivers/TMC22xx.h1
-rw-r--r--src/Movement/StepperDrivers/TMC2660.h1
-rw-r--r--src/Networking/ESP8266WiFi/WiFiInterface.h2
-rw-r--r--src/Networking/LwipEthernet/LwipEthernetInterface.h1
-rw-r--r--src/Networking/Network.h2
-rw-r--r--src/Networking/W5500Ethernet/W5500Interface.h1
-rw-r--r--src/Platform/Heap.h3
-rw-r--r--src/Platform/Logger.h5
-rw-r--r--src/Platform/OutputMemory.h5
-rw-r--r--src/Platform/Platform.cpp12
-rw-r--r--src/Platform/Platform.h21
-rw-r--r--src/Platform/RepRap.h8
-rw-r--r--src/Platform/Tasks.h5
-rw-r--r--src/PrintMonitor/PrintMonitor.h1
-rw-r--r--src/RepRapFirmware.cpp1
-rw-r--r--src/RepRapFirmware.h4
-rw-r--r--src/Storage/FileInfoParser.h1
-rw-r--r--src/Storage/MassStorage.h9
-rw-r--r--src/Tools/Spindle.h1
61 files changed, 110 insertions, 169 deletions
diff --git a/src/Accelerometers/Accelerometers.cpp b/src/Accelerometers/Accelerometers.cpp
index f793bd4d..7e4c8c49 100644
--- a/src/Accelerometers/Accelerometers.cpp
+++ b/src/Accelerometers/Accelerometers.cpp
@@ -13,12 +13,69 @@
#include <Storage/MassStorage.h>
#include <Platform/Platform.h>
#include <Platform/RepRap.h>
+#include <GCodes/GCodeBuffer/GCodeBuffer.h>
+
+#if SUPPORT_CAN_EXPANSION
+# include <CAN/CanInterface.h>
+# include <CAN/ExpansionManager.h>
+# include <CAN/CanMessageGenericConstructor.h>
+#endif
static FileStore *f = nullptr;
static unsigned int expectedSampleNumber;
static CanAddress currentBoard = CanId::NoAddress;
static uint8_t axes;
+// Deal with M955
+GCodeResult Accelerometers::ConfigureAccelerometer(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException)
+{
+ gb.MustSee('P');
+ DriverId device = gb.GetDriverId();
+
+# if SUPPORT_CAN_EXPANSION
+ if (device.IsRemote())
+ {
+ CanMessageGenericConstructor cons(M955Params);
+ cons.PopulateFromCommand(gb);
+ return cons.SendAndGetResponse(CanMessageType::accelerometerConfig, device.boardAddress, reply);
+ }
+# endif
+
+ reply.copy("Local accelerometers are not supported yet");
+ return GCodeResult::error;
+}
+
+// Deal with M956
+GCodeResult Accelerometers::StartAccelerometer(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException)
+{
+ gb.MustSee('P');
+ const DriverId device = gb.GetDriverId();
+ gb.MustSee('S');
+ const uint16_t numSamples = min<uint32_t>(gb.GetUIValue(), 65535);
+ gb.MustSee('A');
+ const uint8_t mode = gb.GetUIValue();
+
+ uint8_t axes = 0;
+ if (gb.Seen('X')) { axes |= 1u << 0; }
+ if (gb.Seen('Y')) { axes |= 1u << 1; }
+ if (gb.Seen('Z')) { axes |= 1u << 2; }
+
+ if (axes == 0)
+ {
+ axes = 0x07; // default to all three axes
+ }
+
+# if SUPPORT_CAN_EXPANSION
+ if (device.IsRemote())
+ {
+ return CanInterface::StartAccelerometer(device, axes, numSamples, mode, gb, reply);
+ }
+# endif
+
+ reply.copy("Local accelerometers are not supported yet");
+ return GCodeResult::error;
+}
+
void Accelerometers::ProcessReceivedData(CanAddress src, const CanMessageAccelerometerData& msg, size_t msgLen) noexcept
{
if (msg.firstSampleNumber == 0)
diff --git a/src/Accelerometers/Accelerometers.h b/src/Accelerometers/Accelerometers.h
index 665a7075..b29ab396 100644
--- a/src/Accelerometers/Accelerometers.h
+++ b/src/Accelerometers/Accelerometers.h
@@ -13,11 +13,14 @@
#if SUPPORT_ACCELEROMETERS
#include <CanId.h>
+#include <GCodes/GCodeException.h>
class CanMessageAccelerometerData;
namespace Accelerometers
{
+ GCodeResult ConfigureAccelerometer(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException);
+ GCodeResult StartAccelerometer(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException);
void ProcessReceivedData(CanAddress src, const CanMessageAccelerometerData& msg, size_t msgLen) noexcept;
}
diff --git a/src/CAN/CanInterface.h b/src/CAN/CanInterface.h
index 76d341ad..d19feef4 100644
--- a/src/CAN/CanInterface.h
+++ b/src/CAN/CanInterface.h
@@ -12,8 +12,6 @@
#if SUPPORT_CAN_EXPANSION
-#include <GCodes/GCodeResult.h>
-#include <Platform/MessageType.h>
#include <CanId.h>
#include <CanMessageFormats.h>
diff --git a/src/CAN/CanMessageGenericConstructor.h b/src/CAN/CanMessageGenericConstructor.h
index 50969ce7..7c621222 100644
--- a/src/CAN/CanMessageGenericConstructor.h
+++ b/src/CAN/CanMessageGenericConstructor.h
@@ -13,7 +13,6 @@
#if SUPPORT_CAN_EXPANSION
#include <CanMessageFormats.h>
-#include <GCodes/GCodeResult.h>
#include <GCodes/GCodeException.h>
class GCodeBuffer;
diff --git a/src/CAN/ExpansionManager.h b/src/CAN/ExpansionManager.h
index 63f41793..8ec862ce 100644
--- a/src/CAN/ExpansionManager.h
+++ b/src/CAN/ExpansionManager.h
@@ -15,7 +15,6 @@
#include <ObjectModel/ObjectModel.h>
#include <CanId.h>
#include <CanMessageBuffer.h>
-#include <GCodes/GCodeResult.h>
#include <General/NamedEnum.h>
NamedEnum(BoardState, uint8_t, unknown, flashing, flashFailed, resetting, running);
diff --git a/src/Comms/FirmwareUpdater.h b/src/Comms/FirmwareUpdater.h
index 4e4d4530..8c897669 100644
--- a/src/Comms/FirmwareUpdater.h
+++ b/src/Comms/FirmwareUpdater.h
@@ -8,8 +8,7 @@
#ifndef SRC_NETWORKING_FIRMWAREUPDATER_H_
#define SRC_NETWORKING_FIRMWAREUPDATER_H_
-#include "RepRapFirmware.h"
-#include "GCodes/GCodeResult.h"
+#include <RepRapFirmware.h>
namespace FirmwareUpdater
{
diff --git a/src/Display/Display.h b/src/Display/Display.h
index 9e2dbb6a..0263fe90 100644
--- a/src/Display/Display.h
+++ b/src/Display/Display.h
@@ -15,8 +15,7 @@
#include "RotaryEncoder.h"
#include "Lcd/Lcd.h"
#include "Menu.h"
-#include "GCodes/GCodeResult.h"
-#include "ObjectModel/ObjectModel.h"
+#include <ObjectModel/ObjectModel.h>
class Display INHERIT_OBJECT_MODEL
{
diff --git a/src/DuetNG/DueXn.h b/src/DuetNG/DueXn.h
index 82cabcdd..07719ef5 100644
--- a/src/DuetNG/DueXn.h
+++ b/src/DuetNG/DueXn.h
@@ -8,9 +8,7 @@
#ifndef SRC_DUETNG_DUEXN_H_
#define SRC_DUETNG_DUEXN_H_
-#include <ecv.h>
-#include <CoreIO.h>
-#include <Platform/MessageType.h>
+#include <RepRapFirmware.h>
enum class ExpansionBoardType : uint8_t
{
diff --git a/src/Endstops/EndstopsManager.h b/src/Endstops/EndstopsManager.h
index 52e7b903..fe5c441f 100644
--- a/src/Endstops/EndstopsManager.h
+++ b/src/Endstops/EndstopsManager.h
@@ -10,7 +10,6 @@
#include <RepRapFirmware.h>
#include "EndstopDefs.h"
-#include <GCodes/GCodeResult.h>
#include <ObjectModel/ObjectModel.h>
#include <RTOSIface/RTOSIface.h>
diff --git a/src/Endstops/SwitchEndstop.h b/src/Endstops/SwitchEndstop.h
index 7278f601..89fb98fa 100644
--- a/src/Endstops/SwitchEndstop.h
+++ b/src/Endstops/SwitchEndstop.h
@@ -9,7 +9,6 @@
#define SRC_ENDSTOPS_SWITCHENDSTOP_H_
#include "Endstop.h"
-#include "GCodes/GCodeResult.h"
// Switch-type endstop, either on the main board or on a CAN-connected board
class SwitchEndstop : public Endstop
diff --git a/src/Endstops/ZProbe.h b/src/Endstops/ZProbe.h
index fecf23fe..9f5e9d7e 100644
--- a/src/Endstops/ZProbe.h
+++ b/src/Endstops/ZProbe.h
@@ -9,7 +9,6 @@
#define SRC_ZPROBE_H_
#include "Endstop.h"
-#include "GCodes/GCodeResult.h"
class ZProbe : public EndstopOrZProbe
{
diff --git a/src/Fans/Fan.h b/src/Fans/Fan.h
index 1444aa0b..87bcca1b 100644
--- a/src/Fans/Fan.h
+++ b/src/Fans/Fan.h
@@ -8,10 +8,9 @@
#ifndef SRC_FAN_H_
#define SRC_FAN_H_
-#include "RepRapFirmware.h"
+#include <RepRapFirmware.h>
#include <ObjectModel/ObjectModel.h>
-#include "Hardware/IoPorts.h"
-#include "GCodes/GCodeResult.h"
+#include <Hardware/IoPorts.h>
#if SUPPORT_CAN_EXPANSION
# include <CanMessageFormats.h>
diff --git a/src/Fans/FansManager.h b/src/Fans/FansManager.h
index a1fa0f8e..309e62b3 100644
--- a/src/Fans/FansManager.h
+++ b/src/Fans/FansManager.h
@@ -10,7 +10,6 @@
#include <RepRapFirmware.h>
#include "Fan.h"
-#include "GCodes/GCodeResult.h"
#include <RTOSIface/RTOSIface.h>
#if SUPPORT_CAN_EXPANSION
diff --git a/src/Fans/LedStripDriver.h b/src/Fans/LedStripDriver.h
index 4931e868..71894ee7 100644
--- a/src/Fans/LedStripDriver.h
+++ b/src/Fans/LedStripDriver.h
@@ -8,8 +8,7 @@
#ifndef SRC_FANS_LEDSTRIPDRIVER_H_
#define SRC_FANS_LEDSTRIPDRIVER_H_
-#include "RepRapFirmware.h"
-#include "GCodes/GCodeResult.h"
+#include <RepRapFirmware.h>
class GCodeBuffer;
diff --git a/src/Fans/RemoteFan.h b/src/Fans/RemoteFan.h
index 165d7534..def0b568 100644
--- a/src/Fans/RemoteFan.h
+++ b/src/Fans/RemoteFan.h
@@ -12,8 +12,6 @@
#if SUPPORT_CAN_EXPANSION
-#include "GCodes/GCodeResult.h"
-
class RemoteFan : public Fan
{
public:
diff --git a/src/FilamentMonitors/FilamentMonitor.h b/src/FilamentMonitors/FilamentMonitor.h
index 8148c9d0..db66971a 100644
--- a/src/FilamentMonitors/FilamentMonitor.h
+++ b/src/FilamentMonitors/FilamentMonitor.h
@@ -10,8 +10,6 @@
#include <RepRapFirmware.h>
#include <Hardware/IoPorts.h>
-#include <Platform/MessageType.h>
-#include "GCodes/GCodeResult.h"
#include <ObjectModel/ObjectModel.h>
#include <RTOSIface/RTOSIface.h>
diff --git a/src/GCodes/GCodeBuffer/BinaryParser.h b/src/GCodes/GCodeBuffer/BinaryParser.h
index d2e81c06..19615473 100644
--- a/src/GCodes/GCodeBuffer/BinaryParser.h
+++ b/src/GCodes/GCodeBuffer/BinaryParser.h
@@ -13,7 +13,6 @@
#if HAS_LINUX_INTERFACE
#include <Linux/LinuxMessageFormats.h>
-#include <Platform/MessageType.h>
#include <GCodes/GCodeException.h>
#include <GCodes/GCodeMachineState.h>
diff --git a/src/GCodes/GCodeBuffer/GCodeBuffer.h b/src/GCodes/GCodeBuffer/GCodeBuffer.h
index 9e4ff97e..05f6c284 100644
--- a/src/GCodes/GCodeBuffer/GCodeBuffer.h
+++ b/src/GCodes/GCodeBuffer/GCodeBuffer.h
@@ -14,9 +14,7 @@
#include <RepRapFirmware.h>
#include <GCodes/GCodeChannel.h>
#include <GCodes/GCodeMachineState.h>
-#include <GCodes/GCodeResult.h>
#include <Linux/LinuxMessageFormats.h>
-#include <Platform/MessageType.h>
#include <ObjectModel/ObjectModel.h>
class FileGCodeInput;
diff --git a/src/GCodes/GCodeBuffer/StringParser.h b/src/GCodes/GCodeBuffer/StringParser.h
index 6ac3279f..5e744a1f 100644
--- a/src/GCodes/GCodeBuffer/StringParser.h
+++ b/src/GCodes/GCodeBuffer/StringParser.h
@@ -11,7 +11,6 @@
#include <RepRapFirmware.h>
#include <GCodes/GCodeInput.h>
#include <GCodes/GCodeMachineState.h>
-#include <Platform/MessageType.h>
#include <ObjectModel/ObjectModel.h>
#include <GCodes/GCodeException.h>
#include <Networking/NetworkDefs.h>
diff --git a/src/GCodes/GCodeInput.h b/src/GCodes/GCodeInput.h
index 8c21f9e8..2d54547e 100644
--- a/src/GCodes/GCodeInput.h
+++ b/src/GCodes/GCodeInput.h
@@ -10,7 +10,6 @@
#include <RepRapFirmware.h>
#include <Storage/FileData.h>
-#include <Platform/MessageType.h>
#include <RTOSIface/RTOSIface.h>
#include <Stream.h>
diff --git a/src/GCodes/GCodeMachineState.h b/src/GCodes/GCodeMachineState.h
index ad283e0b..1614bbae 100644
--- a/src/GCodes/GCodeMachineState.h
+++ b/src/GCodes/GCodeMachineState.h
@@ -12,7 +12,6 @@
#include <Storage/FileData.h>
#include <General/FreelistManager.h>
#include <General/NamedEnum.h>
-#include <GCodes/GCodeResult.h>
#include <GCodes/Variable.h>
// Enumeration to list all the possible states that the Gcode processing machine may be in
diff --git a/src/GCodes/GCodes.h b/src/GCodes/GCodes.h
index 6447bdb2..5133e2dd 100644
--- a/src/GCodes/GCodes.h
+++ b/src/GCodes/GCodes.h
@@ -24,7 +24,6 @@ Licence: GPL
#include "RepRapFirmware.h"
#include <Platform/RepRap.h> // for type ResponseSource
-#include "GCodeResult.h"
#include "ObjectTracker.h"
#include <Movement/RawMove.h>
#include <Libraries/sha1/sha1.h>
diff --git a/src/GCodes/GCodes2.cpp b/src/GCodes/GCodes2.cpp
index 77e41789..3b7f2787 100644
--- a/src/GCodes/GCodes2.cpp
+++ b/src/GCodes/GCodes2.cpp
@@ -51,6 +51,10 @@
# include <CAN/ExpansionManager.h>
#endif
+#if SUPPORT_ACCELEROMETERS
+# include <Accelerometers/Accelerometers.h>
+#endif
+
#ifdef DUET3_ATE
# include <Duet3Ate.h>
#endif
@@ -4541,11 +4545,11 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx
#if SUPPORT_ACCELEROMETERS
case 955:
- result = ConfigureAccelerometer(gb, reply);
+ result = Accelerometers::ConfigureAccelerometer(gb, reply);
break;
case 956:
- result = StartAccelerometer(gb, reply);
+ result = Accelerometers::StartAccelerometer(gb, reply);
break;
#endif
diff --git a/src/GCodes/GCodes3.cpp b/src/GCodes/GCodes3.cpp
index de5f58ec..dd147813 100644
--- a/src/GCodes/GCodes3.cpp
+++ b/src/GCodes/GCodes3.cpp
@@ -35,7 +35,6 @@
#if SUPPORT_CAN_EXPANSION
# include <CAN/CanInterface.h>
# include <CAN/ExpansionManager.h>
-# include <CAN/CanMessageGenericConstructor.h>
#endif
#ifdef I2C_IFACE
@@ -1713,59 +1712,4 @@ bool GCodes::ProcessWholeLineComment(GCodeBuffer& gb, const StringRef& reply) TH
return true;
}
-#if SUPPORT_ACCELEROMETERS
-
-// Deal with M955
-GCodeResult GCodes::ConfigureAccelerometer(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException)
-{
- gb.MustSee('P');
- DriverId device = gb.GetDriverId();
-
-# if SUPPORT_CAN_EXPANSION
- if (device.IsRemote())
- {
- CanMessageGenericConstructor cons(M955Params);
- cons.PopulateFromCommand(gb);
- return cons.SendAndGetResponse(CanMessageType::accelerometerConfig, device.boardAddress, reply);
- }
-# endif
-
- reply.copy("Local accelerometers are not supported yet");
- return GCodeResult::error;
-}
-
-// Deal with M956
-GCodeResult GCodes::StartAccelerometer(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException)
-{
- gb.MustSee('P');
- const DriverId device = gb.GetDriverId();
- gb.MustSee('S');
- const uint16_t numSamples = min<uint32_t>(gb.GetUIValue(), 65535);
- gb.MustSee('A');
- const uint8_t mode = gb.GetUIValue();
-
- uint8_t axes = 0;
- if (gb.Seen('X')) { axes |= 1u << 0; }
- if (gb.Seen('Y')) { axes |= 1u << 1; }
- if (gb.Seen('Z')) { axes |= 1u << 2; }
-
- if (axes == 0)
- {
- reply.copy("At least one axis must be specified");
- return GCodeResult::error;
- }
-
-# if SUPPORT_CAN_EXPANSION
- if (device.IsRemote())
- {
- return CanInterface::StartAccelerometer(device, axes, numSamples, mode, gb, reply);
- }
-# endif
-
- reply.copy("Local accelerometers are not supported yet");
- return GCodeResult::error;
-}
-
-#endif
-
// End
diff --git a/src/GCodes/ObjectTracker.h b/src/GCodes/ObjectTracker.h
index efcf4eac..bb12d5d5 100644
--- a/src/GCodes/ObjectTracker.h
+++ b/src/GCodes/ObjectTracker.h
@@ -9,7 +9,6 @@
#define SRC_GCODES_OBJECTTRACKER_H_
#include <RepRapFirmware.h>
-#include "GCodeResult.h"
#include "RestorePoint.h"
#include <ObjectModel/ObjectModel.h>
#include <Platform/Heap.h>
diff --git a/src/GCodes/Trigger.h b/src/GCodes/Trigger.h
index 86aad4e0..bdf1ac24 100644
--- a/src/GCodes/Trigger.h
+++ b/src/GCodes/Trigger.h
@@ -8,9 +8,8 @@
#ifndef SRC_GCODES_TRIGGER_H_
#define SRC_GCODES_TRIGGER_H_
-#include "RepRapFirmware.h"
-#include "GCodeResult.h"
-#include "Hardware/IoPorts.h"
+#include <RepRapFirmware.h>
+#include <Hardware/IoPorts.h>
class Trigger
{
diff --git a/src/GPIO/GpInPort.h b/src/GPIO/GpInPort.h
index f1e04b65..5ab78eec 100644
--- a/src/GPIO/GpInPort.h
+++ b/src/GPIO/GpInPort.h
@@ -10,7 +10,6 @@
#include <RepRapFirmware.h>
#include <Hardware/IoPorts.h>
-#include <GCodes/GCodeResult.h>
#include <ObjectModel/ObjectModel.h>
#if SUPPORT_CAN_EXPANSION
diff --git a/src/GPIO/GpOutPort.h b/src/GPIO/GpOutPort.h
index b1b19145..087e48f4 100644
--- a/src/GPIO/GpOutPort.h
+++ b/src/GPIO/GpOutPort.h
@@ -10,7 +10,6 @@
#include <RepRapFirmware.h>
#include <Hardware/IoPorts.h>
-#include <GCodes/GCodeResult.h>
#include <ObjectModel/ObjectModel.h>
class CanMessageGenericParser;
diff --git a/src/Hardware/SoftwareReset.h b/src/Hardware/SoftwareReset.h
index b7179a07..e0119f41 100644
--- a/src/Hardware/SoftwareReset.h
+++ b/src/Hardware/SoftwareReset.h
@@ -9,7 +9,6 @@
#define SRC_SOFTWARERESET_H_
#include <RepRapFirmware.h>
-#include <Platform/MessageType.h>
#if SAM3XA
# include <DueFlashStorage.h>
diff --git a/src/Heating/Heat.h b/src/Heating/Heat.h
index bd1f9890..bf37e91f 100644
--- a/src/Heating/Heat.h
+++ b/src/Heating/Heat.h
@@ -29,8 +29,6 @@ Licence: GPL
#include <Platform/RepRap.h>
#include "Heater.h"
#include "TemperatureError.h"
-#include <Platform/MessageType.h>
-#include <GCodes/GCodeResult.h>
#include <RTOSIface/RTOSIface.h>
class TemperatureSensor;
diff --git a/src/Heating/Heater.h b/src/Heating/Heater.h
index dc9d5e8e..7a08444c 100644
--- a/src/Heating/Heater.h
+++ b/src/Heating/Heater.h
@@ -12,7 +12,6 @@
#include <General/NamedEnum.h>
#include "FOPDT.h"
#include "HeaterMonitor.h"
-#include <GCodes/GCodeResult.h>
#include <ObjectModel/ObjectModel.h>
#include <Math/DeviationAccumulator.h>
diff --git a/src/Heating/LocalHeater.h b/src/Heating/LocalHeater.h
index 02fde4f9..040b6ba6 100644
--- a/src/Heating/LocalHeater.h
+++ b/src/Heating/LocalHeater.h
@@ -16,7 +16,6 @@
#include "FOPDT.h"
#include "TemperatureError.h"
#include <Hardware/IoPorts.h>
-#include <GCodes/GCodeResult.h>
class HeaterMonitor;
diff --git a/src/Heating/Sensors/TemperatureSensor.cpp b/src/Heating/Sensors/TemperatureSensor.cpp
index fee02dd5..e7251508 100644
--- a/src/Heating/Sensors/TemperatureSensor.cpp
+++ b/src/Heating/Sensors/TemperatureSensor.cpp
@@ -248,7 +248,7 @@ TemperatureSensor *TemperatureSensor::Create(unsigned int sensorNum, const char
{
ts = new TmcDriverTemperatureSensor(sensorNum, 0);
}
-# ifdef DUET_NG
+# if defined(DUET_NG) || defined(PCCB_10)
else if (ReducedStringEquals(typeName, TmcDriverTemperatureSensor::DuexTypeName))
{
ts = new TmcDriverTemperatureSensor(sensorNum, 1);
diff --git a/src/Heating/Sensors/TemperatureSensor.h b/src/Heating/Sensors/TemperatureSensor.h
index 96c59e6c..cebbeed4 100644
--- a/src/Heating/Sensors/TemperatureSensor.h
+++ b/src/Heating/Sensors/TemperatureSensor.h
@@ -1,10 +1,9 @@
#ifndef TEMPERATURESENSOR_H
#define TEMPERATURESENSOR_H
-#include "RepRapFirmware.h"
-#include "Heating/TemperatureError.h" // for result codes
-#include "Hardware/IoPorts.h"
-#include "GCodes/GCodeResult.h"
+#include <RepRapFirmware.h>
+#include <Heating/TemperatureError.h> // for result codes
+#include <Hardware/IoPorts.h>
#include <ObjectModel/ObjectModel.h>
class GCodeBuffer;
diff --git a/src/Heating/Sensors/TmcDriverTemperatureSensor.h b/src/Heating/Sensors/TmcDriverTemperatureSensor.h
index ca89cc44..2469df17 100644
--- a/src/Heating/Sensors/TmcDriverTemperatureSensor.h
+++ b/src/Heating/Sensors/TmcDriverTemperatureSensor.h
@@ -22,7 +22,7 @@ public:
const char *GetShortSensorType() const noexcept override;
static constexpr const char *PrimaryTypeName = "drivers";
-#ifdef DUET_NG
+#if defined(DUET_NG) || defined(PCCB_10)
static constexpr const char *DuexTypeName = "drivers-duex";
static constexpr const char *DuexTypeShortName = "driversduex";
#endif
diff --git a/src/InputMonitors/InputMonitor.h b/src/InputMonitors/InputMonitor.h
index 43ee12eb..15cfccae 100644
--- a/src/InputMonitors/InputMonitor.h
+++ b/src/InputMonitors/InputMonitor.h
@@ -13,7 +13,6 @@
#if SUPPORT_REMOTE_COMMANDS
#include <Hardware/IoPorts.h>
-#include <GCodes/GCodeResult.h>
#include <RTOSIface/RTOSIface.h>
struct CanMessageCreateInputMonitor;
diff --git a/src/Linux/DataTransfer.h b/src/Linux/DataTransfer.h
index 4935d4d6..96450726 100644
--- a/src/Linux/DataTransfer.h
+++ b/src/Linux/DataTransfer.h
@@ -15,7 +15,6 @@
#include <GCodes/GCodeFileInfo.h>
#include <GCodes/GCodeChannel.h>
#include "LinuxMessageFormats.h"
-#include <Platform/MessageType.h>
#include <RTOSIface/RTOSIface.h>
class BinaryGCodeBuffer;
diff --git a/src/Linux/LinuxInterface.h b/src/Linux/LinuxInterface.h
index 5fad27d2..b00526f4 100644
--- a/src/Linux/LinuxInterface.h
+++ b/src/Linux/LinuxInterface.h
@@ -19,7 +19,6 @@
#include "GCodes/GCodeFileInfo.h"
#include "LinuxMessageFormats.h"
#include "DataTransfer.h"
-#include <Platform/MessageType.h>
class Platform;
diff --git a/src/Linux/LinuxMessageFormats.h b/src/Linux/LinuxMessageFormats.h
index b8af2b44..5de75204 100644
--- a/src/Linux/LinuxMessageFormats.h
+++ b/src/Linux/LinuxMessageFormats.h
@@ -13,7 +13,6 @@
#include <ctime>
#include <RepRapFirmware.h>
-#include <Platform/MessageType.h>
constexpr uint8_t LinuxFormatCode = 0x5F; // standard format code for RRF SPI protocol
constexpr uint8_t LiunxFormatCodeStandalone = 0x60; // used to indicate that RRF is running in stand-alone mode
diff --git a/src/Movement/HeightControl/HeightController.h b/src/Movement/HeightControl/HeightController.h
index a6e0ae0f..c9d243fb 100644
--- a/src/Movement/HeightControl/HeightController.h
+++ b/src/Movement/HeightControl/HeightController.h
@@ -8,12 +8,10 @@
#ifndef SRC_MOVEMENT_HEIGHTCONTROL_HEIGHTCONTROLLER_H_
#define SRC_MOVEMENT_HEIGHTCONTROL_HEIGHTCONTROLLER_H_
-#include "RepRapFirmware.h"
-#undef array
+#include <RepRapFirmware.h>
#if SUPPORT_ASYNC_MOVES
-#include "GCodes/GCodeResult.h"
#include <RTOSIface/RTOSIface.h>
class HeightController
diff --git a/src/Movement/InputShaper.h b/src/Movement/InputShaper.h
index 9111715c..4ed73304 100644
--- a/src/Movement/InputShaper.h
+++ b/src/Movement/InputShaper.h
@@ -9,7 +9,6 @@
#define SRC_MOVEMENT_INPUTSHAPER_H_
#include <RepRapFirmware.h>
-#include <GCodes/GCodeResult.h>
#include <General/NamedEnum.h>
#include <ObjectModel/ObjectModel.h>
diff --git a/src/Movement/Move.h b/src/Movement/Move.h
index 0240cf3d..effe9c58 100644
--- a/src/Movement/Move.h
+++ b/src/Movement/Move.h
@@ -9,7 +9,6 @@
#define MOVE_H_
#include <RepRapFirmware.h>
-#include <Platform/MessageType.h>
#include "InputShaper.h"
#include "DDARing.h"
#include "DDA.h" // needed because of our inline functions
diff --git a/src/Movement/StepperDrivers/TMC22xx.h b/src/Movement/StepperDrivers/TMC22xx.h
index 9da18daf..967c2d48 100644
--- a/src/Movement/StepperDrivers/TMC22xx.h
+++ b/src/Movement/StepperDrivers/TMC22xx.h
@@ -13,7 +13,6 @@
#if SUPPORT_TMC22xx
#include "DriverMode.h"
-#include <Platform/MessageType.h>
// TMC22xx DRV_STATUS register bit assignments
const uint32_t TMC_RR_OT = 1u << 1; // over temperature shutdown
diff --git a/src/Movement/StepperDrivers/TMC2660.h b/src/Movement/StepperDrivers/TMC2660.h
index 34b5388f..e4145078 100644
--- a/src/Movement/StepperDrivers/TMC2660.h
+++ b/src/Movement/StepperDrivers/TMC2660.h
@@ -13,7 +13,6 @@
#include <RepRapFirmware.h>
#include "DriverMode.h"
#include <Pins.h>
-#include <Platform/MessageType.h>
// TMC2660 read response bits that are returned by the status calls
const uint32_t TMC_RR_SG = 1 << 0; // stall detected
diff --git a/src/Networking/ESP8266WiFi/WiFiInterface.h b/src/Networking/ESP8266WiFi/WiFiInterface.h
index d812ca30..a258446f 100644
--- a/src/Networking/ESP8266WiFi/WiFiInterface.h
+++ b/src/Networking/ESP8266WiFi/WiFiInterface.h
@@ -10,9 +10,7 @@
#include <RepRapFirmware.h>
#include <Networking/NetworkDefs.h>
-#include <Platform/MessageType.h>
#include <Networking/NetworkInterface.h>
-#include <GCodes/GCodeResult.h>
#include <MessageFormats.h>
// Forward declarations
diff --git a/src/Networking/LwipEthernet/LwipEthernetInterface.h b/src/Networking/LwipEthernet/LwipEthernetInterface.h
index d4dc0788..2258f618 100644
--- a/src/Networking/LwipEthernet/LwipEthernetInterface.h
+++ b/src/Networking/LwipEthernet/LwipEthernetInterface.h
@@ -11,7 +11,6 @@
#include <RepRapFirmware.h>
#include <Networking/NetworkInterface.h>
#include <Networking/NetworkDefs.h>
-#include <Platform/MessageType.h>
// We have 8 sockets available for Ethernet
const size_t NumHttpSockets = 5; // sockets 0-4 are for HTTP
diff --git a/src/Networking/Network.h b/src/Networking/Network.h
index 697360f4..abe30a0d 100644
--- a/src/Networking/Network.h
+++ b/src/Networking/Network.h
@@ -10,8 +10,6 @@
#include <RepRapFirmware.h>
#include "NetworkDefs.h"
-#include <Platform/MessageType.h>
-#include <GCodes/GCodeResult.h>
#include <RTOSIface/RTOSIface.h>
#include <ObjectModel/ObjectModel.h>
#include <General/NamedEnum.h>
diff --git a/src/Networking/W5500Ethernet/W5500Interface.h b/src/Networking/W5500Ethernet/W5500Interface.h
index dc996a81..fe9de794 100644
--- a/src/Networking/W5500Ethernet/W5500Interface.h
+++ b/src/Networking/W5500Ethernet/W5500Interface.h
@@ -11,7 +11,6 @@ Separated out from Platform.h by dc42 and extended by chrishamm
#include <Networking/NetworkInterface.h>
#include <Networking/NetworkDefs.h>
-#include <Platform/MessageType.h>
class NetworkResponder;
class HttpResponder;
diff --git a/src/Platform/Heap.h b/src/Platform/Heap.h
index 31c3619a..5fdca862 100644
--- a/src/Platform/Heap.h
+++ b/src/Platform/Heap.h
@@ -8,9 +8,8 @@
#ifndef SRC_PLATFORM_HEAP_H_
#define SRC_PLATFORM_HEAP_H_
+#include <RepRapFirmware.h>
#include <RTOSIface/RTOSIface.h>
-#include <General/StringRef.h>
-#include <Platform/MessageType.h>
class IndexSlot;
class StorageSpace;
diff --git a/src/Platform/Logger.h b/src/Platform/Logger.h
index 26ed6287..b4c24f25 100644
--- a/src/Platform/Logger.h
+++ b/src/Platform/Logger.h
@@ -8,7 +8,7 @@
#ifndef SRC_LOGGER_H_
#define SRC_LOGGER_H_
-#include "RepRapFirmware.h"
+#include <RepRapFirmware.h>
#include <General/NamedEnum.h>
NamedEnum(LogLevel, uint8_t, off, warn, info, debug);
@@ -16,8 +16,7 @@ NamedEnum(LogLevel, uint8_t, off, warn, info, debug);
#if HAS_MASS_STORAGE
#include <ctime>
-#include "Storage/FileData.h"
-#include "MessageType.h"
+#include <Storage/FileData.h>
class OutputBuffer;
diff --git a/src/Platform/OutputMemory.h b/src/Platform/OutputMemory.h
index b0f0368f..af47e8cf 100644
--- a/src/Platform/OutputMemory.h
+++ b/src/Platform/OutputMemory.h
@@ -8,9 +8,8 @@
#ifndef OUTPUTMEMORY_H_
#define OUTPUTMEMORY_H_
-#include "RepRapFirmware.h"
-#include "MessageType.h"
-#include "Storage/FileData.h"
+#include <RepRapFirmware.h>
+#include <Storage/FileData.h>
#if HAS_LINUX_INTERFACE
const size_t OUTPUT_STACK_DEPTH = 64; // Number of OutputBuffer chains that can be pushed onto one stack instance
diff --git a/src/Platform/Platform.cpp b/src/Platform/Platform.cpp
index 53d0efaa..a07698b0 100644
--- a/src/Platform/Platform.cpp
+++ b/src/Platform/Platform.cpp
@@ -4305,25 +4305,17 @@ float Platform::GetCurrentV12Voltage() const noexcept
float Platform::GetTmcDriversTemperature(unsigned int boardNumber) const noexcept
{
#if defined(DUET3MINI)
- const DriversBitmap mask = (boardNumber == 0)
- ? DriversBitmap::MakeLowestNBits(5) // drivers 0-4 are on the main board
- : DriversBitmap::MakeLowestNBits(3).ShiftUp(5); // drivers 5-7 are on the daughter board
+ const DriversBitmap mask = DriversBitmap::MakeLowestNBits(7); // report the 2-driver addon along with the main board
#elif defined(DUET3)
const DriversBitmap mask = DriversBitmap::MakeLowestNBits(6); // there are 6 drivers, only one board
#elif defined(DUET_NG)
const DriversBitmap mask = DriversBitmap::MakeLowestNBits(5).ShiftUp(5 * boardNumber); // there are 5 drivers on each board
#elif defined(DUET_M)
- const DriversBitmap mask = (boardNumber == 0)
- ? DriversBitmap::MakeLowestNBits(5) // drivers 0-4 are on the main board
- : DriversBitmap::MakeLowestNBits(2).ShiftUp(5); // drivers 5-6 are on the daughter board
+ const DriversBitmap mask = DriversBitmap::MakeLowestNBits(7); // report the 2-driver addon along with the main board
#elif defined(PCCB_10)
const DriversBitmap mask = (boardNumber == 0)
? DriversBitmap::MakeLowestNBits(2) // drivers 0,1 are on-board
: DriversBitmap::MakeLowestNBits(5).ShiftUp(2); // drivers 2-7 are on the DueX5
-#elif defined(PCCB_08_X5)
- const DriversBitmap mask = DriversBitmap::MakeLowestNBits(5); // all drivers (0-4) are on the DueX, no further expansion supported
-#elif defined(PCCB_08)
- const DriversBitmap mask = DriversBitmap::MakeLowestNBits(2); // drivers 0, 1 are on-board, no expansion supported
#else
# error Undefined board
#endif
diff --git a/src/Platform/Platform.h b/src/Platform/Platform.h
index 89c41f45..79006602 100644
--- a/src/Platform/Platform.h
+++ b/src/Platform/Platform.h
@@ -24,18 +24,17 @@ Licence: GPL
#ifndef PLATFORM_H
#define PLATFORM_H
-#include "RepRapFirmware.h"
-#include "ObjectModel/ObjectModel.h"
-#include "Hardware/IoPorts.h"
-#include "Fans/FansManager.h"
-#include "Heating/TemperatureError.h"
+#include <RepRapFirmware.h>
+#include <ObjectModel/ObjectModel.h>
+#include <Hardware/IoPorts.h>
+#include <Fans/FansManager.h>
+#include <Heating/TemperatureError.h>
#include "OutputMemory.h"
-#include "Storage/FileStore.h"
-#include "Storage/FileData.h"
-#include "Storage/MassStorage.h" // must be after Pins.h because it needs NumSdCards defined
-#include "MessageType.h"
-#include "Tools/Spindle.h"
-#include "Endstops/EndstopsManager.h"
+#include <Storage/FileStore.h>
+#include <Storage/FileData.h>
+#include <Storage/MassStorage.h> // must be after Pins.h because it needs NumSdCards defined
+#include <Tools/Spindle.h>
+#include <Endstops/EndstopsManager.h>
#include <GPIO/GpInPort.h>
#include <GPIO/GpOutPort.h>
#include <Comms/AuxDevice.h>
diff --git a/src/Platform/RepRap.h b/src/Platform/RepRap.h
index 766c1855..31b6ed51 100644
--- a/src/Platform/RepRap.h
+++ b/src/Platform/RepRap.h
@@ -21,11 +21,9 @@ Licence: GPL
#ifndef REPRAP_H
#define REPRAP_H
-#include "RepRapFirmware.h"
-#include "ObjectModel/ObjectModel.h"
-#include "MessageType.h"
-#include "RTOSIface/RTOSIface.h"
-#include "GCodes/GCodeResult.h"
+#include <RepRapFirmware.h>
+#include <ObjectModel/ObjectModel.h>
+#include <RTOSIface/RTOSIface.h>
#include <General/inplace_function.h>
#include <GCodes/Variable.h>
diff --git a/src/Platform/Tasks.h b/src/Platform/Tasks.h
index f811a927..aff42e38 100644
--- a/src/Platform/Tasks.h
+++ b/src/Platform/Tasks.h
@@ -8,9 +8,8 @@
#ifndef SRC_TASKS_H_
#define SRC_TASKS_H_
-#include "RepRapFirmware.h"
-#include "MessageType.h"
-#include "RTOSIface/RTOSIface.h"
+#include <RepRapFirmware.h>
+#include <RTOSIface/RTOSIface.h>
namespace Tasks
{
diff --git a/src/PrintMonitor/PrintMonitor.h b/src/PrintMonitor/PrintMonitor.h
index e4fa7ff6..f1d4c66a 100644
--- a/src/PrintMonitor/PrintMonitor.h
+++ b/src/PrintMonitor/PrintMonitor.h
@@ -21,7 +21,6 @@ Licence: GPL
#define PRINTMONITOR_H
#include <RepRapFirmware.h>
-#include <GCodes/GCodeResult.h>
#include <GCodes/GCodeFileInfo.h>
#include <ObjectModel/ObjectModel.h>
diff --git a/src/RepRapFirmware.cpp b/src/RepRapFirmware.cpp
index 2940a09f..98a390cf 100644
--- a/src/RepRapFirmware.cpp
+++ b/src/RepRapFirmware.cpp
@@ -161,7 +161,6 @@ Licence: GPL
****************************************************************************************************/
#include "RepRapFirmware.h"
-#include <Platform/MessageType.h>
#include <Platform/Platform.h>
#include <Platform/RepRap.h>
diff --git a/src/RepRapFirmware.h b/src/RepRapFirmware.h
index e458e843..726877db 100644
--- a/src/RepRapFirmware.h
+++ b/src/RepRapFirmware.h
@@ -65,6 +65,10 @@ const char *SafeStrptime(const char *buf, const char *format, struct tm *timeptr
# include <CoreIO.h>
# include <Devices.h>
+// The following are needed by many other files, so include them here
+# include <Platform/MessageType.h>
+# include <GCodes/GCodeResult.h>
+
#define SPEED_CRITICAL __attribute__((optimize("O2")))
// API level definition.
diff --git a/src/Storage/FileInfoParser.h b/src/Storage/FileInfoParser.h
index 504fed18..0e9764dc 100644
--- a/src/Storage/FileInfoParser.h
+++ b/src/Storage/FileInfoParser.h
@@ -10,7 +10,6 @@
#include <RepRapFirmware.h>
#include <GCodes/GCodeFileInfo.h>
-#include <GCodes/GCodeResult.h>
#if HAS_MASS_STORAGE
diff --git a/src/Storage/MassStorage.h b/src/Storage/MassStorage.h
index 46fc85bf..887d55a8 100644
--- a/src/Storage/MassStorage.h
+++ b/src/Storage/MassStorage.h
@@ -1,14 +1,13 @@
#ifndef MASSSTORAGE_H
#define MASSSTORAGE_H
-#include "RepRapFirmware.h"
-#include "Pins.h"
+#include <RepRapFirmware.h>
+#include <Pins.h>
#include "FileWriteBuffer.h"
-#include "Libraries/Fatfs/ff.h"
-#include "GCodes/GCodeResult.h"
+#include <Libraries/Fatfs/ff.h>
#include "FileStore.h"
#include "FileInfoParser.h"
-#include "RTOSIface/RTOSIface.h"
+#include <RTOSIface/RTOSIface.h>
#include <ctime>
diff --git a/src/Tools/Spindle.h b/src/Tools/Spindle.h
index 1dec36da..69eb30dd 100644
--- a/src/Tools/Spindle.h
+++ b/src/Tools/Spindle.h
@@ -11,7 +11,6 @@
#include <RepRapFirmware.h>
#include <Hardware/IoPorts.h>
#include <ObjectModel/ObjectModel.h>
-#include <GCodes/GCodeResult.h>
#include <General/NamedEnum.h>
NamedEnum(SpindleState, uint8_t, unconfigured, stopped, forward, reverse);