Skip to content

Commit

Permalink
Cleanup esp32 energy
Browse files Browse the repository at this point in the history
  • Loading branch information
arendst committed Jun 28, 2024
1 parent 8364eca commit 8a0493b
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1345,17 +1345,9 @@ void ResponseAppendMargin(uint16_t* start, uint32_t step_size) {
}

void EnergyMarginStatus(void) {
/*
Response_P(PSTR("{\"" D_CMND_STATUS D_STATUS9_MARGIN "\":{\"" D_CMND_POWERDELTA "\":["));
for (uint32_t i = 0; i < Energy->phase_count; i++) {
ResponseAppend_P(PSTR("%s%d"), (i>0)?",":"", Energy->Settings.power_delta[i]);
}
ResponseAppend_P(PSTR("],\"" D_CMND_POWERLOW "\":"));
*/
Response_P(PSTR("{\"" D_CMND_STATUS D_STATUS9_MARGIN "\":{\"" D_CMND_POWERDELTA "\":"));
ResponseAppendMargin(&Energy->Settings.power_delta[0], 1);
ResponseAppend_P(PSTR(",\"" D_CMND_POWERLOW "\":"));

ResponseAppendMargin(&Energy->Settings.phase[0].min_power);
ResponseAppend_P(PSTR(",\"" D_CMND_POWERHIGH "\":"));
ResponseAppendMargin(&Energy->Settings.phase[0].max_power);
Expand Down Expand Up @@ -1413,14 +1405,6 @@ bool ResponseCmndEnergyMargin(uint16_t* start, uint32_t max_value, uint32_t defa
}

void CmndPowerDelta(void) {
/*
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= ENERGY_MAX_PHASES)) {
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 32000)) {
Energy->Settings.power_delta[XdrvMailbox.index -1] = XdrvMailbox.payload;
}
ResponseCmndIdxNumber(Energy->Settings.power_delta[XdrvMailbox.index -1]);
}
*/
ResponseCmndEnergyMargin(&Energy->Settings.power_delta[0], 32000, 1, 1);
}

Expand Down

0 comments on commit 8a0493b

Please sign in to comment.