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 GitHub
parent 2f17f2207a
commit dc3cfd0d9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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(')');