From 460f73056bd20458380c17fedaa5204e9b912570 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 27 Mar 2015 00:46:39 -0700 Subject: [PATCH] Fix ECHOPAIR ambiguity - Also patch up some warnings --- Marlin/ConfigurationStore.cpp | 2 +- Marlin/Marlin_main.cpp | 2 +- Marlin/vector_3.cpp | 4 ++-- Marlin/vector_3.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/ConfigurationStore.cpp b/Marlin/ConfigurationStore.cpp index 939d83f9e..3872b505d 100644 --- a/Marlin/ConfigurationStore.cpp +++ b/Marlin/ConfigurationStore.cpp @@ -754,7 +754,7 @@ void Config_PrintSettings(bool forReplay) { SERIAL_ECHOLNPGM("Z-Probe Offset (mm):"); SERIAL_ECHO_START; } - SERIAL_ECHOPAIR(" M", CUSTOM_M_CODE_SET_Z_PROBE_OFFSET); + SERIAL_ECHOPAIR(" M", (unsigned long)CUSTOM_M_CODE_SET_Z_PROBE_OFFSET); SERIAL_ECHOPAIR(" Z", -zprobe_zoffset); #else if (!forReplay) { diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ee620bfbb..70fd46957 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2922,7 +2922,7 @@ inline void gcode_M42() { do_blocking_move_to( X_probe_location, Y_probe_location, Z_start_location); // Make sure we are at the probe location if (n_legs) { - double radius=0.0, theta=0.0, x_sweep, y_sweep; + double radius=0.0, theta=0.0; int l; int rotational_direction = (unsigned long) millis() & 0x0001; // clockwise or counter clockwise radius = (unsigned long)millis() % (long)(X_MAX_LENGTH / 4); // limit how far out to go diff --git a/Marlin/vector_3.cpp b/Marlin/vector_3.cpp index 681eceec2..243f0838f 100644 --- a/Marlin/vector_3.cpp +++ b/Marlin/vector_3.cpp @@ -59,7 +59,7 @@ void vector_3::apply_rotation(matrix_3x3 matrix) { z = resultZ; } -void vector_3::debug(char* title) { +void vector_3::debug(const char title[]) { SERIAL_PROTOCOL(title); SERIAL_PROTOCOLPGM(" x: "); SERIAL_PROTOCOL_F(x, 6); @@ -120,7 +120,7 @@ matrix_3x3 matrix_3x3::transpose(matrix_3x3 original) { return new_matrix; } -void matrix_3x3::debug(char* title) { +void matrix_3x3::debug(const char title[]) { SERIAL_PROTOCOLLN(title); int count = 0; for(int i=0; i<3; i++) { diff --git a/Marlin/vector_3.h b/Marlin/vector_3.h index 0b9decafa..0c5938bac 100644 --- a/Marlin/vector_3.h +++ b/Marlin/vector_3.h @@ -37,7 +37,7 @@ struct vector_3 float get_length(); vector_3 get_normal(); - void debug(char* title); + void debug(const char title[]); void apply_rotation(matrix_3x3 matrix); }; @@ -52,7 +52,7 @@ struct matrix_3x3 void set_to_identity(); - void debug(char* title); + void debug(const char title[]); };