From 184c8d4042517c817fe1d1932e2316b921fd197f Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 11 Jun 2019 23:15:26 +0200 Subject: Home all attributes at startup --- src/nanolight.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nanolight.c b/src/nanolight.c index 82332f0..a03c61e 100644 --- a/src/nanolight.c +++ b/src/nanolight.c @@ -184,6 +184,7 @@ static struct fixture *create_fixture(struct nanolight *nl, struct fixture_class const char *label, int base_addr) { struct fixture *fix; + int i; if ( nl->n_fixtures == nl->max_fixtures ) { struct fixture *fixtures_new; @@ -206,6 +207,10 @@ static struct fixture *create_fixture(struct nanolight *nl, struct fixture_class return NULL; } + for ( i=0; in_attrs; i++ ) { + fix->attr_vals[i] = cls->attrs[i].home; + } + return fix; } -- cgit v1.2.3