G20/21 and M149 support, and code_value() refactor
This is an update of MarlinDev PR #196. G20/21: support for switching input units between millimeters and inches. M149: support for changing input temperature units. In support of these changes, code_value() and code_value_short() are replaced with an array of functions which handle converting to the proper types and/or units.
This commit is contained in:
committed by
Scott Lahteine
parent
a569e89775
commit
16212432c9
@ -51,8 +51,7 @@ extern size_t __heap_start, __heap_end, __flp;
|
||||
// Declare all the functions we need from Marlin_Main.cpp to do the work!
|
||||
//
|
||||
|
||||
float code_value();
|
||||
long code_value_long();
|
||||
int code_value_int();
|
||||
bool code_seen(char);
|
||||
void serial_echopair_P(const char*, float);
|
||||
void serial_echopair_P(const char*, double);
|
||||
@ -177,7 +176,7 @@ void gcode_M100() {
|
||||
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
|
||||
if (code_seen('C')) {
|
||||
int x; // x gets the # of locations to corrupt within the memory pool
|
||||
x = code_value();
|
||||
x = code_value_int();
|
||||
SERIAL_ECHOLNPGM("Corrupting free memory block.\n");
|
||||
ptr = (unsigned char*) __brkval;
|
||||
SERIAL_ECHOPAIR("\n__brkval : ", ptr);
|
||||
|
Reference in New Issue
Block a user