From e4bae0cca6608f8830474380f785b4b8c95bcfce Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Sun, 20 Nov 2022 18:32:37 +0100 Subject: [PATCH] Moved to uint16_t --- .../tasmota_xdrv_driver/xdrv_23_zigbee_5_1_attributes.ino | 8 ++++---- .../tasmota_xdrv_driver/xdrv_23_zigbee_5_2_converters.ino | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_1_attributes.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_1_attributes.ino index 1f921dba7..1b775935c 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_1_attributes.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_1_attributes.ino @@ -318,8 +318,8 @@ public: } uint8_t type; // zigbee type, Zunk by default - int16_t multiplier; // multiply by x (ignore if 0 or 1) - int16_t divider; // divide by x (ignore if 0 or 1) + uint16_t multiplier; // multiply by x (ignore if 0 or 1) + uint16_t divider; // divide by x (ignore if 0 or 1) int16_t base; // add x (ignore if 0) uint16_t cluster; // cluster number uint16_t attribute; // attribute number @@ -354,8 +354,8 @@ public: uint16_t attribute; // attribute to match uint16_t new_cluster; // replace with this cluster uint16_t new_attribute; // replace with this attribute - int16_t multiplier; // multiply by x (ignore if 0 or 1) - int16_t divider; // divide by x (ignore if 0 or 1) + uint16_t multiplier; // multiply by x (ignore if 0 or 1) + uint16_t divider; // divide by x (ignore if 0 or 1) int16_t base; // add x (ignore if 0) }; 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 ead5b9ce9..4faa86a39 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 @@ -1000,8 +1000,8 @@ void ZCLFrame::parseReadConfigAttributes(uint16_t shortaddr, Z_attribute_list& a } // find the multiplier - int16_t multiplier = 1; - int16_t divider = 1; + uint16_t multiplier = 1; + uint16_t divider = 1; int16_t base = 0; Z_attribute_match matched_attr = Z_findAttributeMatcherById(shortaddr, cluster, attrid, false); if (matched_attr.found()) {