mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-29 05:20:58 +00:00
Merge branch 'master' into dev-v2.2
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
<span class="input-group-text">Baud rate</span>
|
||||
</div>
|
||||
<select class="form-control sd" name="b">
|
||||
<option value="300" {b300}>300</option>
|
||||
<option value="2400" {b2400}>2400</option>
|
||||
<option value="4800" {b4800}>4800</option>
|
||||
<option value="9600" {b9600}>9600</option>
|
||||
|
||||
@@ -347,6 +347,7 @@ void AmsWebServer::configMeterHtml() {
|
||||
html.replace(F("{mod}"), meterState->getMeterModel());
|
||||
html.replace(F("{mid}"), meterState->getMeterId());
|
||||
html.replace(F("{b}"), String(meterConfig->baud));
|
||||
html.replace(F("{b300}"), meterConfig->baud == 300 ? F("selected") : F(""));
|
||||
html.replace(F("{b2400}"), meterConfig->baud == 2400 ? F("selected") : F(""));
|
||||
html.replace(F("{b4800}"), meterConfig->baud == 4800 ? F("selected") : F(""));
|
||||
html.replace(F("{b9600}"), meterConfig->baud == 9600 ? F("selected") : F(""));
|
||||
|
||||
@@ -168,7 +168,6 @@ void EnergyAccounting::calcDayCost() {
|
||||
float price = eapi->getValueForHour(i - local.Hour);
|
||||
if(price == ENTSOE_NO_VALUE) break;
|
||||
breakTime(now - ((local.Hour - i) * 3600), utc);
|
||||
|
||||
int16_t wh = ds->getHourImport(utc.Hour);
|
||||
costDay += price * (wh / 1000.0);
|
||||
|
||||
|
||||
@@ -98,8 +98,10 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterCo
|
||||
}
|
||||
|
||||
if(listType >= 2 && memcmp(meterModel.c_str(), "MA304T3", 7) == 0) {
|
||||
l2current = (((activeImportPower - activeExportPower) * sqrt(3)) - (l1voltage * l1current) - (l3voltage * l3current)) / l2voltage;
|
||||
l2voltage = sqrt(pow(l1voltage - l3voltage * cos(60 * (PI/180)), 2) + pow(l3voltage * sin(60 * (PI/180)),2));
|
||||
if(l2voltage > 0) {
|
||||
l2current = (((activeImportPower - activeExportPower) * sqrt(3)) - (l1voltage * l1current) - (l3voltage * l3current)) / l2voltage;
|
||||
}
|
||||
}
|
||||
|
||||
if(listType == 3) {
|
||||
|
||||
Reference in New Issue
Block a user