Fix out_of_range_error()

For sprintf_P() the first parameter has to be a `char*` not `const char*`.
This commit is contained in:
AnHardt 2015-06-02 11:50:32 +02:00
parent 764e61708b
commit 17b0ec84ed

View File

@ -2437,10 +2437,12 @@ inline void gcode_G28() {
#elif defined(ENABLE_AUTO_BED_LEVELING) #elif defined(ENABLE_AUTO_BED_LEVELING)
void out_of_range_error(const char *edge) { void out_of_range_error(const char *p_edge) {
char msg[40]; char edge[10];
sprintf_P(msg, PSTR("?Probe %s position out of range.\n"), edge); strncpy_P(edge, p_edge, 10);
SERIAL_PROTOCOL(msg); SERIAL_PROTOCOLPGM("?Probe ");
SERIAL_PROTOCOL(edge);
SERIAL_PROTOCOLLNPGM(" position out of range.");
} }
/** /**