Changeset 5983:377909b17ccb in roaraudio for roard
- Timestamp:
- 02/23/14 22:16:20 (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/light.c
r5982 r5983 28 28 #ifndef ROAR_WITHOUT_DCOMP_LIGHT 29 29 30 static uint8_t nextcycle_events[MAX_EVENTS_PER_CYCLE]; 31 static size_t nextcycle_eventsqueuelen; 32 static int __cb_event_add(struct roar_slfi_inst * inst, void * userdata, uint8_t event); 33 30 34 // declared 'extern' 31 35 struct light_state g_light_state; … … 148 152 149 153 g_light_state.eventsqueuelen = 0; 154 155 if ( nextcycle_eventsqueuelen ) { 156 light_dmxevent_add(nextcycle_events, nextcycle_eventsqueuelen); 157 nextcycle_eventsqueuelen = 0; 158 } 150 159 151 160 return 0; … … 298 307 299 308 if ( primary ) { 309 roar_slfi_cb_set_event_add(filter, __cb_event_add, NULL); 300 310 g_light_state.filter = filter; 301 311 return 0; … … 395 405 } 396 406 407 static int __cb_event_add(struct roar_slfi_inst * inst, void * userdata, uint8_t event) { 408 size_t i; 409 410 if ( nextcycle_eventsqueuelen == MAX_EVENTS_PER_CYCLE ) { 411 roar_err_set(ROAR_ERROR_NOSPC); 412 return -1; 413 } 414 415 nextcycle_events[nextcycle_eventsqueuelen++] = event; 416 417 return 0; 418 } 419 397 420 #endif 398 421
Note: See TracChangeset
for help on using the changeset viewer.