diff options
author | Thomas White <taw@physics.org> | 2019-06-11 23:15:26 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-06-11 23:21:03 +0200 |
commit | 184c8d4042517c817fe1d1932e2316b921fd197f (patch) | |
tree | cb278202758d34d2b85b8b52764a83891866d130 | |
parent | 8b48cbe1bf7dfd5cd7a1400357e9586c29b57aac (diff) |
Home all attributes at startup
-rw-r--r-- | src/nanolight.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; i<cls->n_attrs; i++ ) { + fix->attr_vals[i] = cls->attrs[i].home; + } + return fix; } |