diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/CrazyFlyGUI/src/mainguiwindow.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/CrazyFlyGUI/src/mainguiwindow.cpp index 9a2fadab7b53c8aa04c06fe68c7ce48e328fee73..bfefa9111495f073a6eac1955f8300919f58b138 100755 --- a/pps_ws/src/d_fall_pps/GUI_Qt/CrazyFlyGUI/src/mainguiwindow.cpp +++ b/pps_ws/src/d_fall_pps/GUI_Qt/CrazyFlyGUI/src/mainguiwindow.cpp @@ -223,6 +223,13 @@ void MainGUIWindow::_init() ui->checkBox_vicon_highlight_markers->setEnabled(false); + // Add keyboard shortcuts + // > for "all motors off", press the space bar + ui->all_motors_off_button->setShortcut(tr("Space")); + // > for "kill GUI node", press "CTRL+C" while the GUI window is the focus + QShortcut* close_GUI_shortcut = new QShortcut(QKeySequence(tr("CTRL+C")), this, SLOT(close())); + + #ifdef CATKIN_MAKE _rosNodeThread->init(); qRegisterMetaType<ptrToMessage>("ptrToMessage"); diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp index f93c6358c96129f74450bf6c47d29cb0813e46e6..1a2d589554a0e7a5f968a752cd4621b978e4440d 100644 --- a/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp +++ b/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp @@ -154,6 +154,13 @@ MainWindow::MainWindow(int argc, char **argv, QWidget *parent) : ui->error_label->setStyleSheet("QLabel { color : red; }"); ui->error_label->clear(); + // Add keyboard shortcuts + // > for "all motors off", press the space bar + ui->motors_OFF_button->setShortcut(tr("Space")); + // > for "kill GUI node", press "CTRL+C" while the GUI window is the focus + QShortcut* close_GUI_shortcut = new QShortcut(QKeySequence(tr("CTRL+C")), this, SLOT(close())); + + initialize_demo_setpoint(); initialize_student_setpoint(); initialize_mpc_setpoint();