Use code_value_short() in get_command()
Same code but uses a defined function Saves 28 bytes of flash memory
This commit is contained in:
parent
052ecc3782
commit
ac049c7e3c
|
|
@ -443,7 +443,7 @@ void get_command()
|
||||||
char *p = cmdbuffer+bufindw+CMDHDRSIZE;
|
char *p = cmdbuffer+bufindw+CMDHDRSIZE;
|
||||||
while (p != strchr_pointer)
|
while (p != strchr_pointer)
|
||||||
checksum = checksum^(*p++);
|
checksum = checksum^(*p++);
|
||||||
if (int(strtol(strchr_pointer+1, NULL, 10)) != int(checksum)) {
|
if (code_value_short() != (int16_t)checksum) {
|
||||||
SERIAL_ERROR_START;
|
SERIAL_ERROR_START;
|
||||||
SERIAL_ERRORRPGM(_n("checksum mismatch, Last Line: "));////MSG_ERR_CHECKSUM_MISMATCH
|
SERIAL_ERRORRPGM(_n("checksum mismatch, Last Line: "));////MSG_ERR_CHECKSUM_MISMATCH
|
||||||
SERIAL_ERRORLN(gcode_LastN);
|
SERIAL_ERRORLN(gcode_LastN);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue