From 7338a2fec82caf7ccc469274c8ecef1d75c3abbd Mon Sep 17 00:00:00 2001 From: kisslorand <50251547+kisslorand@users.noreply.github.com> Date: Tue, 3 Oct 2023 22:48:52 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Use=20SERIAL=5FFLOAT=5FPRECISION?= =?UTF-8?q?=20for=20SERIAL=5FECHO(float)=20(#26254)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/core/serial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/core/serial.cpp b/Marlin/src/core/serial.cpp index 2e07f3335a..addd01388e 100644 --- a/Marlin/src/core/serial.cpp +++ b/Marlin/src/core/serial.cpp @@ -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)); }