mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-03-06 11:33:38 +00:00
Merge branch 'master' into mqtt_changes
This commit is contained in:
@@ -48,7 +48,7 @@ public:
|
||||
protected:
|
||||
RemoteDebug* debugger;
|
||||
MqttConfig mqttConfig;
|
||||
MQTTClient mqtt = MQTTClient(128);
|
||||
MQTTClient mqtt = MQTTClient(256);
|
||||
unsigned long lastMqttRetry = -10000;
|
||||
bool caVerification = true;
|
||||
WiFiClient *mqttClient = NULL;
|
||||
|
||||
@@ -89,7 +89,7 @@ float EntsoeApi::getValueForHour(time_t ts, int8_t hour) {
|
||||
breakTime(tz->toLocal(ts), tm);
|
||||
hoursToday++;
|
||||
}
|
||||
if(pos >= 48)
|
||||
if(pos > 49)
|
||||
return ENTSOE_NO_VALUE;
|
||||
|
||||
float value = ENTSOE_NO_VALUE;
|
||||
@@ -286,16 +286,18 @@ float EntsoeApi::getCurrencyMultiplier(const char* from, const char* to, time_t
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("(EntsoeApi) got exchange rate %.4f\n"), p.getValue());
|
||||
currencyMultiplier /= p.getValue();
|
||||
} else {
|
||||
currencyMultiplier = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
currencyMultiplier = 0;
|
||||
return 0;
|
||||
}
|
||||
if(debugger->isActive(RemoteDebug::DEBUG)) debugger->printf_P(PSTR("(EntsoeApi) Resulting currency multiplier: %.4f\n"), currencyMultiplier);
|
||||
tmElements_t tm;
|
||||
breakTime(t, tm);
|
||||
lastCurrencyFetch = now + (SECS_PER_DAY * 1000) - (((((tm.Hour * 60) + tm.Minute) * 60) + tm.Second) * 1000);
|
||||
lastCurrencyFetch = now + (SECS_PER_DAY * 1000) - (((((tm.Hour * 60) + tm.Minute) * 60) + tm.Second) * 1000) + 3600000;
|
||||
}
|
||||
return currencyMultiplier;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"tPI" : %.2f,
|
||||
"tPO" : %.2f,
|
||||
"tQI" : %.2f,
|
||||
"tQO" : %.2f,
|
||||
"tPI" : %.3f,
|
||||
"tPO" : %.3f,
|
||||
"tQI" : %.3f,
|
||||
"tQO" : %.3f,
|
||||
"rtc" : %lu
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
"PF1" : %.2f,
|
||||
"PF2" : %.2f,
|
||||
"PF3" : %.2f,
|
||||
"tPI" : %.2f,
|
||||
"tPO" : %.2f,
|
||||
"tQI" : %.2f,
|
||||
"tQO" : %.2f,
|
||||
"tPI" : %.3f,
|
||||
"tPO" : %.3f,
|
||||
"tQI" : %.3f,
|
||||
"tQO" : %.3f,
|
||||
"rtc" : %lu
|
||||
},
|
||||
"realtime" : {
|
||||
|
||||
2
lib/SvelteUi/app/dist/index.css
vendored
2
lib/SvelteUi/app/dist/index.css
vendored
File diff suppressed because one or more lines are too long
20
lib/SvelteUi/app/dist/index.js
vendored
20
lib/SvelteUi/app/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -20,12 +20,12 @@
|
||||
let values = [];
|
||||
min = max = 0;
|
||||
let cur = new Date();
|
||||
addHours(cur, sysinfo.clock_offset);
|
||||
addHours(cur, sysinfo.clock_offset - ((24 + cur.getHours() - cur.getUTCHours())%24));
|
||||
for(i = hour; i<24; i++) {
|
||||
val = json[zeropad(h++)];
|
||||
if(val == null) break;
|
||||
xTicks.push({
|
||||
label: zeropad(cur.getUTCHours())
|
||||
label: zeropad(cur.getHours())
|
||||
});
|
||||
values.push(val*100);
|
||||
min = Math.min(min, val*100);
|
||||
@@ -36,7 +36,7 @@
|
||||
val = json[zeropad(h++)];
|
||||
if(val == null) break;
|
||||
xTicks.push({
|
||||
label: zeropad(cur.getUTCHours())
|
||||
label: zeropad(cur.getHours())
|
||||
});
|
||||
values.push(val*100);
|
||||
min = Math.min(min, val*100);
|
||||
|
||||
Reference in New Issue
Block a user