Index: trunk/tools/FlairGCS/src/ConnectionLayout.cpp
===================================================================
--- trunk/tools/FlairGCS/src/ConnectionLayout.cpp	(revision 454)
+++ trunk/tools/FlairGCS/src/ConnectionLayout.cpp	(revision 455)
Index: trunk/tools/FlairGCS/src/DataRemote.cpp
===================================================================
--- trunk/tools/FlairGCS/src/DataRemote.cpp	(revision 454)
+++ trunk/tools/FlairGCS/src/DataRemote.cpp	(revision 455)
@@ -16,5 +16,14 @@
   receivesize = 0;
   refresh_rate = (double)period / 1000.;
-  this->nb_buffering=nb_buffering;
+   
+   //flair programs without nb buffering have nb_buffering=0, set it to 1 for compatibility
+    if(nb_buffering==0) {
+        this->nb_buffering=1;
+        nbBufferingCompatible=false;
+    } else {
+        this->nb_buffering=nb_buffering;
+        nbBufferingCompatible=true;
+    }
+ 
   
   connectionLayout()->addDataRemote(this);
@@ -37,6 +46,9 @@
   setRefreshRate->setEnabled(auto_refresh);
   
-  menu->addSeparator();
-  setNbBuffering = menu->addAction(QString("set nb buffering (%1)").arg(nb_buffering));
+  //flair programs without nb buffering have nb_buffering=0
+  if(nbBufferingCompatible) {
+      menu->addSeparator();
+      setNbBuffering = menu->addAction(QString("set nb buffering (%1)").arg(nb_buffering));
+  }
   
 /*  menu->addSeparator();
@@ -52,5 +64,6 @@
 
   action = menu->exec(point);
-
+    if(action==NULL) return action;//setNbBuffering can also be null if in compatibility mode
+    
   if (action == SetAutoRefresh) {
     SendPeriod(RefreshRate_ms(), SetAutoRefresh->isChecked());
@@ -113,5 +126,6 @@
 void DataRemote::XmlSetup(QDomElement *dom) {
   refresh_rate = dom->attribute("period").toUShort() / 1000.;
-  nb_buffering = dom->attribute("nb_buf").toUShort();
+  if(nbBufferingCompatible) nb_buffering = dom->attribute("nb_buf").toUShort();
+  
   if (dom->attribute("enabled") == "1")
     auto_refresh = true;
Index: trunk/tools/FlairGCS/src/DataRemote.h
===================================================================
--- trunk/tools/FlairGCS/src/DataRemote.h	(revision 454)
+++ trunk/tools/FlairGCS/src/DataRemote.h	(revision 455)
@@ -38,4 +38,5 @@
   uint16_t nb_buffering;
   QAction *SetAutoRefresh, *setRefreshRate,*setNbBuffering;
+  bool nbBufferingCompatible;
   //QAction **log;//todo implement this feature (log directly in gcs, in case of uav program crash)
 };
Index: trunk/tools/FlairGCS/src/Layout.cpp
===================================================================
--- trunk/tools/FlairGCS/src/Layout.cpp	(revision 454)
+++ trunk/tools/FlairGCS/src/Layout.cpp	(revision 455)
@@ -160,8 +160,9 @@
     uint16_t period = dom->attribute("period").toUShort();
     uint16_t nb_buffering = dom->attribute("nb_buf").toUShort();
+    if(period==0) period=100;
     if (enabled == 1) {
       widget = new DataPlot1D(this, row, col, name, ymin, ymax, true, period,nb_buffering);
     } else {
-      widget = new DataPlot1D(this, row, col, name, ymin, ymax, false, 100,nb_buffering);
+      widget = new DataPlot1D(this, row, col, name, ymin, ymax, false, period,nb_buffering);
     }
   }
@@ -176,4 +177,5 @@
     uint16_t period = dom->attribute("period").toUShort();
     uint16_t nb_buffering = dom->attribute("nb_buf").toUShort();
+    if(period==0) period=100;
     if (enabled == 1) {
       widget = new DataPlot2D(this, row, col, name, x_name, y_name, xmin, xmax,
@@ -181,5 +183,5 @@
     } else {
       widget = new DataPlot2D(this, row, col, name, x_name, y_name, xmin, xmax,
-                              ymin, ymax, false, 100,nb_buffering);
+                              ymin, ymax, false, period,nb_buffering);
     }
   }
@@ -192,4 +194,5 @@
     QString type = dom->attribute("type");
     int samples = dom->attribute("samples").toInt();
+    if(period==0) period=100;
     if (enabled == 1) {
       widget = new UsSensorPlot(this, row, col, name, y_name,
@@ -197,5 +200,5 @@
     } else {
       widget = new UsSensorPlot(this, row, col, name,  y_name,
-                              ymin, ymax, samples,type,false, 100);
+                              ymin, ymax, samples,type,false, period);
     }
   }
@@ -220,4 +223,5 @@
       invert_axis_bool = true;
     }
+    if(period==0) period=100;
     if (enabled == 1) {
       widget =
@@ -229,5 +233,5 @@
           new RangeFinderPlot(this, row, col, name, x_name, y_name, xmin, xmax,
                               ymin, ymax, start_angle, end_angle, nb_samples,
-                              data_type, invert_axis, false, 100);
+                              data_type, invert_axis, false, period);
     }
   }
@@ -237,4 +241,5 @@
     int enabled = dom->attribute("enabled").toInt();
     uint16_t period = dom->attribute("period").toUShort();
+    if(period==0) period=100;
     if (enabled == 1) {
       widget = new Picture(this, row, col, name, width, height, true, period);
@@ -257,5 +262,5 @@
       i++;
     }
-
+    if(period==0) period=100;
     if (enabled == 1) {
       widget = new Map(this, row, col, name, coordinates, true, period);
