Temperature report followup (#20687)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Giuliano Zaro 2021-01-05 13:18:09 +01:00 committed by GitHub
parent dc3cfd0d9d
commit 1eb592550c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1404,8 +1404,7 @@ void Temperature::manage_heater() {
SERIAL_ECHOPGM(" M305 ");
else
SERIAL_ECHO_START();
SERIAL_CHAR('P');
SERIAL_CHAR('0' + t_index);
SERIAL_CHAR('P', '0' + t_index);
const user_thermistor_t &t = user_thermistor[t_index];
@ -3001,15 +3000,19 @@ void Temperature::tick() {
default: k = 'B'; break;
#endif
}
SERIAL_CHAR(' ');
SERIAL_CHAR(k);
SERIAL_CHAR(' ', k);
#if HAS_MULTI_HOTEND
if (e >= 0) SERIAL_CHAR('0' + e);
#endif
#ifdef SERIAL_FLOAT_PRECISION
#define SFP _MIN(SERIAL_FLOAT_PRECISION, 2)
#else
#define SFP 2
#endif
SERIAL_CHAR(':');
SERIAL_PRINT(c, _MIN(SERIAL_FLOAT_PRECISION, 2));
SERIAL_PRINT(c, SFP);
SERIAL_ECHOPGM(" /");
SERIAL_PRINT(t, _MIN(SERIAL_FLOAT_PRECISION, 2));
SERIAL_PRINT(t, SFP);
#if ENABLED(SHOW_TEMP_ADC_VALUES)
SERIAL_ECHOPAIR(" (", r * RECIPROCAL(OVERSAMPLENR));
SERIAL_CHAR(')');