Index: /trunk/tools/FlairGCS/src/ConnectionLayout.cpp
===================================================================
--- /trunk/tools/FlairGCS/src/ConnectionLayout.cpp	(revision 221)
+++ /trunk/tools/FlairGCS/src/ConnectionLayout.cpp	(revision 222)
@@ -136,4 +136,5 @@
 
 QString ConnectionLayout::getRemoteName() { return remoteName; }
+
 void ConnectionLayout::drawDatas(char *buf, int buf_size, uint16_t period,
                                  bool big_endian) {
Index: /trunk/tools/FlairGCS/src/DataPlot1D.cpp
===================================================================
--- /trunk/tools/FlairGCS/src/DataPlot1D.cpp	(revision 221)
+++ /trunk/tools/FlairGCS/src/DataPlot1D.cpp	(revision 222)
@@ -104,4 +104,5 @@
   step_s = period / 1000.;
   plot(datas);
+  free(datas);
 }
 
@@ -110,18 +111,25 @@
   if (event->button() == Qt::RightButton) {
     QMenu *menu = new QMenu("nom", (QwtPlot *)this);
-    QAction *a, *b, *z;
+    QAction *resetX, *resetY, *clear,*action;
 
-    a = menu->addAction("reset time view");
-    b = menu->addAction("reset y view");
+    resetX = menu->addAction("reset time view");
+    resetY = menu->addAction("reset y view");
     menu->addSeparator();
 
     appendmenu(menu);
-    z = execmenu((QwtPlot *)this, menu, event->globalPos());
+    
+    menu->addSeparator();
+    clear = menu->addAction("clear graph");
+    
+    action = execmenu((QwtPlot *)this, menu, event->globalPos());
     delete menu;
 
-    if (z == a)
+    if (action == resetX)
       resetXView();
-    if (z == b)
+    if (action == resetY)
       resetYView();
+      
+    if (action == clear)
+      clearCurves();
 
     return true;
Index: /trunk/tools/FlairGCS/src/DataRemote.cpp
===================================================================
--- /trunk/tools/FlairGCS/src/DataRemote.cpp	(revision 221)
+++ /trunk/tools/FlairGCS/src/DataRemote.cpp	(revision 222)
@@ -29,30 +29,31 @@
   menu->addSeparator();
 
-  b = menu->addAction("auto refresh");
-  b->setCheckable(true);
-  b->setChecked(auto_refresh);
+  autoRefresh = menu->addAction("auto refresh");
+  autoRefresh->setCheckable(true);
+  autoRefresh->setChecked(auto_refresh);
 
-  c = menu->addAction(QString("set refresh rate (%1ms)")
+  setRefreshRate = menu->addAction(QString("set refresh rate (%1ms)")
                           .arg((uint16_t)(qRound(refresh_rate * 1000))));
-  c->setEnabled(auto_refresh);
-  menu->addSeparator();
+  setRefreshRate->setEnabled(auto_refresh);
+/*  menu->addSeparator();
 
-  d = menu->addAction("log");
-  d->setCheckable(true);
-  d->setChecked(is_logging);
+  log = menu->addAction("log");
+  log->setCheckable(true);
+  log->setChecked(is_logging);
+  */
 }
 
 QAction *DataRemote::execmenu(QWidget *parent, QMenu *menu, QPoint point) {
-  QAction *z;
+  QAction *action;
 
-  z = menu->exec(point);
+  action = menu->exec(point);
 
   // auto_refresh=b->isChecked();
 
-  if (z == b) {
-    SendPeriod(RefreshRate_ms(), b->isChecked());
+  if (action == autoRefresh) {
+    SendPeriod(RefreshRate_ms(), autoRefresh->isChecked());
   }
 
-  if (z == c) {
+  if (action == setRefreshRate) {
     bool ok;
     // uint16_t time = QInputDialog::getInt(this, QString("Set refresh rate
@@ -64,9 +65,9 @@
     if (ok == true && time != qRound(refresh_rate * 1000)) {
       // refresh_rate=time/1000.;
-      SendPeriod(time, b->isChecked());
+      SendPeriod(time, autoRefresh->isChecked());
     }
   }
-
-  return z;
+  
+  return action;
 }
 
Index: /trunk/tools/FlairGCS/src/DataRemote.h
===================================================================
--- /trunk/tools/FlairGCS/src/DataRemote.h	(revision 221)
+++ /trunk/tools/FlairGCS/src/DataRemote.h	(revision 222)
@@ -36,5 +36,6 @@
 private:
   void SendPeriod(int period, bool auto_refresh);
-  QAction *b, *c, *d;
+  QAction *autoRefresh, *setRefreshRate;
+  //QAction **log;//todo implement this feature (log directly in gcs, in case of uav program crash)
 };
 
Index: /trunk/tools/FlairGCS/src/Map.cpp
===================================================================
--- /trunk/tools/FlairGCS/src/Map.cpp	(revision 221)
+++ /trunk/tools/FlairGCS/src/Map.cpp	(revision 222)
@@ -107,5 +107,5 @@
         tr("Failed to find any map services. Please ensure that "
            "the location services plugins for Qt Mobility are "
-           "installed and, if necessary, set the IGEP_ROOT "
+           "installed and, if necessary, set the OECORE_HOST_SYSROOT "
            "environment variable to the good location."));
 
Index: /trunk/tools/FlairGCS/src/UsSensorPlot.cpp
===================================================================
--- /trunk/tools/FlairGCS/src/UsSensorPlot.cpp	(revision 221)
+++ /trunk/tools/FlairGCS/src/UsSensorPlot.cpp	(revision 222)
@@ -102,21 +102,22 @@
   
   firstPeakStart = new QwtPlotMarker();
-  QwtSymbol* s=new QwtSymbol( QwtSymbol::Diamond, Qt::blue, Qt::NoPen, QSize( 10, 10 ) );
-  firstPeakStart->setSymbol(s);
-  //firstPeakStart->setValue( QPointF( 1000, 200 ) );
+  QwtSymbol* s1=new QwtSymbol( QwtSymbol::Diamond, Qt::blue, Qt::NoPen, QSize( 10, 10 ) );
+  firstPeakStart->setSymbol(s1);
   //m->setLabel("toto" );
   firstPeakStart->attach( plot );
   
   firstPeakEnd = new QwtPlotMarker();
-  //QwtSymbol* s=new QwtSymbol( QwtSymbol::Diamond, Qt::blue, Qt::NoPen, QSize( 10, 10 ) );
-  firstPeakEnd->setSymbol(s);
+  QwtSymbol* s2=new QwtSymbol( QwtSymbol::Diamond, Qt::blue, Qt::NoPen, QSize( 10, 10 ) );
+  firstPeakEnd->setSymbol(s2);
   firstPeakEnd->attach( plot );
   
   secondPeakStart = new QwtPlotMarker();
-  secondPeakStart->setSymbol(s);
+  QwtSymbol* s3=new QwtSymbol( QwtSymbol::Diamond, Qt::black, Qt::NoPen, QSize( 10, 10 ) );
+  secondPeakStart->setSymbol(s3);
   secondPeakStart->attach( plot );
   
   secondPeakEnd = new QwtPlotMarker();
-  secondPeakEnd->setSymbol(s);
+  QwtSymbol* s4=new QwtSymbol( QwtSymbol::Diamond, Qt::black, Qt::NoPen, QSize( 10, 10 ) );
+  secondPeakEnd->setSymbol(s4);
   secondPeakEnd->attach( plot );
 }
Index: /trunk/tools/FlairGCS/src/main.cpp
===================================================================
--- /trunk/tools/FlairGCS/src/main.cpp	(revision 221)
+++ /trunk/tools/FlairGCS/src/main.cpp	(revision 222)
@@ -8,4 +8,6 @@
 #include <qmetatype.h>
 #include <tclap/CmdLine.h>
+#include <execinfo.h>
+#include <signal.h>
 
 #include "Manager.h"
@@ -39,4 +41,16 @@
 }
 
+void seg_fault(int sig __attribute__((unused))) {
+  void *bt[32];
+  int nentries;
+
+  printf("Segmentation fault:\n");
+  /* Dump a backtrace of the frame which caused the segfault: */
+  nentries = backtrace(bt, sizeof(bt) / sizeof(bt[0]));
+  backtrace_symbols_fd(bt, nentries, fileno(stdout));
+
+  exit(1);
+}
+
 int main(int argc, char *argv[]) {
 
@@ -52,4 +66,7 @@
 
   compile_info("FlairGCS");
+  
+  // catch segfault
+  signal(SIGSEGV, seg_fault);
 
   parseOptions(argc, argv);
