Skip to content

Commit

Permalink
Fix assignment of scales from cfg to dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Hinkov committed Feb 24, 2021
1 parent d9c2022 commit 6337026
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mgos_ade7953.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ bool mgos_ade7953_create_common(struct mgos_ade7953 *dev, const struct mgos_conf
dev->current_scale[0] = cfg->current_scale_0;
dev->apower_scale[0] = cfg->apower_scale_0;
dev->aenergy_scale[0] = cfg->aenergy_scale_0;
dev->current_scale[1] = cfg->current_scale_0;
dev->apower_scale[1] = cfg->apower_scale_0;
dev->aenergy_scale[1] = cfg->aenergy_scale_0;
dev->current_scale[1] = cfg->current_scale_1;
dev->apower_scale[1] = cfg->apower_scale_1;
dev->aenergy_scale[1] = cfg->aenergy_scale_1;

if (mgos_ade7953_read_reg(dev, MGOS_ADE7953_REG_VERSION, false, &version)) {
LOG(LL_INFO, ("ADE7953 silicon version: 0x%02x (%d)", (int) version, (int) version));
Expand Down

0 comments on commit 6337026

Please sign in to comment.