mirror of https://github.com/arendst/Tasmota.git
Berry fix walrus operator (#22685)
This commit is contained in:
parent
af724a6149
commit
fde529fac4
|
@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
### Fixed
|
||||
- Berry Zigbee fix wrong attributes (#22684)
|
||||
- Berry fix walrus operator
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
@ -716,6 +716,8 @@ int be_code_setvar(bfuncinfo *finfo, bexpdesc *e1, bexpdesc *e2, bbool keep_reg)
|
|||
free_expreg(finfo, e2); /* free source (checks only ETREG) */
|
||||
*e2 = *e1; /* now e2 is e1 ETLOCAL */
|
||||
}
|
||||
} else {
|
||||
*e2 = *e1; /* ETLOCAL wins over ETREG */
|
||||
}
|
||||
break;
|
||||
case ETGLOBAL: /* store to grobal R(A) -> G(Bx) by global index */
|
||||
|
|
|
@ -205,13 +205,11 @@ class zcl_attribute_list : zcl_attribute_list_ntv
|
|||
var v
|
||||
|
||||
# shortaddr
|
||||
v = self.shortaddr
|
||||
if v != nil
|
||||
if (v := self.shortaddr) != nil
|
||||
items.push(f'"Device":"0x{v:04X}"')
|
||||
end
|
||||
# groupaddr
|
||||
v = self.groupaddr
|
||||
if v != nil
|
||||
if (v := self.groupaddr) != nil
|
||||
items.push(f'"Group":"0x{v:04X}"')
|
||||
end
|
||||
|
||||
|
@ -225,15 +223,13 @@ class zcl_attribute_list : zcl_attribute_list_ntv
|
|||
end
|
||||
|
||||
# Endpoint
|
||||
v = self.src_ep
|
||||
if v != nil
|
||||
if (v := self.src_ep) != nil
|
||||
items.push(f'"Endpoint":{v}')
|
||||
end
|
||||
|
||||
# LQI
|
||||
v := self.lqi
|
||||
if v != nil
|
||||
items.push(f'"LinkQuality":{v:i}')
|
||||
if (v := self.lqi) != nil
|
||||
items.push(f'"LinkQuality":{v}')
|
||||
end
|
||||
|
||||
var s = "{" + items.concat(",") + "}"
|
||||
|
|
|
@ -553,7 +553,7 @@ static const bvalue be_ktab_class_zcl_attribute_list[27] = {
|
|||
/* K19 */ be_nested_str_weak(tostring),
|
||||
/* K20 */ be_const_int(1),
|
||||
/* K21 */ be_nested_str_weak(_X22Endpoint_X22_X3A_X25s),
|
||||
/* K22 */ be_nested_str_weak(_X22LinkQuality_X22_X3A_X25i),
|
||||
/* K22 */ be_nested_str_weak(_X22LinkQuality_X22_X3A_X25s),
|
||||
/* K23 */ be_nested_str_weak(_X7B),
|
||||
/* K24 */ be_nested_str_weak(concat),
|
||||
/* K25 */ be_nested_str_weak(_X2C),
|
||||
|
|
Loading…
Reference in New Issue