Commit 908b8212 authored by beuchatp's avatar beuchatp
Browse files

Removed the command all buttons from the System Config GUI. Also removed the...

Removed the command all buttons from the System Config GUI. Also removed the get yaml paramters functions and pointed to the overall class. Needs to be tested for ROS compilation
parent a8b7f464
......@@ -45,7 +45,9 @@ HEADERS += \
include/tablePiece.h \
include/globalDefinitions.h \
include/marker.h \
include/crazyFly.h
include/crazyFly.h \
\
include/constants_for_qt_compile.h
FORMS += \
forms/mainguiwindow.ui
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>1176</width>
<width>1228</width>
<height>1559</height>
</rect>
</property>
......@@ -273,7 +273,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QPushButton" name="all_motors_off_button">
<widget class="QPushButton" name="emergency_stop_button">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
......@@ -300,7 +300,7 @@
</font>
</property>
<property name="text">
<string>All motors OFF</string>
<string>Emergency Stop</string>
</property>
</widget>
</item>
......@@ -870,329 +870,56 @@
</widget>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Command all</string>
<string>Mocap</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="10" column="1">
<widget class="QPushButton" name="all_load_custom_controller_yaml_coordinator_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Load Custom YAML</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QLabel" name="all_yaml_label">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>40</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>LOAD YAML PARAMETERS</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="all_take_off_button">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Take off</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="all_connect_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Reconnect</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="all_flying_state_label">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>40</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>FLYING STATE</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QPushButton" name="all_enable_safe_controller_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Enable Safe</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QPushButton" name="all_load_custom_controller_yaml_own_agent_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Load Custom YAML</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="all_disconnect_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Disconnect</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="all_enable_custom_controller_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Enable Custom</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="all_land_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Land</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QPushButton" name="all_load_safe_controller_yaml_own_agent_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Load Safe YAML</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<widget class="QLabel" name="all_yaml_agent_label">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>&gt; From agenet's local file</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QPushButton" name="all_load_safe_controller_yaml_coordinator_button">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>Load Safe YAML</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<widget class="QLabel" name="all_yaml_coordinator_label">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>&gt; From coordinator's file</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="all_radio_label">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>40</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="text">
<string>CRAZYRADIO</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
</property>
</widget>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QLabel" name="all_radio_label">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>40</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="text">
<string>Work in progress.</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
</property>
</widget>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
......@@ -1245,8 +972,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1176</width>
<height>25</height>
<width>1228</width>
<height>40</height>
</rect>
</property>
</widget>
......
// 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
// ----------------------------------------------------------------------------------
//
//
//
//
//
// ----------------------------------------------------------------------------------
// The types, i.e., agent or coordinator
#define TYPE_INVALID -1
#define TYPE_COORDINATOR 1
#define TYPE_AGENT 2
// ----------------------------------------------------------------------------------
//
//
//
//
//
// ----------------------------------------------------------------------------------
// These constants define the modes that can be used for controller this is
// running on-board the Crazyflie 2.0.
// Therefore, the constants defined here need to be in agreement with those
// defined in the firmware running on-board the Crazyflie 2.0.
// The following is a short description about each mode:
//
// CF_COMMAND_TYPE_MOTORS
// In this mode the Crazyflie will apply the requested 16-bit per motor
// command directly to each of the motors
//
// CF_COMMAND_TYPE_RATE
// In this mode the Crazyflie will apply the requested 16-bit per motor
// command directly to each of the motors, and additionally request the
// body frame roll, pitch, and yaw angular rates from the PID rate
// controllers implemented in the Crazyflie 2.0 firmware.
//
// CF_COMMAND_TYPE_ANGLE
// In this mode the Crazyflie will apply the requested 16-bit per motor
// command directly to each of the motors, and additionally request the
// body frame roll, pitch, and yaw angles from the PID attitude
// controllers implemented in the Crazyflie 2.0 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
#define STATE_UNAVAILABLE 5
// 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