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.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to