From 2d0339e8bf2b6d05f634f179e6920ec9df3ecbd5 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sun, 17 Sep 2023 21:12:36 +0200 Subject: [PATCH] Fix IR compilation for ESP32 with Arduino3 (#19537) --- .../tasmota_xdrv_driver/xdrv_05_irremote_full.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_05_irremote_full.ino b/tasmota/tasmota_xdrv_driver/xdrv_05_irremote_full.ino index 0c228a3ee..98f45373e 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_05_irremote_full.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_05_irremote_full.ino @@ -240,7 +240,7 @@ namespace { if (modelStr != kUnknownStr) { json.add(key, modelStr); } else { // Fallback to int value - json.add(key, model); + json.add(key, (int32_t)model); } } } // namespace { @@ -258,13 +258,13 @@ String sendACJsonState(const stdAc::state_t &state) { case stdAc::ac_command_t::kConfigCommand: // Note: for `kConfigCommand` the semantics of clock/sleep is abused IRremoteESP8266 lib-side for key/value pair // Ref: lib/lib_basic/IRremoteESP8266/IRremoteESP8266/src/IRac.cpp[L3062-3066] - json.add(PSTR(D_JSON_IRHVAC_CONFIG_KEY), state.clock); - json.add(PSTR(D_JSON_IRHVAC_CONFIG_VALUE), state.sleep); + json.add(PSTR(D_JSON_IRHVAC_CONFIG_KEY), (int32_t)state.clock); + json.add(PSTR(D_JSON_IRHVAC_CONFIG_VALUE), (int32_t)state.sleep); break; case stdAc::ac_command_t::kTimerCommand: json.add(PSTR(D_JSON_IRHVAC_POWER), IRac::boolToString(state.power)); if(state.clock != -1) { json.add(PSTR(D_JSON_IRHVAC_CLOCK), irutils::minsToString(state.clock)); } - json.add(PSTR(D_JSON_IRHVAC_SLEEP), state.sleep); + json.add(PSTR(D_JSON_IRHVAC_SLEEP), (int32_t)state.sleep); break; case stdAc::ac_command_t::kControlCommand: default: @@ -288,8 +288,8 @@ String sendACJsonState(const stdAc::state_t &state) { json.add(PSTR(D_JSON_IRHVAC_FILTER), IRac::boolToString(state.filter)); json.add(PSTR(D_JSON_IRHVAC_CLEAN), IRac::boolToString(state.clean)); json.add(PSTR(D_JSON_IRHVAC_BEEP), IRac::boolToString(state.beep)); - json.add(PSTR(D_JSON_IRHVAC_SLEEP), state.sleep); - if(state.clock != -1) { json.add(PSTR(D_JSON_IRHVAC_CLOCK), state.clock); } + json.add(PSTR(D_JSON_IRHVAC_SLEEP), (int32_t)state.sleep); + if(state.clock != -1) { json.add(PSTR(D_JSON_IRHVAC_CLOCK), (int32_t)state.clock); } json.add(PSTR(D_JSON_IRHVAC_IFEEL), IRac::boolToString(state.iFeel)); addFloatToJson(json, PSTR(D_JSON_IRHVAC_SENSOR_TEMP), state.sensorTemperature, kNoTempValue); break;