1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-29 23:07:42 +00:00

🚸 Use SERIAL_FLOAT_PRECISION for SERIAL_ECHO(float) (#26254)

This commit is contained in:
kisslorand 2023-10-03 22:48:52 +03:00 committed by GitHub
parent d56136f06c
commit 7338a2fec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ MAP(_N_LBL, LOGICAL_AXIS_NAMES); MAP(_SP_N_LBL, LOGICAL_AXIS_NAMES);
#endif
// Specializations for float, p_float_t, w_float_t
template <> void SERIAL_ECHO(const float f) { SERIAL_IMPL.print(f); }
template <> void SERIAL_ECHO(const float f) { SERIAL_IMPL.print(f, SERIAL_FLOAT_PRECISION); }
template <> void SERIAL_ECHO(const p_float_t pf) { SERIAL_IMPL.print(pf.value, pf.prec); }
template <> void SERIAL_ECHO(const w_float_t wf) { char f1[20]; SERIAL_IMPL.print(dtostrf(wf.value, wf.width, wf.prec, f1)); }