From 7d1bcda887369eafaaebb3c19385963d720f3ee8 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 23 Aug 2021 17:37:12 +0200 Subject: [PATCH] Saving bytes for same result --- tasmota/xnrg_07_ade7953.ino | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasmota/xnrg_07_ade7953.ino b/tasmota/xnrg_07_ade7953.ino index a2c58e6f1..5ed9f3518 100644 --- a/tasmota/xnrg_07_ade7953.ino +++ b/tasmota/xnrg_07_ade7953.ino @@ -148,8 +148,10 @@ void Ade7953GetData(void) } else if (10 == i) { acc_mode = value; // Accumulation mode if (0 == Ade7953.model) { // Shelly 2.5 - Swap channel B values due to hardware connection - if (acc_mode & APSIGN[0]) { acc_mode &= ~APSIGN[0]; } else { acc_mode |= APSIGN[0]; } - if (acc_mode & VARSIGN[0]) { acc_mode &= ~VARSIGN[0]; } else { acc_mode |= VARSIGN[0]; } +// if (acc_mode & APSIGN[0]) { acc_mode &= ~APSIGN[0]; } else { acc_mode |= APSIGN[0]; } +// if (acc_mode & VARSIGN[0]) { acc_mode &= ~VARSIGN[0]; } else { acc_mode |= VARSIGN[0]; } + acc_mode ^= (APSIGN[0] | VARSIGN[0]); +// acc_mode ^= 0xA00; } } else { reg[i >> 2][i &3] = value;