mirror of https://github.com/arendst/Tasmota.git
Fix Shelly 2.5 low reactive power channels
This commit is contained in:
parent
d0ee5776e5
commit
4471868580
|
@ -406,7 +406,13 @@ void Ade7953GetData(void) {
|
||||||
} else {
|
} else {
|
||||||
Ade7953.active_power[channel] = abs(reg[channel][1]);
|
Ade7953.active_power[channel] = abs(reg[channel][1]);
|
||||||
apparent_power[channel] = abs(reg[channel][2]);
|
apparent_power[channel] = abs(reg[channel][2]);
|
||||||
reactive_power[channel] = ((acc_mode & VARNLOAD[channel]) != 0) ? 0 : abs(reg[channel][3]);
|
|
||||||
|
uint32_t swapped_channel = channel;
|
||||||
|
if (ADE7953_SHELLY_25 == Ade7953.model) {
|
||||||
|
swapped_channel = ~channel;
|
||||||
|
}
|
||||||
|
|
||||||
|
reactive_power[channel] = ((acc_mode & VARNLOAD[swapped_channel]) != 0) ? 0 : abs(reg[channel][3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue