diff --git a/Arduino/CanGrow/include/Webserver/Common.h b/Arduino/CanGrow/include/Webserver/Common.h
index 05a3a72..23efaf4 100644
--- a/Arduino/CanGrow/include/Webserver/Common.h
+++ b/Arduino/CanGrow/include/Webserver/Common.h
@@ -106,3 +106,64 @@ String AddHeaderFooter(const String& var, byte activeNav = 0) {
return String();
}
}
+
+
+/*
+ * Html_SelectOpt_GPIOindex
+ *
+ * returns ";
+ }
+ return gpioIndex_html;
+}
+
+
+String Html_SelectOpt_bool(byte selectVal = 255, String trueStr = "Yes", String falseStr = "No") {
+ String html;
+ html += "";
+
+ html += "";
+ return html;
+}
diff --git a/Arduino/CanGrow/include/Webserver/Page_system.h b/Arduino/CanGrow/include/Webserver/Page_system.h
index ad1bca7..b0c4a01 100644
--- a/Arduino/CanGrow/include/Webserver/Page_system.h
+++ b/Arduino/CanGrow/include/Webserver/Page_system.h
@@ -399,6 +399,42 @@ void WebPage_system_output(AsyncWebServerRequest *request) {
/*
* Subpage output add
*/
+
+/* returns select ";
+ }
+ return outputType_html;
+}
+
+String Html_SelOpt_device_WebPage_system_output_add(byte selectId = 0) {
+ String outputDevice_html;
+ // go through all available Output Devices, skip 0 because it means unconfigured
+ for(byte i = 1; i < Output_Device_total; i++) {
+ outputDevice_html += "";
+ }
+ return outputDevice_html;
+}
+
String Proc_WebPage_system_output_add(const String& var) {
#ifndef DEBUG
Serial.print("DB [Webserver:system:output:add(Proc)] var: ");
@@ -414,61 +450,16 @@ String Proc_WebPage_system_output_add(const String& var) {
/* OUTPUT_TYPE */
} else if(var == "OUTPUT_TYPE") {
- String outputType_html;
- // go through all available Output Devices, skip 0 because it means unconfigured
- for(byte i = 1; i < Output_Type_total; i++) {
- outputType_html += "";
- }
- return outputType_html;
+ return Html_SelOpt_type_WebPage_system_output_add();
/* OUTPUT_DEVICE */
} else if(var == "OUTPUT_DEVICE") {
- String outputDevice_html;
- // go through all available Output Devices, skip 0 because it means unconfigured
- for(byte i = 1; i < Output_Device_total; i++) {
- outputDevice_html += "";
- }
- return outputDevice_html;
+ return Html_SelOpt_device_WebPage_system_output_add();
/* GPIO_INDEX */
} else if(var == "GPIO_INDEX") {
- String gpioIndex_html;
- // iterate through through all available GPIOs in index
- for(byte i = 0; i < GPIOindex_length; i++) {
- bool gpioUsed = Check_GPIOindex_Used(i);
-
- gpioIndex_html += "";
- }
- return gpioIndex_html;
+ return Html_SelectOpt_GPIOindex();
+
} else {
return String();
}