Indexing an interface, a possible bug ?
Tarek Taha <[email protected]>
| Newsgroups | gmane.science.robotics.playerstage |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I am trying to fix a bug in the MRICP driver. This driver allows the usage
of multiple lasers, previously using the "ReadDeviceAddr" I was able to
index the interface directly using "ReadDeviceId" which is now depreciated.
Some of the users highlighted that recently the multi laser support doesn't
work as it uses the same interface multiple times. In my driver I loop
"number of laser" times to load any laser interface using this :
cf->ReadDeviceAddr(&this->laser_addr[i], section, "requires",
PLAYER_LASER_CODE,-1, NULL). This however seems to load the same interface
"the first listed in the tuple" multiple times (verified by printing the
actual address and geom properties). I tried to use the previous method by
indexing the interface directly using :
cf->ReadDeviceAddr(&this->laser_addr[i], section, "requires",
PLAYER_LASER_CODE,i, NULL) but the file configuration parser fails to load
correctly.
I then tried to trace the problem by debugging the configfile.cpp. This
section :
// Match the tuple index (< 0 matches all indices)
if (index >= 0 && i != index)
continue;
didn't make much of a senses, the if statement I think should be if (index
>= 0 && ind != index), but changing that breaks a lot of interface loading
in other drivers. I am puzzled at the moment, anyone can point me to a
solution that doesn't require major hacking of the player core ? Or is it a
bug in loading an interface by index perhaps ?
Regards,
Tarek
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Playerstage-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers