Ticket #81 (assigned bug report)

Opened 21 months ago

Last modified 7 months ago

Check COM_ReadI2C with USB for correct return values

Reported by: atorf Owned by: staas
Priority: none Milestone:
Component: Demos / Applications Keywords:
Cc: staas

Description (last modified by atorf) (diff)

With toolbox version ~ 2.0 (r307) I introduced a function COM_ReadI2C for fast and easy I²C access to digital sensors. This function uses an optimization I discovered which can speed up retrieving sensor values via Bluetooth about 30 to 50%. The method is documented inside trunk/mfiles/COM_ReadI2C.m. Obviously this seemed to work all the time, but when I suggested this method to .net and Python developers, they discovered possible problems with USB connections. For full details, see  https://code.google.com/p/nxt-python/issues/detail?id=11 and  https://sourceforge.net/apps/phpbb/mindboards/viewtopic.php?f=3&t=1014 . We need to verify if this bug applies to us as well.


Problem: COM_ReadI2C might return just the "2nd to last" retrieved value, not the last one (i.e. the most current one we want) when being used with USB connections. This could've been caused by the Fantom driver, but no idea.

Testing is necessary to verify:

  • Use USB connection
  • Manually retrieve US values (e.g. on the command window) using GetUltrasonic
    • Point the US sensor to a close distance, check value
    • Point to a far distance, check value again
    • Repeat and check if returned values match the distances
  • If possible, repeat test with another digital sensor to confirm

If the test reveals whe too have this problem, then the optimization (COM_ReadI2C doesn't check LSGetStatus) has to be deactivated for USB connections. For Bluetooth it seems to work, but a cross-check wouldn't hurt…

Linus Atorf

Attachments

Change History

Changed 21 months ago by atorf

  • description modified (diff)

Changed 21 months ago by staas

  • owner set to staas
  • status changed from new to assigned

I tested this using Ultrasonic Sensor on both Windows 32 Bit using Fantom and Windows 64 Bit using libusb_win32 and both look good. Can´t reproduce the Error.

I will leave the Ticket open until i had the time to do some more Testing.

Cheers Martin

Changed 7 months ago by atorf

  • priority changed from high to none

I guess this isn't important right now, but maybe we should keep it in mind!

Add/Change #81 (Check COM_ReadI2C with USB for correct return values)

Author



Change Properties
<Author field>
Action
as assigned
as The resolution will be set. Next status will be 'closed'
to The owner will change from staas. Next status will be 'assigned'
The owner will change from staas to anonymous. Next status will be 'accepted'
 
Note: See TracTickets for help on using tickets.