Compare commits

...

1 Commits

Author SHA1 Message Date
bf0ec30e16 Aggiunto pulsante per Homing Robot e relativo messaggio 2019-10-23 11:46:15 +02:00
4 changed files with 69 additions and 38 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!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> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>

View File

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

View File

@@ -39,6 +39,7 @@
* 20190322 - Modifica dei nomi segnali tra questo modulo e com. * 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 * 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 * file dei metadati per la pianificazione dei persorsi salvati
* 20191023 - Spostati i commenti in GIT
*/ */
#include <QMainWindow> #include <QMainWindow>
@@ -91,7 +92,7 @@ private slots:
void on_btn_record_clicked(); void on_btn_record_clicked();
void on_btn_play_clicked(); void on_btn_play_clicked();
void on_btn_realtime_clicked(); void on_btn_realtime_clicked();
void on_btn_home_clicked();
void on_btn_open_clicked(); void on_btn_open_clicked();
signals: signals:

View File

@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>945</width> <width>1042</width>
<height>750</height> <height>766</height>
</rect> </rect>
</property> </property>
<property name="mouseTracking"> <property name="mouseTracking">
@@ -17,7 +17,7 @@
<string>MainWindow</string> <string>MainWindow</string>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_8">
<item> <item>
<widget class="QTabWidget" name="tab_mainWindow"> <widget class="QTabWidget" name="tab_mainWindow">
<property name="currentIndex"> <property name="currentIndex">
@@ -1050,36 +1050,9 @@
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <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> <item>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0"> <item row="0" column="1">
<widget class="QRadioButton" name="rad_pos"> <widget class="QRadioButton" name="rad_pos">
<property name="text"> <property name="text">
<string>POS</string> <string>POS</string>
@@ -1092,7 +1065,7 @@
</attribute> </attribute>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="1">
<widget class="QRadioButton" name="rad_vel"> <widget class="QRadioButton" name="rad_vel">
<property name="text"> <property name="text">
<string>VEL</string> <string>VEL</string>
@@ -1102,6 +1075,48 @@
</attribute> </attribute>
</widget> </widget>
</item> </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> </layout>
</item> </item>
<item> <item>
@@ -1290,7 +1305,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>945</width> <width>1042</width>
<height>22</height> <height>22</height>
</rect> </rect>
</property> </property>
@@ -1312,8 +1327,8 @@
<resources/> <resources/>
<connections/> <connections/>
<buttongroups> <buttongroups>
<buttongroup name="grp_mod"/>
<buttongroup name="grp_hilo"/> <buttongroup name="grp_hilo"/>
<buttongroup name="grp_mod"/>
<buttongroup name="gpr_lock"> <buttongroup name="gpr_lock">
<property name="exclusive"> <property name="exclusive">
<bool>false</bool> <bool>false</bool>