Fix for corrupted error messages on temp error.

- Ultralcd stores a pointer to the buffer passed into it,
  so this buffer cannot be stored on the stack.
master
Marcio Teixeira 7 years ago
parent 794ba894f0
commit 8256cfe174

@ -13,7 +13,7 @@
* got disabled.
*/
#define LULZBOT_FW_VERSION ".32" // Change this with each update
#define LULZBOT_FW_VERSION ".33" // Change this with each update
#if ( \
!defined(LULZBOT_Gladiola_Mini) && \
@ -1625,13 +1625,14 @@
#define LULZBOT_REORDERED_MENUS
#define LULZBOT_ENHANCED_TEMP_ERROR_MSG(msg, e) \
{ \
char str[30] = {'\0'}; \
/* Must be static since the ultralcd code */ \
/* will hold a pointer to this buffer */ \
static char str[30] = {'\0'}; \
strncpy(str, msg, 25); \
switch(e) { \
case -1: strcat(str, " BED"); break; \
case 0: strcat(str, " E0"); break; \
case 1: strcat(str, " E1"); break; \
break; \
} \
kill(str); \
}

Loading…
Cancel
Save