Hide M117 with no LCD

This commit is contained in:
Scott Lahteine 2015-05-16 20:59:04 -07:00
parent 98c4f22432
commit ca79282eaf

View File

@ -741,23 +741,31 @@ void get_command() {
}
#endif
while (MYSERIAL.available() > 0 && commands_in_queue < BUFSIZE) {
//
// Loop while serial characters are incoming and the queue is not full
//
while (commands_in_queue < BUFSIZE && MYSERIAL.available() > 0) {
#ifdef NO_TIMEOUTS
last_command_time = ms;
#endif
serial_char = MYSERIAL.read();
if (serial_char == '\n' || serial_char == '\r' ||
serial_count >= (MAX_CMD_SIZE - 1)
) {
//
// If the character ends the line, or the line is full...
//
if (serial_char == '\n' || serial_char == '\r' || serial_count >= MAX_CMD_SIZE-1) {
// end of line == end of comment
comment_mode = false;
if (!serial_count) return; // shortcut for empty lines
if (!serial_count) return; // empty lines just exit
char *command = command_queue[cmd_queue_index_w];
command[serial_count] = 0; // terminate string
// this item in the queue is not from sd
#ifdef SDSUPPORT
fromsd[cmd_queue_index_w] = false;
#endif
@ -3854,15 +3862,16 @@ inline void gcode_M115() {
SERIAL_PROTOCOLPGM(MSG_M115_REPORT);
}
/**
#ifdef ULTIPANEL
/**
* M117: Set LCD Status Message
*/
inline void gcode_M117() {
char* codepos = strchr_pointer + 5;
char* starpos = strchr(codepos, '*');
if (starpos) *starpos = '\0';
lcd_setstatus(codepos);
}
inline void gcode_M117() {
lcd_setstatus(strchr_pointer + 5);
}
#endif
/**
* M119: Output endstop states to serial output
@ -5412,9 +5421,13 @@ void process_commands() {
case 115: // M115: Report capabilities
gcode_M115();
break;
#ifdef ULTIPANEL
case 117: // M117: Set LCD message text
gcode_M117();
break;
#endif
case 114: // M114: Report current position
gcode_M114();
break;