diff --git a/tasmota/xnrg_08_sdm120.ino b/tasmota/xnrg_08_sdm120.ino index 34649da13..bde59266b 100644 --- a/tasmota/xnrg_08_sdm120.ino +++ b/tasmota/xnrg_08_sdm120.ino @@ -275,13 +275,11 @@ bool Xnrg08(uint8_t function) #ifdef USE_WEBSERVER #ifdef USE_ENERGY_COLUMN_GUI case FUNC_WEB_COL_SENSOR: - Sdm220Show(0); - break; -#else // not USE_ENERGY_COLUMN_GUI +#else // not USE_ENERGY_COLUMN_GUI case FUNC_WEB_SENSOR: +#endif // USE_ENERGY_COLUMN_GUI Sdm220Show(0); break; -#endif // USE_ENERGY_COLUMN_GUI #endif // USE_WEBSERVER case FUNC_ENERGY_RESET: Sdm220Reset(); diff --git a/tasmota/xnrg_13_fif_le01mr.ino b/tasmota/xnrg_13_fif_le01mr.ino index 68aae6c7a..f871ea578 100644 --- a/tasmota/xnrg_13_fif_le01mr.ino +++ b/tasmota/xnrg_13_fif_le01mr.ino @@ -296,13 +296,11 @@ bool Xnrg13(uint8_t function) #ifdef USE_WEBSERVER #ifdef USE_ENERGY_COLUMN_GUI case FUNC_WEB_COL_SENSOR: - FifLEShow(0); - break; -#else // not USE_ENERGY_COLUMN_GUI +#else // not USE_ENERGY_COLUMN_GUI case FUNC_WEB_SENSOR: +#endif // USE_ENERGY_COLUMN_GUI FifLEShow(0); break; -#endif // USE_ENERGY_COLUMN_GUI #endif // USE_WEBSERVER case FUNC_ENERGY_RESET: FifLEReset(); diff --git a/tasmota/xnrg_18_sdm72.ino b/tasmota/xnrg_18_sdm72.ino index ab5c7ce4c..d20874749 100644 --- a/tasmota/xnrg_18_sdm72.ino +++ b/tasmota/xnrg_18_sdm72.ino @@ -222,13 +222,11 @@ bool Xnrg18(uint8_t function) #ifdef USE_WEBSERVER #ifdef USE_ENERGY_COLUMN_GUI case FUNC_WEB_COL_SENSOR: - Sdm72Show(0); - break; -#else // not USE_ENERGY_COLUMN_GUI +#else // not USE_ENERGY_COLUMN_GUI case FUNC_WEB_SENSOR: +#endif // USE_ENERGY_COLUMN_GUI Sdm72Show(0); break; -#endif // USE_ENERGY_COLUMN_GUI #endif // USE_WEBSERVER #endif // SDM72_IMPEXP case FUNC_INIT: diff --git a/tasmota/xnrg_21_sdm230.ino b/tasmota/xnrg_21_sdm230.ino index cafe7a031..abcebd554 100644 --- a/tasmota/xnrg_21_sdm230.ino +++ b/tasmota/xnrg_21_sdm230.ino @@ -282,13 +282,11 @@ bool Xnrg21(uint8_t function) #ifdef USE_WEBSERVER #ifdef USE_ENERGY_COLUMN_GUI case FUNC_WEB_COL_SENSOR: - Sdm230Show(0); - break; -#else // not USE_ENERGY_COLUMN_GUI +#else // not USE_ENERGY_COLUMN_GUI case FUNC_WEB_SENSOR: +#endif // USE_ENERGY_COLUMN_GUI Sdm230Show(0); break; -#endif // USE_ENERGY_COLUMN_GUI #endif // USE_WEBSERVER #endif // SDM230_MORE_REGS case FUNC_ENERGY_RESET: diff --git a/tasmota/xnrg_23_ade7880.ino b/tasmota/xnrg_23_ade7880.ino index b77a1fcf9..51c1c6d90 100644 --- a/tasmota/xnrg_23_ade7880.ino +++ b/tasmota/xnrg_23_ade7880.ino @@ -657,12 +657,28 @@ bool Ade7880Command(void) { for (uint32_t i = 0; i < 57; i++) { int32_t value = Ade7880Read(ADE7880_AIGAIN + i); // snprintf_P(data, sizeof(data), PSTR("%s%s%08X"), data, (i)?",":"", value); - if (bitRead(value, 27)) { value |= 0xF0000000; } // Make 32-bit negative (ZPSE) + if (bitRead(value, 27)) { value |= 0xF0000000; } // Make 24-bit negative (ZPSE) snprintf_P(data, sizeof(data), PSTR("%s%s%d"), data, (i)?",":"", value); } AddLog(LOG_LEVEL_DEBUG, PSTR("A78: DSP Regs 0x4380..B9 '%s'"), data); return true; } + if ('2' == XdrvMailbox.data[0]) { + // EnergyConfig 2 - Dump DSP UI data memory (0x43C0..0x43C7) + char data[600] = { 0 }; + for (uint32_t i = 0; i < 8; i++) { + int32_t value = Ade7880Read(ADE7880_AIRMS + i); + snprintf_P(data, sizeof(data), PSTR("%s%s%08X"), data, (i)?",":"", value); +// if (7 == i) { +// if (bitRead(value, 27)) { value |= 0xF0000000; } // Make 28-bit negative (ZP) +// } else { +// if (bitRead(value, 23)) { value |= 0xFF000000; } // Make 24-bit negative (ZP) +// } +// snprintf_P(data, sizeof(data), PSTR("%s%s%d"), data, (i)?",":"", value); + } + AddLog(LOG_LEVEL_DEBUG, PSTR("A78: DSP Regs 0x43C0..C7 '%s'"), data); + return true; + } #endif // ADE7880_DEBUG Ade7880Defaults(); // Load defaults if (Ade7880SetDefaults(XdrvMailbox.data)) { @@ -728,13 +744,11 @@ bool Xnrg23(uint8_t function) { #ifdef USE_WEBSERVER #ifdef USE_ENERGY_COLUMN_GUI case FUNC_WEB_COL_SENSOR: - Ade7880Show(0); - break; -#else // not USE_ENERGY_COLUMN_GUI +#else // not USE_ENERGY_COLUMN_GUI case FUNC_WEB_SENSOR: +#endif // USE_ENERGY_COLUMN_GUI Ade7880Show(0); break; -#endif // USE_ENERGY_COLUMN_GUI #endif // USE_WEBSERVER #endif // ADE7880_MORE_REGS case FUNC_COMMAND: