Zone and Segment type updates

* Add zone flags to indicate if fields are manually configurable and if they have been manually configured
  * Add flags field to segment type
  * Add segment flags for group start and group member
  * Add color mode support flags to zone (RGB, RBG, GRB, GBR, BRG, BGR)
  * Add color mode enum to zone
  * Update zone and segment description functions to support new fields
  * Rename the effects-only configurable size flag
  * Remove zone type and matrix map configuration from E1.31 manual configuration, use zone editor instead
  * Rework DeviceResizeZone to DeviceConfigureZone
  * Rework most ARGB controllers to allow zone customizations
  * Rework DRGBController to define devices in DRGBDevices list (similar to RazerDevices)
  * Rework NollieController to define devices in NollieDevices list (similar to RazerDevices)
This commit is contained in:
Adam Honse
2026-02-22 23:31:00 -06:00
parent f707f99d72
commit 0bc972f4e5
114 changed files with 4016 additions and 2971 deletions

View File

@@ -41,12 +41,7 @@ DetectedControllers DetectE131Controllers()
\*---------------------------------------------*/
dev.name = "";
dev.ip = "";
dev.type = ZONE_TYPE_SINGLE;
dev.num_leds = 0;
dev.rgb_order = E131_RGB_ORDER_RBG;
dev.matrix_order = E131_MATRIX_ORDER_HORIZONTAL_TOP_LEFT;
dev.matrix_width = 0;
dev.matrix_height = 0;
dev.start_channel = 1;
dev.start_universe = 1;
dev.keepalive_time = 0;
@@ -82,128 +77,11 @@ DetectedControllers DetectE131Controllers()
dev.keepalive_time = e131_settings["devices"][device_idx]["keepalive_time"];
}
if(e131_settings["devices"][device_idx].contains("matrix_order"))
{
if(e131_settings["devices"][device_idx]["matrix_order"].is_string())
{
std::string matrix_order_val = e131_settings["devices"][device_idx]["matrix_order"];
if(matrix_order_val == "HORIZONTAL_TOP_LEFT")
{
dev.matrix_order = E131_MATRIX_ORDER_HORIZONTAL_TOP_LEFT;
}
else if(matrix_order_val == "HORIZONTAL_TOP_RIGHT")
{
dev.matrix_order = E131_MATRIX_ORDER_HORIZONTAL_TOP_RIGHT;
}
else if(matrix_order_val == "HORIZONTAL_BOTTOM_LEFT")
{
dev.matrix_order = E131_MATRIX_ORDER_HORIZONTAL_BOTTOM_LEFT;
}
else if(matrix_order_val == "HORIZONTAL_BOTTOM_RIGHT")
{
dev.matrix_order = E131_MATRIX_ORDER_HORIZONTAL_BOTTOM_RIGHT;
}
else if(matrix_order_val == "VERTICAL_TOP_LEFT")
{
dev.matrix_order = E131_MATRIX_ORDER_VERTICAL_TOP_LEFT;
}
else if(matrix_order_val == "VERTICAL_TOP_RIGHT")
{
dev.matrix_order = E131_MATRIX_ORDER_VERTICAL_TOP_RIGHT;
}
else if(matrix_order_val == "VERTICAL_BOTTOM_LEFT")
{
dev.matrix_order = E131_MATRIX_ORDER_VERTICAL_BOTTOM_LEFT;
}
else if(matrix_order_val == "VERTICAL_BOTTOM_RIGHT")
{
dev.matrix_order = E131_MATRIX_ORDER_VERTICAL_BOTTOM_RIGHT;
}
}
else
{
dev.matrix_order = e131_settings["devices"][device_idx]["matrix_order"];
}
}
if(e131_settings["devices"][device_idx].contains("rgb_order"))
{
if(e131_settings["devices"][device_idx]["rgb_order"].is_string())
{
std::string rgb_order_val = e131_settings["devices"][device_idx]["rgb_order"];
if(rgb_order_val == "RGB")
{
dev.rgb_order = E131_RGB_ORDER_RGB;
}
else if(rgb_order_val == "RBG")
{
dev.rgb_order = E131_RGB_ORDER_RBG;
}
else if(rgb_order_val == "GRB")
{
dev.rgb_order = E131_RGB_ORDER_GRB;
}
else if(rgb_order_val == "GBR")
{
dev.rgb_order = E131_RGB_ORDER_GBR;
}
else if(rgb_order_val == "BRG")
{
dev.rgb_order = E131_RGB_ORDER_BRG;
}
else if(rgb_order_val == "BGR")
{
dev.rgb_order = E131_RGB_ORDER_BGR;
}
}
else
{
dev.rgb_order = e131_settings["devices"][device_idx]["rgb_order"];
}
}
if(e131_settings["devices"][device_idx].contains("matrix_width"))
{
dev.matrix_width = e131_settings["devices"][device_idx]["matrix_width"];
}
if(e131_settings["devices"][device_idx].contains("matrix_height"))
{
dev.matrix_height = e131_settings["devices"][device_idx]["matrix_height"];
}
if(e131_settings["devices"][device_idx].contains("universe_size"))
{
dev.universe_size = e131_settings["devices"][device_idx]["universe_size"];
}
if(e131_settings["devices"][device_idx].contains("type"))
{
if(e131_settings["devices"][device_idx]["type"].is_string())
{
std::string type_val = e131_settings["devices"][device_idx]["type"];
if(type_val == "SINGLE")
{
dev.type = ZONE_TYPE_SINGLE;
}
else if(type_val == "LINEAR")
{
dev.type = ZONE_TYPE_LINEAR;
}
else if(type_val == "MATRIX")
{
dev.type = ZONE_TYPE_MATRIX;
}
}
else
{
dev.type = e131_settings["devices"][device_idx]["type"];
}
}
/*---------------------------------------------*\
| Determine whether to create a new list or add |
| this device to an existing list. A device is |