mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Minor changes
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2490 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
24a77b47a2
commit
a0b1d986e4
@ -1,3 +1,4 @@
|
||||
#include <QDebug>
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
@ -10,6 +11,19 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
|
||||
port = NULL;
|
||||
|
||||
// ***************************
|
||||
|
||||
QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();
|
||||
|
||||
foreach (QextPortInfo port, ports)
|
||||
{
|
||||
if (port.friendName == deviceName)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// ***************************
|
||||
|
||||
port = new QextSerialPort(QextSerialPort::EventDriven);
|
||||
if (port)
|
||||
{
|
||||
@ -26,6 +40,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
|
||||
qDebug("isOpen : %d", port->isOpen());
|
||||
}
|
||||
|
||||
// ***************************
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
@ -2,7 +2,10 @@
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
#include <qextserialport.h>
|
||||
#include <qextserialenumerator.h>
|
||||
#include <QThread>
|
||||
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
|
Loading…
Reference in New Issue
Block a user