Consolidate "Unknown X-Code" to save 16 bytes
This commit is contained in:
parent
47b1e6ccef
commit
d04ea859fb
3 changed files with 5 additions and 3 deletions
|
@ -5810,7 +5810,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT)
|
||||||
fCheckModeInit(); // alternatively invoke printer reset
|
fCheckModeInit(); // alternatively invoke printer reset
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf_P(PSTR("Unknown G code: %s\n"), cmdbuffer + bufindr + CMDHDRSIZE);
|
printf_P(MSG_UNKNOWN_CODE, 'G', cmdbuffer + bufindr + CMDHDRSIZE);
|
||||||
}
|
}
|
||||||
// printf_P(_N("END G-CODE=%u\n"), gcode_in_progress);
|
// printf_P(_N("END G-CODE=%u\n"), gcode_in_progress);
|
||||||
gcode_in_progress = 0;
|
gcode_in_progress = 0;
|
||||||
|
@ -8936,7 +8936,7 @@ Sigma_Exit:
|
||||||
#### End of M-Commands
|
#### End of M-Commands
|
||||||
*/
|
*/
|
||||||
default:
|
default:
|
||||||
printf_P(PSTR("Unknown M code: %s\n"), cmdbuffer + bufindr + CMDHDRSIZE);
|
printf_P(MSG_UNKNOWN_CODE, 'M', cmdbuffer + bufindr + CMDHDRSIZE);
|
||||||
}
|
}
|
||||||
// printf_P(_N("END M-CODE=%u\n"), mcode_in_progress);
|
// printf_P(_N("END M-CODE=%u\n"), mcode_in_progress);
|
||||||
mcode_in_progress = 0;
|
mcode_in_progress = 0;
|
||||||
|
@ -9523,7 +9523,7 @@ Sigma_Exit:
|
||||||
#endif //DEBUG_DCODES
|
#endif //DEBUG_DCODES
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printf_P(PSTR("Unknown D code: %s\n"), cmdbuffer + bufindr + CMDHDRSIZE);
|
printf_P(MSG_UNKNOWN_CODE, 'D', cmdbuffer + bufindr + CMDHDRSIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,3 +204,4 @@ const char MSG_M112_KILL[] PROGMEM_N1 = "M112 called. Emergency Stop."; ////c=20
|
||||||
const char MSG_ADVANCE_K[] PROGMEM_N1 = "Advance K:"; ////c=13
|
const char MSG_ADVANCE_K[] PROGMEM_N1 = "Advance K:"; ////c=13
|
||||||
const char MSG_POWERPANIC_DETECTED[] PROGMEM_N1 = "POWER PANIC DETECTED"; ////c=20
|
const char MSG_POWERPANIC_DETECTED[] PROGMEM_N1 = "POWER PANIC DETECTED"; ////c=20
|
||||||
const char MSG_LCD_STATUS_CHANGED[] PROGMEM_N1 = "LCD status changed";
|
const char MSG_LCD_STATUS_CHANGED[] PROGMEM_N1 = "LCD status changed";
|
||||||
|
const char MSG_UNKNOWN_CODE[] PROGMEM_N1 = "Unknown %c code: %s\n";
|
||||||
|
|
|
@ -204,6 +204,7 @@ extern const char MSG_M112_KILL[];
|
||||||
extern const char MSG_ADVANCE_K[];
|
extern const char MSG_ADVANCE_K[];
|
||||||
extern const char MSG_POWERPANIC_DETECTED[];
|
extern const char MSG_POWERPANIC_DETECTED[];
|
||||||
extern const char MSG_LCD_STATUS_CHANGED[];
|
extern const char MSG_LCD_STATUS_CHANGED[];
|
||||||
|
extern const char MSG_UNKNOWN_CODE[];
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue