Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

U3 Exodriver example bug


  • Please log in to reply
2 replies to this topic

#1 brodsky

brodsky
  • Members
  • 17 posts

Posted 08 January 2014 - 12:59 PM

Having downloaded and built the exodriver example code for U3.

In this file:

   u3BasicConfigU3.c

See line 144:

   else if (recBuffer[1] == 0xF8 && recBuffer[2] == 0x10 && recBuffer[2] == 0x08) {

 

This makes no sense:  recBuffer[2] is being tested for equality against 2 different values; it can never be true.

The compiler sees that and complains.

 

How should this really read?

 

Thank you,

- Pete

 



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 08 January 2014 - 02:57 PM

It should read:

else if (recBuffer[1] != 0xF8 || recBuffer[2] != 0x10 || recBuffer[3] != 0x08) {

It is checking the expected ConfigU3 response bytes 1-3 which are documented here:

 

http://labjack.com/s...ers-guide/5.2.2

 

GitHub is down right now, but we will update the examples there when it is back up.



#3 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 08 January 2014 - 03:36 PM

The example has been updated on our GitHub exodriver repository. Thank you for making us aware of this.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users