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:
Guðni Már Gilbert 2021-09-12 16:47:03 +00:00
parent ac049c7e3c
commit d8723c0eac

View File

@ -486,8 +486,7 @@ void get_command()
is_usb_printing = true;
}
if (Stopped == true) {
int gcode = strtol(strchr_pointer+1, NULL, 10);
if (gcode >= 0 && gcode <= 3) {
if (code_value_uint8() <= 3) {
SERIAL_ERRORLNRPGM(MSG_ERR_STOPPED);
LCD_MESSAGERPGM(_T(MSG_STOPPED));
}