mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
[Webserver] Add documentation link to Advanced settings page
And output the new settings in the info page & JSON output Not yet included in the JSON used for the new UI.
This commit is contained in:
+2
-4
@@ -100,12 +100,10 @@ do
|
||||
|
||||
ELFFILE=`echo ".pioenvs/${ENV}/firmware.elf"`
|
||||
if [ -f $ELFFILE ]; then
|
||||
SYMBOLS_STATS=`echo "${TMP_DIST}/memstats/${ENV}_symbols.txt"`
|
||||
STRINGS_STATS=`echo "${TMP_DIST}/memstats/${ENV}_strings.txt"`
|
||||
SYMBOLS_STATS=`echo "${TMP_DIST}/memstats/symbols_${ENV}.txt"`
|
||||
STRINGS_STATS=`echo "${TMP_DIST}/memstats/strings_${ENV}.txt"`
|
||||
readelf -a ${ELFFILE} |grep 3ff |sort -n -k 3 > ${SYMBOLS_STATS}
|
||||
objdump -s -j .rodata ${ELFFILE} > ${STRINGS_STATS}
|
||||
gzip ${SYMBOLS_STATS}
|
||||
gzip ${STRINGS_STATS}
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
+56
-17
@@ -3340,12 +3340,26 @@ void addFormIPBox(const String& label, const String& id, const byte ip[4])
|
||||
}
|
||||
|
||||
// adds a Help Button with points to the the given Wiki Subpage
|
||||
void addHelpButton(const String& url)
|
||||
// If url starts with "RTD", it will be considered as a Read-the-docs link
|
||||
void addHelpButton(const String& url) {
|
||||
if (url.startsWith("RTD")) {
|
||||
addRTDHelpButton(url.substring(3));
|
||||
} else {
|
||||
addHelpButton(url, false);
|
||||
}
|
||||
}
|
||||
|
||||
void addRTDHelpButton(const String& url)
|
||||
{
|
||||
addHelpButton(url, true);
|
||||
}
|
||||
|
||||
void addHelpButton(const String& url, bool isRTD)
|
||||
{
|
||||
addHtmlLink(
|
||||
F("button help"),
|
||||
makeDocLink(url, false),
|
||||
F("❔"));
|
||||
makeDocLink(url, isRTD),
|
||||
isRTD ? F("ℹ") : F("❔"));
|
||||
}
|
||||
|
||||
void addRTDPluginButton(int taskDeviceNumber) {
|
||||
@@ -3356,10 +3370,7 @@ void addRTDPluginButton(int taskDeviceNumber) {
|
||||
if (taskDeviceNumber < 10) url += '0';
|
||||
url += String(taskDeviceNumber);
|
||||
url += F(".html");
|
||||
addHtmlLink(
|
||||
F("button help"),
|
||||
makeDocLink(url, true),
|
||||
F("ℹ"));
|
||||
addRTDHelpButton(url);
|
||||
|
||||
switch (taskDeviceNumber) {
|
||||
case 76:
|
||||
@@ -4503,7 +4514,12 @@ void handle_json()
|
||||
stream_next_json_object_value(F("Load"), String(getCPUload()));
|
||||
stream_next_json_object_value(F("Load LC"), String(getLoopCountPerSec()));
|
||||
}
|
||||
stream_next_json_object_value(F("CPU Eco mode"), jsonBool(Settings.EcoPowerMode()));
|
||||
|
||||
#ifdef CORE_POST_2_5_0
|
||||
stream_next_json_object_value(F("Heap Max Free Block"), String(ESP.getMaxFreeBlockSize()));
|
||||
stream_next_json_object_value(F("Heap Fragmentation"), String(ESP.getHeapFragmentation()));
|
||||
#endif
|
||||
stream_last_json_object_value(F("Free RAM"), String(ESP.getFreeHeap()));
|
||||
TXBuffer += ",\n";
|
||||
}
|
||||
@@ -4526,6 +4542,13 @@ void handle_json()
|
||||
stream_next_json_object_value(F("Last Disconnect Reason"), String(lastDisconnectReason));
|
||||
stream_next_json_object_value(F("Last Disconnect Reason str"), getLastDisconnectReason());
|
||||
stream_next_json_object_value(F("Number reconnects"), String(wifi_reconnects));
|
||||
stream_next_json_object_value(F("Force WiFi B/G"), jsonBool(Settings.ForceWiFi_bg_mode()));
|
||||
stream_next_json_object_value(F("Restart wifi lost conn"), jsonBool(Settings.WiFiRestart_connection_lost()));
|
||||
#ifdef ESP8266
|
||||
stream_next_json_object_value(F("Force WiFi no sleep"), jsonBool(Settings.WifiNoneSleep()));
|
||||
#endif
|
||||
stream_next_json_object_value(F("Periodical send Gratuitous ARP"), jsonBool(Settings.gratuitousARP()));
|
||||
stream_next_json_object_value(F("Connection Failure Threshold"), String(Settings.ConnectionFailuresThreshold));
|
||||
stream_last_json_object_value(F("RSSI"), String(WiFi.RSSI()));
|
||||
TXBuffer += ",\n";
|
||||
}
|
||||
@@ -4908,7 +4931,7 @@ void handle_advanced() {
|
||||
TXBuffer += F("<form method='post'>");
|
||||
html_table_class_normal();
|
||||
|
||||
addFormHeader(F("Advanced Settings"));
|
||||
addFormHeader(F("Advanced Settings"), F("RTDTools/Tools.html#advanced"));
|
||||
|
||||
addFormSubHeader(F("Rules Settings"));
|
||||
|
||||
@@ -4975,6 +4998,14 @@ void handle_advanced() {
|
||||
addFormNumericBox(F("WD I2C Address"), F("wdi2caddress"), Settings.WDI2CAddress, 0, 127);
|
||||
TXBuffer += F(" (decimal)");
|
||||
|
||||
addFormNumericBox(F("I2C ClockStretchLimit"), F("wireclockstretchlimit"), Settings.WireClockStretchLimit); //TODO define limits
|
||||
#if defined(FEATURE_ARDUINO_OTA)
|
||||
addFormCheckBox(F("Enable Arduino OTA"), F("arduinootaenable"), Settings.ArduinoOTAEnable);
|
||||
#endif
|
||||
#if defined(ESP32)
|
||||
addFormCheckBox_disabled(F("Enable RTOS Multitasking"), F("usertosmultitasking"), Settings.UseRTOSMultitasking);
|
||||
#endif
|
||||
|
||||
addFormCheckBox_disabled(F("Use SSDP"), F("usessdp"), Settings.UseSSDP);
|
||||
|
||||
addFormNumericBox(F("Connection Failure Threshold"), F("cft"), Settings.ConnectionFailuresThreshold, 0, 100);
|
||||
@@ -4994,15 +5025,6 @@ void handle_advanced() {
|
||||
addFormCheckBox(F("Periodical send Gratuitous ARP"), F("gratuitous_arp"), Settings.gratuitousARP());
|
||||
addFormCheckBox(F("CPU Eco mode"), F("eco_mode"), Settings.EcoPowerMode());
|
||||
addFormNote(F("Node may miss receiving packets with Eco mode enabled"));
|
||||
|
||||
addFormNumericBox(F("I2C ClockStretchLimit"), F("wireclockstretchlimit"), Settings.WireClockStretchLimit); //TODO define limits
|
||||
#if defined(FEATURE_ARDUINO_OTA)
|
||||
addFormCheckBox(F("Enable Arduino OTA"), F("arduinootaenable"), Settings.ArduinoOTAEnable);
|
||||
#endif
|
||||
#if defined(ESP32)
|
||||
addFormCheckBox_disabled(F("Enable RTOS Multitasking"), F("usertosmultitasking"), Settings.UseRTOSMultitasking);
|
||||
#endif
|
||||
|
||||
addFormSeparator(2);
|
||||
|
||||
html_TR_TD();
|
||||
@@ -6685,6 +6707,8 @@ void handle_sysinfo() {
|
||||
TXBuffer += getLoopCountPerSec();
|
||||
TXBuffer += ')';
|
||||
}
|
||||
addRowLabel(F("CPU Eco mode"));
|
||||
TXBuffer += jsonBool(Settings.EcoPowerMode());
|
||||
|
||||
addRowLabel(F("Free Mem"));
|
||||
TXBuffer += freeMem;
|
||||
@@ -6802,6 +6826,21 @@ void handle_sysinfo() {
|
||||
addRowLabel(F("Number reconnects"));
|
||||
TXBuffer += wifi_reconnects;
|
||||
|
||||
addTableSeparator(F("WiFi Settings"), 2, 3);
|
||||
addRowLabel(F("Force WiFi B/G"));
|
||||
TXBuffer += jsonBool(Settings.ForceWiFi_bg_mode());
|
||||
addRowLabel(F("Restart wifi lost conn"));
|
||||
TXBuffer += jsonBool(Settings.WiFiRestart_connection_lost());
|
||||
#ifdef ESP8266
|
||||
addRowLabel(F("Force WiFi no sleep"));
|
||||
TXBuffer += jsonBool(Settings.WifiNoneSleep());
|
||||
#endif
|
||||
addRowLabel(F("Periodical send Gratuitous ARP"));
|
||||
TXBuffer += jsonBool(Settings.gratuitousARP());
|
||||
|
||||
addRowLabel(F("Connection Failure Threshold"));
|
||||
TXBuffer += String(Settings.ConnectionFailuresThreshold);
|
||||
|
||||
addTableSeparator(F("Firmware"), 2, 3);
|
||||
|
||||
addRowLabel_copy(F("Build"));
|
||||
|
||||
Reference in New Issue
Block a user