🎨 Apply F() to various reports
This commit is contained in:
@ -195,7 +195,7 @@ void GcodeSuite::M420() {
|
||||
// V to print the matrix or mesh
|
||||
if (seenV) {
|
||||
#if ABL_PLANAR
|
||||
planner.bed_level_matrix.debug(PSTR("Bed Level Correction Matrix:"));
|
||||
planner.bed_level_matrix.debug(F("Bed Level Correction Matrix:"));
|
||||
#else
|
||||
if (leveling_is_valid()) {
|
||||
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
|
@ -783,8 +783,8 @@ G29_TYPE GcodeSuite::G29() {
|
||||
|
||||
float min_diff = 999;
|
||||
|
||||
auto print_topo_map = [&](PGM_P const title, const bool get_min) {
|
||||
SERIAL_ECHOPGM_P(title);
|
||||
auto print_topo_map = [&](FSTR_P const title, const bool get_min) {
|
||||
SERIAL_ECHOF(title);
|
||||
for (int8_t yy = abl.grid_points.y - 1; yy >= 0; yy--) {
|
||||
LOOP_L_N(xx, abl.grid_points.x) {
|
||||
const int ind = abl.indexIntoAB[xx][yy];
|
||||
@ -802,19 +802,19 @@ G29_TYPE GcodeSuite::G29() {
|
||||
SERIAL_EOL();
|
||||
};
|
||||
|
||||
print_topo_map(PSTR("\nBed Height Topography:\n"
|
||||
" +--- BACK --+\n"
|
||||
" | |\n"
|
||||
" L | (+) | R\n"
|
||||
" E | | I\n"
|
||||
" F | (-) N (+) | G\n"
|
||||
" T | | H\n"
|
||||
" | (-) | T\n"
|
||||
" | |\n"
|
||||
" O-- FRONT --+\n"
|
||||
" (0,0)\n"), true);
|
||||
print_topo_map(F("\nBed Height Topography:\n"
|
||||
" +--- BACK --+\n"
|
||||
" | |\n"
|
||||
" L | (+) | R\n"
|
||||
" E | | I\n"
|
||||
" F | (-) N (+) | G\n"
|
||||
" T | | H\n"
|
||||
" | (-) | T\n"
|
||||
" | |\n"
|
||||
" O-- FRONT --+\n"
|
||||
" (0,0)\n"), true);
|
||||
if (abl.verbose_level > 3)
|
||||
print_topo_map(PSTR("\nCorrected Bed Height vs. Bed Topology:\n"), false);
|
||||
print_topo_map(F("\nCorrected Bed Height vs. Bed Topology:\n"), false);
|
||||
|
||||
} // abl.topography_map
|
||||
|
||||
@ -825,7 +825,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
// For LINEAR and 3POINT leveling correct the current position
|
||||
|
||||
if (abl.verbose_level > 0)
|
||||
planner.bed_level_matrix.debug(PSTR("\n\nBed Level Correction Matrix:"));
|
||||
planner.bed_level_matrix.debug(F("\n\nBed Level Correction Matrix:"));
|
||||
|
||||
if (!abl.dryrun) {
|
||||
//
|
||||
|
@ -269,28 +269,28 @@ void GcodeSuite::G28() {
|
||||
#endif
|
||||
|
||||
#if HAS_HOMING_CURRENT
|
||||
auto debug_current = [](PGM_P const s, const int16_t a, const int16_t b) {
|
||||
DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPGM(" current: ", a, " -> ", b);
|
||||
auto debug_current = [](FSTR_P const s, const int16_t a, const int16_t b) {
|
||||
DEBUG_ECHOF(s); DEBUG_ECHOLNPGM(" current: ", a, " -> ", b);
|
||||
};
|
||||
#if HAS_CURRENT_HOME(X)
|
||||
const int16_t tmc_save_current_X = stepperX.getMilliamps();
|
||||
stepperX.rms_current(X_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(PSTR("X"), tmc_save_current_X, X_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(F("X"), tmc_save_current_X, X_CURRENT_HOME);
|
||||
#endif
|
||||
#if HAS_CURRENT_HOME(X2)
|
||||
const int16_t tmc_save_current_X2 = stepperX2.getMilliamps();
|
||||
stepperX2.rms_current(X2_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(PSTR("X2"), tmc_save_current_X2, X2_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(F("X2"), tmc_save_current_X2, X2_CURRENT_HOME);
|
||||
#endif
|
||||
#if HAS_CURRENT_HOME(Y)
|
||||
const int16_t tmc_save_current_Y = stepperY.getMilliamps();
|
||||
stepperY.rms_current(Y_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(PSTR("Y"), tmc_save_current_Y, Y_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(F("Y"), tmc_save_current_Y, Y_CURRENT_HOME);
|
||||
#endif
|
||||
#if HAS_CURRENT_HOME(Y2)
|
||||
const int16_t tmc_save_current_Y2 = stepperY2.getMilliamps();
|
||||
stepperY2.rms_current(Y2_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(PSTR("Y2"), tmc_save_current_Y2, Y2_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(F("Y2"), tmc_save_current_Y2, Y2_CURRENT_HOME);
|
||||
#endif
|
||||
#if HAS_CURRENT_HOME(I)
|
||||
const int16_t tmc_save_current_I = stepperI.getMilliamps();
|
||||
@ -310,7 +310,7 @@ void GcodeSuite::G28() {
|
||||
#if HAS_CURRENT_HOME(Z) && ENABLED(DELTA)
|
||||
const int16_t tmc_save_current_Z = stepperZ.getMilliamps();
|
||||
stepperZ.rms_current(Z_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(PSTR("Z"), tmc_save_current_Z, Z_CURRENT_HOME);
|
||||
if (DEBUGGING(LEVELING)) debug_current(F("Z"), tmc_save_current_Z, Z_CURRENT_HOME);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -97,10 +97,9 @@ void ac_cleanup(TERN_(HAS_MULTI_HOTEND, const uint8_t old_tool_index)) {
|
||||
TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index, true));
|
||||
}
|
||||
|
||||
void print_signed_float(PGM_P const prefix, const_float_t f) {
|
||||
void print_signed_float(FSTR_P const prefix, const_float_t f) {
|
||||
SERIAL_ECHOPGM(" ");
|
||||
SERIAL_ECHOPGM_P(prefix);
|
||||
SERIAL_CHAR(':');
|
||||
SERIAL_ECHOF(prefix, AS_CHAR(':'));
|
||||
if (f >= 0) SERIAL_CHAR('+');
|
||||
SERIAL_ECHO_F(f, 2);
|
||||
}
|
||||
@ -111,24 +110,23 @@ void print_signed_float(PGM_P const prefix, const_float_t f) {
|
||||
static void print_calibration_settings(const bool end_stops, const bool tower_angles) {
|
||||
SERIAL_ECHOPGM(".Height:", delta_height);
|
||||
if (end_stops) {
|
||||
print_signed_float(PSTR("Ex"), delta_endstop_adj.a);
|
||||
print_signed_float(PSTR("Ey"), delta_endstop_adj.b);
|
||||
print_signed_float(PSTR("Ez"), delta_endstop_adj.c);
|
||||
print_signed_float(F("Ex"), delta_endstop_adj.a);
|
||||
print_signed_float(F("Ey"), delta_endstop_adj.b);
|
||||
print_signed_float(F("Ez"), delta_endstop_adj.c);
|
||||
}
|
||||
if (end_stops && tower_angles) {
|
||||
SERIAL_ECHOPGM(" Radius:", delta_radius);
|
||||
SERIAL_EOL();
|
||||
SERIAL_ECHOLNPGM(" Radius:", delta_radius);
|
||||
SERIAL_CHAR('.');
|
||||
SERIAL_ECHO_SP(13);
|
||||
}
|
||||
if (tower_angles) {
|
||||
print_signed_float(PSTR("Tx"), delta_tower_angle_trim.a);
|
||||
print_signed_float(PSTR("Ty"), delta_tower_angle_trim.b);
|
||||
print_signed_float(PSTR("Tz"), delta_tower_angle_trim.c);
|
||||
print_signed_float(F("Tx"), delta_tower_angle_trim.a);
|
||||
print_signed_float(F("Ty"), delta_tower_angle_trim.b);
|
||||
print_signed_float(F("Tz"), delta_tower_angle_trim.c);
|
||||
}
|
||||
if ((!end_stops && tower_angles) || (end_stops && !tower_angles)) { // XOR
|
||||
if (end_stops != tower_angles)
|
||||
SERIAL_ECHOPGM(" Radius:", delta_radius);
|
||||
}
|
||||
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
@ -137,11 +135,11 @@ static void print_calibration_settings(const bool end_stops, const bool tower_an
|
||||
*/
|
||||
static void print_calibration_results(const float z_pt[NPP + 1], const bool tower_points, const bool opposite_points) {
|
||||
SERIAL_ECHOPGM(". ");
|
||||
print_signed_float(PSTR("c"), z_pt[CEN]);
|
||||
print_signed_float(F("c"), z_pt[CEN]);
|
||||
if (tower_points) {
|
||||
print_signed_float(PSTR(" x"), z_pt[__A]);
|
||||
print_signed_float(PSTR(" y"), z_pt[__B]);
|
||||
print_signed_float(PSTR(" z"), z_pt[__C]);
|
||||
print_signed_float(F(" x"), z_pt[__A]);
|
||||
print_signed_float(F(" y"), z_pt[__B]);
|
||||
print_signed_float(F(" z"), z_pt[__C]);
|
||||
}
|
||||
if (tower_points && opposite_points) {
|
||||
SERIAL_EOL();
|
||||
@ -149,9 +147,9 @@ static void print_calibration_results(const float z_pt[NPP + 1], const bool towe
|
||||
SERIAL_ECHO_SP(13);
|
||||
}
|
||||
if (opposite_points) {
|
||||
print_signed_float(PSTR("yz"), z_pt[_BC]);
|
||||
print_signed_float(PSTR("zx"), z_pt[_CA]);
|
||||
print_signed_float(PSTR("xy"), z_pt[_AB]);
|
||||
print_signed_float(F("yz"), z_pt[_BC]);
|
||||
print_signed_float(F("zx"), z_pt[_CA]);
|
||||
print_signed_float(F("xy"), z_pt[_AB]);
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -653,13 +651,13 @@ void GcodeSuite::G33() {
|
||||
}
|
||||
}
|
||||
else { // dry run
|
||||
PGM_P const enddryrun = PSTR("End DRY-RUN");
|
||||
SERIAL_ECHOPGM_P(enddryrun);
|
||||
FSTR_P const enddryrun = F("End DRY-RUN");
|
||||
SERIAL_ECHOF(enddryrun);
|
||||
SERIAL_ECHO_SP(35);
|
||||
SERIAL_ECHOLNPAIR_F("std dev:", zero_std_dev, 3);
|
||||
|
||||
char mess[21];
|
||||
strcpy_P(mess, enddryrun);
|
||||
strcpy_P(mess, FTOP(enddryrun));
|
||||
strcpy_P(&mess[11], PSTR(" sd:"));
|
||||
if (zero_std_dev < 1)
|
||||
sprintf_P(&mess[15], PSTR("0.%03i"), (int)LROUND(zero_std_dev * 1000.0f));
|
||||
|
@ -51,7 +51,7 @@
|
||||
* Also, there are two support functions that can be called from a developer's C code.
|
||||
*
|
||||
* uint16_t check_for_free_memory_corruption(PGM_P const free_memory_start);
|
||||
* void M100_dump_routine(PGM_P const title, const char * const start, const uintptr_t size);
|
||||
* void M100_dump_routine(FSTR_P const title, const char * const start, const uintptr_t size);
|
||||
*
|
||||
* Initial version by Roxy-3D
|
||||
*/
|
||||
@ -182,8 +182,8 @@ inline int32_t count_test_bytes(const char * const start_free_memory) {
|
||||
}
|
||||
}
|
||||
|
||||
void M100_dump_routine(PGM_P const title, const char * const start, const uintptr_t size) {
|
||||
SERIAL_ECHOLNPGM_P(title);
|
||||
void M100_dump_routine(FSTR_P const title, const char * const start, const uintptr_t size) {
|
||||
SERIAL_ECHOLNF(title);
|
||||
//
|
||||
// Round the start and end locations to produce full lines of output
|
||||
//
|
||||
@ -196,8 +196,8 @@ inline int32_t count_test_bytes(const char * const start_free_memory) {
|
||||
|
||||
#endif // M100_FREE_MEMORY_DUMPER
|
||||
|
||||
inline int check_for_free_memory_corruption(PGM_P const title) {
|
||||
SERIAL_ECHOPGM_P(title);
|
||||
inline int check_for_free_memory_corruption(FSTR_P const title) {
|
||||
SERIAL_ECHOF(title);
|
||||
|
||||
char *start_free_memory = free_memory_start, *end_free_memory = free_memory_end;
|
||||
int n = end_free_memory - start_free_memory;
|
||||
@ -217,7 +217,7 @@ inline int check_for_free_memory_corruption(PGM_P const title) {
|
||||
// idle();
|
||||
serial_delay(20);
|
||||
#if ENABLED(M100_FREE_MEMORY_DUMPER)
|
||||
M100_dump_routine(PSTR(" Memory corruption detected with end_free_memory<Heap\n"), (const char*)0x1B80, 0x0680);
|
||||
M100_dump_routine(F(" Memory corruption detected with end_free_memory<Heap\n"), (const char*)0x1B80, 0x0680);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_
|
||||
"\nMemory Corruption detected in free memory area."
|
||||
"\nLargest free block is ", max_cnt, " bytes at ", hex_address(max_addr)
|
||||
);
|
||||
SERIAL_ECHOLNPGM("check_for_free_memory_corruption() = ", check_for_free_memory_corruption(PSTR("M100 F ")));
|
||||
SERIAL_ECHOLNPGM("check_for_free_memory_corruption() = ", check_for_free_memory_corruption(F("M100 F ")));
|
||||
}
|
||||
|
||||
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
|
||||
|
@ -65,12 +65,12 @@ inline void toggle_pins() {
|
||||
pin_t pin = GET_PIN_MAP_PIN_M43(i);
|
||||
if (!VALID_PIN(pin)) continue;
|
||||
if (M43_NEVER_TOUCH(i) || (!ignore_protection && pin_is_protected(pin))) {
|
||||
report_pin_state_extended(pin, ignore_protection, true, PSTR("Untouched "));
|
||||
report_pin_state_extended(pin, ignore_protection, true, F("Untouched "));
|
||||
SERIAL_EOL();
|
||||
}
|
||||
else {
|
||||
watchdog_refresh();
|
||||
report_pin_state_extended(pin, ignore_protection, true, PSTR("Pulsing "));
|
||||
report_pin_state_extended(pin, ignore_protection, true, F("Pulsing "));
|
||||
#ifdef __STM32F1__
|
||||
const auto prior_mode = _GET_MODE(i);
|
||||
#else
|
||||
@ -303,7 +303,7 @@ void GcodeSuite::M43() {
|
||||
if (parser.seen('E')) {
|
||||
endstops.monitor_flag = parser.value_bool();
|
||||
SERIAL_ECHOPGM("endstop monitor ");
|
||||
SERIAL_ECHOPGM_P(endstops.monitor_flag ? PSTR("en") : PSTR("dis"));
|
||||
SERIAL_ECHOF(endstops.monitor_flag ? F("en") : F("dis"));
|
||||
SERIAL_ECHOLNPGM("abled");
|
||||
return;
|
||||
}
|
||||
|
@ -57,14 +57,14 @@ void MAC_report() {
|
||||
|
||||
// Display current values when the link is active,
|
||||
// otherwise show the stored values
|
||||
void ip_report(const uint16_t cmd, PGM_P const post, const IPAddress &ipo) {
|
||||
void ip_report(const uint16_t cmd, FSTR_P const post, const IPAddress &ipo) {
|
||||
SERIAL_CHAR('M'); SERIAL_ECHO(cmd); SERIAL_CHAR(' ');
|
||||
LOOP_L_N(i, 4) {
|
||||
SERIAL_ECHO(ipo[i]);
|
||||
if (i < 3) SERIAL_CHAR('.');
|
||||
}
|
||||
SERIAL_ECHOPGM(" ; ");
|
||||
SERIAL_ECHOLNPGM_P(post);
|
||||
SERIAL_ECHOLNF(post);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -98,7 +98,7 @@ void GcodeSuite::M552() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M552_report() {
|
||||
ip_report(552, PSTR("ip address"), Ethernet.linkStatus() == LinkON ? Ethernet.localIP() : ethernet.ip);
|
||||
ip_report(552, F("ip address"), Ethernet.linkStatus() == LinkON ? Ethernet.localIP() : ethernet.ip);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -112,7 +112,7 @@ void GcodeSuite::M553() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M553_report() {
|
||||
ip_report(553, PSTR("subnet mask"), Ethernet.linkStatus() == LinkON ? Ethernet.subnetMask() : ethernet.subnet);
|
||||
ip_report(553, F("subnet mask"), Ethernet.linkStatus() == LinkON ? Ethernet.subnetMask() : ethernet.subnet);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -126,7 +126,7 @@ void GcodeSuite::M554() {
|
||||
}
|
||||
|
||||
void GcodeSuite::M554_report() {
|
||||
ip_report(554, PSTR("gateway"), Ethernet.linkStatus() == LinkON ? Ethernet.gatewayIP() : ethernet.gateway);
|
||||
ip_report(554, F("gateway"), Ethernet.linkStatus() == LinkON ? Ethernet.gatewayIP() : ethernet.gateway);
|
||||
}
|
||||
|
||||
#endif // HAS_ETHERNET
|
||||
|
@ -44,10 +44,10 @@
|
||||
|
||||
void menu_job_recovery();
|
||||
|
||||
inline void plr_error(PGM_P const prefix) {
|
||||
inline void plr_error(FSTR_P const prefix) {
|
||||
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
|
||||
DEBUG_ECHO_START();
|
||||
DEBUG_ECHOPGM_P(prefix);
|
||||
DEBUG_ECHOF(prefix);
|
||||
DEBUG_ECHOLNPGM(" Job Recovery Data");
|
||||
#else
|
||||
UNUSED(prefix);
|
||||
@ -91,7 +91,7 @@ void GcodeSuite::M1000() {
|
||||
recovery.resume();
|
||||
}
|
||||
else
|
||||
plr_error(recovery.info.valid_head ? PSTR("No") : PSTR("Invalid"));
|
||||
plr_error(recovery.info.valid_head ? F("No") : F("Invalid"));
|
||||
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ void GcodeSuite::M413() {
|
||||
if (parser.seen("RL")) recovery.load();
|
||||
if (parser.seen_test('W')) recovery.save(true);
|
||||
if (parser.seen_test('P')) recovery.purge();
|
||||
if (parser.seen_test('D')) recovery.debug(PSTR("M413"));
|
||||
if (parser.seen_test('D')) recovery.debug(F("M413"));
|
||||
#if PIN_EXISTS(POWER_LOSS)
|
||||
if (parser.seen_test('O')) recovery._outage();
|
||||
#endif
|
||||
|
@ -141,12 +141,12 @@ void GcodeSuite::M569() {
|
||||
void GcodeSuite::M569_report(const bool forReplay/*=true*/) {
|
||||
report_heading(forReplay, F(STR_DRIVER_STEPPING_MODE));
|
||||
|
||||
auto say_M569 = [](const bool forReplay, const char * const etc=nullptr, const bool eol=false) {
|
||||
auto say_M569 = [](const bool forReplay, FSTR_P const etc=nullptr, const bool eol=false) {
|
||||
if (!forReplay) SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM(" M569 S1");
|
||||
if (etc) {
|
||||
SERIAL_CHAR(' ');
|
||||
SERIAL_ECHOPGM_P(etc);
|
||||
SERIAL_ECHOF(etc);
|
||||
}
|
||||
if (eol) SERIAL_EOL();
|
||||
};
|
||||
@ -176,28 +176,28 @@ void GcodeSuite::M569_report(const bool forReplay/*=true*/) {
|
||||
chop_z2 = TERN0(Z2_HAS_STEALTHCHOP, stepperZ2.get_stored_stealthChop());
|
||||
|
||||
if (chop_x2 || chop_y2 || chop_z2) {
|
||||
say_M569(forReplay, PSTR("I1"));
|
||||
say_M569(forReplay, F("I1"));
|
||||
if (chop_x2) SERIAL_ECHOPGM_P(SP_X_STR);
|
||||
if (chop_y2) SERIAL_ECHOPGM_P(SP_Y_STR);
|
||||
if (chop_z2) SERIAL_ECHOPGM_P(SP_Z_STR);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
if (TERN0(Z3_HAS_STEALTHCHOP, stepperZ3.get_stored_stealthChop())) { say_M569(forReplay, PSTR("I2 Z"), true); }
|
||||
if (TERN0(Z4_HAS_STEALTHCHOP, stepperZ4.get_stored_stealthChop())) { say_M569(forReplay, PSTR("I3 Z"), true); }
|
||||
if (TERN0(Z3_HAS_STEALTHCHOP, stepperZ3.get_stored_stealthChop())) { say_M569(forReplay, F("I2 Z"), true); }
|
||||
if (TERN0(Z4_HAS_STEALTHCHOP, stepperZ4.get_stored_stealthChop())) { say_M569(forReplay, F("I3 Z"), true); }
|
||||
|
||||
if (TERN0( I_HAS_STEALTHCHOP, stepperI.get_stored_stealthChop())) { say_M569(forReplay, SP_I_STR, true); }
|
||||
if (TERN0( J_HAS_STEALTHCHOP, stepperJ.get_stored_stealthChop())) { say_M569(forReplay, SP_J_STR, true); }
|
||||
if (TERN0( K_HAS_STEALTHCHOP, stepperK.get_stored_stealthChop())) { say_M569(forReplay, SP_K_STR, true); }
|
||||
if (TERN0( I_HAS_STEALTHCHOP, stepperI.get_stored_stealthChop())) { say_M569(forReplay, FPSTR(SP_I_STR), true); }
|
||||
if (TERN0( J_HAS_STEALTHCHOP, stepperJ.get_stored_stealthChop())) { say_M569(forReplay, FPSTR(SP_J_STR), true); }
|
||||
if (TERN0( K_HAS_STEALTHCHOP, stepperK.get_stored_stealthChop())) { say_M569(forReplay, FPSTR(SP_K_STR), true); }
|
||||
|
||||
if (TERN0(E0_HAS_STEALTHCHOP, stepperE0.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T0 E"), true); }
|
||||
if (TERN0(E1_HAS_STEALTHCHOP, stepperE1.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T1 E"), true); }
|
||||
if (TERN0(E2_HAS_STEALTHCHOP, stepperE2.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T2 E"), true); }
|
||||
if (TERN0(E3_HAS_STEALTHCHOP, stepperE3.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T3 E"), true); }
|
||||
if (TERN0(E4_HAS_STEALTHCHOP, stepperE4.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T4 E"), true); }
|
||||
if (TERN0(E5_HAS_STEALTHCHOP, stepperE5.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T5 E"), true); }
|
||||
if (TERN0(E6_HAS_STEALTHCHOP, stepperE6.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T6 E"), true); }
|
||||
if (TERN0(E7_HAS_STEALTHCHOP, stepperE7.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T7 E"), true); }
|
||||
if (TERN0(E0_HAS_STEALTHCHOP, stepperE0.get_stored_stealthChop())) { say_M569(forReplay, F("T0 E"), true); }
|
||||
if (TERN0(E1_HAS_STEALTHCHOP, stepperE1.get_stored_stealthChop())) { say_M569(forReplay, F("T1 E"), true); }
|
||||
if (TERN0(E2_HAS_STEALTHCHOP, stepperE2.get_stored_stealthChop())) { say_M569(forReplay, F("T2 E"), true); }
|
||||
if (TERN0(E3_HAS_STEALTHCHOP, stepperE3.get_stored_stealthChop())) { say_M569(forReplay, F("T3 E"), true); }
|
||||
if (TERN0(E4_HAS_STEALTHCHOP, stepperE4.get_stored_stealthChop())) { say_M569(forReplay, F("T4 E"), true); }
|
||||
if (TERN0(E5_HAS_STEALTHCHOP, stepperE5.get_stored_stealthChop())) { say_M569(forReplay, F("T5 E"), true); }
|
||||
if (TERN0(E6_HAS_STEALTHCHOP, stepperE6.get_stored_stealthChop())) { say_M569(forReplay, F("T6 E"), true); }
|
||||
if (TERN0(E7_HAS_STEALTHCHOP, stepperE7.get_stored_stealthChop())) { say_M569(forReplay, F("T7 E"), true); }
|
||||
}
|
||||
|
||||
#endif // HAS_STEALTHCHOP
|
||||
|
@ -1068,7 +1068,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
}
|
||||
|
||||
#if ENABLED(M100_FREE_MEMORY_DUMPER)
|
||||
void M100_dump_routine(PGM_P const title, const char * const start, const uintptr_t size);
|
||||
void M100_dump_routine(FSTR_P const title, const char * const start, const uintptr_t size);
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -1087,7 +1087,7 @@ void GcodeSuite::process_next_command() {
|
||||
SERIAL_ECHOLN(command.buffer);
|
||||
#if ENABLED(M100_FREE_MEMORY_DUMPER)
|
||||
SERIAL_ECHOPGM("slot:", queue.ring_buffer.index_r);
|
||||
M100_dump_routine(PSTR(" Command Queue:"), (const char*)&queue.ring_buffer, sizeof(queue.ring_buffer));
|
||||
M100_dump_routine(F(" Command Queue:"), (const char*)&queue.ring_buffer, sizeof(queue.ring_buffer));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -34,9 +34,9 @@
|
||||
#endif
|
||||
|
||||
#if ENABLED(EXTENDED_CAPABILITIES_REPORT)
|
||||
static void cap_line(PGM_P const name, bool ena=false) {
|
||||
static void cap_line(FSTR_P const name, bool ena=false) {
|
||||
SERIAL_ECHOPGM("Cap:");
|
||||
SERIAL_ECHOPGM_P(name);
|
||||
SERIAL_ECHOF(name);
|
||||
SERIAL_CHAR(':', '0' + ena);
|
||||
SERIAL_EOL();
|
||||
}
|
||||
@ -68,101 +68,101 @@ void GcodeSuite::M115() {
|
||||
serial_index_t port = queue.ring_buffer.command_port();
|
||||
|
||||
// PAREN_COMMENTS
|
||||
TERN_(PAREN_COMMENTS, cap_line(PSTR("PAREN_COMMENTS"), true));
|
||||
TERN_(PAREN_COMMENTS, cap_line(F("PAREN_COMMENTS"), true));
|
||||
|
||||
// QUOTED_STRINGS
|
||||
TERN_(GCODE_QUOTED_STRINGS, cap_line(PSTR("QUOTED_STRINGS"), true));
|
||||
TERN_(GCODE_QUOTED_STRINGS, cap_line(F("QUOTED_STRINGS"), true));
|
||||
|
||||
// SERIAL_XON_XOFF
|
||||
cap_line(PSTR("SERIAL_XON_XOFF"), ENABLED(SERIAL_XON_XOFF));
|
||||
cap_line(F("SERIAL_XON_XOFF"), ENABLED(SERIAL_XON_XOFF));
|
||||
|
||||
// BINARY_FILE_TRANSFER (M28 B1)
|
||||
cap_line(PSTR("BINARY_FILE_TRANSFER"), ENABLED(BINARY_FILE_TRANSFER)); // TODO: Use SERIAL_IMPL.has_feature(port, SerialFeature::BinaryFileTransfer) once implemented
|
||||
cap_line(F("BINARY_FILE_TRANSFER"), ENABLED(BINARY_FILE_TRANSFER)); // TODO: Use SERIAL_IMPL.has_feature(port, SerialFeature::BinaryFileTransfer) once implemented
|
||||
|
||||
// EEPROM (M500, M501)
|
||||
cap_line(PSTR("EEPROM"), ENABLED(EEPROM_SETTINGS));
|
||||
cap_line(F("EEPROM"), ENABLED(EEPROM_SETTINGS));
|
||||
|
||||
// Volumetric Extrusion (M200)
|
||||
cap_line(PSTR("VOLUMETRIC"), DISABLED(NO_VOLUMETRICS));
|
||||
cap_line(F("VOLUMETRIC"), DISABLED(NO_VOLUMETRICS));
|
||||
|
||||
// AUTOREPORT_POS (M154)
|
||||
cap_line(PSTR("AUTOREPORT_POS"), ENABLED(AUTO_REPORT_POSITION));
|
||||
cap_line(F("AUTOREPORT_POS"), ENABLED(AUTO_REPORT_POSITION));
|
||||
|
||||
// AUTOREPORT_TEMP (M155)
|
||||
cap_line(PSTR("AUTOREPORT_TEMP"), ENABLED(AUTO_REPORT_TEMPERATURES));
|
||||
cap_line(F("AUTOREPORT_TEMP"), ENABLED(AUTO_REPORT_TEMPERATURES));
|
||||
|
||||
// PROGRESS (M530 S L, M531 <file>, M532 X L)
|
||||
cap_line(PSTR("PROGRESS"));
|
||||
cap_line(F("PROGRESS"));
|
||||
|
||||
// Print Job timer M75, M76, M77
|
||||
cap_line(PSTR("PRINT_JOB"), true);
|
||||
cap_line(F("PRINT_JOB"), true);
|
||||
|
||||
// AUTOLEVEL (G29)
|
||||
cap_line(PSTR("AUTOLEVEL"), ENABLED(HAS_AUTOLEVEL));
|
||||
cap_line(F("AUTOLEVEL"), ENABLED(HAS_AUTOLEVEL));
|
||||
|
||||
// RUNOUT (M412, M600)
|
||||
cap_line(PSTR("RUNOUT"), ENABLED(FILAMENT_RUNOUT_SENSOR));
|
||||
cap_line(F("RUNOUT"), ENABLED(FILAMENT_RUNOUT_SENSOR));
|
||||
|
||||
// Z_PROBE (G30)
|
||||
cap_line(PSTR("Z_PROBE"), ENABLED(HAS_BED_PROBE));
|
||||
cap_line(F("Z_PROBE"), ENABLED(HAS_BED_PROBE));
|
||||
|
||||
// MESH_REPORT (M420 V)
|
||||
cap_line(PSTR("LEVELING_DATA"), ENABLED(HAS_LEVELING));
|
||||
cap_line(F("LEVELING_DATA"), ENABLED(HAS_LEVELING));
|
||||
|
||||
// BUILD_PERCENT (M73)
|
||||
cap_line(PSTR("BUILD_PERCENT"), ENABLED(LCD_SET_PROGRESS_MANUALLY));
|
||||
cap_line(F("BUILD_PERCENT"), ENABLED(LCD_SET_PROGRESS_MANUALLY));
|
||||
|
||||
// SOFTWARE_POWER (M80, M81)
|
||||
cap_line(PSTR("SOFTWARE_POWER"), ENABLED(PSU_CONTROL));
|
||||
cap_line(F("SOFTWARE_POWER"), ENABLED(PSU_CONTROL));
|
||||
|
||||
// TOGGLE_LIGHTS (M355)
|
||||
cap_line(PSTR("TOGGLE_LIGHTS"), ENABLED(CASE_LIGHT_ENABLE));
|
||||
cap_line(PSTR("CASE_LIGHT_BRIGHTNESS"), TERN0(CASE_LIGHT_ENABLE, caselight.has_brightness()));
|
||||
cap_line(F("TOGGLE_LIGHTS"), ENABLED(CASE_LIGHT_ENABLE));
|
||||
cap_line(F("CASE_LIGHT_BRIGHTNESS"), TERN0(CASE_LIGHT_ENABLE, caselight.has_brightness()));
|
||||
|
||||
// EMERGENCY_PARSER (M108, M112, M410, M876)
|
||||
cap_line(PSTR("EMERGENCY_PARSER"), ENABLED(EMERGENCY_PARSER));
|
||||
cap_line(F("EMERGENCY_PARSER"), ENABLED(EMERGENCY_PARSER));
|
||||
|
||||
// HOST ACTION COMMANDS (paused, resume, resumed, cancel, etc.)
|
||||
cap_line(PSTR("HOST_ACTION_COMMANDS"), ENABLED(HOST_ACTION_COMMANDS));
|
||||
cap_line(F("HOST_ACTION_COMMANDS"), ENABLED(HOST_ACTION_COMMANDS));
|
||||
|
||||
// PROMPT SUPPORT (M876)
|
||||
cap_line(PSTR("PROMPT_SUPPORT"), ENABLED(HOST_PROMPT_SUPPORT));
|
||||
cap_line(F("PROMPT_SUPPORT"), ENABLED(HOST_PROMPT_SUPPORT));
|
||||
|
||||
// SDCARD (M20, M23, M24, etc.)
|
||||
cap_line(PSTR("SDCARD"), ENABLED(SDSUPPORT));
|
||||
cap_line(F("SDCARD"), ENABLED(SDSUPPORT));
|
||||
|
||||
// REPEAT (M808)
|
||||
cap_line(PSTR("REPEAT"), ENABLED(GCODE_REPEAT_MARKERS));
|
||||
cap_line(F("REPEAT"), ENABLED(GCODE_REPEAT_MARKERS));
|
||||
|
||||
// SD_WRITE (M928, M28, M29)
|
||||
cap_line(PSTR("SD_WRITE"), ENABLED(SDSUPPORT) && DISABLED(SDCARD_READONLY));
|
||||
cap_line(F("SD_WRITE"), ENABLED(SDSUPPORT) && DISABLED(SDCARD_READONLY));
|
||||
|
||||
// AUTOREPORT_SD_STATUS (M27 extension)
|
||||
cap_line(PSTR("AUTOREPORT_SD_STATUS"), ENABLED(AUTO_REPORT_SD_STATUS));
|
||||
cap_line(F("AUTOREPORT_SD_STATUS"), ENABLED(AUTO_REPORT_SD_STATUS));
|
||||
|
||||
// LONG_FILENAME_HOST_SUPPORT (M33)
|
||||
cap_line(PSTR("LONG_FILENAME"), ENABLED(LONG_FILENAME_HOST_SUPPORT));
|
||||
cap_line(F("LONG_FILENAME"), ENABLED(LONG_FILENAME_HOST_SUPPORT));
|
||||
|
||||
// THERMAL_PROTECTION
|
||||
cap_line(PSTR("THERMAL_PROTECTION"), ENABLED(THERMALLY_SAFE));
|
||||
cap_line(F("THERMAL_PROTECTION"), ENABLED(THERMALLY_SAFE));
|
||||
|
||||
// MOTION_MODES (M80-M89)
|
||||
cap_line(PSTR("MOTION_MODES"), ENABLED(GCODE_MOTION_MODES));
|
||||
cap_line(F("MOTION_MODES"), ENABLED(GCODE_MOTION_MODES));
|
||||
|
||||
// ARC_SUPPORT (G2-G3)
|
||||
cap_line(PSTR("ARCS"), ENABLED(ARC_SUPPORT));
|
||||
cap_line(F("ARCS"), ENABLED(ARC_SUPPORT));
|
||||
|
||||
// BABYSTEPPING (M290)
|
||||
cap_line(PSTR("BABYSTEPPING"), ENABLED(BABYSTEPPING));
|
||||
cap_line(F("BABYSTEPPING"), ENABLED(BABYSTEPPING));
|
||||
|
||||
// CHAMBER_TEMPERATURE (M141, M191)
|
||||
cap_line(PSTR("CHAMBER_TEMPERATURE"), ENABLED(HAS_HEATED_CHAMBER));
|
||||
cap_line(F("CHAMBER_TEMPERATURE"), ENABLED(HAS_HEATED_CHAMBER));
|
||||
|
||||
// COOLER_TEMPERATURE (M143, M193)
|
||||
cap_line(PSTR("COOLER_TEMPERATURE"), ENABLED(HAS_COOLER));
|
||||
cap_line(F("COOLER_TEMPERATURE"), ENABLED(HAS_COOLER));
|
||||
|
||||
// MEATPACK Compression
|
||||
cap_line(PSTR("MEATPACK"), SERIAL_IMPL.has_feature(port, SerialFeature::MeatPack));
|
||||
cap_line(F("MEATPACK"), SERIAL_IMPL.has_feature(port, SerialFeature::MeatPack));
|
||||
|
||||
// Machine Geometry
|
||||
#if ENABLED(M115_GEOMETRY_REPORT)
|
||||
|
@ -43,9 +43,15 @@ static void config_line(PGM_P const name, const float val, PGM_P const pref=null
|
||||
config_prefix(name, pref, ind);
|
||||
SERIAL_ECHOLN(val);
|
||||
}
|
||||
static void config_line(FSTR_P const name, const float val, FSTR_P const pref=nullptr, const int8_t ind=-1) {
|
||||
config_line(FTOP(name), val, FTOP(pref) , ind);
|
||||
}
|
||||
static void config_line_e(const int8_t e, PGM_P const name, const float val) {
|
||||
config_line(name, val, PSTR("Extr."), e + 1);
|
||||
}
|
||||
static void config_line_e(const int8_t e, FSTR_P const name, const float val) {
|
||||
config_line_e(e, FTOP(name), val);
|
||||
}
|
||||
|
||||
/**
|
||||
* M360: Report Firmware configuration
|
||||
@ -60,19 +66,19 @@ void GcodeSuite::M360() {
|
||||
//
|
||||
// Basics and Enabled items
|
||||
//
|
||||
config_line(PSTR("Baudrate"), BAUDRATE);
|
||||
config_line(PSTR("InputBuffer"), MAX_CMD_SIZE);
|
||||
config_line(PSTR("PrintlineCache"), BUFSIZE);
|
||||
config_line(PSTR("MixingExtruder"), ENABLED(MIXING_EXTRUDER));
|
||||
config_line(PSTR("SDCard"), ENABLED(SDSUPPORT));
|
||||
config_line(PSTR("Fan"), ENABLED(HAS_FAN));
|
||||
config_line(PSTR("LCD"), ENABLED(HAS_DISPLAY));
|
||||
config_line(PSTR("SoftwarePowerSwitch"), 1);
|
||||
config_line(PSTR("SupportLocalFilamentchange"), ENABLED(ADVANCED_PAUSE_FEATURE));
|
||||
config_line(PSTR("CaseLights"), ENABLED(CASE_LIGHT_ENABLE));
|
||||
config_line(PSTR("ZProbe"), ENABLED(HAS_BED_PROBE));
|
||||
config_line(PSTR("Autolevel"), ENABLED(HAS_LEVELING));
|
||||
config_line(PSTR("EEPROM"), ENABLED(EEPROM_SETTINGS));
|
||||
config_line(F("Baudrate"), BAUDRATE);
|
||||
config_line(F("InputBuffer"), MAX_CMD_SIZE);
|
||||
config_line(F("PrintlineCache"), BUFSIZE);
|
||||
config_line(F("MixingExtruder"), ENABLED(MIXING_EXTRUDER));
|
||||
config_line(F("SDCard"), ENABLED(SDSUPPORT));
|
||||
config_line(F("Fan"), ENABLED(HAS_FAN));
|
||||
config_line(F("LCD"), ENABLED(HAS_DISPLAY));
|
||||
config_line(F("SoftwarePowerSwitch"), 1);
|
||||
config_line(F("SupportLocalFilamentchange"), ENABLED(ADVANCED_PAUSE_FEATURE));
|
||||
config_line(F("CaseLights"), ENABLED(CASE_LIGHT_ENABLE));
|
||||
config_line(F("ZProbe"), ENABLED(HAS_BED_PROBE));
|
||||
config_line(F("Autolevel"), ENABLED(HAS_LEVELING));
|
||||
config_line(F("EEPROM"), ENABLED(EEPROM_SETTINGS));
|
||||
|
||||
//
|
||||
// Homing Directions
|
||||
@ -87,7 +93,7 @@ void GcodeSuite::M360() {
|
||||
//
|
||||
#if HAS_CLASSIC_JERK
|
||||
if (planner.max_jerk.x == planner.max_jerk.y)
|
||||
config_line(PSTR("XY"), planner.max_jerk.x, JERK_STR);
|
||||
config_line(F("XY"), planner.max_jerk.x, JERK_STR);
|
||||
else {
|
||||
config_line(X_STR, planner.max_jerk.x, JERK_STR);
|
||||
config_line(Y_STR, planner.max_jerk.y, JERK_STR);
|
||||
@ -98,21 +104,21 @@ void GcodeSuite::M360() {
|
||||
//
|
||||
// Firmware Retraction
|
||||
//
|
||||
config_line(PSTR("SupportG10G11"), ENABLED(FWRETRACT));
|
||||
config_line(F("SupportG10G11"), ENABLED(FWRETRACT));
|
||||
#if ENABLED(FWRETRACT)
|
||||
PGMSTR(RET_STR, "Retraction");
|
||||
PGMSTR(UNRET_STR, "RetractionUndo");
|
||||
PGMSTR(SPEED_STR, "Speed");
|
||||
// M10 Retract with swap (long) moves
|
||||
config_line(PSTR("Length"), fwretract.settings.retract_length, RET_STR);
|
||||
config_line(F("Length"), fwretract.settings.retract_length, RET_STR);
|
||||
config_line(SPEED_STR, fwretract.settings.retract_feedrate_mm_s, RET_STR);
|
||||
config_line(PSTR("ZLift"), fwretract.settings.retract_zraise, RET_STR);
|
||||
config_line(PSTR("LongLength"), fwretract.settings.swap_retract_length, RET_STR);
|
||||
config_line(F("ZLift"), fwretract.settings.retract_zraise, RET_STR);
|
||||
config_line(F("LongLength"), fwretract.settings.swap_retract_length, RET_STR);
|
||||
// M11 Recover (undo) with swap (long) moves
|
||||
config_line(SPEED_STR, fwretract.settings.retract_recover_feedrate_mm_s, UNRET_STR);
|
||||
config_line(PSTR("ExtraLength"), fwretract.settings.retract_recover_extra, UNRET_STR);
|
||||
config_line(PSTR("ExtraLongLength"), fwretract.settings.swap_retract_recover_extra, UNRET_STR);
|
||||
config_line(PSTR("LongSpeed"), fwretract.settings.swap_retract_recover_feedrate_mm_s, UNRET_STR);
|
||||
config_line(F("ExtraLength"), fwretract.settings.retract_recover_extra, UNRET_STR);
|
||||
config_line(F("ExtraLongLength"), fwretract.settings.swap_retract_recover_extra, UNRET_STR);
|
||||
config_line(F("LongSpeed"), fwretract.settings.swap_retract_recover_feedrate_mm_s, UNRET_STR);
|
||||
#endif
|
||||
|
||||
//
|
||||
@ -163,22 +169,22 @@ void GcodeSuite::M360() {
|
||||
//
|
||||
// Heated Bed
|
||||
//
|
||||
config_line(PSTR("HeatedBed"), ENABLED(HAS_HEATED_BED));
|
||||
config_line(F("HeatedBed"), ENABLED(HAS_HEATED_BED));
|
||||
#if HAS_HEATED_BED
|
||||
config_line(PSTR("MaxBedTemp"), BED_MAX_TARGET);
|
||||
config_line(F("MaxBedTemp"), BED_MAX_TARGET);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Per-Extruder settings
|
||||
//
|
||||
config_line(PSTR("NumExtruder"), EXTRUDERS);
|
||||
config_line(F("NumExtruder"), EXTRUDERS);
|
||||
#if HAS_EXTRUDERS
|
||||
LOOP_L_N(e, EXTRUDERS) {
|
||||
config_line_e(e, JERK_STR, TERN(HAS_LINEAR_E_JERK, planner.max_e_jerk[E_INDEX_N(e)], TERN(HAS_CLASSIC_JERK, planner.max_jerk.e, DEFAULT_EJERK)));
|
||||
config_line_e(e, PSTR("MaxSpeed"), planner.settings.max_feedrate_mm_s[E_AXIS_N(e)]);
|
||||
config_line_e(e, PSTR("Acceleration"), planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]);
|
||||
config_line_e(e, PSTR("Diameter"), TERN(NO_VOLUMETRICS, DEFAULT_NOMINAL_FILAMENT_DIA, planner.filament_size[e]));
|
||||
config_line_e(e, PSTR("MaxTemp"), thermalManager.hotend_maxtemp[e]);
|
||||
config_line_e(e, F("MaxSpeed"), planner.settings.max_feedrate_mm_s[E_AXIS_N(e)]);
|
||||
config_line_e(e, F("Acceleration"), planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]);
|
||||
config_line_e(e, F("Diameter"), TERN(NO_VOLUMETRICS, DEFAULT_NOMINAL_FILAMENT_DIA, planner.filament_size[e]));
|
||||
config_line_e(e, F("MaxTemp"), thermalManager.hotend_maxtemp[e]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -302,10 +302,10 @@ static bool serial_data_available(serial_index_t index) {
|
||||
|
||||
inline int read_serial(const serial_index_t index) { return SERIAL_IMPL.read(index); }
|
||||
|
||||
void GCodeQueue::gcode_line_error(PGM_P const err, const serial_index_t serial_ind) {
|
||||
void GCodeQueue::gcode_line_error(FSTR_P const ferr, const serial_index_t serial_ind) {
|
||||
PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ECHOLNPGM_P(err, serial_state[serial_ind.index].last_N);
|
||||
SERIAL_ECHOLNF(ferr, serial_state[serial_ind.index].last_N);
|
||||
while (read_serial(serial_ind) != -1) { /* nada */ } // Clear out the RX buffer. Why don't use flush here ?
|
||||
flush_and_request_resend(serial_ind);
|
||||
serial_state[serial_ind.index].count = 0;
|
||||
@ -470,7 +470,7 @@ void GCodeQueue::get_serial_commands() {
|
||||
|
||||
if (gcode_N != serial.last_N + 1 && !M110) {
|
||||
// In case of error on a serial port, don't prevent other serial port from making progress
|
||||
gcode_line_error(PSTR(STR_ERR_LINE_NO), p);
|
||||
gcode_line_error(F(STR_ERR_LINE_NO), p);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -480,13 +480,13 @@ void GCodeQueue::get_serial_commands() {
|
||||
while (count) checksum ^= command[--count];
|
||||
if (strtol(apos + 1, nullptr, 10) != checksum) {
|
||||
// In case of error on a serial port, don't prevent other serial port from making progress
|
||||
gcode_line_error(PSTR(STR_ERR_CHECKSUM_MISMATCH), p);
|
||||
gcode_line_error(F(STR_ERR_CHECKSUM_MISMATCH), p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// In case of error on a serial port, don't prevent other serial port from making progress
|
||||
gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), p);
|
||||
gcode_line_error(F(STR_ERR_NO_CHECKSUM), p);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -495,7 +495,7 @@ void GCodeQueue::get_serial_commands() {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
// Pronterface "M29" and "M29 " has no line number
|
||||
else if (card.flag.saving && !is_M29(command)) {
|
||||
gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), p);
|
||||
gcode_line_error(F(STR_ERR_NO_CHECKSUM), p);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
@ -259,7 +259,7 @@ private:
|
||||
*/
|
||||
static bool enqueue_one(const char *cmd);
|
||||
|
||||
static void gcode_line_error(PGM_P const err, const serial_index_t serial_ind);
|
||||
static void gcode_line_error(FSTR_P const ferr, const serial_index_t serial_ind);
|
||||
|
||||
friend class GcodeSuite;
|
||||
};
|
||||
|
Reference in New Issue
Block a user