Commit 62fca265 authored by Lorenz Meier's avatar Lorenz Meier

Merged APM config changes, reverted some really ridiculous non-programming changes

parents b6c11a8d 34eaf1fb
*.swp
*.nfs
CMakeFiles
*Makefile*
tags
build*/
Info.plist
obj
.DS_Store
*.log
*~
*~.skp
bin/*.exe
bin/*.txt
bin/mac
*pro.user*
qrc_*.cpp
*.Debug
*.Release
tmp
debug
release
qgroundcontrol
mavlinkgen-build-desktop
qgroundcontrol.xcodeproj/**
doc/html
doc/doxy.log
deploy/mac
deploy/linux
deploy/qgroundcontrol*
controller_log*
user_config.pri
*.app
*.ncb
*.vcproj
*.vcxproj*
*.sdf
*.ipch
*.pdb
*.sln
*.sln
*.vcproj
*.user
*.ncb
*.idb
*.project
*.cproject
*.sln
*.suo
*.uhf.txt
*.opensdf
thirdParty/qserialport-build-desktop/
thirdParty/qserialport/bin/
thirdParty/qserialport/lib/
*.swp
*.nfs
CMakeFiles
*Makefile*
tags
build*/
Info.plist
obj
.DS_Store
*.log
*~
*~.skp
bin/*.exe
bin/*.txt
bin/mac
*pro.user*
qrc_*.cpp
*.Debug
*.Release
tmp
debug
release
qgroundcontrol
mavlinkgen-build-desktop
qgroundcontrol.xcodeproj/**
doc/html
doc/doxy.log
deploy/mac
deploy/linux
deploy/qgroundcontrol*
controller_log*
user_config.pri
*.app
*.ncb
*.vcproj
*.vcxproj*
*.sdf
*.ipch
*.pdb
*.sln
*.sln
*.vcproj
*.user
*.ncb
*.idb
*.project
*.cproject
*.sln
*.suo
*.uhf.txt
*.opensdf
apmplanner2.xcodeproj/
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtSerialPort
description = Qt Serial Port Reference Documentation
url = http://qt-project.org/doc/qt-$QT_VER/qtserialport
version = $QT_VERSION
qhp.projects = QtSerialPort
qhp.QtSerialPort.file = qtserialport.qhp
qhp.QtSerialPort.namespace = org.qt-project.qtserialport.$QT_VERSION_TAG
qhp.QtSerialPort.virtualFolder = qtserialport
qhp.QtSerialPort.indexTitle = Qt Serial Port
qhp.QtSerialPort.indexRoot =
qhp.QtSerialPort.filterAttributes = qtserialport $QT_VERSION qtrefdoc
qhp.QtSerialPort.customFilters.Qt.name = QtSerialPort $QT_VERSION
qhp.QtSerialPort.customFilters.Qt.filterAttributes = qtserialport $QT_VERSION
qhp.QtSerialPort.subprojects = classes examples
qhp.QtSerialPort.subprojects.classes.title = C++ Classes
qhp.QtSerialPort.subprojects.classes.indexTitle = Qt Serial Port C++ Classes
qhp.QtSerialPort.subprojects.classes.selectors = class fake:headerfile
qhp.QtSerialPort.subprojects.classes.sortPages = true
qhp.QtSerialPort.subprojects.examples.title = Examples
qhp.QtSerialPort.subprojects.examples.indexTitle = Qt Serial Port Examples
qhp.QtSerialPort.subprojects.examples.selectors = fake:example
qhp.QtSerialPort.subprojects.examples.sortPages = true
headerdirs += ..
sourcedirs += ..
exampledirs += ../../../examples/serialport
imagedirs += images
depends += qtcore qtdoc
/****************************************************************************
**
** Copyright (C) 2011 - 2012 Denis Shienkov <denis.shienkov@gmail.com>
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\page qtserialport-index.html
\title Qt Serial Port
\brief Provides API to make the serial programming simple and portable.
Qt Serial Port provides the basic functionality, which includes
configuring, I/O operations, get and set control signals of the
RS-232 pinouts.
The following are not supported by this module:
\list
\li Terminal features such as echo, control CR/LF, and so on.
\li Text mode.
\li Configuring timeouts and delays while reading.
\li Tracking and notification when the state of RS-232 pinout signals change.
\endlist
To use these classes in your application, use the following include
statement:
\code
#include <QtSerialPort/QtSerialPort>
\endcode
To link against the module, add this line to your \l qmake \c
.pro file:
\code
QT += serialport
\endcode
\section1 Related information
\list
\li \l{Qt Serial Port C++ Classes}{C++ Classes}
\li \l{Qt Serial Port Examples}{Examples}
\endlist
*/
/****************************************************************************
**
** Copyright (C) 2011 - 2012 Denis Shienkov <denis.shienkov@gmail.com>
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\module QtSerialPort
\title Qt Serial Port C++ Classes
\brief List of C++ classes that enable access to a serial port.
To use these classes in your application, use the following include
statement:
\code
#include <QtSerialPort/QtSerialPort>
\endcode
To link against the module, add this line to your \l qmake \c
.pro file:
\code
QT += serialport
\endcode
*/
a:link, a:visited {
color: #00732F;
text-decoration: none;
font-weight: bold;
}
body {
font: normal 400 14px/1.2 Arial;
margin-top: 85px;
}
h1 {
margin: 0;
}
h2 {
font: 500 20px/1.2 Arial;
}
h3.fn, span.fn {
-moz-border-radius: 7px 7px 7px 7px;
-webkit-border-radius: 7px 7px 7px 7px;
border-radius: 7px 7px 7px 7px;
background-color: #F6F6F6;
border-width: 1px;
border-style: solid;
border-color: #E6E6E6;
word-spacing: 3px;
padding: 3px 5px;
}
table, pre {
-moz-border-radius: 7px 7px 7px 7px;
-webkit-border-radius: 7px 7px 7px 7px;
border-radius: 7px 7px 7px 7px;
background-color: #F6F6F6;
border: 1px solid #E6E6E6;
border-collapse: separate;
font-size: 12px;
line-height: 1.2;
margin-bottom: 25px;
margin-left: 15px;
}
table td {
padding: 3px 15px 3px 20px;
}
table tr.even {
background-color: white;
color: #66666E;
}
table tr.odd {
background-color: #F6F6F6;
color: #66666E;
}
li {
margin-bottom: 10px;
padding-left: 12px;
}
.cpp {
display: block;
margin: 10;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
padding: 20px 0 20px 0;
}
.footer {
margin-top: 50px;
}
.memItemLeft {
padding-right: 3px;
}
.memItemRight {
padding: 3px 15px 3px 0;
}
.qml {
display: block;
margin: 10;
overflow: hidden;
overflow-x: hidden;
overflow-y: hidden;
padding: 20px 0 20px 0;
}
.qmldefault {
padding-left: 5px;
float: right;
color: red;
}
.qmlreadonly {
padding-left: 5px;
float: right;
color: #254117;
}
.rightAlign {
padding: 3px 5px 3px 10px;
text-align: right;
}
.title {
background-color: white;
color: #44A51C;
font-family: Verdana;
font-size: 35px;
font-weight: normal;
left: 0;
padding-bottom: 5px;
padding-left: 16px;
padding-top: 20px;
position: absolute;
right: 0;
top: 0;
}
.toc {
float: right;
-moz-border-radius: 7px 7px 7px 7px;
-webkit-border-radius: 7px 7px 7px 7px;
border-radius: 7px 7px 7px 7px;
background-color: #F6F6F6;
border: 1px solid #DDD;
margin: 0 20px 10px 10px;
padding: 20px 15px 20px 20px;
height: auto;
width: 200px;
}
This diff is collapsed.
/****************************************************************************
**
** Copyright (C) 2012 Denis Shienkov <denis.shienkov@gmail.com>
** Copyright (C) 2013 Laszlo Papp <lpapp@kde.org>
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSerialPort module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QSERIALPORT_H
#define QSERIALPORT_H
#include <QtCore/qiodevice.h>
#include <qserialportglobal.h>
//#include <QtSerialPort/qserialportglobal.h>
QT_BEGIN_NAMESPACE
class QSerialPortInfo;
class QSerialPortPrivate;
class Q_SERIALPORT_EXPORT QSerialPort : public QIODevice
{
Q_OBJECT
Q_PROPERTY(qint32 baudRate READ baudRate WRITE setBaudRate NOTIFY baudRateChanged)
Q_PROPERTY(DataBits dataBits READ dataBits WRITE setDataBits NOTIFY dataBitsChanged)
Q_PROPERTY(Parity parity READ parity WRITE setParity NOTIFY parityChanged)
Q_PROPERTY(StopBits stopBits READ stopBits WRITE setStopBits NOTIFY stopBitsChanged)
Q_PROPERTY(FlowControl flowControl READ flowControl WRITE setFlowControl NOTIFY flowControlChanged)
Q_PROPERTY(DataErrorPolicy dataErrorPolicy READ dataErrorPolicy WRITE setDataErrorPolicy NOTIFY dataErrorPolicyChanged)
Q_PROPERTY(bool dataTerminalReady READ isDataTerminalReady WRITE setDataTerminalReady NOTIFY dataTerminalReadyChanged)
Q_PROPERTY(bool requestToSend READ isRequestToSend WRITE setRequestToSend NOTIFY requestToSendChanged)
Q_PROPERTY(SerialPortError error READ error RESET clearError NOTIFY error)
Q_PROPERTY(bool settingsRestoredOnClose READ settingsRestoredOnClose WRITE setSettingsRestoredOnClose NOTIFY settingsRestoredOnCloseChanged)
Q_ENUMS( Directions Rate DataBits Parity StopBits FlowControl PinoutSignals DataErrorPolicy SerialPortError )
public:
enum Direction {
Input = 1,
Output = 2,
AllDirections = Input | Output
};
Q_DECLARE_FLAGS(Directions, Direction)
enum BaudRate {
Baud1200 = 1200,
Baud2400 = 2400,
Baud4800 = 4800,
Baud9600 = 9600,
Baud19200 = 19200,
Baud38400 = 38400,
Baud57600 = 57600,
Baud115200 = 115200,
UnknownBaud = -1
};
enum DataBits {
Data5 = 5,
Data6 = 6,
Data7 = 7,
Data8 = 8,
UnknownDataBits = -1
};
enum Parity {
NoParity = 0,
EvenParity = 2,
OddParity = 3,
SpaceParity = 4,
MarkParity = 5,
UnknownParity = -1
};
enum StopBits {
OneStop = 1,
OneAndHalfStop = 3,
TwoStop = 2,
UnknownStopBits = -1
};
enum FlowControl {
NoFlowControl,
HardwareControl,
SoftwareControl,
UnknownFlowControl = -1
};
enum PinoutSignal {
NoSignal = 0x00,
TransmittedDataSignal = 0x01,
ReceivedDataSignal = 0x02,
DataTerminalReadySignal = 0x04,
DataCarrierDetectSignal = 0x08,
DataSetReadySignal = 0x10,
RingIndicatorSignal = 0x20,
RequestToSendSignal = 0x40,
ClearToSendSignal = 0x80,
SecondaryTransmittedDataSignal = 0x100,
SecondaryReceivedDataSignal = 0x200
};
Q_DECLARE_FLAGS(PinoutSignals, PinoutSignal)
enum DataErrorPolicy {
SkipPolicy,
PassZeroPolicy,
IgnorePolicy,
StopReceivingPolicy,
UnknownPolicy = -1
};
enum SerialPortError {
NoError,
DeviceNotFoundError,
PermissionError,
OpenError,
ParityError,
FramingError,
BreakConditionError,
WriteError,
ReadError,
ResourceError,
UnsupportedOperationError,
UnknownError
};
explicit QSerialPort(QObject *parent = 0);
explicit QSerialPort(const QString &name, QObject *parent = 0);
explicit QSerialPort(const QSerialPortInfo &info, QObject *parent = 0);
virtual ~QSerialPort();
void setPortName(const QString &name);
QString portName() const;
void setPort(const QSerialPortInfo &info);
bool open(OpenMode mode) Q_DECL_OVERRIDE;
void close() Q_DECL_OVERRIDE;
void setSettingsRestoredOnClose(bool restore);
bool settingsRestoredOnClose() const;
bool setBaudRate(qint32 baudRate, Directions dir = AllDirections);
qint32 baudRate(Directions dir = AllDirections) const;
bool setDataBits(DataBits dataBits);
DataBits dataBits() const;
bool setParity(Parity parity);
Parity parity() const;
bool setStopBits(StopBits stopBits);
StopBits stopBits() const;
bool setFlowControl(FlowControl flow);
FlowControl flowControl() const;
bool setDataTerminalReady(bool set);
bool isDataTerminalReady();
bool setRequestToSend(bool set);
bool isRequestToSend();
PinoutSignals pinoutSignals();
bool flush();
bool clear(Directions dir = AllDirections);
bool atEnd() const Q_DECL_OVERRIDE;
bool setDataErrorPolicy(DataErrorPolicy policy = IgnorePolicy);
DataErrorPolicy dataErrorPolicy() const;
SerialPortError error() const;
void clearError();
qint64 readBufferSize() const;
void setReadBufferSize(qint64 size);
bool isSequential() const Q_DECL_OVERRIDE;
qint64 bytesAvailable() const Q_DECL_OVERRIDE;
qint64 bytesToWrite() const Q_DECL_OVERRIDE;
bool canReadLine() const Q_DECL_OVERRIDE;
bool waitForReadyRead(int msecs) Q_DECL_OVERRIDE;
bool waitForBytesWritten(int msecs) Q_DECL_OVERRIDE;
bool sendBreak(int duration = 0);
bool setBreakEnabled(bool set = true);
Q_SIGNALS:
void baudRateChanged(qint32 baudRate, QSerialPort::Directions dir);
void dataBitsChanged(QSerialPort::DataBits dataBits);
void parityChanged(QSerialPort::Parity parity);
void stopBitsChanged(QSerialPort::StopBits stopBits);
void flowControlChanged(QSerialPort::FlowControl flow);
void dataErrorPolicyChanged(QSerialPort::DataErrorPolicy policy);
void dataTerminalReadyChanged(bool set);
void requestToSendChanged(bool set);
void error(QSerialPort::SerialPortError serialPortError);
void settingsRestoredOnCloseChanged(bool restore);
protected:
qint64 readData(char *data, qint64 maxSize) Q_DECL_OVERRIDE;
qint64 readLineData(char *data, qint64 maxSize) Q_DECL_OVERRIDE;
qint64 writeData(const char *data, qint64 maxSize) Q_DECL_OVERRIDE;
private: