mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-12 16:36:38 +02:00
setup page complete converted to static version
This commit is contained in:
parent
b6ac416665
commit
08d8658737
2 changed files with 17 additions and 6 deletions
|
@ -44,8 +44,12 @@ void api::onSystem(AsyncWebServerRequest *request) {
|
|||
AsyncJsonResponse* response = new AsyncJsonResponse();
|
||||
JsonObject root = response->getRoot();
|
||||
|
||||
root[F("ssid")] = mSysCfg->stationSsid;
|
||||
root[F("ssid")] = mSysCfg->stationSsid;
|
||||
root[F("device_name")] = mSysCfg->deviceName;
|
||||
root[F("version")] = String(mVersion);
|
||||
root[F("build")] = String(AUTO_GIT_HASH);
|
||||
root[F("ts_uptime")] = mApp->getUptime();
|
||||
root[F("ts_now")] = mApp->getTimestamp();
|
||||
|
||||
response->setLength();
|
||||
//response->addHeader("Access-Control-Allow-Origin", "*");
|
||||
|
@ -80,8 +84,8 @@ void api::onInverterList(AsyncWebServerRequest *request) {
|
|||
obj[F("power_limit_option")] = iv->powerLimit[1];
|
||||
}
|
||||
}
|
||||
root[F("interval")] = String(mConfig->sendInterval);
|
||||
root[F("retries")] = String(mConfig->maxRetransPerPyld);
|
||||
root[F("interval")] = String(mConfig->sendInterval);
|
||||
root[F("retries")] = String(mConfig->maxRetransPerPyld);
|
||||
root[F("max_num_inverters")] = MAX_NUM_INVERTERS;
|
||||
|
||||
response->setLength();
|
||||
|
@ -150,8 +154,7 @@ void api::onSerial(AsyncWebServerRequest *request) {
|
|||
AsyncJsonResponse* response = new AsyncJsonResponse();
|
||||
JsonObject root = response->getRoot();
|
||||
|
||||
// next line cause a chrash but why?
|
||||
//root[F("interval")] = mConfig->serialInterval;
|
||||
root[F("interval")] = (uint16_t)mConfig->serialInterval;
|
||||
root[F("show_live_data")] = mConfig->serialShowIv;
|
||||
root[F("debug")] = mConfig->serialDebug;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue