From cd32af4dea04f9c4cc60617d5824cd4973c92232 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Thu, 10 Oct 2024 19:35:28 +0200 Subject: [PATCH] Berry Zigbee removed test code --- CHANGELOG.md | 1 + lib/libesp32/berry_tasmota/src/be_zigbee.c | 4 +- .../xdrv_52_3_berry_zigbee.ino | 84 +++++++++---------- 3 files changed, 45 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1bb269de3ef..3239fd397031 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ All notable changes to this project will be documented in this file. - ESP32 Ethernet using EthClockMode 3 (#22248) ### Removed +- Berry Zigbee removed test code ## [14.2.0.5] 20240926 ### Added diff --git a/lib/libesp32/berry_tasmota/src/be_zigbee.c b/lib/libesp32/berry_tasmota/src/be_zigbee.c index 2471dac4984a..8c5956796f13 100644 --- a/lib/libesp32/berry_tasmota/src/be_zigbee.c +++ b/lib/libesp32/berry_tasmota/src/be_zigbee.c @@ -127,8 +127,8 @@ class be_class_zb_coord_ntv (scope: global, name: zb_coord_ntv, strings: weak) { abort, ctype_func(zc_abort) - test_attr, func(zigbee_test_attr) - test_msg, func(zigbee_test_msg) + // test_attr, func(zigbee_test_attr) + // test_msg, func(zigbee_test_msg) } @const_object_info_end */ 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 d169629d714f..139ca48051b0 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_zigbee.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_zigbee.ino @@ -601,38 +601,38 @@ extern "C" { } extern "C" { - int zigbee_test_attr(struct bvm *vm) { - int32_t mode = be_toint(vm, 2); - if (mode < 10) { - // - } else { - Z_attribute *a = new Z_attribute(); - if (mode == 10) { - a->setKeyId(1111, 2222); - a->setUInt(1337); - } else if (mode == 11) { - a->setKeyName("super_attribute"); - a->key_suffix = 2; - a->setFloat(3.14); - } else if (mode == 12) { - a->setKeyName("array"); - a->newJsonArray(); - a->val.arrval->add((int32_t)-1); - a->val.arrval->addStr("foo"); - a->val.arrval->addStr("bar"); - a->val.arrval->addStr("bar\"baz\'toto"); - } else if (mode == 13) { - a->setKeyName("list"); - a->newAttrList(); - Z_attribute &subattr1 = a->val.objval->addAttribute(10,20); - subattr1.setStr("sub1"); - Z_attribute &subattr2 = a->val.objval->addAttribute(11,21); - subattr2.setStr("sub2"); - } - zat_zcl_attribute(vm, a); - } - be_return(vm); - } +// int zigbee_test_attr(struct bvm *vm) { +// int32_t mode = be_toint(vm, 2); +// if (mode < 10) { +// // +// } else { +// Z_attribute *a = new Z_attribute(); +// if (mode == 10) { +// a->setKeyId(1111, 2222); +// a->setUInt(1337); +// } else if (mode == 11) { +// a->setKeyName("super_attribute"); +// a->key_suffix = 2; +// a->setFloat(3.14); +// } else if (mode == 12) { +// a->setKeyName("array"); +// a->newJsonArray(); +// a->val.arrval->add((int32_t)-1); +// a->val.arrval->addStr("foo"); +// a->val.arrval->addStr("bar"); +// a->val.arrval->addStr("bar\"baz\'toto"); +// } else if (mode == 13) { +// a->setKeyName("list"); +// a->newAttrList(); +// Z_attribute &subattr1 = a->val.objval->addAttribute(10,20); +// subattr1.setStr("sub1"); +// Z_attribute &subattr2 = a->val.objval->addAttribute(11,21); +// subattr2.setStr("sub2"); +// } +// zat_zcl_attribute(vm, a); +// } +// be_return(vm); +// } // Creates a zcl_attributes from Z_attribute_list @@ -651,18 +651,18 @@ extern "C" { } } - int zigbee_test_msg(struct bvm *vm) { - Z_attribute_list attr_list; + // int zigbee_test_msg(struct bvm *vm) { + // Z_attribute_list attr_list; - attr_list.lqi = 250; - Z_attribute &subattr1 = attr_list.addAttribute(10,20); - subattr1.setStr("sub1"); - Z_attribute &subattr2 = attr_list.addAttribute(11,21); - subattr2.setStr("sub2"); + // attr_list.lqi = 250; + // Z_attribute &subattr1 = attr_list.addAttribute(10,20); + // subattr1.setStr("sub1"); + // Z_attribute &subattr2 = attr_list.addAttribute(11,21); + // subattr2.setStr("sub2"); - zat_zcl_attribute_list(vm, 100, &attr_list); - be_return(vm); - } + // zat_zcl_attribute_list(vm, 100, &attr_list); + // be_return(vm); + // } } #endif // USE_ZIGBEE