Add SERIAL_FLUSH and SERIAL_FLUSHTX macros

This commit is contained in:
Scott Lahteine 2018-02-16 17:50:58 -06:00
parent a8a64f19f4
commit 023d21a1cf
5 changed files with 15 additions and 10 deletions

View file

@ -763,7 +763,7 @@
const float measured_z = probe_pt(rawx, rawy, stow_probe, g29_verbose_level); // TODO: Needs error handling
z_values[location.x_index][location.y_index] = measured_z;
}
MYSERIAL0.flush(); // Prevent host M105 buffer overrun.
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
} while (location.x_index >= 0 && --max_iterations);
@ -902,7 +902,7 @@
SERIAL_PROTOCOL_F(z_values[location.x_index][location.y_index], 6);
SERIAL_EOL();
}
MYSERIAL0.flush(); // Prevent host M105 buffer overrun.
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
} while (location.x_index >= 0 && location.y_index >= 0);
if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing
@ -1414,7 +1414,7 @@
do_blocking_move_to_z(h_offset + new_z); // Move the nozzle as the point is edited
#endif
idle();
MYSERIAL0.flush(); // Prevent host M105 buffer overrun.
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
} while (!is_lcd_clicked());
if (!lcd_map_control) lcd_return_to_status();