Index: trunk/lib/FlairCore/src/RangeFinderPlot.cpp
===================================================================
--- trunk/lib/FlairCore/src/RangeFinderPlot.cpp	(revision 217)
+++ trunk/lib/FlairCore/src/RangeFinderPlot.cpp	(revision 221)
@@ -35,5 +35,5 @@
     : SendData(position, name, "RangeFinderPlot", 200) {
   this->datas = datas;
-Warn("RangeFinderPlot::CopyDatas needs to be written\n");
+
   SetSendSize(datas->GetDataType().GetSize());
 
@@ -58,5 +58,5 @@
 
 void RangeFinderPlot::CopyDatas(char *buf) const {
-  //datas->CopyDatas(buf);
+  datas->CopyDatas(buf);
 }
 
Index: trunk/lib/FlairCore/src/UsSensorPlot.cpp
===================================================================
--- trunk/lib/FlairCore/src/UsSensorPlot.cpp	(revision 221)
+++ trunk/lib/FlairCore/src/UsSensorPlot.cpp	(revision 221)
@@ -0,0 +1,70 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+//  created:    2018/02/21
+//  filename:   UsSensorPlot.cpp
+//
+//  author:     Guillaume Sanahuja
+//              Copyright Heudiasyc UMR UTC/CNRS 7253
+//
+//  version:    $Id: $
+//
+//  purpose:    Class displaying a plot for raw us sensor
+//
+//
+/*********************************************************************/
+
+#include "UsSensorPlot.h"
+#include "LayoutPosition.h"
+#include "Matrix.h"
+
+using std::string;
+using namespace flair::core;
+
+namespace flair {
+namespace gui {
+
+UsSensorPlot::UsSensorPlot(const LayoutPosition *position, string name,
+                       string y_name,float ymin, float ymax,const Matrix *datas,const Matrix *peakInfos)
+    : DataPlot(position, name, "UsSensorPlot") {
+  int nbSamples;
+  if(datas->Cols()==1) {
+    nbSamples=datas->Rows();
+  } else if(datas->Rows()==1) {
+    nbSamples=datas->Cols();
+  } else {
+    nbSamples=0;
+    Err("matrix must be 1D\n");
+  }
+  
+  if(peakInfos->Cols()!=4 || peakInfos->Rows()!=1) {
+    Err("peakInfos matrix must be 1*4 (first start,first end, second start,second end)\n");
+  }
+  
+  if(peakInfos->GetDataType().GetElementDataType().GetDescription()!="uint16_t") {
+    Err("peakInfos matrix must be 1of type uint16_t\n");
+  }
+    
+  this->datas = datas;
+  this->peakInfos = peakInfos;
+  
+  SetVolatileXmlProp("ymin", ymin);
+  SetVolatileXmlProp("ymax", ymax);
+  SetVolatileXmlProp("y_name", y_name);
+  SetVolatileXmlProp("samples", nbSamples);
+  SetVolatileXmlProp("type", datas->GetDataType().GetElementDataType().GetDescription());
+  SendXml();
+
+  SetSendSize(datas->GetDataType().GetSize()+peakInfos->GetDataType().GetSize());
+}
+
+UsSensorPlot::~UsSensorPlot() {}
+
+void UsSensorPlot::CopyDatas(char *buf) const {
+  datas->CopyDatas(buf);
+  peakInfos->CopyDatas(buf+datas->GetDataType().GetSize());
+}
+
+} // end namespace gui
+} // end namespace flair
Index: trunk/lib/FlairCore/src/UsSensorPlot.h
===================================================================
--- trunk/lib/FlairCore/src/UsSensorPlot.h	(revision 221)
+++ trunk/lib/FlairCore/src/UsSensorPlot.h	(revision 221)
@@ -0,0 +1,77 @@
+// %flair:license{
+// This file is part of the Flair framework distributed under the
+// CECILL-C License, Version 1.0.
+// %flair:license}
+/*!
+ * \file UsSensorPlot.h
+ * \brief Class displaying a plot for raw us sensor
+ * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
+ * \date 2018/02/21
+ * \version 4.0
+ */
+
+#ifndef USSENSORPLOT_H
+#define USSENSORPLOT_H
+
+#include <DataPlot.h>
+#include <stdint.h>
+
+namespace flair {
+namespace core {
+class Matrix;
+}
+}
+
+namespace flair {
+namespace gui {
+
+class LayoutPosition;
+
+/*! \class UsSensorPlot
+*
+* \brief Class displaying a plot for raw us sensor
+*
+*/
+class UsSensorPlot : private DataPlot {
+public:
+  /*!
+  * \brief Constructor
+  *
+  * Construct a plot for raw us sensor at given place position.
+  *
+  * \param position position to display the plot
+  * \param name name
+  * \param y_name name of y axis
+  * \param ymin default ymin of the plot
+  * \param ymax default ymax of the plot
+  * \param datas data matrix, must be 1D
+  * \param peakInfos peak infos, must be 1*4 (first start,first end, second start,second end)
+  */
+  UsSensorPlot(const LayoutPosition *position, std::string name,
+                       std::string y_name,float ymin, float ymax,const core::Matrix *datas,const core::Matrix *peakInfos);
+
+  /*!
+  * \brief Destructor
+  *
+  */
+  ~UsSensorPlot();
+  
+private:
+  /*!
+  * \brief Copy datas to specified buffer
+  *
+  * Reimplemented from SendData.
+  *
+  * \param buf output buffer
+  */
+  void CopyDatas(char *buf) const;
+  
+  const core::Matrix *datas,*peakInfos;
+
+
+};
+
+} // end namespace gui
+} // end namespace flair
+
+#endif // USSENSORPLOT_H
