Index: trunk/lib/FlairCore/CMakeLists.txt
===================================================================
--- trunk/lib/FlairCore/CMakeLists.txt	(revision 215)
+++ trunk/lib/FlairCore/CMakeLists.txt	(revision 216)
@@ -23,4 +23,5 @@
 	${LIBXML2_INCLUDE_DIR}
 	${CMAKE_SYSROOT}/usr/include/opencv1
+    ${CMAKE_SYSROOT}/usr/include/opencv/
 	${CMAKE_SYSROOT}/usr/include/udt
 	${CMAKE_CURRENT_SOURCE_DIR}/src
Index: trunk/lib/FlairCore/src/Unix_I2cPort.cpp
===================================================================
--- trunk/lib/FlairCore/src/Unix_I2cPort.cpp	(revision 215)
+++ trunk/lib/FlairCore/src/Unix_I2cPort.cpp	(revision 216)
@@ -49,5 +49,5 @@
   int err = ioctl(fd, I2C_SLAVE_FORCE, address);
   if (err < 0) {
-    Err("Failed to set slave address\n");
+    Err("Failed to set slave address (0x%x)\n",address);
   }
 
Index: trunk/lib/FlairFilter/CMakeLists.txt
===================================================================
--- trunk/lib/FlairFilter/CMakeLists.txt	(revision 215)
+++ trunk/lib/FlairFilter/CMakeLists.txt	(revision 216)
@@ -25,4 +25,5 @@
 	${CMAKE_CURRENT_SOURCE_DIR}/src/
 	${CMAKE_SYSROOT}/usr/include/opencv1
+    ${CMAKE_SYSROOT}/usr/include/opencv
 	${CMAKE_SYSROOT}/usr/include/iir
 )
Index: trunk/lib/FlairFilter/src/ControlLaw.h
===================================================================
--- trunk/lib/FlairFilter/src/ControlLaw.h	(revision 215)
+++ trunk/lib/FlairFilter/src/ControlLaw.h	(revision 216)
@@ -88,5 +88,5 @@
   * \brief Reset the internal state of the control law
   *
-  * Doesn't do anything by default
+  * Does nothing by default
   *
   */
Index: trunk/lib/FlairFilter/src/PidThrust.cpp
===================================================================
--- trunk/lib/FlairFilter/src/PidThrust.cpp	(revision 215)
+++ trunk/lib/FlairFilter/src/PidThrust.cpp	(revision 216)
@@ -43,7 +43,15 @@
 }
 
+void PidThrust::Reset(void) {
+  ResetI();
+  SetDefaultOffset();
+  SetValues(0,0);
+}
+
 void PidThrust::ResetI(void) { pimpl_->i = 0; }
 
-float PidThrust::GetOffset(void) { return pimpl_->offset_g; }
+float PidThrust::GetOffset(void) const { return pimpl_->offset_g; }
+
+float PidThrust::GetIntegral(void) const { return pimpl_->i; }
 
 void PidThrust::UpdateFrom(const io_data *data) {
Index: trunk/lib/FlairFilter/src/PidThrust.h
===================================================================
--- trunk/lib/FlairFilter/src/PidThrust.h	(revision 215)
+++ trunk/lib/FlairFilter/src/PidThrust.h	(revision 216)
@@ -55,4 +55,14 @@
 
   /*!
+  * \brief Reset the control law
+  * equivalent to:
+  * ResetI();
+  * SetDefaultOffset();
+  * SetValues(0,0);
+  * 
+  */
+  void Reset(void);
+  
+  /*!
   * \brief Reset integral to 0
   *
@@ -78,5 +88,12 @@
   * \return current offset
   */
-  float GetOffset(void);
+  float GetOffset(void) const;
+  
+  /*!
+  * \brief Get intergral part
+  *
+  * \return current integral part
+  */
+  float GetIntegral(void) const;
 
   /*!
Index: trunk/lib/FlairMeta/CMakeLists.txt
===================================================================
--- trunk/lib/FlairMeta/CMakeLists.txt	(revision 215)
+++ trunk/lib/FlairMeta/CMakeLists.txt	(revision 216)
@@ -26,4 +26,5 @@
 	${CMAKE_CURRENT_SOURCE_DIR}/src/
 	${CMAKE_SYSROOT}/usr/include/opencv1
+    ${CMAKE_SYSROOT}/usr/include/opencv
 )
 
Index: trunk/lib/FlairMeta/src/UavStateMachine.cpp
===================================================================
--- trunk/lib/FlairMeta/src/UavStateMachine.cpp	(revision 215)
+++ trunk/lib/FlairMeta/src/UavStateMachine.cpp	(revision 216)
@@ -90,6 +90,6 @@
   uZ->AddDeviceToLog(uYaw);
 
-    joy=new MetaDualShock3("uav high level controller",controller);
-    uav->GetAhrs()->AddPlot(joy->GetReferenceOrientation(),DataPlot::Blue);
+  joy=new MetaDualShock3("uav high level controller",controller);
+  uav->GetAhrs()->AddPlot(joy->GetReferenceOrientation(),DataPlot::Blue);
 
   altitudeMode = AltitudeMode_t::Manual;
@@ -484,6 +484,8 @@
     joy->SetZRef(0);
 
-    uZ->SetDefaultOffset(); // positionne l'offset de compensation de la gravité à sa
-                     // valeur initiale (station sol)
+    uZ->Reset();
+    uRoll->Reset();
+    uPitch->Reset();
+    uYaw->Reset();
 
     uav->GetUavMultiplex()->LockUserInterface();
@@ -569,6 +571,8 @@
   uav->GetAhrs()->UnlockUserInterface();
 
-  uZ->SetValues(0, 0);
   uZ->Reset();
+  uRoll->Reset();
+  uPitch->Reset();
+  uYaw->Reset();
 }
 
Index: trunk/lib/FlairSensorActuator/CMakeLists.txt
===================================================================
--- trunk/lib/FlairSensorActuator/CMakeLists.txt	(revision 215)
+++ trunk/lib/FlairSensorActuator/CMakeLists.txt	(revision 216)
@@ -25,4 +25,5 @@
 	${CMAKE_CURRENT_SOURCE_DIR}/../FlairVisionFilter/src
 	${CMAKE_SYSROOT}/usr/include/opencv1
+    ${CMAKE_SYSROOT}/usr/include/opencv
 	${CMAKE_SYSROOT}/usr/include/vrpn
 )
Index: trunk/lib/FlairSensorActuator/src/NmeaGps.cpp
===================================================================
--- trunk/lib/FlairSensorActuator/src/NmeaGps.cpp	(revision 215)
+++ trunk/lib/FlairSensorActuator/src/NmeaGps.cpp	(revision 216)
@@ -174,13 +174,16 @@
 
 void NmeaGps::parseFrame(const char *frame, int frame_size) {
-
+  //avoid unrecognized nmea sentence (when no satelites
+  if(strncmp(frame,"$GNGGA,,",8)==0) return;
+  if(strncmp(frame,"$GNVTG,,",8)==0) return;
+  if(strstr(frame,",,,,,")!=NULL) return;
+  
   int result;
   result = nmea_parse(&parser, frame, frame_size, &info);
-  
   if (result != 1) {
     Warn("unrecognized nmea sentence: %s\n",frame);
     return;
   }
-
+  
   result = nmea_parse_GPGGA(frame, frame_size, &pack);
 
Index: trunk/lib/FlairSensorActuator/src/PressureSensor.cpp
===================================================================
--- trunk/lib/FlairSensorActuator/src/PressureSensor.cpp	(revision 215)
+++ trunk/lib/FlairSensorActuator/src/PressureSensor.cpp	(revision 216)
@@ -79,5 +79,5 @@
 
   plot_tab = new Tab(tab, "Mesures");
-  plot = new DataPlot1D(plot_tab->NewRow(), ObjectName(), 0, 2);
+  plot = new DataPlot1D(plot_tab->NewRow(), ObjectName(), 101000, 101500);
   plot->AddCurve(output->Element(0));
 }
Index: trunk/lib/FlairSensorActuator/src/PressureSensor.h
===================================================================
--- trunk/lib/FlairSensorActuator/src/PressureSensor.h	(revision 215)
+++ trunk/lib/FlairSensorActuator/src/PressureSensor.h	(revision 216)
@@ -109,5 +109,5 @@
   * \brief Value
   *
-  * \return output value
+  * \return output value in pascal
   */
   float Value(void) const;
Index: trunk/lib/FlairSimulator/CMakeLists.txt
===================================================================
--- trunk/lib/FlairSimulator/CMakeLists.txt	(revision 215)
+++ trunk/lib/FlairSimulator/CMakeLists.txt	(revision 216)
@@ -26,4 +26,5 @@
 	${CMAKE_SYSROOT}/usr/include/vrpn
 	${CMAKE_SYSROOT}/usr/include/opencv1
+    ${CMAKE_SYSROOT}/usr/include/opencv
 	${CMAKE_SYSROOT}/usr/include/irrlicht
 )
Index: trunk/lib/FlairVisionFilter/CMakeLists.txt
===================================================================
--- trunk/lib/FlairVisionFilter/CMakeLists.txt	(revision 215)
+++ trunk/lib/FlairVisionFilter/CMakeLists.txt	(revision 216)
@@ -24,4 +24,5 @@
 	$ENV{FLAIR_ROOT}/flair-src/lib/FlairCore/src
 	${CMAKE_SYSROOT}/usr/include/opencv1
+    ${CMAKE_SYSROOT}/usr/include/opencv
 )
 
