diff options
author | David Crocker <dcrocker@eschertech.com> | 2022-07-06 18:16:53 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2022-07-06 18:16:53 +0300 |
commit | fc5bfa0c1cfbe31884e5b0d8f90667e0f4557f78 (patch) | |
tree | 3058764326a1fd88d8a94578210b099944f73df7 /src | |
parent | 93fba580c031d8b635084c14eb812d64c822a6ba (diff) |
Increased format string length to 500 characters in ATE builds
Diffstat (limited to 'src')
-rw-r--r-- | src/Config/Configuration.h | 3 | ||||
-rw-r--r-- | src/FilamentMonitors/LaserFilamentMonitor.cpp | 2 | ||||
-rw-r--r-- | src/FilamentMonitors/RotatingMagnetFilamentMonitor.cpp | 2 | ||||
-rw-r--r-- | src/GCodes/GCodes.cpp | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/Config/Configuration.h b/src/Config/Configuration.h index 1d216b43..aa02d818 100644 --- a/src/Config/Configuration.h +++ b/src/Config/Configuration.h @@ -154,11 +154,12 @@ constexpr size_t StringLength256 = 256; constexpr size_t MaxHeaterNameLength = StringLength20; // Maximum number of characters in a heater name constexpr size_t MaxFanNameLength = StringLength20; // Maximum number of characters in a fan name -constexpr size_t FormatStringLength = StringLength256; #ifdef DUET3_ATE constexpr size_t GCodeReplyLength = StringLength500; // Maximum number of characters in a GCode reply that doesn't use an OutputBuffer (ATE codes can generate long replies) +constexpr size_t FormatStringLength = StringLength500; // GCode replies are processed by Platform::MessageF which uses an intermediate buffer of this length #else constexpr size_t GCodeReplyLength = StringLength256; // Maximum number of characters in a GCode reply that doesn't use an OutputBuffer +constexpr size_t FormatStringLength = StringLength256; #endif constexpr size_t MachineNameLength = StringLength50; constexpr size_t RepRapPasswordLength = StringLength20; diff --git a/src/FilamentMonitors/LaserFilamentMonitor.cpp b/src/FilamentMonitors/LaserFilamentMonitor.cpp index de9eb207..aa0890fa 100644 --- a/src/FilamentMonitors/LaserFilamentMonitor.cpp +++ b/src/FilamentMonitors/LaserFilamentMonitor.cpp @@ -485,7 +485,7 @@ FilamentSensorStatus LaserFilamentMonitor::Clear() noexcept // Print diagnostic info for this sensor void LaserFilamentMonitor::Diagnostics(MessageType mtype, unsigned int extruder) noexcept { - String<FormatStringLength> buf; + String<StringLength256> buf; buf.printf("Extruder %u: ", extruder); if (dataReceived) { diff --git a/src/FilamentMonitors/RotatingMagnetFilamentMonitor.cpp b/src/FilamentMonitors/RotatingMagnetFilamentMonitor.cpp index d2e26b45..a6563d67 100644 --- a/src/FilamentMonitors/RotatingMagnetFilamentMonitor.cpp +++ b/src/FilamentMonitors/RotatingMagnetFilamentMonitor.cpp @@ -532,7 +532,7 @@ FilamentSensorStatus RotatingMagnetFilamentMonitor::Clear() noexcept // Print diagnostic info for this sensor void RotatingMagnetFilamentMonitor::Diagnostics(MessageType mtype, unsigned int extruder) noexcept { - String<FormatStringLength> buf; + String<StringLength256> buf; buf.printf("Extruder %u: ", extruder); if (dataReceived) { diff --git a/src/GCodes/GCodes.cpp b/src/GCodes/GCodes.cpp index 5f0b1449..53acec04 100644 --- a/src/GCodes/GCodes.cpp +++ b/src/GCodes/GCodes.cpp @@ -1197,7 +1197,7 @@ void GCodes::SaveResumeInfo(bool wasPowerFailure) noexcept } else { - String<FormatStringLength> buf; + String<StringLength256> buf; // Write the header comment buf.printf("; File \"%s\" resume print after %s", printingFilename, (wasPowerFailure) ? "power failure" : "print paused"); |