Fix MIEL_HVAC temperature saving 9k code size in addition (#23271)

This commit is contained in:
Theo Arends 2025-04-10 11:32:43 +02:00
parent 7ddf8abf90
commit 3f82228905

View File

@ -875,12 +875,11 @@ miel_hvac_cmnd_settemp(void)
{ {
struct miel_hvac_softc *sc = miel_hvac_sc; struct miel_hvac_softc *sc = miel_hvac_sc;
struct miel_hvac_msg_update_settings *update = &sc->sc_settings_update; struct miel_hvac_msg_update_settings *update = &sc->sc_settings_update;
float degc;
if (XdrvMailbox.data_len == 0) if (XdrvMailbox.data_len == 0)
return; return;
degc = strtof(XdrvMailbox.data, nullptr); float degc = CharToFloat(XdrvMailbox.data);
if (degc < MIEL_HVAC_SETTINGS_TEMP_MIN || degc > MIEL_HVAC_SETTINGS_TEMP_MAX) if (degc < MIEL_HVAC_SETTINGS_TEMP_MIN || degc > MIEL_HVAC_SETTINGS_TEMP_MAX)
{ {
miel_hvac_respond_unsupported(); miel_hvac_respond_unsupported();
@ -899,7 +898,7 @@ miel_hvac_cmnd_settemp(void)
update->temp05 = miel_hvac_deg2temp(degc); update->temp05 = miel_hvac_deg2temp(degc);
} }
ResponseCmndNumber(degc); ResponseCmndFloat(degc, Settings->flag2.temperature_resolution);
} }
static void static void