-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It looks like the Debug out put is all scrambled... #4263
Comments
@@ -572,15 +572,15 @@ void serial_echopair_P(const char* s_P, unsigned long v) { serialprintPGM(s_P);
static void report_current_position();
#if ENABLED(DEBUG_LEVELING_FEATURE)
void print_xyz(const char* suffix, const float x, const float y, const float z) {
+ SERIAL_ECHO(suffix);
SERIAL_ECHOPAIR("(", x);
SERIAL_ECHOPAIR(", ", y);
SERIAL_ECHOPAIR(", ", z);
SERIAL_ECHOLNPGM(") ");
- SERIAL_ECHO(suffix);
}
void print_xyz(const char* suffix, const float xyz[]) {
print_xyz(suffix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
}
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
@@ -1963,10 +1963,11 @@ static void clean_up_after_endstop_or_probe_move() {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
DEBUG_POS("set_probe_deployed", current_position);
SERIAL_ECHOPAIR("deploy: ", deploy);
+ SERIAL_EOL;
}
#endif
if (endstops.z_probe_enabled == deploy) return false;
is looking a lot nicer. |
Even better is @@ -572,18 +572,25 @@ void serial_echopair_P(const char* s_P, unsigned long v) { serialprintPGM(s_P);
static void report_current_position();
#if ENABLED(DEBUG_LEVELING_FEATURE)
void print_xyz(const char* suffix, const float x, const float y, const float z) {
+ SERIAL_ECHO(suffix);
SERIAL_ECHOPAIR("(", x);
SERIAL_ECHOPAIR(", ", y);
SERIAL_ECHOPAIR(", ", z);
SERIAL_ECHOLNPGM(") ");
- SERIAL_ECHO(suffix);
}
void print_xyz(const char* suffix, const float xyz[]) {
- print_xyz(suffix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
+ if (xyz[X_AXIS] == current_position[X_AXIS] && xyz[Y_AXIS] == current_position[Y_AXIS] && xyz[Z_AXIS] == current_position[Z_AXIS]) {
+ SERIAL_ECHO(suffix);
+ SERIAL_ECHOPGM(" > ");
+ report_current_position();
+ }
+ else {
+ print_xyz(suffix, xyz[X_AXIS], xyz[Y_AXIS], xyz[Z_AXIS]);
+ }
}
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
void print_xyz(const char* suffix, const vector_3 &xyz) {
print_xyz(suffix, xyz.x, xyz.y, xyz.z);
}
@@ -1963,10 +1970,11 @@ static void clean_up_after_endstop_or_probe_move() {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
DEBUG_POS("set_probe_deployed", current_position);
SERIAL_ECHOPAIR("deploy: ", deploy);
+ SERIAL_EOL;
}
#endif
if (endstops.z_probe_enabled == deploy) return false; A bit complicated but exactly what we are looking for when debugging the stepper coordinate system. |
Recently I changed the debug output so it would show the coordinates first and the given text as a suffix. This makes it easier to see coordinates in comparison to each other. If the text is used as a prefix, the coordinates are staggered, making them harder to compare. |
- if (xyz[X_AXIS] == current_position[X_AXIS] && xyz[Y_AXIS] == current_position[Y_AXIS] && xyz[Z_AXIS] == current_position[Z_AXIS])
+ if (xyz == current_position) { // should work Cool: Since |
Thanks a lot, this looks a lot better... I will prepare a patch. @thinkyhead Please give @Blue-Marlin and yourself due recognition on that patch. BTW, is
|
Closed by #4269 |
Yes. C++, in essence, allows you to give two functions the same name as long as the arguments differ. And it figures out which one you mean by the arguments in the call. "Polymorphism." |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I used the latest RCBugFix... I just moved my Configuration.H and Configuration_adv.h from my MMBL_2_LRP branch https://github.com/lrpirlet/Marlin.git
Here is the output of G28...
@thinkyhead
Do you know if any of the #defined macros related to debug or to printing on the console did change recently??
The text was updated successfully, but these errors were encountered: