Use code_value_uint8() in get_command()
The if statement is simplified as the value is never negative and we can get rid of one variable Saves 12 bytes of flash memory
This commit is contained in:
parent
ac049c7e3c
commit
d8723c0eac
|
|
@ -486,8 +486,7 @@ void get_command()
|
||||||
is_usb_printing = true;
|
is_usb_printing = true;
|
||||||
}
|
}
|
||||||
if (Stopped == true) {
|
if (Stopped == true) {
|
||||||
int gcode = strtol(strchr_pointer+1, NULL, 10);
|
if (code_value_uint8() <= 3) {
|
||||||
if (gcode >= 0 && gcode <= 3) {
|
|
||||||
SERIAL_ERRORLNRPGM(MSG_ERR_STOPPED);
|
SERIAL_ERRORLNRPGM(MSG_ERR_STOPPED);
|
||||||
LCD_MESSAGERPGM(_T(MSG_STOPPED));
|
LCD_MESSAGERPGM(_T(MSG_STOPPED));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue