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

Modified Files:
        sr3000.cc 
Log Message:
Removed many configuration requests from the camera interface that should be 
properties because they're specified to one device.



Index: sr3000.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/sr3000/sr3000.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sr3000.cc   20 Nov 2006 12:41:20 -0000      1.2
--- sr3000.cc   11 Aug 2007 00:21:28 -0000      1.3
***************
*** 26,34 ****
  /** @{ */
  /** @defgroup driver_sr3000 sr3000
!  * @brief SR3000 
  
! The sr3000 driver controls the Swiss Ranger SR3000 camera. A broad range of 
! camera option parameters are supported, via the libusbSR library. The driver 
! provides a @ref interface_pointcloud3d interface and two @ref 
interface_camera 
  interfaces for both distance and intensity images.
  
--- 26,34 ----
  /** @{ */
  /** @defgroup driver_sr3000 sr3000
!  * @brief SR3000
  
! The sr3000 driver controls the Swiss Ranger SR3000 camera. A broad range of
! camera option parameters are supported, via the libusbSR library. The driver
! provides a @ref interface_pointcloud3d interface and two @ref interface_camera
  interfaces for both distance and intensity images.
  
***************
*** 40,44 ****
  
  - @ref interface_pointcloud3d : the 3d point cloud generated by the SR3000
! - @ref interface_camera : snapshot images (both distance and intensity) taken 
by 
                            the SR3000
  
--- 40,44 ----
  
  - @ref interface_pointcloud3d : the 3d point cloud generated by the SR3000
! - @ref interface_camera : snapshot images (both distance and intensity) taken 
by
                            the SR3000
  
***************
*** 49,60 ****
  @par Supported configuration requests
  
! The @ref interface_camera interface supports:
!   - PLAYER_CAMERA_REQ_SET_AUTOILLUMINATION
!   - PLAYER_CAMERA_REQ_SET_MODULATION_FREQ
!   - PLAYER_CAMERA_REQ_GET_MODULATION_FREQ
!   - PLAYER_CAMERA_REQ_SET_INTEGRATION_TIME
!   - PLAYER_CAMERA_REQ_GET_INTEGRATION_TIME
!   - PLAYER_CAMERA_REQ_SET_THRESHOLD
!   - PLAYER_CAMERA_REQ_SET_TEMPORAL_IIR
  
  @par Configuration file options
--- 49,71 ----
  @par Supported configuration requests
  
!   - none
! 
! @par Properties provided
! 
!   - auto_illumination (integer): Set to 1 to turn auto illumination on.
!   - integration_time (integer): Integration time.
!   - modulation_freq (integer): This device employs the following values:
!                                 40MHz  -> 3.75 m,
!                                 30MHz  -> 5.0  m,
!                                 21MHz  -> 7.1  m,
!                                 20MHz  -> 7.5  m,
!                                 19MHz  -> 7.9  m,
!                                 10MHz  -> 15.0 m,
!                                 6.6MHz -> 22.5 m,
!                                 5MHz   -> 30.0 m
!   - sat_threshold (integer): Saturation threshold.
!   - amp_threshold (integer): Amplification threshold.
!   - static_delay (double): Temporal IIR static delay (0.0-1.0).
!   - dynamic_delay (double): Temporal IIR dynamic delay (0.0-1.0).
  
  @par Configuration file options
***************
*** 62,66 ****
    - none
  
! @par Example 
  
  @verbatim
--- 73,77 ----
    - none
  
! @par Example
  
  @verbatim
***************
*** 84,100 ****
  #define CAM_COLS 176
  
! class SR3000:public Driver 
  {
    public:
!       // constructor 
      SR3000 (ConfigFile* cf, int section);
      ~SR3000 ();
!       
      int Setup ();
      int Shutdown ();
  
      // MessageHandler
!     virtual int ProcessMessage (MessageQueue * resp_queue, 
!                                 player_msghdr * hdr, 
                                  void * data);
  
--- 95,111 ----
  #define CAM_COLS 176
  
! class SR3000:public Driver
  {
    public:
!       // constructor
      SR3000 (ConfigFile* cf, int section);
      ~SR3000 ();
! 
      int Setup ();
      int Shutdown ();
  
      // MessageHandler
!     virtual int ProcessMessage (MessageQueue * resp_queue,
!                                 player_msghdr * hdr,
                                  void * data);
  
***************
*** 115,123 ****
      unsigned int rows, cols, bpp, inr;
      unsigned char integration_time;
!     ModulationFrq modulation_freq;
      size_t buffer_size, buffer_points_size;
      void *buffer;
      float *buffer_points, *xp, *yp, *zp;
  
      // device bookkeeping
      player_devaddr_t pcloud_addr;
--- 126,138 ----
      unsigned int rows, cols, bpp, inr;
      unsigned char integration_time;
!     //ModulationFrq modulation_freq;
      size_t buffer_size, buffer_points_size;
      void *buffer;
      float *buffer_points, *xp, *yp, *zp;
  
+     // Properties
+     IntProperty auto_illumination, integration_time, modulation_freq, 
sat_threshold, amp_threshold;
+     DoubleProperty static_delay, dynamic_delay;
+ 
      // device bookkeeping
      player_devaddr_t pcloud_addr;
***************
*** 131,135 ****
  //Factory creation function. This functions is given as an argument when
  // the driver is added to the driver table
! Driver* 
      SR3000_Init (ConfigFile* cf, int section)
  {
--- 146,150 ----
  //Factory creation function. This functions is given as an argument when
  // the driver is added to the driver table
! Driver*
      SR3000_Init (ConfigFile* cf, int section)
  {
***************
*** 138,142 ****
  
  
////////////////////////////////////////////////////////////////////////////////
! //Registers the driver in the driver table. Called from the 
  // player_driver_init function that the loader looks for
  void
--- 153,157 ----
  
  
////////////////////////////////////////////////////////////////////////////////
! //Registers the driver in the driver table. Called from the
  // player_driver_init function that the loader looks for
  void
***************
*** 150,154 ****
  // pre-Setup() setup.
  SR3000::SR3000 (ConfigFile* cf, int section)
!       : Driver (cf, section)
  {
    memset (&this->pcloud_addr, 0, sizeof (player_devaddr_t));
--- 165,171 ----
  // pre-Setup() setup.
  SR3000::SR3000 (ConfigFile* cf, int section)
!       : Driver (cf, section),
!       auto_illumination (0), integration_time (0), modulation_freq (0),
!       sat_threshold (0), amp_threshold (0), static_delay (0), dynamic_delay 
(0)
  {
    memset (&this->pcloud_addr, 0, sizeof (player_devaddr_t));
***************
*** 156,159 ****
--- 173,184 ----
    memset (&this->i_cam_addr,  0, sizeof (player_devaddr_t));
  
+   this->RegisterProperty ("auto_illumination", &this->auto_illumination, cf, 
section);
+   this->RegisterProperty ("integration_time", &this->integration_time, cf, 
section);
+   this->RegisterProperty ("modulation_freq", &this->modulation_freq, cf, 
section);
+   this->RegisterProperty ("sat_threshold", &this->sat_threshold, cf, section);
+   this->RegisterProperty ("amp_threshold", &this->amp_threshold, cf, section);
+   this->RegisterProperty ("static_delay", &this->static_delay, cf, section);
+   this->RegisterProperty ("dynamic_delay", &this->dynamic_delay, cf, section);
+ 
    providePCloud = FALSE; provideDCam = FALSE; provideICam = FALSE;
  
***************
*** 204,208 ****
  
////////////////////////////////////////////////////////////////////////////////
  // Set up the device.  Return 0 if things go well, and -1 otherwise.
! int 
      SR3000::Setup ()
  {
--- 229,233 ----
  
////////////////////////////////////////////////////////////////////////////////
  // Set up the device.  Return 0 if things go well, and -1 otherwise.
! int
      SR3000::Setup ()
  {
***************
*** 219,222 ****
--- 244,248 ----
    inr  = SR_GetNumImg (srCam);
    modulation_freq  = SR_GetModulationFrequency (srCam);
+   integration_time = SR_GetIntegrationTime (srCam);
    buffer_size      = SR_GetBufferSize (srCam);
    PLAYER_MSG5 (2, ">> Expecting %dx%dx%dx%d (%d bytes)", cols, rows, bpp, 
inr, buffer_size);
***************
*** 228,232 ****
      return (-1);
    }
!   
    // ---[ Alloc memory for the buffer ]---
    buffer = malloc (buffer_size);
--- 254,258 ----
      return (-1);
    }
! 
    // ---[ Alloc memory for the buffer ]---
    buffer = malloc (buffer_size);
***************
*** 250,263 ****
  
////////////////////////////////////////////////////////////////////////////////
  // Shutdown the device
! int 
      SR3000::Shutdown ()
  {
    StopThread ();
!   
    // ---[ Close the camera ]---
    int res = SR_Close (srCam);
  
    PLAYER_MSG1 (1, "> SR3000 driver shutting down... %d [done]", res);
!   
    // ---[ Free the allocated memory buffer ]---
    free (buffer);
--- 276,289 ----
  
////////////////////////////////////////////////////////////////////////////////
  // Shutdown the device
! int
      SR3000::Shutdown ()
  {
    StopThread ();
! 
    // ---[ Close the camera ]---
    int res = SR_Close (srCam);
  
    PLAYER_MSG1 (1, "> SR3000 driver shutting down... %d [done]", res);
! 
    // ---[ Free the allocated memory buffer ]---
    free (buffer);
***************
*** 270,274 ****
  // Process messages from/for a camera interface
  int
!     SR3000::ProcessMessageCamera (MessageQueue* resp_queue, 
                                    player_msghdr * hdr,
                                    void * data,
--- 296,300 ----
  // Process messages from/for a camera interface
  int
!     SR3000::ProcessMessageCamera (MessageQueue* resp_queue,
                                    player_msghdr * hdr,
                                    void * data,
***************
*** 276,417 ****
  {
    int res;
!   
!   // ---[ Set Autoillumination
!   if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_REQ, 
!       PLAYER_CAMERA_REQ_SET_AUTOILLUMINATION, cam_addr))
!   {
!     // check if autoillumination should be enabled or disabled
!     player_camera_autoillumination_config *datatype = 
(player_camera_autoillumination_config*)data;
!     if (datatype->value == 1)
!       res = SR_SetAutoIllumination (srCam, 5, 255, 10, 45);
!     else
!       res = SR_SetAutoIllumination (srCam, 255, 0, 0, 0);
  
!     // Check the error code
!     if (res == 0)
      {
!       Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, hdr->subtype);
        return (0);
      }
!     else
      {
!       Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, hdr->subtype);
!       return (-1);
!     }
!   }
!   // ---[ Set modulation frequency
!   else if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_REQ, 
!       PLAYER_CAMERA_REQ_SET_MODULATION_FREQ, cam_addr))
!   {
!     player_camera_modulation_freq_config *datatype = 
(player_camera_modulation_freq_config*)data;
!     res = SR_SetModulationFrequency (srCam, (ModulationFrq)datatype->value);
  
!     // Check the error code
!     if (res == 0)
!     {
!       Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, hdr->subtype);
        return (0);
      }
!     else
      {
!       Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, hdr->subtype);
!       return (-1);
!     }
!   }
!   // ---[ Get modulation frequency
!   else if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_REQ, 
!       PLAYER_CAMERA_REQ_GET_MODULATION_FREQ, cam_addr))
!   {
!     // Assemble the data packet
!     player_camera_modulation_freq_config datatype;
!     datatype.value = (unsigned char)SR_GetModulationFrequency (srCam);
! 
!     Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, hdr->subtype);
!     return (0);
!   }
!   // ---[ Set integration time
!   else if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_REQ, 
!       PLAYER_CAMERA_REQ_SET_INTEGRATION_TIME, cam_addr))
!   {
!     player_camera_integration_time_config *datatype = 
(player_camera_integration_time_config*)data;
!     res = SR_SetIntegrationTime (srCam, datatype->value);
  
!     // Check the error code
!     if (res == 0)
!     {
!       Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, hdr->subtype);
        return (0);
      }
!     else
      {
!       Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, hdr->subtype);
!       return (-1);
      }
!   }
!   // ---[ Get integration time
!   else if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_REQ, 
!       PLAYER_CAMERA_REQ_GET_INTEGRATION_TIME, cam_addr))
!   {
!     // Assemble the data packet
!     player_camera_integration_time_config datatype;
!     datatype.value = (unsigned char)SR_GetIntegrationTime (srCam);
  
!     Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, hdr->subtype);
!     return (0);
    }
!   // ---[ Set thresholds
!   else if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_REQ, 
!       PLAYER_CAMERA_REQ_SET_THRESHOLD, cam_addr))
    {
!     player_camera_threshold_config *datatype = 
(player_camera_threshold_config*)data;
!     if (datatype->subtype == PLAYER_CAMERA_REQ_SET_SATURATION_THRESHOLD)
!       res = SR_SetSaturationThreshold (srCam, datatype->value);
!     else if (datatype->subtype == PLAYER_CAMERA_REQ_SET_AMPLITUDE_THRESHOLD)
!       res = SR_SetAmplitudeThreshold (srCam, datatype->value);
!     else
!     {
!       Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, hdr->subtype);
        return (-1);
!     } 
! 
!     // Check the error code
!     if (res == 0)
      {
!       Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, hdr->subtype);
        return (0);
      }
!     else
      {
!       Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, hdr->subtype);
!       return (-1);
      }
    }
!   // ---[ Set IIR
!   else if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_REQ, 
!       PLAYER_CAMERA_REQ_SET_TEMPORAL_IIR, cam_addr))
    {
!     player_camera_iir_config *datatype = (player_camera_iir_config*)data;
!     res = SR_SetTemporalIIR (srCam, datatype->static_delay, 
datatype->dynamic_delay);
! 
!     // Check the error code
!     if (res == 0)
      {
!       Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, hdr->subtype);
        return (0);
      }
!     else
      {
!       Publish (cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, hdr->subtype);
!       return (-1);
      }
    }
!   
    return (0);
  }
!                                   
  
////////////////////////////////////////////////////////////////////////////////
  // ProcessMessage
! int 
!     SR3000::ProcessMessage (MessageQueue* resp_queue, 
                              player_msghdr * hdr,
                              void * data)
--- 302,477 ----
  {
    int res;
!   Property *property = NULL;
  
!   // Check for properties
!   if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_REQ, PLAYER_SET_INTPROP_REQ, 
cam_addr))
!   {
!     player_intprop_req_t req = *reinterpret_cast<player_intprop_req_t*> 
(data);
!     if ((property = propertyBag.GetProperty (req.key)) == NULL)
!       return (-1);
!     if (property->KeyIsEqual ("auto_illumination"))
      {
!       // ---[ Set Autoillumination
!       if (req->value == 1)
!         res = SR_SetAutoIllumination (srCam, 5, 255, 10, 45);
!       else
!         res = SR_SetAutoIllumination (srCam, 255, 0, 0, 0);
! 
!       // Check the error code
!       if (res == 0)
!       {
!         property->SetValueFromMessage (reinterpret_cast<void*> (&req));
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
!       }
!       else
!       {
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
!       }
        return (0);
      }
!     else if (property->KeyIsEqual ("integration_time")
      {
!       // ---[ Set integration time
!       res = SR_SetIntegrationTime (srCam, req->value);
  
!       // Check the error code
!       if (res == 0)
!       {
!         property->SetValueFromMessage (reinterpret_cast<void*> (&req));
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
!       }
!       else
!       {
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
!       }
        return (0);
      }
!     else if (property->KeyIsEqual ("modulation_freq")
      {
!       // ---[ Set modulation frequency
!       res = SR_SetModulationFrequency (srCam, (ModulationFrq)req->value);
  
!       // Check the error code
!       if (res == 0)
!       {
!         property->SetValueFromMessage (reinterpret_cast<void*> (&req));
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
!       }
!       else
!       {
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
!       }
        return (0);
      }
!     else if (property->KeyIsEqual ("sat_threshold")
      {
!       // ---[ Set saturation threshold
!       res = SR_SetSaturationThreshold (srCam, req->value);
! 
!       // Check the error code
!       if (res == 0)
!       {
!         property->SetValueFromMessage (reinterpret_cast<void*> (&req));
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
!       }
!       else
!       {
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
!       }
!       return (0);
      }
!     else if (property->KeyIsEqual ("amp_threshold")
!     {
!       // ---[ Set amplitude threshold
!       res = SR_SetAmplitudeThreshold (srCam, req->value);
  
!       // Check the error code
!       if (res == 0)
!       {
!         property->SetValueFromMessage (reinterpret_cast<void*> (&req));
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
!       }
!       else
!       {
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, 
PLAYER_SET_INTPROP_REQ, NULL, 0, NULL);
!       }
!       return (0);
!     }
!     return (-1);    // Let the default property handling handle it
    }
!   else if(Message::MatchMessage(hdr, PLAYER_MSGTYPE_REQ, 
PLAYER_GET_INTPROP_REQ, device_addr))
    {
!     player_intprop_req_t req = *reinterpret_cast<player_intprop_req_t*> 
(data);
!     if ((property = propertyBag.GetProperty (req.key)) == NULL)
        return (-1);
!     if (property->KeyIsEqual ("modulation_freq"))
      {
!       // ---[ Get modulation frequency
!       reinterpret_cast<IntProperty*> (property)->SetValue 
(SR_GetModulationFrequency (srCam));
!       property->GetValueToMessage (reinterpret_cast<void*> (&req));
!       Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_GET_INTPROP_REQ, reinterpret_cast<void*> (&req), 
sizeof(player_intprop_req_t), NULL);
        return (0);
      }
!     else if (property->KeyIsEqual ("integration_time"))
      {
!       // ---[ Get integration time
!       reinterpret_cast<IntProperty*> (property)->SetValue 
(SR_GetIntegrationTime (srCam));
!       property->GetValueToMessage (reinterpret_cast<void*> (&req));
!       Publish(device_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_GET_INTPROP_REQ, reinterpret_cast<void*> (&req), 
sizeof(player_intprop_req_t), NULL);
!       return (0);
      }
+     return (-1);    // Let the default property handling handle it
    }
!   else if (Message::MatchMessage (hdr, PLAYER_MSGTYPE_REQ, 
PLAYER_SET_DBLPROP_REQ, cam_addr))
    {
!     player_dblprop_req_t req = *reinterpret_cast<player_dblprop_req_t*> 
(data);
!     if ((property = propertyBag.GetProperty (req.key)) == NULL)
!       return (-1);
!     if (property->KeyIsEqual ("static_delay"))
      {
!       // ---[ Set IIR static delay
!       DoubleProperty *dynamic_delay = propertyBag.GetProperty 
("dynamic_delay");
!       res = SR_SetTemporalIIR (srCam, req->value, dynamic_delay);
! 
!       // Check the error code
!       if (res == 0)
!       {
!         property->SetValueFromMessage (reinterpret_cast<void*> (&req));
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_DBLPROP_REQ, NULL, 0, NULL);
!       }
!       else
!       {
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, 
PLAYER_SET_DBLPROP_REQ, NULL, 0, NULL);
!       }
        return (0);
      }
!     else if (property->KeyIsEqual ("dynamic_delay"))
      {
!       // ---[ Set IIR dynamic delay
!       DoubleProperty *static_delay = propertyBag.GetProperty ("static_delay");
!       res = SR_SetTemporalIIR (srCam, static_delay, req->value);
! 
!       // Check the error code
!       if (res == 0)
!       {
!         property->SetValueFromMessage (reinterpret_cast<void*> (&req));
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_ACK, 
PLAYER_SET_DBLPROP_REQ, NULL, 0, NULL);
!       }
!       else
!       {
!         Publish(cam_addr, resp_queue, PLAYER_MSGTYPE_RESP_NACK, 
PLAYER_SET_DBLPROP_REQ, NULL, 0, NULL);
!       }
!       return (0);
      }
+     return (-1);    // Let the default property handling handle it
    }
! 
    return (0);
  }
! 
  
////////////////////////////////////////////////////////////////////////////////
  // ProcessMessage
! int
!     SR3000::ProcessMessage (MessageQueue* resp_queue,
                              player_msghdr * hdr,
                              void * data)
***************
*** 419,426 ****
    assert (hdr);
    assert (data);
!   
    ProcessMessageCamera (resp_queue, hdr, data, d_cam_addr);
    ProcessMessageCamera (resp_queue, hdr, data, i_cam_addr);
!   
    return (0);
  }
--- 479,486 ----
    assert (hdr);
    assert (data);
! 
    ProcessMessageCamera (resp_queue, hdr, data, d_cam_addr);
    ProcessMessageCamera (resp_queue, hdr, data, i_cam_addr);
! 
    return (0);
  }
***************
*** 442,446 ****
      pthread_testcancel ();
      ProcessMessages ();
!     
      // get data ------------------------------------------------------------
      if ((rows != 1) && (cols != 1))
--- 502,506 ----
      pthread_testcancel ();
      ProcessMessages ();
! 
      // get data ------------------------------------------------------------
      if ((rows != 1) && (cols != 1))
***************
*** 458,462 ****
  
    res = SR_Acquire (srCam, MODE);
!   
    // Publish pointcloud3d data if subscribed
    if (providePCloud)
--- 518,522 ----
  
    res = SR_Acquire (srCam, MODE);
! 
    // Publish pointcloud3d data if subscribed
    if (providePCloud)
***************
*** 472,486 ****
        element.point.pz = zp[i];
  
!       element.color.alpha = 255; 
!       element.color.red   = 255; 
        element.color.green = 255;
        element.color.blue  = 255;
!       pcloud_data.points[i] = element; 
!     } 
      // Write the Pointcloud3d data
      Publish (pcloud_addr, NULL, PLAYER_MSGTYPE_DATA, 
PLAYER_POINTCLOUD3D_DATA_STATE,
!              &pcloud_data, 4 + pcloud_data.points_count*sizeof 
(player_pointcloud3d_element_t), 
               NULL);
!              
    }
  
--- 532,546 ----
        element.point.pz = zp[i];
  
!       element.color.alpha = 255;
!       element.color.red   = 255;
        element.color.green = 255;
        element.color.blue  = 255;
!       pcloud_data.points[i] = element;
!     }
      // Write the Pointcloud3d data
      Publish (pcloud_addr, NULL, PLAYER_MSGTYPE_DATA, 
PLAYER_POINTCLOUD3D_DATA_STATE,
!              &pcloud_data, 4 + pcloud_data.points_count*sizeof 
(player_pointcloud3d_element_t),
               NULL);
! 
    }
  


-------------------------------------------------------------------------
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