Aggiunto pulsante per Homing Robot e relativo messaggio

This commit is contained in:
2019-10-23 11:46:15 +02:00
parent f26382aa74
commit bf0ec30e16
4 changed files with 69 additions and 38 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.8.2, 2019-07-10T11:42:03. -->
<!-- Written by QtCreator 4.8.2, 2019-10-23T11:42:08. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

View File

@@ -196,6 +196,7 @@ void RoboGlue_GUI::on_btn_record_clicked() {
param["metadata"] = metadata;
ui->btn_play->setEnabled(false);
ui->btn_realtime->setEnabled(false);
ui->btn_home->setEnabled(false);
disableLockAxes();
} else {
m->commonStatus.isRecording = false;
@@ -203,6 +204,7 @@ void RoboGlue_GUI::on_btn_record_clicked() {
param["action"]="stop";
ui->btn_play->setEnabled(true);
ui->btn_realtime->setEnabled(true);
ui->btn_home->setEnabled(true);
enableLockAxes();
}
emit m->commonStatusChange();
@@ -223,6 +225,7 @@ void RoboGlue_GUI::on_btn_play_clicked() {
param["lock"] = getLockAxes();
ui->btn_record->setEnabled(false);
ui->btn_realtime->setEnabled(false);
ui->btn_home->setEnabled(false);
ui->btn_play->setText("Stop");
ui->txt_fileName->setEnabled(false);
disableLockAxes();
@@ -232,6 +235,7 @@ void RoboGlue_GUI::on_btn_play_clicked() {
param["action"] = "stop";
ui->btn_record->setEnabled(true);
ui->btn_realtime->setEnabled(true);
ui->btn_home->setEnabled(true);
ui->btn_play->setText("Play");
ui->txt_fileName->setEnabled(true);
enableLockAxes();
@@ -254,6 +258,7 @@ void RoboGlue_GUI::on_btn_open_clicked() {
param["metadata"] = metadata;
ui->btn_record->setEnabled(false);
ui->btn_realtime->setEnabled(false);
ui->btn_home->setEnabled(false);
ui->btn_open->setText("Close");
ui->txt_fileName->setEnabled(false);
} else {
@@ -262,6 +267,7 @@ void RoboGlue_GUI::on_btn_open_clicked() {
param["action"] = "close";
ui->btn_record->setEnabled(true);
ui->btn_realtime->setEnabled(true);
ui->btn_home->setEnabled(true);
ui->btn_open->setText("Open");
ui->txt_fileName->setEnabled(true);
}
@@ -295,6 +301,16 @@ void RoboGlue_GUI::on_btn_realtime_clicked() {
emit m->commonStatusChange();
emit sendROScommand("REALTIME", param);
}
void RoboGlue_GUI::on_btn_home_clicked() {
QVariantMap param;
modlog->debug("robotHome");
param["action"] = "start";
param["execute"] = false;
emit m->commonStatusChange();
emit sendROScommand("HOME", param);
}
////////////////////////////////////////////////
////////END INTERNAL PRIVATE SLOTS//////////////
////////////////////////////////////////////////
@@ -339,5 +355,4 @@ void RoboGlue_GUI::on_newRobotData() {
////////////////////////////////////////////////
//////// END EXTERNAL PUBLIC SLOTS /////////////
////////////////////////////////////////////////
///

View File

@@ -39,6 +39,7 @@
* 20190322 - Modifica dei nomi segnali tra questo modulo e com.
* 20190402 - Aggiunte due spinbox per il settaggio di delta tempo e delta spazio da salvare nel
* file dei metadati per la pianificazione dei persorsi salvati
* 20191023 - Spostati i commenti in GIT
*/
#include <QMainWindow>
@@ -91,7 +92,7 @@ private slots:
void on_btn_record_clicked();
void on_btn_play_clicked();
void on_btn_realtime_clicked();
void on_btn_home_clicked();
void on_btn_open_clicked();
signals:

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>945</width>
<height>750</height>
<width>1042</width>
<height>766</height>
</rect>
</property>
<property name="mouseTracking">
@@ -17,7 +17,7 @@
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout_4">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QTabWidget" name="tab_mainWindow">
<property name="currentIndex">
@@ -1050,36 +1050,9 @@
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QPushButton" name="btn_realtime">
<property name="text">
<string>RealTime</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_17">
<property name="text">
<string>MODE:</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<item row="0" column="1">
<widget class="QRadioButton" name="rad_pos">
<property name="text">
<string>POS</string>
@@ -1092,7 +1065,7 @@
</attribute>
</widget>
</item>
<item row="1" column="0">
<item row="1" column="1">
<widget class="QRadioButton" name="rad_vel">
<property name="text">
<string>VEL</string>
@@ -1102,6 +1075,48 @@
</attribute>
</widget>
</item>
<item row="0" column="0" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QPushButton" name="btn_realtime">
<property name="text">
<string>RealTime</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_17">
<property name="text">
<string>MODE:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="btn_home">
<property name="text">
<string>GoHOME</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
@@ -1290,7 +1305,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>945</width>
<width>1042</width>
<height>22</height>
</rect>
</property>
@@ -1312,8 +1327,8 @@
<resources/>
<connections/>
<buttongroups>
<buttongroup name="grp_mod"/>
<buttongroup name="grp_hilo"/>
<buttongroup name="grp_mod"/>
<buttongroup name="gpr_lock">
<property name="exclusive">
<bool>false</bool>