Index: /trunk/tools/Controller/DualShock3/CMakeLists.txt
===================================================================
--- /trunk/tools/Controller/DualShock3/CMakeLists.txt	(revision 303)
+++ /trunk/tools/Controller/DualShock3/CMakeLists.txt	(revision 304)
@@ -14,5 +14,5 @@
 )
 
-FLAIR_NRT_TOOL(${PROJECT_NAME} "${SRC_FILES}")
+FLAIR_NRT_TOOL(${PROJECT_NAME} "${SRC_FILES}" COPY_RESOURCES)
 
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} bluetooth usb)
Index: /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3.sh
===================================================================
--- /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3.sh	(revision 304)
+++ /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3.sh	(revision 304)
@@ -0,0 +1,23 @@
+#! /bin/bash
+#ARCH_DIR=$(uname -m)
+ARCH_DIR=core2-64
+#on kernel >=4.13, ds3 is seen as a mouse
+#search every ds3 connected and disable them
+for id in `xinput --list|grep 'Sony PLAYSTATION(R)3 Controller'|perl -ne 'while (m/id=(\d+)/g){print "$1\n";}'`; do
+    xinput set-prop $id 'Device Enabled' 0
+done 
+
+#This script is the only one that calls itself with sudo.
+#As a consequence, only one exception is needed in sudoers (the following 2 lines)
+#  Defaults!/opt/flair/flair-bin/tools/scripts/dualshock3.sh setenv
+#  uav ALL=(root) /opt/flair/flair-bin/tools/scripts/dualshock3.sh
+
+#we must run as root
+if [ $EUID -ne 0 ]; then
+  exec sudo -E $0 $*
+fi
+
+. ${FLAIR_ROOT}/flair-bin/tools/scripts/ubuntu_cgroup_hack.sh
+
+export LD_LIBRARY_PATH="${OECORE_HOST_SYSROOT}/usr/lib:${OECORE_HOST_SYSROOT}/lib"
+${FLAIR_ROOT}/flair-bin/tools/$ARCH_DIR/dualshock3 $*
Index: /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3.xml
===================================================================
--- /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3.xml	(revision 304)
+++ /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3.xml	(revision 304)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<root name="Manager">
+  <TabWidget name="Main_TabWidget">
+    <Tab name="dualshock3">
+      <TabWidget name="dualshock3">
+        <Tab name="Settings">
+          <GroupBox name="DualShock3">
+            <SpinBox name="dead zone:" value="8" />
+            <Label name="battery charge level" />
+            <CheckBox name="enabled" value="1" />
+          </GroupBox>
+        </Tab>
+        <Tab name="Measures">
+          <DataPlot1D name="left stick x-axis" period="100"
+          enabled="1" />
+          <DataPlot1D name="left stick y-axis" period="100"
+          enabled="1" />
+          <DataPlot1D name="right stick x-axis" period="100"
+          enabled="1" />
+          <DataPlot1D name="right stick y-axis" period="100"
+          enabled="1" />
+        </Tab>
+      </TabWidget>
+    </Tab>
+  </TabWidget>
+  <TabWidget name="App_TabWidget">
+    <Tab name="dualshock3">
+      <PushButton name="save config on target" value="1" />
+    </Tab>
+  </TabWidget>
+</root>
Index: /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_bt.sh
===================================================================
--- /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_bt.sh	(revision 304)
+++ /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_bt.sh	(revision 304)
@@ -0,0 +1,11 @@
+#! /bin/bash
+ARCH_DIR=$(uname -m)
+
+# $1 is the drone ip
+if [ "$#" -ne 1 ] ; then
+  echo "Usage: $0 drone_ip_address"
+  exit 1
+fi
+
+${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3.sh -a ${1}:20000 -x ${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3.xml
+
Index: /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_local_bt.sh
===================================================================
--- /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_local_bt.sh	(revision 304)
+++ /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_local_bt.sh	(revision 304)
@@ -0,0 +1,2 @@
+#! /bin/bash
+${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3_bt.sh 127.0.0.1
Index: /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_local_usb.sh
===================================================================
--- /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_local_usb.sh	(revision 304)
+++ /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_local_usb.sh	(revision 304)
@@ -0,0 +1,2 @@
+#! /bin/bash
+${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3_usb.sh 127.0.0.1 $*
Index: /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_usb.sh
===================================================================
--- /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_usb.sh	(revision 304)
+++ /trunk/tools/Controller/DualShock3/resources/core2-64/dualshock3_usb.sh	(revision 304)
@@ -0,0 +1,17 @@
+#! /bin/bash
+ARCH_DIR=$(uname -m)
+
+# $1 is the drone ip
+if [ "$#" -gt 2 ] ; then
+  echo "Usage: $0 drone_ip_address (drone_port, default 20000)"
+  exit 1
+fi
+
+# use default port
+PORT=${2}
+if [ "$#" -eq 1 ] ; then
+  PORT="20000"
+fi
+
+$FLAIR_ROOT/flair-bin/tools/scripts/dualshock3.sh -a ${1}:$PORT -c usb -t 100 -x ${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3.xml
+
