Browse Source

Adjustable precision in M105 temperature report (#20602)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
FanDjango 4 years ago
parent
commit
dc3cfd0d9d
No account linked to committer's email address
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      Marlin/src/module/temperature.cpp

+ 3
- 2
Marlin/src/module/temperature.cpp View File

@@ -3007,8 +3007,9 @@ void Temperature::tick() {
3007 3007
       if (e >= 0) SERIAL_CHAR('0' + e);
3008 3008
     #endif
3009 3009
     SERIAL_CHAR(':');
3010
-    SERIAL_ECHO(c);
3011
-    SERIAL_ECHOPAIR(" /" , t);
3010
+    SERIAL_PRINT(c, _MIN(SERIAL_FLOAT_PRECISION, 2));
3011
+    SERIAL_ECHOPGM(" /");
3012
+    SERIAL_PRINT(t, _MIN(SERIAL_FLOAT_PRECISION, 2));
3012 3013
     #if ENABLED(SHOW_TEMP_ADC_VALUES)
3013 3014
       SERIAL_ECHOPAIR(" (", r * RECIPROCAL(OVERSAMPLENR));
3014 3015
       SERIAL_CHAR(')');

Loading…
Cancel
Save