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
|
### Fixed
|
||||||
- Berry Zigbee fix wrong attributes (#22684)
|
- Berry Zigbee fix wrong attributes (#22684)
|
||||||
|
- Berry fix walrus operator
|
||||||
|
|
||||||
### Removed
|
### 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) */
|
free_expreg(finfo, e2); /* free source (checks only ETREG) */
|
||||||
*e2 = *e1; /* now e2 is e1 ETLOCAL */
|
*e2 = *e1; /* now e2 is e1 ETLOCAL */
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
*e2 = *e1; /* ETLOCAL wins over ETREG */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ETGLOBAL: /* store to grobal R(A) -> G(Bx) by global index */
|
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
|
var v
|
||||||
|
|
||||||
# shortaddr
|
# shortaddr
|
||||||
v = self.shortaddr
|
if (v := self.shortaddr) != nil
|
||||||
if v != nil
|
|
||||||
items.push(f'"Device":"0x{v:04X}"')
|
items.push(f'"Device":"0x{v:04X}"')
|
||||||
end
|
end
|
||||||
# groupaddr
|
# groupaddr
|
||||||
v = self.groupaddr
|
if (v := self.groupaddr) != nil
|
||||||
if v != nil
|
|
||||||
items.push(f'"Group":"0x{v:04X}"')
|
items.push(f'"Group":"0x{v:04X}"')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -225,15 +223,13 @@ class zcl_attribute_list : zcl_attribute_list_ntv
|
||||||
end
|
end
|
||||||
|
|
||||||
# Endpoint
|
# Endpoint
|
||||||
v = self.src_ep
|
if (v := self.src_ep) != nil
|
||||||
if v != nil
|
|
||||||
items.push(f'"Endpoint":{v}')
|
items.push(f'"Endpoint":{v}')
|
||||||
end
|
end
|
||||||
|
|
||||||
# LQI
|
# LQI
|
||||||
v := self.lqi
|
if (v := self.lqi) != nil
|
||||||
if v != nil
|
items.push(f'"LinkQuality":{v}')
|
||||||
items.push(f'"LinkQuality":{v:i}')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
var s = "{" + items.concat(",") + "}"
|
var s = "{" + items.concat(",") + "}"
|
||||||
|
|
|
@ -553,7 +553,7 @@ static const bvalue be_ktab_class_zcl_attribute_list[27] = {
|
||||||
/* K19 */ be_nested_str_weak(tostring),
|
/* K19 */ be_nested_str_weak(tostring),
|
||||||
/* K20 */ be_const_int(1),
|
/* K20 */ be_const_int(1),
|
||||||
/* K21 */ be_nested_str_weak(_X22Endpoint_X22_X3A_X25s),
|
/* 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),
|
/* K23 */ be_nested_str_weak(_X7B),
|
||||||
/* K24 */ be_nested_str_weak(concat),
|
/* K24 */ be_nested_str_weak(concat),
|
||||||
/* K25 */ be_nested_str_weak(_X2C),
|
/* K25 */ be_nested_str_weak(_X2C),
|
||||||
|
|
Loading…
Reference in New Issue