From 21ea99832779500912e03d55d6d97af6113230ed Mon Sep 17 00:00:00 2001 From: pip Date: Fri, 21 Jan 2011 12:39:20 +0000 Subject: [PATCH] Removing experimental code. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2504 ebee16cc-31ac-478f-84a7-5cbb03baadba --- .../PipXtreme_Config/PipXtreme_Config.pro | 38 -- .../experimental/PipXtreme_Config/main.cpp | 12 - .../PipXtreme_Config/mainwindow.cpp | 102 ---- .../PipXtreme_Config/mainwindow.h | 33 -- .../PipXtreme_Config/mainwindow.ui | 440 ------------------ 5 files changed, 625 deletions(-) delete mode 100644 ground/src/experimental/PipXtreme_Config/PipXtreme_Config.pro delete mode 100644 ground/src/experimental/PipXtreme_Config/main.cpp delete mode 100644 ground/src/experimental/PipXtreme_Config/mainwindow.cpp delete mode 100644 ground/src/experimental/PipXtreme_Config/mainwindow.h delete mode 100644 ground/src/experimental/PipXtreme_Config/mainwindow.ui diff --git a/ground/src/experimental/PipXtreme_Config/PipXtreme_Config.pro b/ground/src/experimental/PipXtreme_Config/PipXtreme_Config.pro deleted file mode 100644 index 035906af6..000000000 --- a/ground/src/experimental/PipXtreme_Config/PipXtreme_Config.pro +++ /dev/null @@ -1,38 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2011-01-20T10:44:17 -# -#------------------------------------------------- - -QT += core gui - -TARGET = PipXtreme_Config -TEMPLATE = app - -INCLUDEPATH += ../../libs/qextserialport/src - -SOURCES += main.cpp\ - mainwindow.cpp \ - -HEADERS += mainwindow.h \ - -HEADERS += ../../libs/qextserialport/src/qextserialport.h \ - ../../libs/qextserialport/src/qextserialenumerator.h \ - ../../libs/qextserialport/src/qextserialport_global.h -SOURCES = ../../libs/qextserialport/src/qextserialport.cpp - -unix:SOURCES += ../../libs/qextserialport/src/posix_qextserialport.cpp -unix:!macx:SOURCES += ../../libs/qextserialport/src/qextserialenumerator_unix.cpp -macx { - SOURCES += ../../libs/qextserialport/src/qextserialenumerator_osx.cpp - LIBS += -framework IOKit -framework CoreFoundation -} - -win32 { - SOURCES += ../../libs/qextserialport/src/win_qextserialport.cpp \ - ../../libs/qextserialport/src/qextserialenumerator_win.cpp - DEFINES += WINVER=0x0501 # needed for mingw to pull in appropriate dbt business...probably a better way to do this - LIBS += -lsetupapi -} - -FORMS += mainwindow.ui diff --git a/ground/src/experimental/PipXtreme_Config/main.cpp b/ground/src/experimental/PipXtreme_Config/main.cpp deleted file mode 100644 index 1280d8919..000000000 --- a/ground/src/experimental/PipXtreme_Config/main.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include "mainwindow.h" -#include - -int main(int argc, char *argv[]) -{ - QApplication a(argc, argv); - MainWindow w; - w.show(); - - return a.exec(); -} diff --git a/ground/src/experimental/PipXtreme_Config/mainwindow.cpp b/ground/src/experimental/PipXtreme_Config/mainwindow.cpp deleted file mode 100644 index e867ffb3d..000000000 --- a/ground/src/experimental/PipXtreme_Config/mainwindow.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include - -#include "mainwindow.h" -#include "ui_mainwindow.h" - -MainWindow::MainWindow(QWidget *parent) : - QMainWindow(parent), - ui(new Ui::MainWindow) -{ - ui->setupUi(this); - - port = NULL; - - // *************************** - - QList ports = QextSerialEnumerator::getPorts(); - - foreach (QextPortInfo port, ports) - { - if (port.friendName == deviceName) - { - } - } - - // *************************** - - port = new QextSerialPort(QextSerialPort::EventDriven); - if (port) - { - port->setPortName("COM1"); - port->setBaudRate(BAUD57600); - port->setFlowControl(FLOW_OFF); - port->setParity(PAR_NONE); - port->setDataBits(DATA_8); - port->setStopBits(STOP_1); - - connect(port, SIGNAL(readyRead()), this, SLOT(onDataAvailable())); - - port->open(0); - - qDebug("isOpen : %d", port->isOpen()); - } - - // *************************** -} - -MainWindow::~MainWindow() -{ - if (port) - { - if (port->isOpen()) - port->close(); - - delete port; - port = NULL; - } - - delete ui; -} - -void MainWindow::onDataAvailable() -{ - if (!port) - return; - - int avail = port->bytesAvailable(); - if (avail <= 0) - return; - - QByteArray data; - data.resize(avail); - - int read = port->read(data.data(), data.size()); - if (read <= 0) - return; - - - - - - - qDebug("bytes available: %d", avail); - qDebug("received: %d", read); -} - -void MainWindow::closePort() -{ - if (!port) - return; - - port->close(); - qDebug("is open: %d", port->isOpen()); -} - -void MainWindow::openPort() -{ - if (!port) - return; - - port->open(QIODevice::ReadWrite); - qDebug("is open: %d", port->isOpen()); -} diff --git a/ground/src/experimental/PipXtreme_Config/mainwindow.h b/ground/src/experimental/PipXtreme_Config/mainwindow.h deleted file mode 100644 index 048bdb762..000000000 --- a/ground/src/experimental/PipXtreme_Config/mainwindow.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include - -#include -#include -#include - -namespace Ui { - class MainWindow; -} - -class MainWindow : public QMainWindow -{ - Q_OBJECT - -public: - explicit MainWindow(QWidget *parent = 0); - ~MainWindow(); - -private: - Ui::MainWindow *ui; - - QextSerialPort *port; - -private slots: - void onDataAvailable(); - void closePort(); - void openPort(); -}; - -#endif // MAINWINDOW_H diff --git a/ground/src/experimental/PipXtreme_Config/mainwindow.ui b/ground/src/experimental/PipXtreme_Config/mainwindow.ui deleted file mode 100644 index 70ffa17b5..000000000 --- a/ground/src/experimental/PipXtreme_Config/mainwindow.ui +++ /dev/null @@ -1,440 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 335 - 489 - - - - PipXtreme Configuration - - - - - - - - - Serial Port - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 150 - 0 - - - - - - - - - - - - Baudrate - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 150 - 0 - - - - - - - - - - Qt::Horizontal - - - - - - - - - Serial Number - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - false - - - 8 - - - Qt::AlignCenter - - - true - - - - - - - - - Qt::Horizontal - - - - - - - - - Paired Serial Number - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - 8 - - - Qt::AlignCenter - - - - - - - - - - - Min Frequency (MHz) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - 9 - - - Qt::AlignCenter - - - - - - - - - - - Max Frequency (MHz) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - 9 - - - Qt::AlignCenter - - - - - - - - - - - Frequency (MHz) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - 9 - - - Qt::AlignCenter - - - - - - - - - - - Max RF Bandwidth - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - - - - - - - - Max RF Tx Power - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - - - - - - - - Serial Port Speed - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 100 - 0 - - - - - - - - - - - - AES Encryption Key - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 256 - - - - - - - Enable - - - - - - - - - Qt::Horizontal - - - - - - - - - Scan Spectrum - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - - - -