diff --git a/src/.vscode/extensions.json b/src/.vscode/extensions.json new file mode 100644 index 00000000..080e70d0 --- /dev/null +++ b/src/.vscode/extensions.json @@ -0,0 +1,10 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "platformio.platformio-ide" + ], + "unwantedRecommendations": [ + "ms-vscode.cpptools-extension-pack" + ] +} diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json index 841ff790..6af36bae 100644 --- a/src/.vscode/settings.json +++ b/src/.vscode/settings.json @@ -21,6 +21,9 @@ // https://clang.llvm.org/docs/ClangFormatStyleOptions.html "C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0}", "files.associations": { - "typeinfo": "cpp" + "typeinfo": "cpp", + "string": "cpp", + "istream": "cpp", + "ostream": "cpp" }, } \ No newline at end of file diff --git a/src/app.cpp b/src/app.cpp index 443e7fcb..4da010ef 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -287,7 +287,7 @@ void app::setupMqtt(void) { mMqttActive = true; if(mMqttActive) - mMqtt.setup(&mConfig->mqtt, mConfig->sys.deviceName, mVersion, mSys, &mUtcTimestamp); + mMqtt.setup(this, &mConfig->mqtt, mConfig->sys.deviceName, mVersion, mSys, &mUtcTimestamp); } //----------------------------------------------------------------------------- diff --git a/src/web/html/api.js b/src/web/html/api.js index 0a194634..3db0002e 100644 --- a/src/web/html/api.js +++ b/src/web/html/api.js @@ -31,6 +31,23 @@ function parseESP(obj) { document.getElementById("esp_type").innerHTML="Board: " + obj["esp_type"]; } +function parseSysInfo(obj) { + document.getElementById("sdkversion").innerHTML= "SDKv.: " + obj["sdk_version"]; + document.getElementById("cpufreq").innerHTML= "CPU MHz: " + obj["cpu_freq"] + "MHz"; + document.getElementById("chiprevision").innerHTML= "Rev.: " + obj["chip_revision"]; + document.getElementById("chipmodel").innerHTML= "Model: " + obj["chip_model"]; + document.getElementById("chipcores").innerHTML= "Core: " + obj["chip_cores"]; + document.getElementById("esp_type").innerHTML= "Type: " + obj["esp_type"]; + + document.getElementById("heap_used").innerHTML= "Used: " + obj["heap_used"]; + document.getElementById("heap_total").innerHTML= "Total: " + obj["heap_total"]; +} + +function changeProgressbar(id, value, max) { + document.getElementById(id).value = value; + document.getElementById(id).max = max; +} + function setHide(id, hide) { var elm = document.getElementById(id); if(hide) { diff --git a/src/web/html/system.html b/src/web/html/system.html index 4e47a18c..c48c1d64 100644 --- a/src/web/html/system.html +++ b/src/web/html/system.html @@ -17,7 +17,18 @@
-
+
+ +
+