To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 432d44ac authored by beuchatp's avatar beuchatp
Browse files

Added Test Motors item to menu

parent 7cc3f5e1
......@@ -215,6 +215,8 @@
<addaction name="action_showHideController_picker"/>
<addaction name="action_showHideController_tuning"/>
<addaction name="action_showHideController_template"/>
<addaction name="separator"/>
<addaction name="action_testMotors"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuLoad_YAML"/>
......@@ -313,6 +315,11 @@
<string>Template</string>
</property>
</action>
<action name="action_testMotors">
<property name="text">
<string>TestMotors</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
......
......@@ -132,6 +132,8 @@
#define CMD_CRAZYFLY_LAND 12
#define CMD_CRAZYFLY_MOTORS_OFF 13
#define CMD_USE_TESTMOTORS_CONTROLLER 21
// Flying states
#define STATE_MOTORS_OFF 1
#define STATE_TAKE_OFF 2
......@@ -208,4 +210,4 @@
// ----------------------------------------------------------------------------------
// For standard buttons in the GUI
#define REQUEST_DEFAULT_SETPOINT_BUTTON_ID 100
\ No newline at end of file
#define REQUEST_DEFAULT_SETPOINT_BUTTON_ID 100
......@@ -94,6 +94,8 @@ public:
void showHideController_tuning_changed();
void showHideController_template_changed();
void testMotors_changed();
public slots:
void setAgentIDsToCoordinate(QVector<int> agentIDs , bool shouldCoordinateAll);
......
......@@ -133,6 +133,8 @@ private slots:
void on_action_showHideController_tuning_changed();
void on_action_showHideController_template_changed();
void on_action_testMotors_changed();
};
#endif // MAINWINDOW_H
......@@ -116,6 +116,20 @@ void EnableControllerLoadYamlBar::showHideController_template_changed()
// TEST MOTORS
void EnableControllerLoadYamlBar::testMotors_changed()
{
#ifdef CATKIN_MAKE
dfall_pkg::IntWithHeader msg;
fillIntMessageHeader(msg);
msg.data = CMD_USE_TESTMOTORS_CONTROLLER;
this->commandPublisher.publish(msg);
ROS_INFO("[ENABLE CONTROLLER LOAD YAML GUI BAR] Enable Test Motors Controller");
#endif
}
// ENABLE CONTROLLER BUTTONS ON-CLICK CALLBACK
......
......@@ -253,6 +253,16 @@ void MainWindow::on_action_showHideController_template_changed()
}
void MainWindow::on_action_testMotors_changed()
{
#ifdef CATKIN_MAKE
// Inform the user that the menu item was selected
ROS_INFO("[FLYING AGENT GUI MAIN WINDOW] Test Motors Menu Item clicked in Main Window.");
#endif
// Notify the UI elements of this change
ui->customWidget_enableControllerLoadYamlBar->testMotors_changed();
}
// ----------------------------------------------------------------------------------
// III DDDD &&& TTTTT Y Y PPPP EEEEE
......
......@@ -145,6 +145,8 @@
#define CMD_CRAZYFLY_LAND 12
#define CMD_CRAZYFLY_MOTORS_OFF 13
#define CMD_USE_TESTMOTORS_CONTROLLER 21
// Flying states
#define STATE_MOTORS_OFF 1
#define STATE_TAKE_OFF 2
......
Markdown is supported
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