From 97d7101d25eac657ecd9bd3a1e8b4e58026e6d47 Mon Sep 17 00:00:00 2001
From: beuchatp <beuchatp@control.ee.ethz.ch>
Date: Sun, 9 Dec 2018 16:36:18 +0100
Subject: [PATCH] Small adjusts to flying agent GUI, layout and button naming

---
 .../GUI_Qt/flyingAgentGUI/flyingAgentGUI.pro  |   3 +-
 .../forms/connectstartstopbar.ui              |  16 +-
 .../flyingAgentGUI/forms/coordinatorrow.ui    |   5 +-
 .../forms/enablecontrollerloadyamlbar.ui      |  55 +++--
 .../GUI_Qt/flyingAgentGUI/forms/mainwindow.ui |  32 ++-
 .../include/Constants_for_Qt_compile.h        | 229 ++++++++++++++++++
 .../include/connectstartstopbar.h             |   5 +
 .../flyingAgentGUI/include/coordinatorrow.h   |   5 +
 .../include/enablecontrollerloadyamlbar.h     |   5 +
 .../flyingAgentGUI/include/mainwindow.h       |   4 +
 .../src/connectstartstopbar.cpp               |   6 +-
 11 files changed, 327 insertions(+), 38 deletions(-)
 create mode 100644 pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/Constants_for_Qt_compile.h

diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/flyingAgentGUI.pro b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/flyingAgentGUI.pro
index 07c4fbce..dba7e186 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/flyingAgentGUI.pro
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/flyingAgentGUI.pro
@@ -39,7 +39,8 @@ HEADERS  += include/mainwindow.h \
     include/coordinatorrow.h \
     include/studentcontrollertab.h \
     include/defaultcontrollertab.h \
-    include/pickercontrollertab.h
+    include/pickercontrollertab.h \
+    include/Constants_for_Qt_compile.h
 
 FORMS    += forms/mainwindow.ui \
     forms/topbanner.ui \
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/connectstartstopbar.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/connectstartstopbar.ui
index c08c3341..c2e783df 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/connectstartstopbar.ui
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/connectstartstopbar.ui
@@ -22,19 +22,19 @@
    <item row="0" column="0">
     <layout class="QHBoxLayout" name="horizontalLayout">
      <property name="spacing">
-      <number>6</number>
+      <number>12</number>
      </property>
      <property name="leftMargin">
       <number>6</number>
      </property>
      <property name="topMargin">
-      <number>6</number>
+      <number>0</number>
      </property>
      <property name="rightMargin">
       <number>6</number>
      </property>
      <property name="bottomMargin">
-      <number>6</number>
+      <number>0</number>
      </property>
      <item>
       <widget class="QPushButton" name="rf_disconnect_button">
@@ -113,6 +113,9 @@
      </item>
      <item>
       <widget class="QLineEdit" name="battery_voltage_lineEdit">
+       <property name="enabled">
+        <bool>true</bool>
+       </property>
        <property name="sizePolicy">
         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
          <horstretch>0</horstretch>
@@ -144,6 +147,9 @@
        <property name="alignment">
         <set>Qt::AlignCenter</set>
        </property>
+       <property name="readOnly">
+        <bool>true</bool>
+       </property>
       </widget>
      </item>
      <item>
@@ -172,7 +178,7 @@
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="take_off_button">
+      <widget class="QPushButton" name="enable_flying_button">
        <property name="sizePolicy">
         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
          <horstretch>0</horstretch>
@@ -197,7 +203,7 @@
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="land_button">
+      <widget class="QPushButton" name="disable_flying_button">
        <property name="sizePolicy">
         <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
          <horstretch>0</horstretch>
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinatorrow.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinatorrow.ui
index 06003ef3..ffb245eb 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinatorrow.ui
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinatorrow.ui
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>660</width>
+    <width>740</width>
     <height>45</height>
    </rect>
   </property>
@@ -193,6 +193,9 @@
      <property name="text">
       <string>-.-- V</string>
      </property>
+     <property name="readOnly">
+      <bool>true</bool>
+     </property>
     </widget>
    </item>
    <item>
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui
index 80d40b20..704e95ab 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui
@@ -27,6 +27,9 @@
   <layout class="QGridLayout" name="gridLayout_2">
    <item row="0" column="0">
     <layout class="QGridLayout" name="gridLayout_3">
+     <property name="spacing">
+      <number>12</number>
+     </property>
      <item row="0" column="4">
       <widget class="QPushButton" name="enable_safe_button">
        <property name="sizePolicy">
@@ -38,13 +41,13 @@
        <property name="minimumSize">
         <size>
          <width>60</width>
-         <height>40</height>
+         <height>70</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
          <width>180</width>
-         <height>40</height>
+         <height>70</height>
         </size>
        </property>
        <property name="font">
@@ -61,21 +64,21 @@
      <item row="0" column="0">
       <widget class="QLabel" name="enable_controller_label">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+        <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>60</width>
-         <height>20</height>
+         <width>0</width>
+         <height>70</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>180</width>
-         <height>20</height>
+         <width>16777215</width>
+         <height>70</height>
         </size>
        </property>
        <property name="font">
@@ -103,13 +106,13 @@
        <property name="minimumSize">
         <size>
          <width>60</width>
-         <height>40</height>
+         <height>70</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
          <width>180</width>
-         <height>40</height>
+         <height>70</height>
         </size>
        </property>
        <property name="font">
@@ -126,21 +129,21 @@
      <item row="1" column="0">
       <widget class="QLabel" name="load_yaml_label">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+        <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>60</width>
-         <height>20</height>
+         <width>0</width>
+         <height>50</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>180</width>
-         <height>20</height>
+         <width>16777215</width>
+         <height>50</height>
         </size>
        </property>
        <property name="font">
@@ -168,13 +171,13 @@
        <property name="minimumSize">
         <size>
          <width>60</width>
-         <height>40</height>
+         <height>50</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
          <width>180</width>
-         <height>40</height>
+         <height>50</height>
         </size>
        </property>
        <property name="text">
@@ -193,13 +196,13 @@
        <property name="minimumSize">
         <size>
          <width>60</width>
-         <height>40</height>
+         <height>50</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
          <width>180</width>
-         <height>40</height>
+         <height>50</height>
         </size>
        </property>
        <property name="text">
@@ -218,13 +221,13 @@
        <property name="minimumSize">
         <size>
          <width>60</width>
-         <height>40</height>
+         <height>50</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
          <width>180</width>
-         <height>40</height>
+         <height>50</height>
         </size>
        </property>
        <property name="text">
@@ -243,13 +246,13 @@
        <property name="minimumSize">
         <size>
          <width>60</width>
-         <height>40</height>
+         <height>70</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
          <width>180</width>
-         <height>40</height>
+         <height>70</height>
         </size>
        </property>
        <property name="font">
@@ -274,13 +277,13 @@
        <property name="minimumSize">
         <size>
          <width>60</width>
-         <height>40</height>
+         <height>70</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
          <width>180</width>
-         <height>40</height>
+         <height>70</height>
         </size>
        </property>
        <property name="font">
@@ -305,13 +308,13 @@
        <property name="minimumSize">
         <size>
          <width>60</width>
-         <height>40</height>
+         <height>50</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
          <width>180</width>
-         <height>40</height>
+         <height>50</height>
         </size>
        </property>
        <property name="text">
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui
index a3018633..28300e78 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui
@@ -73,20 +73,44 @@
         </property>
         <item>
          <widget class="TopBanner" name="customWidget_topBanner" native="true">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>0</height>
+           </size>
+          </property>
           <property name="maximumSize">
            <size>
             <width>16777215</width>
-            <height>100</height>
+            <height>16777215</height>
            </size>
           </property>
          </widget>
         </item>
         <item>
          <widget class="ConnectStartStopBar" name="customWidget_connectStartStopBar" native="true">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>0</height>
+           </size>
+          </property>
           <property name="maximumSize">
            <size>
             <width>16777215</width>
-            <height>80</height>
+            <height>16777215</height>
            </size>
           </property>
          </widget>
@@ -97,7 +121,7 @@
            <bool>true</bool>
           </property>
           <property name="sizePolicy">
-           <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+           <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
             <horstretch>0</horstretch>
             <verstretch>0</verstretch>
            </sizepolicy>
@@ -111,7 +135,7 @@
           <property name="maximumSize">
            <size>
             <width>16777215</width>
-            <height>100</height>
+            <height>16777215</height>
            </size>
           </property>
          </widget>
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/Constants_for_Qt_compile.h b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/Constants_for_Qt_compile.h
new file mode 100644
index 00000000..ac3ecb91
--- /dev/null
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/Constants_for_Qt_compile.h
@@ -0,0 +1,229 @@
+//    Copyright (C) 2017, ETH Zurich, D-ITET, Paul Beuchat
+//
+//    This file is part of D-FaLL-System.
+//    
+//    D-FaLL-System is free software: you can redistribute it and/or modify
+//    it under the terms of the GNU General Public License as published by
+//    the Free Software Foundation, either version 3 of the License, or
+//    (at your option) any later version.
+//    
+//    D-FaLL-System is distributed in the hope that it will be useful,
+//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//    GNU General Public License for more details.
+//    
+//    You should have received a copy of the GNU General Public License
+//    along with D-FaLL-System.  If not, see <http://www.gnu.org/licenses/>.
+//    
+//
+//    ----------------------------------------------------------------------------------
+//    DDDD        FFFFF        L     L           SSSS  Y   Y   SSSS  TTTTT  EEEEE  M   M
+//    D   D       F      aaa   L     L          S       Y Y   S        T    E      MM MM
+//    D   D  ---  FFFF  a   a  L     L     ---   SSS     Y     SSS     T    EEE    M M M
+//    D   D       F     a  aa  L     L              S    Y        S    T    E      M   M
+//    DDDD        F      aa a  LLLL  LLLL       SSSS     Y    SSSS     T    EEEEE  M   M
+//
+//
+//    DESCRIPTION:
+//    Constants that are used across multiple files
+//
+//    ----------------------------------------------------------------------------------
+
+
+//    ----------------------------------------------------------------------------------
+//    U   U
+//    U   U
+//    U   U
+//    U   U
+//     UUU
+//    ----------------------------------------------------------------------------------
+
+
+// Conversions between degrees and radians
+#define RAD2DEG 180.0/PI
+#define DEG2RAD PI/180.0
+
+// PI
+#define PI 3.141592653589
+
+
+
+
+// Types PPS firmware
+#define CF_COMMAND_TYPE_MOTORS 6
+#define CF_COMMAND_TYPE_RATE   7
+#define CF_COMMAND_TYPE_ANGLE  8
+
+// Types of controllers being used:
+#define SAFE_CONTROLLER      1
+#define DEMO_CONTROLLER      2
+#define STUDENT_CONTROLLER   3
+#define MPC_CONTROLLER       4
+#define REMOTE_CONTROLLER    5
+#define TUNING_CONTROLLER    6
+#define PICKER_CONTROLLER    7
+
+// The constants that "command" changes in the
+// operation state of this agent
+#define CMD_USE_SAFE_CONTROLLER      1
+#define CMD_USE_DEMO_CONTROLLER      2
+#define CMD_USE_STUDENT_CONTROLLER   3
+#define CMD_USE_MPC_CONTROLLER       4
+#define CMD_USE_REMOTE_CONTROLLER    5
+#define CMD_USE_TUNING_CONTROLLER    6
+#define CMD_USE_PICKER_CONTROLLER    7
+
+
+#define CMD_CRAZYFLY_TAKE_OFF        11
+#define CMD_CRAZYFLY_LAND            12
+#define CMD_CRAZYFLY_MOTORS_OFF      13
+
+// Flying states
+#define STATE_MOTORS_OFF 1
+#define STATE_TAKE_OFF   2
+#define STATE_FLYING     3
+#define STATE_LAND       4
+
+
+// Commands for CrazyRadio
+#define CMD_RECONNECT  0
+#define CMD_DISCONNECT 1
+
+
+// CrazyRadio states:
+#define CRAZY_RADIO_STATE_CONNECTED      0
+#define CRAZY_RADIO_STATE_CONNECTING     1
+#define CRAZY_RADIO_STATE_DISCONNECTED   2
+
+
+
+
+//    ----------------------------------------------------------------------------------
+//    BBBB     A    TTTTT  TTTTT  EEEEE  RRRR   Y   Y
+//    B   B   A A     T      T    E      R   R   Y Y
+//    BBBB   A   A    T      T    EEE    RRRR     Y
+//    B   B  AAAAA    T      T    E      R   R    Y
+//    BBBB   A   A    T      T    EEEEE  R   R    Y
+//    ----------------------------------------------------------------------------------
+
+// Battery levels
+#define BATTERY_LEVEL_000            0
+#define BATTERY_LEVEL_010            1
+#define BATTERY_LEVEL_020            2
+#define BATTERY_LEVEL_030            3
+#define BATTERY_LEVEL_040            4
+#define BATTERY_LEVEL_050            5
+#define BATTERY_LEVEL_060            6
+#define BATTERY_LEVEL_070            7
+#define BATTERY_LEVEL_080            8
+#define BATTERY_LEVEL_090            9
+#define BATTERY_LEVEL_100           10
+#define BATTERY_LEVEL_UNAVAILABLE   -1
+
+// Battery states
+#define BATTERY_STATE_NORMAL         0
+#define BATTERY_STATE_LOW            1
+
+
+
+
+
+//    ----------------------------------------------------------------------------------
+//    Y   Y    A    M   M  L
+//     Y Y    A A   MM MM  L
+//      Y    A   A  M M M  L
+//      Y    AAAAA  M   M  L
+//      Y    A   A  M   M  LLLLL
+//    ----------------------------------------------------------------------------------
+
+// For where to load the yaml file from
+#define LOAD_YAML_FROM_AGENT             1
+#define LOAD_YAML_FROM_COORDINATOR       2
+
+
+
+
+
+
+// The types, i.e., agent or coordinator
+#define TYPE_INVALID      -1
+#define TYPE_COORDINATOR   1
+#define TYPE_AGENT         2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// OLD STUFF FOR LOADING YAML FILES
+// For which controller parameters to load from file
+#define LOAD_YAML_SAFE_CONTROLLER_AGENT             1
+#define LOAD_YAML_DEMO_CONTROLLER_AGENT             2
+#define LOAD_YAML_STUDENT_CONTROLLER_AGENT          3
+#define LOAD_YAML_MPC_CONTROLLER_AGENT              4
+#define LOAD_YAML_REMOTE_CONTROLLER_AGENT           5
+#define LOAD_YAML_TUNING_CONTROLLER_AGENT           6
+#define LOAD_YAML_PICKER_CONTROLLER_AGENT           7
+
+#define LOAD_YAML_SAFE_CONTROLLER_COORDINATOR       11
+#define LOAD_YAML_DEMO_CONTROLLER_COORDINATOR       12
+#define LOAD_YAML_STUDENT_CONTROLLER_COORDINATOR    13
+#define LOAD_YAML_MPC_CONTROLLER_COORDINATOR        14
+#define LOAD_YAML_REMOTE_CONTROLLER_COORDINATOR     15
+#define LOAD_YAML_TUNING_CONTROLLER_COORDINATOR     16
+#define LOAD_YAML_PICKER_CONTROLLER_COORDINATOR     17
+
+
+// For sending commands to the controller node informing
+// which parameters to fetch
+// > NOTE: these are identical to the #defines above, but
+//         used because they have the name distinguishes
+//         between:
+//         - "loading" a yaml file into ram
+//         - "fetching" the values that were loaded into ram
+#define FETCH_YAML_SAFE_CONTROLLER_FROM_OWN_AGENT      1
+#define FETCH_YAML_DEMO_CONTROLLER_FROM_OWN_AGENT      2
+#define FETCH_YAML_STUDENT_CONTROLLER_FROM_OWN_AGENT   3
+#define FETCH_YAML_MPC_CONTROLLER_FROM_OWN_AGENT       4
+#define FETCH_YAML_REMOTE_CONTROLLER_FROM_OWN_AGENT    5
+#define FETCH_YAML_TUNING_CONTROLLER_FROM_OWN_AGENT    6
+#define FETCH_YAML_PICKER_CONTROLLER_FROM_OWN_AGENT    7
+
+#define FETCH_YAML_SAFE_CONTROLLER_FROM_COORDINATOR      11
+#define FETCH_YAML_DEMO_CONTROLLER_FROM_COORDINATOR      12
+#define FETCH_YAML_STUDENT_CONTROLLER_FROM_COORDINATOR   13
+#define FETCH_YAML_MPC_CONTROLLER_FROM_COORDINATOR       14
+#define FETCH_YAML_REMOTE_CONTROLLER_FROM_COORDINATOR    15
+#define FETCH_YAML_TUNING_CONTROLLER_FROM_COORDINATOR    16
+#define FETCH_YAML_PICKER_CONTROLLER_FROM_COORDINATOR    17
\ No newline at end of file
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/connectstartstopbar.h b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/connectstartstopbar.h
index fbfd8c71..98ce0104 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/connectstartstopbar.h
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/connectstartstopbar.h
@@ -26,6 +26,11 @@
 
 // SPECIFY THE PACKAGE NAMESPACE
 //using namespace d_fall_pps;
+
+#else
+// Include the shared definitions
+#include "include/Constants_for_Qt_compile.h"
+
 #endif
 
 // BATTERY LABEL IMAGE INDEX
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/coordinatorrow.h b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/coordinatorrow.h
index f80eb8ba..f8e8b749 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/coordinatorrow.h
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/coordinatorrow.h
@@ -58,6 +58,11 @@
 
 // SPECIFY THE PACKAGE NAMESPACE
 using namespace d_fall_pps;
+
+#else
+// Include the shared definitions
+#include "include/Constants_for_Qt_compile.h"
+
 #endif
 
 // BATTERY LABEL IMAGE INDEX
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/enablecontrollerloadyamlbar.h b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/enablecontrollerloadyamlbar.h
index b42d1186..5c239d18 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/enablecontrollerloadyamlbar.h
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/enablecontrollerloadyamlbar.h
@@ -25,6 +25,11 @@
 #include "nodes/Constants.h"
 
 // using namespace d_fall_pps;
+
+#else
+// Include the shared definitions
+#include "include/Constants_for_Qt_compile.h"
+
 #endif
 
 
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h
index c9f071fa..baeea54b 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h
@@ -56,6 +56,10 @@
 using namespace d_fall_pps;
 //using namespace std;
 
+#else
+// Include the shared definitions
+#include "include/Constants_for_Qt_compile.h"
+
 #endif
 
 
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/connectstartstopbar.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/connectstartstopbar.cpp
index ab730565..9f699f92 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/connectstartstopbar.cpp
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/connectstartstopbar.cpp
@@ -504,20 +504,24 @@ void ConnectStartStopBar::setFlyingState(int new_flying_state)
 
 void ConnectStartStopBar::on_rf_connect_button_clicked()
 {
+#ifdef CATKIN_MAKE
     d_fall_pps::IntWithHeader msg;
     fillIntMessageHeader(msg);
     msg.data = CMD_RECONNECT;
     this->crazyRadioCommandPublisher.publish(msg);
     ROS_INFO("[ENABLE CONTROLLER LOAD YAML GUI BAR] Enable Safe Controller");
+#endif
 }
 
 void ConnectStartStopBar::on_rf_disconnect_button_clicked()
 {
+#ifdef CATKIN_MAKE
     d_fall_pps::IntWithHeader msg;
     fillIntMessageHeader(msg);
     msg.data = CMD_DISCONNECT;
     this->crazyRadioCommandPublisher.publish(msg);
     ROS_INFO("[ENABLE CONTROLLER LOAD YAML GUI BAR] Enable Safe Controller");
+#endif
 }
 
 void ConnectStartStopBar::on_enable_flying_button_clicked()
@@ -693,4 +697,4 @@ bool ConnectStartStopBar::getTypeAndIDParameters()
     // Return
     return return_was_successful;
 }
-#endif
\ No newline at end of file
+#endif
-- 
GitLab