Squeeze 0.4k from code size

This commit is contained in:
Theo Arends 2025-12-13 16:15:35 +01:00
parent d521498d82
commit e8a38813b7
13 changed files with 43 additions and 71 deletions

View File

@ -307,19 +307,21 @@ const char HTTP_FORM_LOGIN[] PROGMEM =
const char HTTP_FIELDSET_LEGEND[] PROGMEM =
"<fieldset><legend><b>&nbsp;%s&nbsp;</b></legend>";
const char HTTP_FORM_TEMPLATE[] PROGMEM =
"<form method='get' action='tp'>";
const char HTTP_FORM_GET_ACTION[] PROGMEM =
"<form method='get' action='%s'>";
const char HTTP_FORM_BUTTON[] PROGMEM =
"<p></p><form method='get' action='%s'><button>%s</button></form>";
const char HTTP_FORM_TEMPLATE_FLAG[] PROGMEM =
// "<label><input id='c0' name='c0' type='checkbox'><b>" D_OPTION_TEXT "</b></label><br>"
"</p></fieldset>";
const char HTTP_FORM_MODULE[] PROGMEM =
"<form method='get' action='md'>"
"<p></p><b>" D_MODULE_TYPE "</b> (%s)<br><select id='g99'></select><br>"
"<br><table>";
const char HTTP_FORM_WIFI_PART1[] PROGMEM =
"<form method='get' action='wi'>"
"<p><b>" D_AP1_SSID "</b>%s<br><input id='s1' placeholder=\"" D_AP1_SSID_HELP "\" value=\"%s\"></p>" // Need \" instead of ' to be able to use ' in text (#8489)
"<p><label><b>" D_AP_PASSWORD "</b><input type='checkbox' onclick='sp(\"p1\")'></label><br><input id='p1' type='password' placeholder=\"" D_AP_PASSWORD_HELP "\"";
@ -333,18 +335,12 @@ const char HTTP_FORM_WIFI_PART2[] PROGMEM =
#endif
;
const char HTTP_FORM_LOG1[] PROGMEM =
"<form method='get' action='lg'>";
const char HTTP_FORM_LOG2[] PROGMEM =
const char HTTP_FORM_LOG[] PROGMEM =
"<p><b>" D_SYSLOG_HOST "</b> (" SYS_LOG_HOST ")<br><input id='lh' placeholder=\"" SYS_LOG_HOST "\" value=\"%s\"></p>"
"<p><b>" D_SYSLOG_PORT "</b> (" STR(SYS_LOG_PORT) ")<br><input id='lp' placeholder='" STR(SYS_LOG_PORT) "' value='%d'></p>"
"<p><b>" D_TELEMETRY_PERIOD "</b> (" STR(TELE_PERIOD) ")<br><input id='lt' placeholder='" STR(TELE_PERIOD) "' value='%d'></p>";
const char HTTP_FORM_OTHER1[] PROGMEM =
"<form method='get' action='co'>"
"<p></p>";
const char HTTP_FORM_OTHER2[] PROGMEM =
const char HTTP_FORM_OTHER[] PROGMEM =
"<p><input id='t1' placeholder=\"" D_TEMPLATE "\" value='%s'></p>" // We need ' apostrophe here as the template contains " quotation mark
"<p><label><input id='t2' type='checkbox'%s><b>" D_ACTIVATE "</b></label></p>"
"</fieldset>"
@ -362,11 +358,10 @@ const char HTTP_FORM_END[] PROGMEM =
"<button name='save' type='submit' class='button bgrn'>" D_SAVE "</button>"
"</form></fieldset>";
const char HTTP_DIV_BLOCK[] PROGMEM =
const char HTTP_DIV_F1_BLOCK[] PROGMEM =
"<div id='f1' name='f1' style='display:block;'>";
const char HTTP_FORM_UPG[] PROGMEM =
"<form method='get' action='u1'>"
"<br><b>" D_OTA_URL "</b><br><input id='o' placeholder=\"OTA_URL\" value=\"%s\"><br>"
"<br><button type='submit'>" D_START_UPGRADE "</button></form>"
"</fieldset><br><br>";
@ -2275,7 +2270,7 @@ void HandleTemplateConfiguration(void) {
WSContentSendStyle();
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_TEMPLATE_PARAMETERS));
WSContentSend_P(HTTP_FORM_TEMPLATE);
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("tp"));
WSContentSend_P(HTTP_TABLE100); // "<table style='width:100%%'>"
WSContentSend_P(PSTR("<tr><td><b>" D_TEMPLATE_NAME "</b></td><td style='width:200px'><input id='s1' placeholder='" D_TEMPLATE_NAME "'></td></tr>"
"<tr><td><b>" D_BASE_TYPE "</b></td><td><select id='g99' onchange='st(this.value)'></select></td></tr>"
@ -2449,6 +2444,7 @@ void HandleModuleConfiguration(void) {
WSContentSendStyle();
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_MODULE_PARAMETERS));
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("md"));
WSContentSend_P(HTTP_FORM_MODULE, AnyModuleName(MODULE).c_str());
for (uint32_t i = 0; i < nitems(template_gp.io); i++) {
if (ValidGPIO(i, template_gp.io[i])) {
@ -2729,6 +2725,7 @@ void HandleWifiConfiguration(void) {
WSContentSend_P(PSTR("<div><a href='/wi?scan='>%s</a></div><br>"),
(limitScannedNetworks) ? PSTR(D_SHOW_MORE_WIFI_NETWORKS) : PSTR(D_SCAN_FOR_WIFI_NETWORKS));
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_WIFI_PARAMETERS));
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("wi"));
WSContentSend_P(HTTP_FORM_WIFI_PART1,
(WifiIsInManagerMode()) ? "" : PSTR(" (" STA_SSID1 ")"),
SettingsTextEscaped(SET_STASSID1).c_str());
@ -2813,7 +2810,7 @@ void HandleLoggingConfiguration(void) {
WSContentStart_P(PSTR(D_CONFIGURE_LOGGING));
WSContentSendStyle();
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_LOGGING_PARAMETERS));
WSContentSend_P(HTTP_FORM_LOG1);
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("lg"));
char stemp1[45];
char stemp2[32];
uint8_t dlevel[4] = { LOG_LEVEL_INFO, LOG_LEVEL_INFO, LOG_LEVEL_NONE, LOG_LEVEL_NONE };
@ -2831,7 +2828,7 @@ void HandleLoggingConfiguration(void) {
}
WSContentSend_P(PSTR("</select></p>"));
}
WSContentSend_P(HTTP_FORM_LOG2,
WSContentSend_P(HTTP_FORM_LOG,
SettingsTextEscaped(SET_SYSLOG_HOST).c_str(),
Settings->syslog_port,
Settings->tele_period);
@ -2875,9 +2872,10 @@ void HandleOtherConfiguration(void) {
TemplateJson();
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_OTHER_PARAMETERS));
WSContentSend_P(HTTP_FORM_OTHER1);
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("co"));
WSContentSend_P(PSTR("<p></p>"));
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_TEMPLATE));
WSContentSend_P(HTTP_FORM_OTHER2,
WSContentSend_P(HTTP_FORM_OTHER,
HtmlEscape(ResponseData()).c_str(),
(USER_MODULE == Settings->module) ? PSTR(" checked disabled") : "",
(Settings->flag5.disable_referer_chk) ? PSTR(" checked") : "", // SetOption128 - Enable HTTP API
@ -3018,7 +3016,7 @@ void HandleRestoreConfiguration(void) {
WSContentStart_P(PSTR(D_RESTORE_CONFIGURATION));
WSContentSendStyle();
WSContentSend_P(HTTP_DIV_BLOCK);
WSContentSend_P(HTTP_DIV_F1_BLOCK);
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_RESTORE_CONFIGURATION));
WSContentSend_P(HTTP_FORM_RST_UPG, PSTR(D_START_RESTORE));
if (WifiIsInManagerMode()) {
@ -3390,8 +3388,9 @@ void HandleUpgradeFirmware(void) {
WSContentStart_P(PSTR(D_FIRMWARE_UPGRADE));
WSContentSendStyle();
WSContentSend_P(HTTP_MENU_HEAD, D_FIRMWARE_UPGRADE);
WSContentSend_P(HTTP_DIV_BLOCK);
WSContentSend_P(HTTP_DIV_F1_BLOCK);
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_UPGRADE_BY_WEBSERVER));
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("u1"));
WSContentSend_P(HTTP_FORM_UPG, SettingsTextEscaped(SET_OTAURL).c_str());
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_UPGRADE_BY_FILE_UPLOAD));
#ifdef ESP32

View File

@ -2049,13 +2049,7 @@ void CmndTlsDump(void) {
#define WEB_HANDLE_MQTT "mq"
const char S_CONFIGURE_MQTT[] PROGMEM = D_CONFIGURE_MQTT;
const char HTTP_BTN_MENU_MQTT[] PROGMEM =
"<p></p><form action='" WEB_HANDLE_MQTT "' method='get'><button>" D_CONFIGURE_MQTT "</button></form>";
const char HTTP_FORM_MQTT1[] PROGMEM =
"<form method='get' action='" WEB_HANDLE_MQTT "'>"
"<p><b>" D_HOST "</b> (" MQTT_HOST ")<br><input id='mh' placeholder=\"" MQTT_HOST "\" value=\"%s\"></p>"
"<p><b>" D_PORT "</b> (" STR(MQTT_PORT) ")<br><input id='ml' placeholder='" STR(MQTT_PORT) "' value='%d'></p>"
#ifdef USE_MQTT_TLS
@ -2085,6 +2079,7 @@ void HandleMqttConfiguration(void)
WSContentStart_P(PSTR(D_CONFIGURE_MQTT));
WSContentSendStyle();
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_MQTT_PARAMETERS));
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR(WEB_HANDLE_MQTT));
WSContentSend_P(HTTP_FORM_MQTT1,
SettingsTextEscaped(SET_MQTT_HOST).c_str(),
Settings->mqtt_port,
@ -2135,7 +2130,7 @@ bool Xdrv02(uint32_t function)
#ifdef USE_WEBSERVER
#ifndef FIRMWARE_MINIMAL // not needed in minimal/safeboot because of disabled feature and Settings are not saved anyways
case FUNC_WEB_ADD_BUTTON:
WSContentSend_P(HTTP_BTN_MENU_MQTT);
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_MQTT), PSTR(D_CONFIGURE_MQTT));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer_on(PSTR("/" WEB_HANDLE_MQTT), HandleMqttConfiguration);

View File

@ -636,9 +636,6 @@ void CmndDomoticzSend(void) {
#define WEB_HANDLE_DOMOTICZ "dm"
const char HTTP_BTN_MENU_DOMOTICZ[] PROGMEM =
"<p></p><form action='" WEB_HANDLE_DOMOTICZ "' method='get'><button>" D_CONFIGURE_DOMOTICZ "</button></form>";
const char HTTP_FORM_DOMOTICZ[] PROGMEM =
"<form method='post' action='" WEB_HANDLE_DOMOTICZ "'>"
"<table>";
@ -739,7 +736,7 @@ bool Xdrv07(uint32_t function) {
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_ADD_BUTTON:
WSContentSend_P(HTTP_BTN_MENU_DOMOTICZ);
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_DOMOTICZ), PSTR(D_CONFIGURE_DOMOTICZ));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer_on(PSTR("/" WEB_HANDLE_DOMOTICZ), HandleDomoticzConfiguration);

View File

@ -872,9 +872,6 @@ void CmndDomoticzSend(void) {
#define WEB_HANDLE_DOMOTICZ "dm"
const char HTTP_BTN_MENU_DOMOTICZ[] PROGMEM =
"<p></p><form action='" WEB_HANDLE_DOMOTICZ "' method='get'><button>" D_CONFIGURE_DOMOTICZ "</button></form>";
const char HTTP_FORM_DOMOTICZ[] PROGMEM =
"<form method='post' action='" WEB_HANDLE_DOMOTICZ "'>"
"<table>"
@ -997,7 +994,7 @@ bool Xdrv07(uint32_t function) {
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_ADD_BUTTON:
WSContentSend_P(HTTP_BTN_MENU_DOMOTICZ);
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_DOMOTICZ), PSTR(D_CONFIGURE_DOMOTICZ));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer_on(PSTR("/" WEB_HANDLE_DOMOTICZ), HandleDomoticzConfiguration);

View File

@ -530,9 +530,6 @@ void CmndSunrise(void) {
#define WEB_HANDLE_TIMER "tm"
const char HTTP_BTN_MENU_TIMER[] PROGMEM =
"<p></p><form action='" WEB_HANDLE_TIMER "' method='get'><button>" D_CONFIGURE_TIMER "</button></form>";
#ifdef USE_UNISHOX_COMPRESSION
const size_t HTTP_TIMER_SCRIPT1_SIZE = 106;
const char HTTP_TIMER_SCRIPT1_COMPRESSED[] PROGMEM = "\x33\xBF\xA1\x94\x7C\x3D\xE3\xDF\x3A\x83\xA3\xE1\xC4\x8F\x04\x60\x5F\x07\x5B\x9C"
@ -938,9 +935,11 @@ bool Xdrv09(uint32_t function)
#ifdef USE_TIMERS_WEB
case FUNC_WEB_ADD_BUTTON:
#if defined(USE_RULES) || defined(USE_SCRIPT)
WSContentSend_P(HTTP_BTN_MENU_TIMER);
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_TIMER), PSTR(D_CONFIGURE_TIMER));
#else
if (TasmotaGlobal.devices_present) { WSContentSend_P(HTTP_BTN_MENU_TIMER); }
if (TasmotaGlobal.devices_present) {
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_TIMER), PSTR(D_CONFIGURE_TIMER));
}
#endif // USE_RULES
break;
case FUNC_WEB_ADD_HANDLER:

View File

@ -10044,9 +10044,6 @@ void Scripter_save_pvars(void) {
#define WEB_HANDLE_SCRIPT "s10"
const char HTTP_BTN_MENU_RULES[] PROGMEM =
"<p></p><form action='" WEB_HANDLE_SCRIPT "' method='get'><button>" D_CONFIGURE_SCRIPT "</button></form>";
const char HTTP_FORM_SCRIPT[] PROGMEM =
"<form method='post' action='" WEB_HANDLE_SCRIPT "'>";
@ -14872,7 +14869,7 @@ bool Xdrv10(uint32_t function) {
if (XdrvMailbox.index) {
XdrvMailbox.index++;
} else {
WSContentSend_P(HTTP_BTN_MENU_RULES);
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_SCRIPT), PSTR(D_CONFIGURE_SCRIPT));
}
break;
#ifdef USE_SCRIPT_WEB_DISPLAY

View File

@ -1050,9 +1050,6 @@ void KnxSensor(uint8_t sensor_type, float value)
#ifdef USE_WEBSERVER
#ifdef USE_KNX_WEB_MENU
const char HTTP_BTN_MENU_KNX[] PROGMEM =
"<p></p><form action='kn' method='get'><button>" D_CONFIGURE_KNX "</button></form>";
const char HTTP_FORM_KNX[] PROGMEM =
"<fieldset style='min-width:530px;'>"
"<legend style='text-align:left;'><b>&nbsp;" D_KNX_PARAMETERS "&nbsp;</b></legend>"
@ -1583,7 +1580,7 @@ bool Xdrv11(uint32_t function)
#ifdef USE_WEBSERVER
#ifdef USE_KNX_WEB_MENU
case FUNC_WEB_ADD_BUTTON:
WSContentSend_P(HTTP_BTN_MENU_KNX);
WSContentSend_P(HTTP_FORM_BUTTON, PSTR("kn"), PSTR(D_CONFIGURE_KNX));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer_on(PSTR("/kn"), HandleKNXConfiguration);

View File

@ -515,11 +515,7 @@ void Pcf8574ModuleInitMode1(void) {
#ifdef USE_WEBSERVER
#define WEB_HANDLE_PCF8574 "pcf"
const char HTTP_BTN_MENU_PCF8574[] PROGMEM =
"<p></p><form action='" WEB_HANDLE_PCF8574 "' method='get'><button>" D_CONFIGURE_PCF8574 "</button></form>";
const char HTTP_FORM_I2C_PCF8574_1[] PROGMEM =
"<form method='get' action='" WEB_HANDLE_PCF8574 "'>"
"<p><label><input id='b1' name='b1' type='checkbox'%s><b>" D_INVERT_PORTS "</b></label></p><hr/>";
const char HTTP_FORM_I2C_PCF8574_2[] PROGMEM =
@ -544,6 +540,7 @@ void HandlePcf8574(void) {
WSContentStart_P(D_CONFIGURE_PCF8574);
WSContentSendStyle();
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_PCF8574_PARAMETERS));
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR(WEB_HANDLE_PCF8574));
WSContentSend_P(HTTP_FORM_I2C_PCF8574_1, (Settings->flag3.pcf8574_ports_inverted) ? PSTR(" checked") : ""); // SetOption81 - Invert all ports on PCF8574 devices
WSContentSend_P(HTTP_TABLE100);
for (uint32_t idx = 0; idx < Pcf8574.max_devices; idx++) {
@ -710,7 +707,7 @@ bool Xdrv28(uint32_t function) {
#endif // USE_PCF8574_SENSOR
#ifdef USE_WEBSERVER
case FUNC_WEB_ADD_BUTTON:
WSContentSend_P(HTTP_BTN_MENU_PCF8574);
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_PCF8574), PSTR(D_CONFIGURE_PCF8574));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer_on(PSTR("/" WEB_HANDLE_PCF8574), HandlePcf8574);

View File

@ -41,7 +41,6 @@ const char MLX90640type[] PROGMEM = "MLX90640";
#ifdef USE_WEBSERVER
#define WEB_HANDLE_MLX90640 "mlx"
const char HTTP_BTN_MENU_MLX90640[] PROGMEM = "<p></p><form action='" WEB_HANDLE_MLX90640 "' method='get'><button>MLX90640</button></form>";
#endif // USE_WEBSERVER
struct {
@ -608,7 +607,7 @@ bool Xdrv43(uint32_t function)
break;
#ifdef USE_WEBSERVER
case FUNC_WEB_ADD_MAIN_BUTTON:
WSContentSend_P(HTTP_BTN_MENU_MLX90640);
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_MLX90640), PSTR("MLX90640"));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer_on(PSTR("/mlx"), MLX90640HandleWebGui);

View File

@ -1292,7 +1292,7 @@ const char UFS_FORM_SDC_DIRa[] PROGMEM =
const char UFS_FORM_SDC_DIRc[] PROGMEM =
"</div>";
const char UFS_FORM_FILE_UPGb[] PROGMEM =
"<form method='get' action='ufse'><input type='hidden' name='file' value='%s/" D_NEW_FILE "'>"
"<input type='hidden' name='file' value='%s/" D_NEW_FILE "'>"
"<button type='submit'>" D_CREATE_NEW_FILE "</button></form>";
const char UFS_FORM_FILE_UPGb1[] PROGMEM =
"<label><input type='checkbox' id='shf' onclick='sf(eb(\"shf\").checked);' name='shf'>" D_SHOW_HIDDEN_FILES "</label>";
@ -1423,7 +1423,7 @@ void UfsDirectory(void) {
WSContentStart_P(PSTR(D_MANAGE_FILE_SYSTEM));
WSContentSendStyle();
WSContentSend_P(HTTP_DIV_BLOCK);
WSContentSend_P(HTTP_DIV_F1_BLOCK);
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_MANAGE_FILE_SYSTEM));
char ts[FLOATSZ];
@ -1452,6 +1452,7 @@ void UfsDirectory(void) {
}
WSContentSend_P(UFS_FORM_SDC_DIRc);
#ifdef GUI_EDIT_FILE
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR("ufse"));
WSContentSend_P(UFS_FORM_FILE_UPGb, ufs_path);
#endif
if (!UfsIsSDC()) {

View File

@ -745,10 +745,6 @@ const char HTTP_BERRY_FORM_CMND[] PROGMEM =
#endif // USE_BERRY_DEBUG
;
const char HTTP_BTN_BERRY_CONSOLE[] PROGMEM =
"<p></p><form action='bc' method='get'><button>Berry Scripting console</button></form>";
void HandleBerryConsoleRefresh(void)
{
String svalue = Webserver->arg(F("c1"));
@ -1048,7 +1044,7 @@ bool Xdrv52(uint32_t function)
if (XdrvMailbox.index) {
XdrvMailbox.index++;
} else {
WSContentSend_P(HTTP_BTN_BERRY_CONSOLE);
WSContentSend_P(HTTP_FORM_BUTTON, PSTR("bc"), PSTR("Berry Scripting console"));
HandleBerryBECLoaderButton(); // display buttons to load BEC files
callBerryEventDispatcher(PSTR("web_add_button"), nullptr, 0, nullptr);
callBerryEventDispatcher(PSTR("web_add_console_button"), nullptr, 0, nullptr);

View File

@ -3580,11 +3580,10 @@ std::string BLETriggerResponse(generic_sensor_t *toSend){
#define WEB_HANDLE_BLE "ble"
const char HTTP_BTN_MENU_BLE[] PROGMEM =
"<p></p><form action='" WEB_HANDLE_BLE "' method='get'><button>" D_CONFIGURE_BLE "</button></form>";
//const char HTTP_BTN_MENU_BLE[] PROGMEM =
// "<p></p><form action='" WEB_HANDLE_BLE "' method='get'><button>" D_CONFIGURE_BLE "</button></form>";
const char HTTP_FORM_BLE[] PROGMEM =
"<form method='get' action='" WEB_HANDLE_BLE "'>"
"<p><label><input id='e0' type='checkbox'%s><b>" D_BLE_ENABLE "</b></label></p>"
"<p><label><input id='e1' type='checkbox'%s><b>" D_BLE_ACTIVESCAN "</b></label></p>"
"<p>" D_BLE_REMARK "</p>";
@ -3644,6 +3643,7 @@ void HandleBleConfiguration(void)
WSContentSendStyle_P(HTTP_BLE_DEV_STYLE);
//WSContentSendStyle();
WSContentSend_P(HTTP_FIELDSET_LEGEND, PSTR(D_BLE_PARAMETERS));
WSContentSend_P(HTTP_FORM_GET_ACTION, PSTR(WEB_HANDLE_BLE));
WSContentSend_P(HTTP_FORM_BLE,
(Settings->flag5.mi32_enable) ? " checked" : "",
(BLEScanActiveMode) ? " checked" : ""
@ -3751,7 +3751,8 @@ bool Xdrv79(uint32_t function)
*/
#ifdef USE_WEBSERVER
case FUNC_WEB_ADD_BUTTON:
WSContentSend_P(BLE_ESP32::HTTP_BTN_MENU_BLE);
// WSContentSend_P(BLE_ESP32::HTTP_BTN_MENU_BLE);
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_BLE), PSTR(D_CONFIGURE_BLE));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer_on(PSTR("/" WEB_HANDLE_BLE), BLE_ESP32::HandleBleConfiguration);

View File

@ -618,9 +618,6 @@ void HxShow(bool json) {
const char HTTP_BTN_MENU_MAIN_HX711[] PROGMEM =
"<p></p><form action='" WEB_HANDLE_HX711 "' method='get'><button name='reset'>" D_RESET_HX711 "</button></form>";
const char HTTP_BTN_MENU_HX711[] PROGMEM =
"<p></p><form action='" WEB_HANDLE_HX711 "' method='get'><button>" D_CONFIGURE_HX711 "</button></form>";
const char HTTP_FORM_HX711a[] PROGMEM =
"<form method='post' action='" WEB_HANDLE_HX711 "'>"
"<p><b>" D_REFERENCE_WEIGHT "</b> (" D_UNIT_KILOGRAM ")<br><input type='number' step='0.001' id='p1' placeholder='0' value='%s'></p>"
@ -720,7 +717,7 @@ bool Xsns34(uint32_t function) {
}
break;
case FUNC_WEB_ADD_BUTTON:
WSContentSend_P(HTTP_BTN_MENU_HX711);
WSContentSend_P(HTTP_FORM_BUTTON, PSTR(WEB_HANDLE_HX711), PSTR(D_CONFIGURE_HX711));
break;
case FUNC_WEB_ADD_HANDLER:
WebServer_on(PSTR("/" WEB_HANDLE_HX711), HandleHxAction);