add Energy.phase_count_virtual to berry energy module (#19004)

* add Energy.phase_count_virtual to berry energy module

* Update xdrv_52_3_berry_energy.ino

* Update xdrv_52_3_berry_energy.ino
This commit is contained in:
Jacek Ziółkowski 2023-06-30 22:19:59 +02:00 committed by GitHub
parent ad404dfc0c
commit 2705374160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -39,9 +39,9 @@ extern "C" {
};
extern "C" const be_ctypes_structure_t be_energy_struct = {
sizeof(tEnergy), /* size in bytes */
88, /* number of elements */
89, /* number of elements */
be_ctypes_instance_mappings,
(const be_ctypes_structure_item_t[88]) {
(const be_ctypes_structure_item_t[89]) {
{ "active_power", offsetof(tEnergy, active_power[0]), 0, 0, ctypes_float, 0 },
{ "active_power_2", offsetof(tEnergy, active_power[1]), 0, 0, ctypes_float, 0 },
{ "active_power_3", offsetof(tEnergy, active_power[2]), 0, 0, ctypes_float, 0 },
@ -88,6 +88,7 @@ extern "C" {
{ "period_2", offsetof(tEnergy, period_kWh[1]), 0, 0, ctypes_float, 0 },
{ "period_3", offsetof(tEnergy, period_kWh[2]), 0, 0, ctypes_float, 0 },
{ "phase_count", offsetof(tEnergy, phase_count), 0, 0, ctypes_u8, 0 },
{ "phase_count_virtual", offsetof(tEnergy, phase_count_virtual), 0, 0, ctypes_u8, 0 },
{ "power_factor", offsetof(tEnergy, power_factor[0]), 0, 0, ctypes_float, 0 },
{ "power_factor_2", offsetof(tEnergy, power_factor[1]), 0, 0, ctypes_float, 0 },
{ "power_factor_3", offsetof(tEnergy, power_factor[2]), 0, 0, ctypes_float, 0 },