mirror of https://github.com/arendst/Tasmota.git
Fix ESP32 rules operation priority regression from v13.3.0.4 (#22636)
This commit is contained in:
parent
6268066bac
commit
620fade73c
|
@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- ESP32 rules operation priority regression from v13.3.0.4 (#22636)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -123,5 +123,6 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- ESP32 rules operation priority regression from v13.3.0.4 [#22636](https://github.com/arendst/Tasmota/issues/22636)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
|
@ -1687,10 +1687,15 @@ float evaluateExpression(const char * expression, unsigned int len) {
|
||||||
while (index < operators_size) {
|
while (index < operators_size) {
|
||||||
if (priority == pgm_read_byte(kExpressionOperatorsPriorities + operators[index])) { // Need to calculate the operator first
|
if (priority == pgm_read_byte(kExpressionOperatorsPriorities + operators[index])) { // Need to calculate the operator first
|
||||||
// Get current object value and remove the next object with current operator
|
// Get current object value and remove the next object with current operator
|
||||||
|
|
||||||
|
// AddLog(LOG_LEVEL_DEBUG, PSTR("DBG: index %d, v1 '%4_f', v2 '%4_f', op %d"), index, &object_values[index], &object_values[index + 1], operators[index]);
|
||||||
|
|
||||||
va = calculateTwoValues(object_values[index], object_values[index + 1], operators[index]);
|
va = calculateTwoValues(object_values[index], object_values[index + 1], operators[index]);
|
||||||
uint32_t i = index;
|
uint32_t i = index;
|
||||||
while (i <= operators_size) {
|
while (i <= operators_size) {
|
||||||
operators[i++] = operators[i]; // operators.remove(index)
|
// operators[i++] = operators[i]; // operators.remove(index) - Fails on ESP32 (#22636)
|
||||||
|
operators[i] = operators[i +1]; // operators.remove(index)
|
||||||
|
i++;
|
||||||
object_values[i] = object_values[i +1]; // object_values.remove(index + 1)
|
object_values[i] = object_values[i +1]; // object_values.remove(index + 1)
|
||||||
}
|
}
|
||||||
operators_size--;
|
operators_size--;
|
||||||
|
|
Loading…
Reference in New Issue