Index: /trunk/ReleaseNotes
===================================================================
--- /trunk/ReleaseNotes	(revision 313)
+++ /trunk/ReleaseNotes	(revision 314)
@@ -3,4 +3,6 @@
 - new build system, now out of source; binaries are no longer provided in repositories
 - corrected a bug with vrpn delta time calculation
+- const TargetController *UavStateMachine::GetJoystick as been replaced by const TargetController *UavStateMachine::GetTargetController
+- new method MetaDualShock3 *UavStateMachine::GetJoystick
 
 
Index: /trunk/demos/CircleFollower/uav/src/CircleFollower.cpp
===================================================================
--- /trunk/demos/CircleFollower/uav/src/CircleFollower.cpp	(revision 313)
+++ /trunk/demos/CircleFollower/uav/src/CircleFollower.cpp	(revision 314)
@@ -19,5 +19,4 @@
 #include <DataPlot1D.h>
 #include <DataPlot2D.h>
-#include <MetaDualShock3.h>
 #include <FrameworkManager.h>
 #include <VrpnClient.h>
@@ -230,15 +229,15 @@
 void CircleFollower::ExtraCheckJoystick(void) {
     //R1 and Circle
-    if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(4) && (behaviourMode!=BehaviourMode_t::Circle)) {
+    if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(4) && (behaviourMode!=BehaviourMode_t::Circle)) {
         StartCircle();
     }
 
     //R1 and Cross
-    if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) {
+    if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) {
         StopCircle();
     }
     
     //R1 and Square
-    if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {
+    if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {
         VrpnPositionHold();
     }
Index: /trunk/demos/CircleFollower/uav/src/main.cpp
===================================================================
--- /trunk/demos/CircleFollower/uav/src/main.cpp	(revision 313)
+++ /trunk/demos/CircleFollower/uav/src/main.cpp	(revision 314)
@@ -18,5 +18,4 @@
 #include <tclap/CmdLine.h>
 #include <TargetEthController.h>
-//#include <VisionFilter.h>
 
 using namespace TCLAP;
Index: /trunk/demos/Gps/uav/src/DemoGps.cpp
===================================================================
--- /trunk/demos/Gps/uav/src/DemoGps.cpp	(revision 313)
+++ /trunk/demos/Gps/uav/src/DemoGps.cpp	(revision 314)
@@ -163,5 +163,5 @@
 void DemoGps::ExtraCheckJoystick(void) {
   // R1 and Circle
-  if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(4) &&
+  if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(4) &&
      (behaviourMode != BehaviourMode_t::Circle)) {
     StartCircle();
@@ -169,5 +169,5 @@
 
   // R1 and Cross
-  if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(5) &&
+  if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(5) &&
      (behaviourMode == BehaviourMode_t::Circle)) {
     StopCircle();
Index: /trunk/demos/MixedReality/real/uav/src/CircleFollower.cpp
===================================================================
--- /trunk/demos/MixedReality/real/uav/src/CircleFollower.cpp	(revision 313)
+++ /trunk/demos/MixedReality/real/uav/src/CircleFollower.cpp	(revision 314)
@@ -222,15 +222,15 @@
 void CircleFollower::ExtraCheckJoystick(void) {
     //R1 and Circle
-    if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(4) && (behaviourMode!=BehaviourMode_t::Circle)) {
+    if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(4) && (behaviourMode!=BehaviourMode_t::Circle)) {
         StartCircle();
     }
 
     //R1 and Cross
-    if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) {
+    if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(5) && (behaviourMode==BehaviourMode_t::Circle)) {
         StopCircle();
     }
     
     //R1 and Square
-    if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {
+    if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {
         VrpnPositionHold();
     }
Index: /trunk/demos/MixedReality/virtual/uav/src/App.cpp
===================================================================
--- /trunk/demos/MixedReality/virtual/uav/src/App.cpp	(revision 313)
+++ /trunk/demos/MixedReality/virtual/uav/src/App.cpp	(revision 314)
@@ -169,5 +169,5 @@
 void App::ExtraCheckJoystick(void) {
     //R1 and Square
-    if(GetJoystick()->IsButtonPressed(9) && GetJoystick()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {
+    if(GetTargetController()->IsButtonPressed(9) && GetTargetController()->IsButtonPressed(2) && (behaviourMode==BehaviourMode_t::Default)) {
         VrpnPositionHold();
     }
Index: /trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp
===================================================================
--- /trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp	(revision 313)
+++ /trunk/demos/OpticalFlow/uav/src/DemoOpticalFlow.cpp	(revision 314)
@@ -102,5 +102,5 @@
   u_y->UseDefaultPlot(graphLawTab->LastRowLastCol());
 
-  opticalFlowGroupBox=new GroupBox(GetJoystick()->GetTab()->NewRow(),"consignes fo");
+  opticalFlowGroupBox=new GroupBox(GetTargetController()->GetTab()->NewRow(),"consignes fo");
   maxXSpeed=new DoubleSpinBox(opticalFlowGroupBox->NewRow(),"debattement x"," m/s",-5,5,0.1,1);
   maxYSpeed=new DoubleSpinBox(opticalFlowGroupBox->LastRowLastCol(),"debattement y"," m/s",-5,5,0.1,1);
@@ -131,6 +131,6 @@
     switch(event) {
     case Event_t::EnteringControlLoop:
-        opticalFlowReference->SetValue(0,0,GetJoystick()->GetAxisValue(1)*maxXSpeed->Value());//joy axis 0 maps to x displacement
-        opticalFlowReference->SetValue(1,0,GetJoystick()->GetAxisValue(0)*maxYSpeed->Value());//joy axis 1 maps to y displacement
+        opticalFlowReference->SetValue(0,0,GetTargetController()->GetAxisValue(1)*maxXSpeed->Value());//joy axis 0 maps to x displacement
+        opticalFlowReference->SetValue(1,0,GetTargetController()->GetAxisValue(0)*maxYSpeed->Value());//joy axis 1 maps to y displacement
         float focal=271.76;
         float z,dz;
@@ -164,5 +164,5 @@
     static bool wasOpticalFlowModeButtonPressed=false;
     // controller button R1 enters optical flow mode
-    if(GetJoystick()->IsButtonPressed(9)) { // R1
+    if(GetTargetController()->IsButtonPressed(9)) { // R1
         if (!wasOpticalFlowModeButtonPressed) {
             wasOpticalFlowModeButtonPressed=true;
Index: /trunk/demos/PidStandalone/uav/src/PidUav.cpp
===================================================================
--- /trunk/demos/PidStandalone/uav/src/PidUav.cpp	(revision 313)
+++ /trunk/demos/PidStandalone/uav/src/PidUav.cpp	(revision 314)
@@ -91,5 +91,5 @@
   static bool wasOscillatingModeButtonPressed = false;
   // controller button R1 enters optical flow mode
-  if (GetJoystick()->IsButtonPressed(9)) { // R1
+  if (GetTargetController()->IsButtonPressed(9)) { // R1
     if (!wasOscillatingModeButtonPressed) {
       wasOscillatingModeButtonPressed = true;
Index: /trunk/demos/Skeletons/CustomReferenceAngles/src/MyApp.cpp
===================================================================
--- /trunk/demos/Skeletons/CustomReferenceAngles/src/MyApp.cpp	(revision 313)
+++ /trunk/demos/Skeletons/CustomReferenceAngles/src/MyApp.cpp	(revision 314)
@@ -83,5 +83,5 @@
 void MyApp::ExtraCheckJoystick(void) {
     //R1
-    if(GetJoystick()->IsButtonPressed(9) && (behaviourMode!=BehaviourMode_t::CustomReferenceAngles)) {
+    if(GetTargetController()->IsButtonPressed(9) && (behaviourMode!=BehaviourMode_t::CustomReferenceAngles)) {
         StartCustomAngles();
     }
Index: /trunk/demos/Skeletons/CustomTorques/src/MyApp.cpp
===================================================================
--- /trunk/demos/Skeletons/CustomTorques/src/MyApp.cpp	(revision 313)
+++ /trunk/demos/Skeletons/CustomTorques/src/MyApp.cpp	(revision 314)
@@ -70,5 +70,5 @@
 void MyApp::ExtraCheckJoystick(void) {
     //R1
-    if(GetJoystick()->IsButtonPressed(9) && (behaviourMode!=BehaviourMode_t::CustomTorques)) {
+    if(GetTargetController()->IsButtonPressed(9) && (behaviourMode!=BehaviourMode_t::CustomTorques)) {
         StartCustomTorques();
     }
