Skip to content
This repository was archived by the owner on Jul 9, 2020. It is now read-only.

Commit 6950d12

Browse files
committed
Fixes for DSF
Increased maximum code buffer size to accomodate longer messages Bug fix: G-code file info from DSF was not fully initialized Bug fix: Message boxes from DSF were not always correctly registered
1 parent 85a33c7 commit 6950d12

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/Linux/DataTransfer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ void DataTransfer::ReadPrintStartedInfo(size_t packetLength, StringRef& filename
228228
{
229229
// Read header
230230
const PrintStartedHeader *header = ReadDataHeader<PrintStartedHeader>();
231+
info.isValid = true;
231232
info.numFilaments = header->numFilaments;
232233
info.lastModifiedTime = header->lastModifiedTime;
233234
info.fileSize = header->fileSize;

src/Linux/MessageFormats.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ constexpr uint16_t LinuxProtocolVersion = 1;
2424
constexpr size_t LinuxTransferBufferSize = 8192; // maximum length of a data transfer. Must be a multiple of 4 and kept in sync with Duet Control Server!
2525
static_assert(LinuxTransferBufferSize % sizeof(uint32_t) == 0, "LinuxTransferBufferSize must be a whole number of dwords");
2626

27-
constexpr size_t MaxCodeBufferSize = 192; // maximum length of a G/M/T-code in binary encoding
27+
constexpr size_t MaxCodeBufferSize = 256; // maximum length of a G/M/T-code in binary encoding
2828
static_assert(MaxCodeBufferSize % sizeof(uint32_t) == 0, "MaxCodeBufferSize must be a whole number of dwords");
2929
static_assert(MaxCodeBufferSize >= GCODE_LENGTH, "MaxCodeBufferSize must be at least as big as GCODE_LENGTH");
3030

src/Platform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3487,7 +3487,7 @@ void Platform::Message(MessageType type, const char *message)
34873487
// sParam = 3 As for 2 but also display a Cancel button
34883488
void Platform::SendAlert(MessageType mt, const char *message, const char *title, int sParam, float tParam, AxesBitmap controls)
34893489
{
3490-
if ((mt & (HttpMessage | AuxMessage)) != 0)
3490+
if ((mt & (HttpMessage | AuxMessage | BinaryCodeReplyFlag)) != 0)
34913491
{
34923492
reprap.SetAlert(message, title, sParam, tParam, controls); // make the RepRap class cache this message until it's picked up by the HTTP clients and/or PanelDue
34933493
}

0 commit comments

Comments
 (0)