diff options
author | Christian Hammacher <bmasterc@gmail.com> | 2021-11-15 15:14:32 +0300 |
---|---|---|
committer | Christian Hammacher <bmasterc@gmail.com> | 2021-11-15 15:14:32 +0300 |
commit | be212de630ce67e283d7ab78cda796165e2b7d43 (patch) | |
tree | 3756f5d518e6edf0f908f160874a12c58d4e8211 /src/GCodes | |
parent | 510b4f4bb221964a829974185bb55972c3141911 (diff) |
Made SBC file handling more robust
Diffstat (limited to 'src/GCodes')
-rw-r--r-- | src/GCodes/GCodeBuffer/GCodeBuffer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GCodes/GCodeBuffer/GCodeBuffer.cpp b/src/GCodes/GCodeBuffer/GCodeBuffer.cpp index 5ead2442..76437228 100644 --- a/src/GCodes/GCodeBuffer/GCodeBuffer.cpp +++ b/src/GCodes/GCodeBuffer/GCodeBuffer.cpp @@ -954,10 +954,10 @@ bool GCodeBuffer::RequestMacroFile(const char *filename, bool fromCode) noexcept // Wait for a response (but not forever) isWaitingForMacro = true; reprap.GetSbcInterface().EventOccurred(true); - if (!macroSemaphore.Take(SpiMacroRequestTimeout)) + if (!macroSemaphore.Take(SpiMaxRequestTime)) { isWaitingForMacro = false; - reprap.GetPlatform().MessageF(ErrorMessage, "Failed to get macro response within %" PRIu32 "ms from SBC (channel %s)\n", SpiMacroRequestTimeout, GetChannel().ToString()); + reprap.GetPlatform().MessageF(ErrorMessage, "Timeout while waiting for macro file %s (channel %s)\n", filename, GetChannel().ToString()); return false; } } |