Browse Source

Fix garbled print_xyz output (#18810)

Victor Tseng 4 years ago
parent
commit
b5ece63778
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/core/serial.cpp

+ 1
- 1
Marlin/src/core/serial.cpp View File

68
 extern const char SP_X_STR[], SP_Y_STR[], SP_Z_STR[];
68
 extern const char SP_X_STR[], SP_Y_STR[], SP_Z_STR[];
69
 
69
 
70
 void print_xyz(const float &x, const float &y, const float &z, PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) {
70
 void print_xyz(const float &x, const float &y, const float &z, PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) {
71
-  serialprintPGM(prefix);
71
+  if (prefix) serialprintPGM(prefix);
72
   SERIAL_ECHOPAIR_P(SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z);
72
   SERIAL_ECHOPAIR_P(SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z);
73
   if (suffix) serialprintPGM(suffix); else SERIAL_EOL();
73
   if (suffix) serialprintPGM(suffix); else SERIAL_EOL();
74
 }
74
 }

Loading…
Cancel
Save