mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-06 04:31:37 +02:00
0.8.54
* added minimal version (without: MqTT, Display, History), WebUI is not changed! * added simulator (must be activated before compile, standard: off) * changed communication attempts back to 5
This commit is contained in:
parent
ca6ebfe0fe
commit
60111d0696
17 changed files with 421 additions and 42 deletions
|
@ -202,8 +202,6 @@ class RestApi {
|
|||
ep[F("setup")] = url + F("setup");
|
||||
ep[F("system")] = url + F("system");
|
||||
ep[F("live")] = url + F("live");
|
||||
ep[F("powerHistory")] = url + F("powerHistory");
|
||||
ep[F("yieldDayHistory")] = url + F("yieldDayHistory");
|
||||
}
|
||||
|
||||
|
||||
|
@ -791,6 +789,7 @@ class RestApi {
|
|||
|
||||
void getPowerHistory(AsyncWebServerRequest *request, JsonObject obj) {
|
||||
getGeneric(request, obj.createNestedObject(F("generic")));
|
||||
#if defined(ENABLE_HISTORY)
|
||||
obj[F("refresh")] = mConfig->inst.sendInterval;
|
||||
uint16_t max = 0;
|
||||
for (uint16_t fld = 0; fld < HISTORY_DATA_ARR_LENGTH; fld++) {
|
||||
|
@ -801,10 +800,12 @@ class RestApi {
|
|||
}
|
||||
obj[F("max")] = max;
|
||||
obj[F("maxDay")] = mApp->getHistoryMaxDay();
|
||||
#endif /*ENABLE_HISTORY*/
|
||||
}
|
||||
|
||||
void getYieldDayHistory(AsyncWebServerRequest *request, JsonObject obj) {
|
||||
getGeneric(request, obj.createNestedObject(F("generic")));
|
||||
#if defined(ENABLE_HISTORY)
|
||||
obj[F("refresh")] = 86400; // 1 day
|
||||
uint16_t max = 0;
|
||||
for (uint16_t fld = 0; fld < HISTORY_DATA_ARR_LENGTH; fld++) {
|
||||
|
@ -814,6 +815,7 @@ class RestApi {
|
|||
max = value;
|
||||
}
|
||||
obj[F("max")] = max;
|
||||
#endif /*ENABLE_HISTORY*/
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue