Cleanup after some direct commits

https://github.com/MarlinFirmware/Marlin/commit/5e9726530ff21d3bc62beaa6
ac1b9437c276130a
This commit is contained in:
Scott Lahteine
2017-04-16 17:33:22 -05:00
committed by Scott Lahteine
parent e05d050a1e
commit e9b53ae00c
4 changed files with 85 additions and 98 deletions

View File

@@ -35,7 +35,6 @@
#include <math.h>
void lcd_babystep_z();
void lcd_return_to_status();
bool lcd_clicked();
void lcd_implementation_clear();
@@ -305,7 +304,7 @@
// The simple parameter flags and values are 'static' so parameter parsing can be in a support routine.
static int g29_verbose_level, phase_value = -1, repetition_cnt,
storage_slot=0, map_type, grid_size;
storage_slot = 0, map_type, grid_size;
static bool repeat_flag, c_flag, x_flag, y_flag;
static float x_pos, y_pos, measured_z, card_thickness = 0.0, ubl_constant = 0.0;
@@ -330,13 +329,10 @@
// Invalidate Mesh Points. This command is a little bit asymetrical because
// it directly specifies the repetition count and does not use the 'R' parameter.
if (code_seen('I')) {
int cnt = 0;
uint8_t cnt = 0;
repetition_cnt = code_has_value() ? code_value_int() : 1;
while (repetition_cnt--) {
if (cnt>20) {
cnt = 0;
idle();
}
if (cnt > 20) { cnt = 0; idle(); }
const mesh_index_pair location = find_closest_mesh_point_of_type(REAL, x_pos, y_pos, 0, NULL, false); // The '0' says we want to use the nozzle's position
if (location.x_index < 0) {
SERIAL_PROTOCOLLNPGM("Entire Mesh invalidated.\n");
@@ -381,7 +377,7 @@
}
if (code_seen('J')) {
if (grid_size<2 || grid_size>5) {
if (!WITHIN(grid_size, 2, 5)) {
SERIAL_PROTOCOLLNPGM("ERROR - grid size must be between 2 and 5");
return;
}
@@ -996,7 +992,7 @@
repetition_cnt = 0;
repeat_flag = code_seen('R');
if (repeat_flag) {
repetition_cnt = code_has_value() ? code_value_int() : GRID_MAX_POINTS_X*GRID_MAX_POINTS_Y;
repetition_cnt = code_has_value() ? code_value_int() : (GRID_MAX_POINTS_X) * (GRID_MAX_POINTS_Y);
if (repetition_cnt < 1) {
SERIAL_PROTOCOLLNPGM("Invalid Repetition count.\n");
return UBL_ERR;