From: <th...@us...> - 2008-08-16 21:50:34
|
Revision: 6960 http://playerstage.svn.sourceforge.net/playerstage/?rev=6960&view=rev Author: thjc Date: 2008-08-17 04:50:44 +0000 (Sun, 17 Aug 2008) Log Message: ----------- Merge 6955 from P2-1 added scan accessor function to the sonar python client Modified Paths: -------------- code/player/trunk/client_libs/libplayerc/bindings/python/playerc.i Modified: code/player/trunk/client_libs/libplayerc/bindings/python/playerc.i =================================================================== --- code/player/trunk/client_libs/libplayerc/bindings/python/playerc.i 2008-08-17 04:40:58 UTC (rev 6959) +++ code/player/trunk/client_libs/libplayerc/bindings/python/playerc.i 2008-08-17 04:50:44 UTC (rev 6960) @@ -410,10 +410,25 @@ { double get_range (int index) { - return self->ranges[index]; + if (index < self->scan_count) + return self->ranges[index]; + else + return 0; }; } +%extend playerc_sonar +{ +double get_scan (int index) +{ + if (index < self->scan_count) + return self->scan[index]; + else + return 0; +}; +} + + %extend playerc_blackboard { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |