Commit 4273a469 authored by roangel's avatar roangel
Browse files

Cleaned a bit code and CMakeList.txt. Next step: add ROS stuff and start testing

parent 9eab1cbd
...@@ -15,7 +15,6 @@ find_package(catkin REQUIRED COMPONENTS ...@@ -15,7 +15,6 @@ find_package(catkin REQUIRED COMPONENTS
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
## System dependencies are found with CMake's conventions ## System dependencies are found with CMake's conventions
...@@ -36,7 +35,7 @@ set(MY_LIB_PATH_INC ${PROJECT_SOURCE_DIR}/GUI_Qt/CrazyFlyGUI/include) ...@@ -36,7 +35,7 @@ set(MY_LIB_PATH_INC ${PROJECT_SOURCE_DIR}/GUI_Qt/CrazyFlyGUI/include)
add_definitions(-std=c++11) add_definitions(-std=c++11)
set(SRC_HDRS set(SRC_HDRS_QOBJECT #sources that have the Qt macro QOBJECT inside, the MOC cpp file needs to be done manually
${MY_LIB_PATH_INC}/crazyFlyZoneTab.h ${MY_LIB_PATH_INC}/crazyFlyZoneTab.h
${MY_LIB_PATH_INC}/myGraphicsScene.h ${MY_LIB_PATH_INC}/myGraphicsScene.h
${MY_LIB_PATH_INC}/myGraphicsView.h ${MY_LIB_PATH_INC}/myGraphicsView.h
...@@ -44,7 +43,7 @@ set(SRC_HDRS ...@@ -44,7 +43,7 @@ set(SRC_HDRS
) )
qt5_wrap_ui(UIS_HDRS GUI_Qt/CrazyFlyGUI/src/mainguiwindow.ui) qt5_wrap_ui(UIS_HDRS GUI_Qt/CrazyFlyGUI/src/mainguiwindow.ui)
qt5_wrap_cpp(SRC_MOC_HDRS ${SRC_HDRS}) qt5_wrap_cpp(SRC_MOC_HDRS ${SRC_HDRS_QOBJECT})
## Uncomment this if the package has a setup.py. This macro ensures ## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed ## modules and global scripts declared therein get installed
...@@ -146,7 +145,7 @@ catkin_package( ...@@ -146,7 +145,7 @@ catkin_package(
## Your package locations should be listed before other locations ## Your package locations should be listed before other locations
# include_directories(include) # include_directories(include)
include_directories( include_directories(
GUI_Qt/CrazyFlyGUI/include ${MY_LIB_PATH_INC}
${catkin_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}
) )
...@@ -165,12 +164,12 @@ include_directories( ...@@ -165,12 +164,12 @@ include_directories(
## The recommended prefix ensures that target names across packages don't collide ## The recommended prefix ensures that target names across packages don't collide
# add_executable(${PROJECT_NAME}_node src/d_fall_gui_node.cpp) # add_executable(${PROJECT_NAME}_node src/d_fall_gui_node.cpp)
add_executable(myGUI GUI_Qt/CrazyFlyGUI/src/mainguiwindow.cpp GUI_Qt/CrazyFlyGUI/src/main.cpp ${UIS_HDRS} ${SRC_HDRS}) add_executable(my_GUI GUI_Qt/CrazyFlyGUI/src/mainguiwindow.cpp GUI_Qt/CrazyFlyGUI/src/main.cpp ${UIS_HDRS} ${SRC_HDRS_QOBJECT})
qt5_use_modules(myGUI Widgets) qt5_use_modules(my_GUI Widgets)
set(MY_LIB_SOURCES set(MY_LIB_SOURCES # compilation of sources
${MY_LIB_PATH_SRC}/cornergrabber.cpp ${MY_LIB_PATH_SRC}/cornergrabber.cpp
${MY_LIB_PATH_SRC}/crazyFlyZone.cpp ${MY_LIB_PATH_SRC}/crazyFlyZone.cpp
${MY_LIB_PATH_SRC}/crazyFlyZoneTab.cpp ${MY_LIB_PATH_SRC}/crazyFlyZoneTab.cpp
...@@ -183,9 +182,9 @@ set(MY_LIB_SOURCES ...@@ -183,9 +182,9 @@ set(MY_LIB_SOURCES
add_library(my_library ${MY_LIB_SOURCES}) add_library(my_library ${MY_LIB_SOURCES})
target_link_libraries(myGUI Qt5::Widgets) target_link_libraries(my_GUI Qt5::Widgets) # let my_GUI have acesss to Qt stuff
target_link_libraries(my_library Qt5::Widgets) target_link_libraries(my_library Qt5::Widgets) # let my_library have access to Qt stuff
target_link_libraries(myGUI my_library) target_link_libraries(my_GUI my_library)
## Rename C++ executable without prefix ## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the ## The above recommended prefix causes long target names, the following renames the
......
...@@ -75,59 +75,6 @@ public slots: ...@@ -75,59 +75,6 @@ public slots:
#endif #endif
private slots: private slots:
#ifndef DEBUG_GUI #ifndef DEBUG_GUI
// void PIDParamTableChanged(double param);
// void RateParamTableChanged(double param);
// void positionSetpointChanged(double param);
// void sampleTimeChanged(double param);
// void feedforwardCmdChanged(double cmd);
// void controllerTypeChanged(bool checked);
// void trajectoryTypeChanged(bool checked);
// void on_buttonStop_clicked();
// void on_buttonPrint_clicked();
// void on_buttonSetpointChange_clicked();
// void on_buttonPIDDefaultParams_clicked();
// void on_buttonSetpointCurrPos_clicked();
// void on_buttonDefaultFeedforward_clicked();
// void on_buttonResetMissed_clicked();
// void on_SetpointHome_clicked();
// void on_setpointZ200_clicked();
// void on_slideMotorCmdTest_valueChanged(int value);
// void on_buttonResetControllers_clicked();
// void on_buttonSetDefaultTs_clicked();
// void on_buttonSetDefaultRateParams_clicked();
// void on_slideRollAngleTest_valueChanged(int value);
// void on_slidePitchAngleTest_valueChanged(int value);
// void on_slideYawAngleTest_valueChanged(int value);
// void on_slideRollRateTest_valueChanged(int value);
// void on_slidePitchRateTest_valueChanged(int value);
// void on_slideYawRateTest_valueChanged(int value);
// void on_buttonStop_2_clicked();
#endif #endif
void set_tabs(int n); void set_tabs(int n);
...@@ -162,33 +109,7 @@ private: ...@@ -162,33 +109,7 @@ private:
void _init(); void _init();
#ifndef DEBUG_GUI #ifndef DEBUG_GUI
// void refreshScreen();
// callbacks
// void callbackControllerOutput(const crazypkg::ControllerOutputPackage& msg);
// void callbackViconData(const crazypkg::ViconData& msg);
// void callbackCntViconDataMissed(const std_msgs::Int32& msg);
void readDefaultParameters(); void readDefaultParameters();
// void setDefaultPIDParameters();
// void setDefaultRateParameters();
// void setDefaultSampleTime();
// void setDefaultFeedforwardCmd();
// void initPIDParamsTable();
// void initRateParamsTable();
// void initPositionSetpoint();
// void initSampleTime();
// void initControllerType();
// void initFeedforwardCmd();
// void initSetpointQueues();
// void initSetpointType();
// void publishSetpoint();
// void updateSetpoint();
// void publishSampleTime(EControllerType controller);
ros::CallbackQueue m_CallbackQueue; ros::CallbackQueue m_CallbackQueue;
ros::NodeHandle* m_pNodeHandle; ros::NodeHandle* m_pNodeHandle;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment