Update lights
This commit is contained in:
parent
eca3a360a8
commit
606897dce9
4 changed files with 27 additions and 3 deletions
|
@ -32,6 +32,9 @@ static void * LEDOutThread( void * v )
|
|||
struct LEDOutDriver * led = (struct LEDOutDriver*)v;
|
||||
while(1)
|
||||
{
|
||||
int total_bytes = (led->total_leds*3)+1;
|
||||
total_bytes = ((total_bytes-1)&0xffc0) + 0x40; //Round up.
|
||||
printf( "TL: %d\n", total_bytes );
|
||||
if( led->readyFlag )
|
||||
{
|
||||
int r = libusb_control_transfer( led->devh,
|
||||
|
@ -40,7 +43,7 @@ static void * LEDOutThread( void * v )
|
|||
0x0100, //wValue
|
||||
0x0000, //wIndex
|
||||
led->last_leds,
|
||||
(led->total_leds*3)+1,
|
||||
total_bytes,
|
||||
1000 );
|
||||
if( r < 0 )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue