mirror of
https://github.com/vale981/Taevitas
synced 2025-03-05 09:31:42 -05:00
A first Try on Serial.
This commit is contained in:
parent
798e908d86
commit
b006f9b80a
3 changed files with 22 additions and 7 deletions
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>614</width>
|
<width>614</width>
|
||||||
<height>750</height>
|
<height>767</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -253,6 +253,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPlainTextEdit" name="serialMon">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -77,6 +77,11 @@ MainWindow::MainWindow( QWidget * parent ) :
|
||||||
connect( ui->sHalt, &QPushButton::clicked, &comm, &SerialCommunicator::sendHalt );
|
connect( ui->sHalt, &QPushButton::clicked, &comm, &SerialCommunicator::sendHalt );
|
||||||
connect( ui->sFast, &QPushButton::clicked, &comm, &SerialCommunicator::sendFast );
|
connect( ui->sFast, &QPushButton::clicked, &comm, &SerialCommunicator::sendFast );
|
||||||
|
|
||||||
|
// Serial Monitor
|
||||||
|
connect( &comm, &SerialCommunicator::dataRead, this, [this] ( QByteArray data ) {
|
||||||
|
ui->serialMon->appendPlainText( data );
|
||||||
|
} );
|
||||||
|
|
||||||
// Camera selected
|
// Camera selected
|
||||||
connect( ui->cameraSelector, static_cast<void( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &MainWindow::cameraSelected );
|
connect( ui->cameraSelector, static_cast<void( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &MainWindow::cameraSelected );
|
||||||
|
|
||||||
|
@ -99,11 +104,6 @@ MainWindow::MainWindow( QWidget * parent ) :
|
||||||
|
|
||||||
// Start recording
|
// Start recording
|
||||||
connect( ui->startButton, &QPushButton::clicked, this, &MainWindow::startStopRecording );
|
connect( ui->startButton, &QPushButton::clicked, this, &MainWindow::startStopRecording );
|
||||||
|
|
||||||
// Serial Selected
|
|
||||||
connect( &comm, &SerialCommunicator::dataRead, this, [this] ( QByteArray data ) {
|
|
||||||
qDebug() << data;
|
|
||||||
} );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Proper wait please! EVENT
|
// TODO: Proper wait please! EVENT
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <QtWidgets/QLabel>
|
#include <QtWidgets/QLabel>
|
||||||
#include <QtWidgets/QLineEdit>
|
#include <QtWidgets/QLineEdit>
|
||||||
#include <QtWidgets/QMainWindow>
|
#include <QtWidgets/QMainWindow>
|
||||||
|
#include <QtWidgets/QPlainTextEdit>
|
||||||
#include <QtWidgets/QPushButton>
|
#include <QtWidgets/QPushButton>
|
||||||
#include <QtWidgets/QSpacerItem>
|
#include <QtWidgets/QSpacerItem>
|
||||||
#include <QtWidgets/QSpinBox>
|
#include <QtWidgets/QSpinBox>
|
||||||
|
@ -62,6 +63,7 @@ public:
|
||||||
QCheckBox *saveFrames;
|
QCheckBox *saveFrames;
|
||||||
QPushButton *startButton;
|
QPushButton *startButton;
|
||||||
QPushButton *preview_button;
|
QPushButton *preview_button;
|
||||||
|
QPlainTextEdit *serialMon;
|
||||||
QGroupBox *groupBox_2;
|
QGroupBox *groupBox_2;
|
||||||
QVBoxLayout *verticalLayout_2;
|
QVBoxLayout *verticalLayout_2;
|
||||||
QLabel *statusLabel;
|
QLabel *statusLabel;
|
||||||
|
@ -79,7 +81,7 @@ public:
|
||||||
{
|
{
|
||||||
if (MainWindow->objectName().isEmpty())
|
if (MainWindow->objectName().isEmpty())
|
||||||
MainWindow->setObjectName(QStringLiteral("MainWindow"));
|
MainWindow->setObjectName(QStringLiteral("MainWindow"));
|
||||||
MainWindow->resize(614, 750);
|
MainWindow->resize(614, 767);
|
||||||
QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
|
QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
|
||||||
sizePolicy.setHorizontalStretch(0);
|
sizePolicy.setHorizontalStretch(0);
|
||||||
sizePolicy.setVerticalStretch(0);
|
sizePolicy.setVerticalStretch(0);
|
||||||
|
@ -248,6 +250,12 @@ public:
|
||||||
|
|
||||||
verticalLayout_4->addWidget(preview_button);
|
verticalLayout_4->addWidget(preview_button);
|
||||||
|
|
||||||
|
serialMon = new QPlainTextEdit(recOptions);
|
||||||
|
serialMon->setObjectName(QStringLiteral("serialMon"));
|
||||||
|
serialMon->setReadOnly(true);
|
||||||
|
|
||||||
|
verticalLayout_4->addWidget(serialMon);
|
||||||
|
|
||||||
|
|
||||||
verticalLayout->addWidget(recOptions);
|
verticalLayout->addWidget(recOptions);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue