From 20c54a36471471155b07f757cb2c8ce4e6b477a4 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Thu, 11 Jan 2024 10:02:12 +0100 Subject: [PATCH] Fix compilation of Zigbee for Core3 (#20464) --- .../tasmota_xdrv_driver/xdrv_23_zigbee_2a_devices_impl.ino | 2 +- tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_2_converters.ino | 2 +- tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_6_0_commands.ino | 2 +- tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_6_1_greenpower.ino | 4 ++-- tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_zigbee.ino | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_2a_devices_impl.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_2a_devices_impl.ino index 8d5a71fb5..a8cfdbbc6 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_2a_devices_impl.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_2a_devices_impl.ino @@ -795,7 +795,7 @@ void Z_Device::jsonAddEndpoints(Z_attribute_list & attr_list) const { for (uint32_t i = 0; i < endpoints_max; i++) { uint8_t endpoint = endpoints[i]; if (0x00 == endpoint) { break; } - arr_ep.add(endpoint); + arr_ep.add((uint32_t)endpoint); } attr_list.addAttributePMEM(PSTR("Endpoints")).setStrRaw(arr_ep.toString().c_str()); } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_2_converters.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_2_converters.ino index 4fc87f19a..de0d1862a 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_2_converters.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_2_converters.ino @@ -931,7 +931,7 @@ void ZCLFrame::parseReadAttributes(uint16_t shortaddr, Z_attribute_list& attr_li Z_attribute_list attr_names; while (len >= 2 + i) { uint16_t attrid = payload.get16(i); - attr_numbers.add(attrid); + attr_numbers.add((uint32_t)attrid); read_attr_ids[i/2] = attrid; // find the attribute name diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_6_0_commands.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_6_0_commands.ino index aa30eb15d..53ca8f223 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_6_0_commands.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_6_0_commands.ino @@ -454,7 +454,7 @@ void convertClusterSpecific(class Z_attribute_list &attr_list, uint16_t cluster, JsonGeneratorArray group_list; for (uint32_t i = 0; i < xyz.y; i++) { - group_list.add(payload.get16(2 + 2*i)); + group_list.add((uint32_t)payload.get16(2 + 2*i)); } attr_list.addAttribute(command_name, true).setStrRaw(group_list.toString().c_str()); } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_6_1_greenpower.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_6_1_greenpower.ino index 24a11dec6..abe8ac124 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_6_1_greenpower.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_6_1_greenpower.ino @@ -161,7 +161,7 @@ bool convertGPDF_Commissioning(class Z_attribute_list &attr_list, uint16_t short JsonGeneratorArray gpdi_list; for (uint32_t i = 0; i < gpid_len; i++) { if (idx_offset >= payload_len + payload_start) { break; } // end of payload - gpdi_list.add(payload.get8(idx_offset++)); + gpdi_list.add((uint32_t)payload.get8(idx_offset++)); } ResponseAppend_P(PSTR(",\"commandid\":%s"), gpdi_list.toString().c_str()); } @@ -171,7 +171,7 @@ bool convertGPDF_Commissioning(class Z_attribute_list &attr_list, uint16_t short JsonGeneratorArray gpdi_list; for (uint32_t i = 0; i < clust_report_len; i++) { if (idx_offset >= payload_len + payload_start) { break; } // end of payload - gpdi_list.add(payload.get16(idx_offset)); + gpdi_list.add((uint32_t)payload.get16(idx_offset)); idx_offset += 2; } ResponseAppend_P(PSTR(",\"clusterreports\":%s"), gpdi_list.toString().c_str()); diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_zigbee.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_zigbee.ino index fee50f5f7..f684a9a6b 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_zigbee.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_zigbee.ino @@ -550,7 +550,7 @@ extern "C" { } else if (mode == 12) { a->setKeyName("array"); a->newJsonArray(); - a->val.arrval->add(-1); + a->val.arrval->add((int32_t)-1); a->val.arrval->addStr("foo"); a->val.arrval->addStr("bar"); a->val.arrval->addStr("bar\"baz\'toto");