Update of /cvsroot/playerstage/code/player/examples/libplayerc++
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11829/examples/libplayerc++

Modified Files:
        args.h camera.cc example1.cc example2.cc goto.cc 
        laserobstacleavoid.cc randomwalk.cc wallfollow.cc 
Log Message:
replaced non portable uint with uint32_t


Index: laserobstacleavoid.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/examples/libplayerc++/laserobstacleavoid.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** laserobstacleavoid.cc       1 Mar 2006 23:08:54 -0000       1.5
--- laserobstacleavoid.cc       24 Oct 2007 22:32:03 -0000      1.6
***************
*** 44,54 ****
  
        // laser avoid (stolen from esben's java example)
!       uint count = lp.GetCount();
!       for (uint j=0; j < count/2; ++j)
        {
          if (minR > lp[j])
            minR = lp[j];
        }
!       for (uint j = count/2; j < count; ++j)
        {
          if (minL > lp[j])
--- 44,54 ----
  
        // laser avoid (stolen from esben's java example)
!       uint32_t count = lp.GetCount();
!       for (uint32_t j=0; j < count/2; ++j)
        {
          if (minR > lp[j])
            minR = lp[j];
        }
!       for (uint32_t j = count/2; j < count; ++j)
        {
          if (minL > lp[j])

Index: wallfollow.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/examples/libplayerc++/wallfollow.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** wallfollow.cc       25 Sep 2006 16:27:23 -0000      1.2
--- wallfollow.cc       24 Oct 2007 22:32:03 -0000      1.3
***************
*** 2,7 ****
  #include <libplayerc++/playerc++.h>
  
! const uint WALL_FOLLOWING = 0;
! const uint COLLISION_AVOIDANCE = 1;
  
  // parameters
--- 2,7 ----
  #include <libplayerc++/playerc++.h>
  
! const uint32_t WALL_FOLLOWING = 0;
! const uint32_t COLLISION_AVOIDANCE = 1;
  
  // parameters
***************
*** 28,32 ****
      double turnrate;
      bool escape_direction;
!     uint previous_mode = WALL_FOLLOWING;
  
      // read from the proxies
--- 28,32 ----
      double turnrate;
      bool escape_direction;
!     uint32_t previous_mode = WALL_FOLLOWING;
  
      // read from the proxies

Index: example1.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/examples/libplayerc++/example1.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** example1.cc 4 Nov 2005 18:15:22 -0000       1.6
--- example1.cc 24 Oct 2007 22:32:03 -0000      1.7
***************
*** 13,17 ****
  
  // Callbacks can also be passed parameters
! void cb2(uint &aI)
    { std::cout << "cb2 " << ++aI << std::endl; }
  
--- 13,17 ----
  
  // Callbacks can also be passed parameters
! void cb2(uint32_t &aI)
    { std::cout << "cb2 " << ++aI << std::endl; }
  
***************
*** 30,34 ****
        { std::cout << "TestCb " << mId << std::endl; }
  
!     void Cb(uint aOpt)
        { std::cout << "TestCb " << mId << " " << aOpt << std::endl; }
  
--- 30,34 ----
        { std::cout << "TestCb " << mId << std::endl; }
  
!     void Cb(uint32_t aOpt)
        { std::cout << "TestCb " << mId << " " << aOpt << std::endl; }
  
***************
*** 36,40 ****
  
  // we'll use this to stop the client
! void stop_cb(PlayerCc::PlayerClient* c, uint &i)
  {
    // after 10 iterations, stop the client
--- 36,40 ----
  
  // we'll use this to stop the client
! void stop_cb(PlayerCc::PlayerClient* c, uint32_t &i)
  {
    // after 10 iterations, stop the client
***************
*** 69,73 ****
      // In order to use a callback with a argument, you need to bind
      // the argument to the callback.
!     uint count = 0;
      cp.ConnectReadSignal(boost::bind(&cb2, count));
  
--- 69,73 ----
      // In order to use a callback with a argument, you need to bind
      // the argument to the callback.
!     uint32_t count = 0;
      cp.ConnectReadSignal(boost::bind(&cb2, count));
  
***************
*** 86,90 ****
      // like to process data.
      std::cout << "Read()" << std::endl;
!     for (uint i=0; i<10; ++i)
      {
        client.Read();
--- 86,90 ----
      // like to process data.
      std::cout << "Read()" << std::endl;
!     for (uint32_t i=0; i<10; ++i)
      {
        client.Read();
***************
*** 102,106 ****
      // Let's connect our stop_cb() signal.  This signal tells the client
      // to exit after 10 iterations
!     uint i = 0;
      conn = cp.ConnectReadSignal(boost::bind(&stop_cb, &client, i));
  
--- 102,106 ----
      // Let's connect our stop_cb() signal.  This signal tells the client
      // to exit after 10 iterations
!     uint32_t i = 0;
      conn = cp.ConnectReadSignal(boost::bind(&stop_cb, &client, i));
  
***************
*** 125,129 ****
      // Instead of sleeping here, we could also be sending commands and reading
      // directly from the proxy.
!     for (uint j=0; j<10; ++j)
      {
        cp.SaveFrame("test");
--- 125,129 ----
      // Instead of sleeping here, we could also be sending commands and reading
      // directly from the proxy.
!     for (uint32_t j=0; j<10; ++j)
      {
        cp.SaveFrame("test");

Index: args.h
===================================================================
RCS file: /cvsroot/playerstage/code/player/examples/libplayerc++/args.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** args.h      23 Apr 2006 01:39:54 -0000      1.4
--- args.h      24 Oct 2007 22:32:03 -0000      1.5
***************
*** 4,12 ****
  
  std::string  gHostname(PlayerCc::PLAYER_HOSTNAME);
! uint         gPort(PlayerCc::PLAYER_PORTNUM);
! uint         gIndex(0);
! uint         gDebug(0);
! uint         gFrequency(10); // Hz
! uint         gDataMode(PLAYER_DATAMODE_PUSH);
  bool         gUseLaser(false);
  
--- 4,12 ----
  
  std::string  gHostname(PlayerCc::PLAYER_HOSTNAME);
! uint32_t        gPort(PlayerCc::PLAYER_PORTNUM);
! uint32_t        gIndex(0);
! uint32_t        gDebug(0);
! uint32_t        gFrequency(10); // Hz
! uint32_t        gDataMode(PLAYER_DATAMODE_PUSH);
  bool         gUseLaser(false);
  

Index: goto.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/examples/libplayerc++/goto.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** goto.cc     9 Jul 2007 17:17:59 -0000       1.4
--- goto.cc     24 Oct 2007 22:32:03 -0000      1.5
***************
*** 31,38 ****
  bool         gGotoDone(false);
  std::string  gHostname(PlayerCc::PLAYER_HOSTNAME);
! uint         gPort(PlayerCc::PLAYER_PORTNUM);
! uint         gIndex(0);
! uint         gDebug(0);
! uint         gFrequency(10); // Hz
  
  player_pose2d_t gTarget = {0, 0, 0};
--- 31,38 ----
  bool         gGotoDone(false);
  std::string  gHostname(PlayerCc::PLAYER_HOSTNAME);
! uint32_t        gPort(PlayerCc::PLAYER_PORTNUM);
! uint32_t        gIndex(0);
! uint32_t        gDebug(0);
! uint32_t        gFrequency(10); // Hz
  
  player_pose2d_t gTarget = {0, 0, 0};

Index: example2.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/examples/libplayerc++/example2.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** example2.cc 20 Oct 2005 15:31:17 -0000      1.5
--- example2.cc 24 Oct 2007 22:32:03 -0000      1.6
***************
*** 28,32 ****
  void read_callback4(PlayerCc::PlayerClient* c)
  {
!   static uint i(0);
    std::cout << "read_client_callback_4: " << i << std::endl;
    if (++i>10)
--- 28,32 ----
  void read_callback4(PlayerCc::PlayerClient* c)
  {
!   static uint32_t i(0);
    std::cout << "read_client_callback_4: " << i << std::endl;
    if (++i>10)

Index: camera.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/examples/libplayerc++/camera.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** camera.cc   16 Nov 2005 12:59:31 -0000      1.1
--- camera.cc   24 Oct 2007 22:32:03 -0000      1.2
***************
*** 12,16 ****
      PlayerCc::CameraProxy cp(&client, gIndex);
  
!     for (uint i=0; i<10; ++i)
      {
        client.Read();
--- 12,16 ----
      PlayerCc::CameraProxy cp(&client, gIndex);
  
!     for (uint32_t i=0; i<10; ++i)
      {
        client.Read();

Index: randomwalk.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/examples/libplayerc++/randomwalk.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** randomwalk.cc       23 Apr 2006 01:39:54 -0000      1.3
--- randomwalk.cc       24 Oct 2007 22:32:03 -0000      1.4
***************
*** 51,55 ****
        {
          obs = false;
!         for (uint i = 0; i < lp->GetCount (); i++)
          {
            if((*lp)[i] < minfrontdistance)
--- 51,55 ----
        {
          obs = false;
!         for (uint32_t i = 0; i < lp->GetCount (); i++)
          {
            if((*lp)[i] < minfrontdistance)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to