From 0449f69179cfa8c3085d84357263c94d16631147 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 2 May 2017 01:06:25 -0500 Subject: [PATCH] Cleanup patch to recent merge --- Marlin/ubl.cpp | 2 +- Marlin/ubl.h | 2 +- Marlin/ubl_G29.cpp | 2 +- Marlin/ubl_motion.cpp | 18 ++++++++---------- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Marlin/ubl.cpp b/Marlin/ubl.cpp index 2c46a3166..aa1fc8873 100755 --- a/Marlin/ubl.cpp +++ b/Marlin/ubl.cpp @@ -39,7 +39,7 @@ void bit_set(uint16_t bits[16], uint8_t x, uint8_t y) { SBI(bits[y], x); } bool is_bit_set(uint16_t bits[16], uint8_t x, uint8_t y) { return TEST(bits[y], x); } - int ubl_cnt=0; + uint8_t ubl_cnt = 0; static void serial_echo_xy(const uint16_t x, const uint16_t y) { SERIAL_CHAR('('); diff --git a/Marlin/ubl.h b/Marlin/ubl.h index 70ddf6bba..63aa10cb5 100644 --- a/Marlin/ubl.h +++ b/Marlin/ubl.h @@ -66,7 +66,7 @@ void gcode_G26(); void gcode_G29(); - extern int ubl_cnt; + extern uint8_t ubl_cnt; /////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp index c21a1a2ee..b2c4a7ef4 100644 --- a/Marlin/ubl_G29.cpp +++ b/Marlin/ubl_G29.cpp @@ -1195,7 +1195,7 @@ SERIAL_EOL; safe_delay(50); - SERIAL_PROTOCOLLNPAIR("UBL object count: ", ubl_cnt); + SERIAL_PROTOCOLLNPAIR("UBL object count: ", (int)ubl_cnt); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) SERIAL_PROTOCOLLNPAIR("planner.z_fade_height : ", planner.z_fade_height); diff --git a/Marlin/ubl_motion.cpp b/Marlin/ubl_motion.cpp index a2fe2e99f..cd211c96b 100644 --- a/Marlin/ubl_motion.cpp +++ b/Marlin/ubl_motion.cpp @@ -1,4 +1,3 @@ - /** * Marlin 3D Printer Firmware * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] @@ -275,15 +274,14 @@ if (y != start[Y_AXIS]) { if (!inf_normalized_flag) { -// on_axis_distance = y - start[Y_AXIS]; + //on_axis_distance = y - start[Y_AXIS]; on_axis_distance = use_x_dist ? x - start[X_AXIS] : y - start[Y_AXIS]; -// on_axis_distance = use_x_dist ? next_mesh_line_x - start[X_AXIS] : y - start[Y_AXIS]; -// on_axis_distance = use_x_dist ? x - start[X_AXIS] : next_mesh_line_y - start[Y_AXIS]; - -// on_axis_distance = use_x_dist ? next_mesh_line_x - start[X_AXIS] : y - start[Y_AXIS]; -// on_axis_distance = use_x_dist ? x - start[X_AXIS] : next_mesh_line_y - start[Y_AXIS]; + //on_axis_distance = use_x_dist ? next_mesh_line_x - start[X_AXIS] : y - start[Y_AXIS]; + //on_axis_distance = use_x_dist ? x - start[X_AXIS] : next_mesh_line_y - start[Y_AXIS]; + //on_axis_distance = use_x_dist ? next_mesh_line_x - start[X_AXIS] : y - start[Y_AXIS]; + //on_axis_distance = use_x_dist ? x - start[X_AXIS] : next_mesh_line_y - start[Y_AXIS]; e_position = start[E_AXIS] + on_axis_distance * e_normalized_dist; z_position = start[Z_AXIS] + on_axis_distance * z_normalized_dist; @@ -350,11 +348,11 @@ if (x != start[X_AXIS]) { if (!inf_normalized_flag) { -// on_axis_distance = x - start[X_AXIS]; + //on_axis_distance = x - start[X_AXIS]; on_axis_distance = use_x_dist ? x - start[X_AXIS] : y - start[Y_AXIS]; -// on_axis_distance = use_x_dist ? next_mesh_line_x - start[X_AXIS] : y - start[Y_AXIS]; -// on_axis_distance = use_x_dist ? x - start[X_AXIS] : next_mesh_line_y - start[Y_AXIS]; + //on_axis_distance = use_x_dist ? next_mesh_line_x - start[X_AXIS] : y - start[Y_AXIS]; + //on_axis_distance = use_x_dist ? x - start[X_AXIS] : next_mesh_line_y - start[Y_AXIS]; e_position = start[E_AXIS] + on_axis_distance * e_normalized_dist; // is based on X or Y because this is a horizontal move z_position = start[Z_AXIS] + on_axis_distance * z_normalized_dist;