From 6969eb14314ab89a100394a5f6f327e53258cc95 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 14 Jun 2019 23:49:28 +0200 Subject: Move DMX universe number into fixture --- src/nanolight.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/nanolight.c') diff --git a/src/nanolight.c b/src/nanolight.c index 46f6efc..9b3c699 100644 --- a/src/nanolight.c +++ b/src/nanolight.c @@ -238,7 +238,7 @@ static gboolean draw_sig(GtkWidget *widget, cairo_t *cr, struct nanolight *nl) static struct fixture *create_fixture(struct nanolight *nl, struct fixture_class *cls, - const char *label, int base_addr) + const char *label, int universe, int base_addr) { struct fixture *fix; int i; @@ -253,6 +253,7 @@ static struct fixture *create_fixture(struct nanolight *nl, struct fixture_class fix = &nl->fixtures[nl->n_fixtures++]; fix->label = strdup(label); + fix->universe = universe; fix->base_addr = base_addr; fix->cls = cls; fix->attr_vals = calloc(cls->n_attrs, sizeof(int)); @@ -626,10 +627,10 @@ int main(int argc, char *argv[]) nl.sel_attr = ATT_TILT; nl.dragging = 0; - create_fixture(&nl, &cls, "mh1", 1); - create_fixture(&nl, &cls, "mh2", 52); - create_fixture(&nl, &cls, "mh3", 103); - create_fixture(&nl, &cls, "mh4", 154); + create_fixture(&nl, &cls, "mh1", 0, 1); + create_fixture(&nl, &cls, "mh2", 0, 52); + create_fixture(&nl, &cls, "mh3", 0, 103); + create_fixture(&nl, &cls, "mh4", 0, 154); /* Set up output */ g_timeout_add(100, scanout_cb, &nl); -- cgit v1.2.3