Reverted a buffer size to fix random print hang
Reverted STRING_LENGTH to 1029 to avoid random print hangs that occurred using 0.57f firmware. Reduced max reported buffer size to fit within this. Report additional memory usage detail in response to M111 S0.
This commit is contained in:
parent
66c934a791
commit
41daff3d26
5 changed files with 8 additions and 5 deletions
|
@ -24,8 +24,8 @@ Licence: GPL
|
|||
#define CONFIGURATION_H
|
||||
|
||||
#define NAME "RepRapFirmware"
|
||||
#define VERSION "0.57f-dc42"
|
||||
#define DATE "2014-01-30"
|
||||
#define VERSION "0.57h-dc42"
|
||||
#define DATE "2014-01-31"
|
||||
#define LAST_AUTHOR "reprappro.com"
|
||||
|
||||
// Other firmware that we might switch to be compatible with.
|
||||
|
|
|
@ -300,7 +300,10 @@ void Platform::PrintMemoryUsage()
|
|||
snprintf(scratchString, STRING_LENGTH, "Stack ram used: %d\n", ramend - stack_ptr);
|
||||
reprap.GetWebserver()->AppendReply(scratchString);
|
||||
Message(HOST_MESSAGE, scratchString);
|
||||
snprintf(scratchString, STRING_LENGTH, "Guess at free mem: %d\n\n", stack_ptr - heapend + mi.fordblks);
|
||||
snprintf(scratchString, STRING_LENGTH, "Recycled heap: %d\n\n", mi.fordblks);
|
||||
reprap.GetWebserver()->AppendReply(scratchString);
|
||||
Message(HOST_MESSAGE, scratchString);
|
||||
snprintf(scratchString, STRING_LENGTH, "Guess at free mem: %d\n\n", stack_ptr - heapend);
|
||||
reprap.GetWebserver()->AppendReply(scratchString);
|
||||
Message(HOST_MESSAGE, scratchString);
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ Licence: GPL
|
|||
|
||||
// Some numbers...
|
||||
|
||||
#define STRING_LENGTH 1100 // needs to be long enough to receive web data
|
||||
#define STRING_LENGTH 1029 // needs to be long enough to receive web data
|
||||
#define SHORT_STRING_LENGTH 40
|
||||
#define TIME_TO_REPRAP 1.0e6 // Convert seconds to the units used by the machine (usually microseconds)
|
||||
#define TIME_FROM_REPRAP 1.0e-6 // Convert the units used by the machine (usually microseconds) to seconds
|
||||
|
|
Binary file not shown.
|
@ -37,7 +37,7 @@ Licence: GPL
|
|||
|
||||
const unsigned int gcodeBufLength = 2048; // size of our gcode ring buffer, ideally a power of 2
|
||||
const unsigned int minReportedFreeBuf = 100; // the minimum free buffer we report if not zero
|
||||
const unsigned int maxReportedFreeBuf = 1024; // the max we own up to having free, to avoid overlong messages
|
||||
const unsigned int maxReportedFreeBuf = 900; // the max we own up to having free, to avoid overlong messages
|
||||
|
||||
class Webserver
|
||||
{
|
||||
|
|
Reference in a new issue