Update of /cvsroot/playerstage/code/player/server/drivers/mixed/erratic
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21498

Modified Files:
      Tag: release-2-0-patches
        erratic.cc 
Log Message:


Index: erratic.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/erratic/erratic.cc,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -C2 -d -r1.1.2.10 -r1.1.2.11
*** erratic.cc  26 Dec 2006 22:00:16 -0000      1.1.2.10
--- erratic.cc  9 Jan 2007 06:02:52 -0000       1.1.2.11
***************
*** 816,820 ****
                //Lock();
                
!               int count;
                switch(packet.packet[3]) 
                        {
--- 816,820 ----
                //Lock();
                
!               int count, maxcount;
                switch(packet.packet[3]) 
                        {
***************
*** 871,875 ****
                        case (reply_e)sonar:
                                // Sonar packet
!                               count = RobotParams[this->param_idx]->NumSonars;
                                erratic_data.sonar.ranges_count = count;
                                for (int i = 0; i < count; i++) 
--- 871,876 ----
                        case (reply_e)sonar:
                                // Sonar packet
!                               maxcount = 
RobotParams[this->param_idx]->NumSonars;
!                               count = packet.packet[4];
                                erratic_data.sonar.ranges_count = count;
                                for (int i = 0; i < count; i++) 
***************
*** 878,882 ****
                                                        continue;
                                                int ch = packet.packet[5+i*3]; 
// channel number
!                                               if (ch >= count)
                                                        continue;               
                        // bad channel number
                                                erratic_data.sonar.ranges[ch] = 
.001 * (double)(packet.packet[6+i*3]
--- 879,883 ----
                                                        continue;
                                                int ch = packet.packet[5+i*3]; 
// channel number
!                                               if (ch >= maxcount)
                                                        continue;               
                        // bad channel number
                                                erratic_data.sonar.ranges[ch] = 
.001 * (double)(packet.packet[6+i*3]


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to