Adjustable precision in M105 temperature report (#20602)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
FanDjango 2021-01-05 06:57:58 +01:00 committed by Scott Lahteine
parent d324f3b16a
commit e3cd293f4e

View File

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