Changeset 6018:e0df5c74ff43 in roaraudio for roard/light.c
- Timestamp:
- 06/22/14 07:59:39 (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/light.c
r6009 r6018 327 327 } 328 328 329 return (int)(unsigned int)(uint8_t)g_light_state. state[index];329 return (int)(unsigned int)(uint8_t)g_light_state.output[index]; 330 330 } 331 331 … … 349 349 } 350 350 351 int light_dmxchannel_swap_universe(uint8_t * universe, size_t len) {352 uint8_t c;353 size_t i;354 355 if ( g_light_state.state == NULL ) {356 roar_err_set(ROAR_ERROR_BADSTATE);357 return -1;358 }359 360 if ( g_light_state.channels != len ) {361 roar_err_set(ROAR_ERROR_FAULT);362 return -1;363 }364 365 for (i = 0; i < len; i++) {366 c = g_light_state.state[i];367 __set_channel(i, universe[i]);368 universe[i] = c;369 }370 371 return 0;372 }373 374 351 int light_dmxevent_add(const uint8_t * events, size_t len) { 375 352 size_t i;
Note: See TracChangeset
for help on using the changeset viewer.