Skip to content

Commit

Permalink
Changes after testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gskjold committed May 5, 2023
1 parent 48eb640 commit ccee3f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/SvelteUi/src/AmsWebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,7 @@ void AmsWebServer::configFileDownload() {
EnergyAccountingConfig eac;
config->getEnergyAccountingConfig(eac);
EnergyAccountingData ead = ea->getData();
server.sendContent(buf, snprintf_P(buf, BufferSize, PSTR("energyaccounting %d %d %.2f %d %d %.2f %d %d %d %.2f %d %.2f %d %.2f %d %.2f %d %.2f %.2f %.2f"),
server.sendContent(buf, snprintf_P(buf, BufferSize, PSTR("energyaccounting %d %d %.2f %.2f %.2f %.2f %.2f %.2f %d %.2f %d %.2f %d %.2f %d %.2f %d %.2f %.2f %.2f"),
ead.version,
ead.month,
ea->getCostYesterday(),
Expand Down
18 changes: 9 additions & 9 deletions src/AmsToMqttBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2129,13 +2129,13 @@ void configFileParse() {
}
} else if(i == 3) {
float val = String(pch).toFloat();
ead.costYesterday = val * 10;
ead.costYesterday = val * 100;
} else if(i == 4) {
float val = String(pch).toFloat();
ead.costThisMonth = val;
ead.costThisMonth = val * 100;
} else if(i == 5) {
float val = String(pch).toFloat();
ead.costLastMonth = val;
ead.costLastMonth = val * 100;
} else if(i >= 6 && i < 18) {
uint8_t hour = i-6;
{
Expand All @@ -2156,22 +2156,22 @@ void configFileParse() {
ead.month = val;
} else if(i == 2) {
float val = String(pch).toFloat();
ead.costYesterday = val * 10;
ead.costYesterday = val * 100;
} else if(i == 3) {
float val = String(pch).toFloat();
ead.costThisMonth = val;
ead.costThisMonth = val * 100;
} else if(i == 4) {
float val = String(pch).toFloat();
ead.costLastMonth = val;
ead.costLastMonth = val * 100;
} else if(i == 5) {
float val = String(pch).toFloat();
ead.incomeYesterday= val * 10;
ead.incomeYesterday= val * 100;
} else if(i == 6) {
float val = String(pch).toFloat();
ead.incomeThisMonth = val;
ead.incomeThisMonth = val * 100;
} else if(i == 7) {
float val = String(pch).toFloat();
ead.incomeLastMonth = val;
ead.incomeLastMonth = val * 100;
} else if(i >= 8 && i < 18) {
uint8_t hour = i-8;
{
Expand Down

0 comments on commit ccee3f5

Please sign in to comment.