Compare commits
No commits in common. "46c481b862b068a836723e5277f415966daea267" and "f741fb96f99fdfde3753653b32c520a266913402" have entirely different histories.
46c481b862
...
f741fb96f9
@ -70,14 +70,12 @@ SOURCES += \
|
||||
mainwindow.cpp \
|
||||
sender_thread.cpp \
|
||||
receiver_thread.cpp \
|
||||
worker_thread.cpp \
|
||||
../common/src/message_handler.cpp
|
||||
|
||||
HEADERS += \
|
||||
mainwindow.h \
|
||||
sender_thread.h \
|
||||
receiver_thread.h \
|
||||
worker_thread.h \
|
||||
../common/include/message_handler.h
|
||||
|
||||
OTHER_FILES += \
|
||||
|
@ -24,8 +24,6 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
openSerialPort();
|
||||
|
||||
//ui->updateProgress->setRange(0, 100);
|
||||
//ui->updateProgress->reset();
|
||||
|
||||
@ -73,18 +71,23 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
MainWindow::~MainWindow() {
|
||||
//delete m_startTimer;
|
||||
//delete m_exitTimer;
|
||||
closeSerialPort();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool MainWindow::openSerialPort() {
|
||||
// const SettingsDialog::Settings p = m_settings->settings();
|
||||
//m_serial->setPortName(p.name);
|
||||
//m_serial->setBaudRate(p.baudRate);
|
||||
//m_serial->setDataBits(p.dataBits);
|
||||
//m_serial->setParity(p.parity);
|
||||
//m_serial->setStopBits(p.stopBits);
|
||||
///m_serial->setFlowControl(p.flowControl);
|
||||
m_serial->setPortName("");
|
||||
m_serial->setBaudRate(QSerialPort::Baud115200);
|
||||
m_serial->setDataBits(QSerialPort::DataBits::Data8);
|
||||
m_serial->setParity(QSerialPort::Parity::NoParity);
|
||||
m_serial->setStopBits(QSerialPort::StopBits::OneStop);
|
||||
m_serial->setFlowControl(QSerialPort::FlowControl::NoFlowControl);
|
||||
m_serial->setFlowControl(QSerialPort::FlowControl::HardwareControl);
|
||||
if (m_serial->open(QIODevice::ReadWrite)) {
|
||||
//m_console->setEnabled(true);
|
||||
//m_console->setLocalEchoEnabled(p.localEchoEnabled);
|
||||
|
@ -1,13 +0,0 @@
|
||||
#include "worker_thread.h"
|
||||
|
||||
WorkerThread::WorkerThread(QObject *parent)
|
||||
: QThread(parent) {
|
||||
}
|
||||
|
||||
WorkerThread::~WorkerThread() {
|
||||
|
||||
}
|
||||
|
||||
void WorkerThread::run() {
|
||||
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#ifndef WORKER_THREAD_H_INCLUDED
|
||||
#define WORKER_THREAD_H_INCLUDED
|
||||
|
||||
#include <QThread>
|
||||
|
||||
class WorkerThread : public QThread {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit WorkerThread(QObject *parent = nullptr);
|
||||
~WorkerThread();
|
||||
|
||||
|
||||
private:
|
||||
void run() override;
|
||||
|
||||
bool m_quit = false;
|
||||
};
|
||||
|
||||
#endif // WORKER_THREAD_H_INCLUDED
|
Loading…
x
Reference in New Issue
Block a user