Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 247 → Rev 248

/QMK-Groundstation/branches/waypoint/COPYING
0,0 → 1,340
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
 
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
 
Preamble
 
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
 
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
 
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
 
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
 
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
 
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
 
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
 
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
 
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
 
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
 
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
 
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
 
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
 
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
 
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
 
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
 
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
 
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
 
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
 
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
 
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
 
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
 
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
 
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
 
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
 
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
 
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
 
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
 
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
 
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
 
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
 
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
 
NO WARRANTY
 
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
 
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
 
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
 
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
 
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
 
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
 
Also add information on how to contact you by electronic and paper mail.
 
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
 
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
 
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
 
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
 
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
 
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
 
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
/QMK-Groundstation/branches/waypoint/Classes/ToolBox.cpp
0,0 → 1,246
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
#include "ToolBox.h"
 
ToolBox::ToolBox()
{
}
 
void ToolBox::Wait(int Time)
{
#ifndef _WIN32_
usleep(Time);
#else
// sleep(Time);
#endif
}
 
QString ToolBox::get_Float(long Wert, long Count)
{
QString Temp;
 
if (Wert > 0)
Temp = "";
else
Temp = "-";
 
Temp = Temp + QString("%1").arg(Wert / Count) + "." + QString("%1").arg(Wert % Count);
 
return Temp;
}
 
 
// Base64 Decoder
bool ToolBox::Decode64(sRxData &RX, bool Long)
{
unsigned char a,b,c,d;
unsigned char ptr = 0;
unsigned char x,y,z;
int ptrOut[150];
 
int ptrIn = 3;
int max = RX.String.length();
int len = RX.String.length();
int DecLen = 0;
 
if (RX.Input[ptrIn] == 0)
{
qDebug("QString to Char ERROR...!!!!");
return false;
}
 
while(len != 0)
{
a = RX.Input[ptrIn++] - '=';
b = RX.Input[ptrIn++] - '=';
c = RX.Input[ptrIn++] - '=';
d = RX.Input[ptrIn++] - '=';
 
if(ptrIn > max - 2) break; // nicht mehr Daten verarbeiten, als empfangen wurden
 
x = (a << 2) | (b >> 4);
y = ((b & 0x0f) << 4) | (c >> 2);
z = ((c & 0x03) << 6) | d;
 
if(len--) ptrOut[ptr++] = x; else break;
if(len--) ptrOut[ptr++] = y; else break;
if(len--) ptrOut[ptr++] = z; else break;
}
 
for (int a=0; a<ptr; a++)
{
if (Long == false)
{
int b1, b2, b3;
 
b1 = ptrOut[a++];
b2 = ptrOut[a];
 
b3 = (b2 << 8) | b1;
 
if (b3 > 32767)
b3 = b3 - 65536;
 
RX.Decode[DecLen] = b3;
DecLen++;
}
else
{
RX.Decode[DecLen] = ptrOut[a];
DecLen++;
}
 
RX.DecLen = DecLen;
}
return true;
}
 
// Base64 Encoder
QString ToolBox::Encode64(char Data[150],unsigned int Length)
{
unsigned int pt = 0;
unsigned char a,b,c;
unsigned char ptr = 0;
 
char TX_Buff[150];
 
while(Length > 0)
{
if(Length) { a = Data[ptr++]; Length--;} else a = 0;
if(Length) { b = Data[ptr++]; Length--;} else b = 0;
if(Length) { c = Data[ptr++]; Length--;} else c = 0;
 
TX_Buff[pt++] = '=' + (a >> 2);
TX_Buff[pt++] = '=' + (((a & 0x03) << 4) | ((b & 0xf0) >> 4));
TX_Buff[pt++] = '=' + (((b & 0x0f) << 2) | ((c & 0xc0) >> 6));
TX_Buff[pt++] = '=' + ( c & 0x3f);
}
TX_Buff[pt] = 0;
 
return QString(TX_Buff);
}
 
// Datensatz nach 16bit Integer
int ToolBox::Data2Int(int *Data , int Start, bool is_signed)
{
int Out = (Data[Start+1]<<8) | (Data[Start+0]);
 
if ((Out > 32767) && (is_signed))
Out = Out - 65536;
 
return Out;
 
}
 
// Datensatz nach 32bit Long
long ToolBox::Data2Long(int *Data , int Start, bool is_signed)
{
long Out = (Data[Start+3]<<24) | (Data[Start+2]<<16) | (Data[Start+1]<<8) | (Data[Start+0]);
 
if ((Out > 32767) && (is_signed))
Out = Out;
 
return Out;
}
 
// Datensatz nach QString
QString ToolBox::Data2QString(int Data[150], int Start, int End)
{
char String[150];
for (int a = Start; a < End; a++)
{
String[a - Start] = Data[a];
}
String[End - Start] = '\0';
 
return QString(String);
}
 
// Datensatz-CRC prüfen
bool ToolBox::check_CRC(QString RXString)
{
int CRC = 0;
char *RX;
 
int Length = RXString.length();
 
RX = RXString.toLatin1().data();
 
if (RX[1] == 127)
{
RX[1] = 0;
}
 
for(int i=0; i < Length-2; i++)
{
CRC+=RX[i];
}
 
CRC = CRC % 4096;
 
if(RX[Length - 2] != ('=' + (CRC / 64)))
{
return false;
}
 
if(RX[Length - 1] != ('=' + CRC % 64))
{
return false;
}
 
return true;
}
 
// Datensatz-CRC hinzufügen
QString ToolBox::add_CRC(QString TXString)
{
unsigned int tmpCRC = 0;
 
char *TXBuff;
char CRC[2];
 
TXBuff = TXString.toLatin1().data();
 
for(int i = 0; i < TXString.length(); i++)
{
tmpCRC += TXBuff[i];
}
 
tmpCRC %= 4096;
 
CRC[0] = '=' + tmpCRC / 64;
CRC[1] = '=' + tmpCRC % 64;
CRC[2] = '\0';
 
QString Return = TXString + QString(CRC);
 
return Return;
}
 
// Alle Icons
QIcon ToolBox::Icon(int ID)
{
QIcon Icons[5] ;
Icons[0].addPixmap(QPixmap(QString::fromUtf8(":/LED/Images/16X16/ledred.png")), QIcon::Normal, QIcon::Off);
Icons[1].addPixmap(QPixmap(QString::fromUtf8(":/LED/Images/16X16/ledyellow.png")), QIcon::Normal, QIcon::Off);
Icons[3].addPixmap(QPixmap(QString::fromUtf8(":/LED/Images/16X16/ledyellow.png")), QIcon::Normal, QIcon::Off);
Icons[4].addPixmap(QPixmap(QString::fromUtf8(":/LED/Images/16X16/ledoff.png")), QIcon::Normal, QIcon::Off);
return Icons[ID];
}
/QMK-Groundstation/branches/waypoint/Classes/ToolBox.h
0,0 → 1,42
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef TOOLBOX_H
#define TOOLBOX_H
 
#include <QString>
#include <QIcon>
#include "../global.h"
 
class ToolBox
{
public :
ToolBox();
static bool Decode64(sRxData &RX, bool Long = true);
static QString Encode64(char Data[150],unsigned int Length);
static bool check_CRC(QString RXString);
static QString add_CRC(QString TXString);
static int Data2Int(int *Data , int Start, bool is_signed = true);
static long Data2Long(int *Data , int Start, bool is_signed = true);
static QString Data2QString(int Data[150], int Start = 0, int End = 150);
static QIcon Icon(int ID);
static QString get_Float(long Wert, long Count);
static void Wait(int Time);
};
 
#endif // TOOLBOX_H
/QMK-Groundstation/branches/waypoint/Classes/cAttitude.cpp
0,0 → 1,136
#include <qevent.h>
#include <qpainter.h>
#include <qwt_math.h>
#include <qwt_polygon.h>
#include "cAttitude.h"
 
AttitudeIndicatorNeedle::AttitudeIndicatorNeedle(const QColor &c)
{
QPalette palette;
for ( int i = 0; i < QPalette::NColorGroups; i++ )
{
palette.setColor((QPalette::ColorGroup)i, QPalette::Text, c);
}
setPalette(palette);
}
 
void AttitudeIndicatorNeedle::draw(QPainter *painter, const QPoint &center, int length, double direction, QPalette::ColorGroup cg) const
{
direction *= M_PI / 180.0;
int triangleSize = qRound(length * 0.1);
 
painter->save();
 
// Verschiebung von Pfeil und Linie
const QPoint p0(QPoint(center.x() + 1, center.y() + 1));
const QPoint p01(QPoint(center.x() + 1, center.y() + 10));
const QPoint p02(QPoint(center.x() + 1, center.y() - 11));
const QPoint p03(QPoint(center.x() + 1, center.y() + 20));
const QPoint p04(QPoint(center.x() + 1, center.y() - 21));
 
// Der kleine Pfeil
const QPoint p1 = qwtPolar2Pos(p0, length - 2 * triangleSize - 2, direction);
 
QwtPolygon pa(3);
pa.setPoint(0, qwtPolar2Pos(p1, 2 * triangleSize, direction));
pa.setPoint(1, qwtPolar2Pos(p1, triangleSize, direction + M_PI_2));
pa.setPoint(2, qwtPolar2Pos(p1, triangleSize, direction - M_PI_2));
 
const QColor color = palette().color(cg, QPalette::Text);
 
painter->setBrush(color);
painter->drawPolygon(pa);
 
painter->setPen(QPen(color, 3));
painter->drawLine(qwtPolar2Pos(p0, length - 2, direction + M_PI_2), qwtPolar2Pos(p0, length - 2, direction - M_PI_2));
 
painter->setPen(QPen(QColor(255,255,255), 1));
painter->drawLine(qwtPolar2Pos(p01, length - 40, direction + M_PI_2), qwtPolar2Pos(p01, length - 40, direction - M_PI_2));
painter->drawLine(qwtPolar2Pos(p02, length - 40, direction + M_PI_2), qwtPolar2Pos(p02, length - 40, direction - M_PI_2));
painter->drawLine(qwtPolar2Pos(p03, length - 30, direction + M_PI_2), qwtPolar2Pos(p03, length - 30, direction - M_PI_2));
painter->drawLine(qwtPolar2Pos(p04, length - 30, direction + M_PI_2), qwtPolar2Pos(p04, length - 30, direction - M_PI_2));
 
painter->restore();
}
 
AttitudeIndicator::AttitudeIndicator(QWidget *parent): QwtDial(parent), d_gradient(0.0)
{
setMode(RotateScale);
setWrapping(true);
 
setOrigin(270.0);
setScaleOptions(ScaleTicks);
setScale(0, 0, 30.0);
 
const QColor color = palette().color(QPalette::Text);
 
setNeedle(new AttitudeIndicatorNeedle(color));
}
 
void AttitudeIndicator::setGradient(double gradient)
{
if ( gradient < -1.0 )
gradient = -1.0;
else if ( gradient > 1.0 )
gradient = 1.0;
 
if ( d_gradient != gradient )
{
d_gradient = gradient;
update();
}
}
 
void AttitudeIndicator::drawScale(QPainter *painter, const QPoint &center, int radius, double origin, double minArc, double maxArc) const
{
double dir = (360.0 - origin) * M_PI / 180.0; // counter clockwise, radian
 
int offset = 4;
const QPoint p0 = qwtPolar2Pos(center, offset, dir + M_PI);
 
const int w = contentsRect().width();
 
QwtPolygon pa(4);
pa.setPoint(0, qwtPolar2Pos(p0, w, dir - M_PI_2));
pa.setPoint(1, qwtPolar2Pos(pa.point(0), 2 * w, dir + M_PI_2));
pa.setPoint(2, qwtPolar2Pos(pa.point(1), w, dir));
pa.setPoint(3, qwtPolar2Pos(pa.point(2), 2 * w, dir - M_PI_2));
 
painter->save();
painter->setClipRegion(pa); // swallow 180 - 360 degrees
 
QwtDial::drawScale(painter, center, radius, origin, minArc, maxArc);
 
painter->restore();
}
 
void AttitudeIndicator::drawScaleContents(QPainter *painter, const QPoint &, int) const
{
int dir = 360 - qRound(origin() - value()); // counter clockwise
int arc = 90 + qRound(gradient() * 90);
 
const QColor skyColor(38, 151, 221);
 
painter->save();
painter->setBrush(skyColor);
painter->drawChord(scaleContentsRect(), (dir - arc) * 16, 2 * arc * 16 );
painter->restore();
}
 
void AttitudeIndicator::keyPressEvent(QKeyEvent *e)
{
switch(e->key())
{
case Qt::Key_Plus:
setGradient(gradient() + 0.05);
break;
case Qt::Key_Minus:
setGradient(gradient() - 0.05);
break;
 
default:
QwtDial::keyPressEvent(e);
}
}
/QMK-Groundstation/branches/waypoint/Classes/cAttitude.h
0,0 → 1,37
#include <QObject>
#include <qwt_dial.h>
#include <qwt_dial_needle.h>
 
class AttitudeIndicatorNeedle: public QwtDialNeedle
{
public:
AttitudeIndicatorNeedle(const QColor &);
 
virtual void draw(QPainter *, const QPoint &, int length,
double direction, QPalette::ColorGroup) const;
};
 
class AttitudeIndicator: public QwtDial
{
Q_OBJECT
 
public:
AttitudeIndicator(QWidget *parent = NULL);
 
double angle() const { return value(); }
double gradient() const { return d_gradient; }
 
public slots:
void setGradient(double);
void setAngle(double angle) { setValue(angle); }
 
protected:
virtual void keyPressEvent(QKeyEvent *);
 
virtual void drawScale(QPainter *, const QPoint &center, int radius, double origin, double arcMin, double arcMax) const;
 
virtual void drawScaleContents(QPainter *painter, const QPoint &center, int radius) const;
 
private:
double d_gradient;
};
/QMK-Groundstation/branches/waypoint/Classes/cQMK_Server.cpp
0,0 → 1,137
/***************************************************************************
* Copyright (C) 2008-2009 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "cQMK_Server.h"
 
cQMK_Server::cQMK_Server()
{
}
 
void cQMK_Server::Connect(QString IP, int Port, QString User, QString Pass)
{
Username = User;
Password = Pass;
 
TcpSocket = new(QTcpSocket);
TcpSocket->connectToHost (IP, Port);
 
connect(TcpSocket, SIGNAL(connected()), this, SLOT(slot_Connected()) );
connect(TcpSocket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(slot_Error(QAbstractSocket::SocketError)));
}
 
void cQMK_Server::Disconnect()
{
TcpSocket->disconnectFromHost();
disconnect(TcpSocket, SIGNAL(connected()), 0, 0);
disconnect(TcpSocket, SIGNAL(readyRead()), 0, 0);
disconnect(TcpSocket, SIGNAL(disconnected()), 0, 0);
}
 
void cQMK_Server::SendData(int CMD, QString Data)
{
QString SendString = QString(QString("%1").arg(CMD) + ":" + Data + ":");
 
int CRC = qChecksum(SendString.toLatin1().data(), SendString.length());
QString sCRC = QString("%1").arg(CRC);
 
SendString = SendString + sCRC + "\n";
 
QByteArray SendText = SendString.toAscii();
 
TcpSocket->write(SendText);
}
 
void cQMK_Server::NewPosition(sNaviString Pos)
{
if (1==1)
{
SendData(100, QString(Pos.Longitude + ":" + Pos.Latitude + ":" + Pos.Altitude));
}
}
 
void cQMK_Server::slot_Connected()
{
// qDebug("Verbunden");
 
connect(TcpSocket, SIGNAL(readyRead()), SLOT(slot_ReadLine()));
connect(TcpSocket, SIGNAL(disconnected()),TcpSocket, SLOT(deleteLater()));
connect(TcpSocket, SIGNAL(disconnected()),this, SLOT(slot_Disconnect()));
 
emit sig_Connected();
}
 
void cQMK_Server::slot_Disconnect()
{
// qDebug("Verbindung getrennt ");
disconnect(TcpSocket, SIGNAL(disconnected()), 0, 0);
emit sig_Disconnected(1);
}
 
void cQMK_Server::slot_Error(QAbstractSocket::SocketError Error)
{
switch (Error)
{
case QAbstractSocket::ConnectionRefusedError:
emit sig_Disconnected(2);
break;
case QAbstractSocket::RemoteHostClosedError:
emit sig_Disconnected(1);
break;
default:
emit sig_Disconnected(0);
break;
}
 
disconnect(TcpSocket, SIGNAL(disconnected()), 0, 0);
emit sig_Disconnected(2);
// qDebug("Error..!!");
}
 
void cQMK_Server::slot_ReadLine()
{
QString Input = QString(TcpSocket->readLine(TcpSocket->bytesAvailable())).remove(QChar('\n'));
 
QStringList Data = Input.split(":");
 
if (Data.count() > 1)
{
int CMD = Data[0].toInt();
 
switch(CMD)
{
case 1 :
{
SendData(1, QString(QA_NAME + " " + QA_VERSION + ":" + Username + ":" + Password + ":"));
}
break;
case 2 :
{
// qDebug("Login OK");
}
break;
case 3 :
{
emit sig_Disconnected(3);
}
break;
}
}
}
 
 
 
/QMK-Groundstation/branches/waypoint/Classes/cQMK_Server.h
0,0 → 1,57
 
/***************************************************************************
* Copyright (C) 2008-2009 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef CQMK_SERVER_H
#define CQMK_SERVER_H
 
#include <QString>
#include <QTcpSocket>
#include <QStringList>
 
#include "../global.h"
 
class cQMK_Server : public QObject
{
Q_OBJECT
 
public:
cQMK_Server();
void Connect(QString IP, int Port, QString User, QString Pass);
void Disconnect();
void NewPosition(sNaviString Pos);
 
private:
//TCP-Socket
QTcpSocket *TcpSocket;
QString Username;
QString Password;
void SendData(int CMD, QString Data);
 
private slots:
void slot_Connected();
void slot_Disconnect();
void slot_ReadLine();
void slot_Error(QAbstractSocket::SocketError Error);
 
signals:
void sig_Connected();
void sig_Disconnected(int Error);
};
 
#endif // CQMK_SERVER_H
/QMK-Groundstation/branches/waypoint/Classes/cServer.cpp
0,0 → 1,136
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
#include <QStringList>
 
#include "cServer.h"
 
cServer::cServer()
{
NaviCount = 0;
}
 
void cServer::start_Server(int Port, cSettings *Set)
{
Settings = Set;
 
TcpServer = new QTcpServer();
if (!TcpServer->listen(QHostAddress::Any, qint16(Port)))
{
qDebug("Kann Serversocket nicht Einrichten..!!");
}
else
{
connect(TcpServer, SIGNAL(newConnection()), this, SLOT(slot_NewConnection()));
}
}
 
void cServer::stop_Server()
{
delete TcpServer;
}
 
void cServer::store_NaviString(sNaviString Navi)
{
Route[NaviCount] = Navi;
NaviCount++;
}
 
void cServer::slot_ReadData()
{
if (TcpSocket->canReadLine())
{
QStringList tokens = QString(TcpSocket->readLine()).split(QRegExp("[ \r\n][ \r\n]*"));
 
qDebug() << "QStringList ---------";
for (QList<QString>::iterator i = tokens.begin(); i != tokens.end(); ++i)
qDebug() << (*i);
}
 
TcpSocket->close();
}
 
void cServer::slot_NewConnection()
{
TcpSocket = TcpServer->nextPendingConnection();
connect(TcpSocket, SIGNAL(readyRead ()),this, SLOT(slot_ReadData()));
 
QByteArray block;
 
block = "HTTP/1.0 200 OK\nContent-Type: application/vnd.google-earth.kml+xml; charset=iso-8859-1\nConnection: close\n\n";
// block = "HTTP/1.0 200 OK\nContent-Type: text/xml; charset=utf-8\nConnection: close\n\n";
 
TcpSocket->write(block);
 
TcpSocket->write(get_KML());
 
TcpSocket->close();
}
 
QByteArray cServer::get_KML()
{
QByteArray block;
 
block = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<kml xmlns=\"http://earth.google.com/kml/2.2\">\n"
" <Document>\n"
" <name>Online Mikrokopter GPS Position</name>\n"
" <Style id=\"MK_gps-style\">\n"
" <LineStyle>\n"
" <color>ff0000ff</color>\n"
" <width>2</width>\n"
" </LineStyle>\n"
" </Style>\n"
" <Placemark>\n"
" <LookAt>\n"
" <range>400</range>\n"
" <tilt>45</tilt>\n"
" </LookAt>\n"
" <name>Flight</name>\n"
" <styleUrl>#MK_gps-style</styleUrl>\n"
" <LineString>\n";
if (Settings->Server.ToGround)
{
block = block + " <extrude>1</extrude>\n";
}
 
block = block +
" <tessellate>1</tessellate>\n"
" <altitudeMode>relativeToGround</altitudeMode>\n"
" <coordinates>\n";
 
for (int a = 0; a < NaviCount; a++)
{
block = block + Route[a].Longitude.toLatin1() + "," + Route[a].Latitude.toLatin1() + "," + Route[a].Altitude.toLatin1() + " " ;
block = block + "\n";
}
 
block = block +
" </coordinates>\n"
" </LineString>\n"
" </Placemark>\n"
" </Document>\n"
" </kml>\n";
 
return block;
}
 
cServer::~cServer()
{
}
/QMK-Groundstation/branches/waypoint/Classes/cServer.h
0,0 → 1,57
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef CSERVER_H
#define CSERVER_H
 
#include <QTcpServer>
#include <QTcpSocket>
 
//#include "../global.h"
#include "../Classes/cSettings.h"
 
class cServer : public QObject
{
Q_OBJECT
 
public:
cServer();
~cServer();
 
void start_Server(int Port, cSettings *Set);
 
void stop_Server();
void store_NaviString(sNaviString Navi);
 
 
private:
QTcpServer *TcpServer;
QTcpSocket *TcpSocket;
 
cSettings *Settings;
 
QByteArray get_KML();
sNaviString Route[MaxNaviPos];
int NaviCount;
 
private slots:
void slot_NewConnection();
void slot_ReadData();
};
 
#endif // CSERVER_H
/QMK-Groundstation/branches/waypoint/Classes/cSettings.cpp
0,0 → 1,267
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <QCoreApplication>
#include <QSettings>
#include <QDir>
 
#include "cSettings.h"
 
cSettings::cSettings()
{
read_SettingsID();
 
if (Settings_ID < 3)
{
QBitArray Def_TabViews;
Def_TabViews.fill(true, 6);
 
qDebug("Konvertiere Einstellungen Version 1+2 -> 3");
QSettings Setting("KeyOz-Net", "QMK-Groundstation");
 
Setting.beginGroup("GUI");
GUI.TabViews = Setting.value("TabViews", QBitArray(Def_TabViews)).value<QBitArray>();
 
GUI.TabViews.resize(10);
GUI.TabViews[6] = true;
 
Setting.setValue("TabViews", QBitArray(GUI.TabViews));
Setting.endGroup();
}
 
read_Settings();
 
Analog1.LogView.resize(MaxAnalog);
Analog1.PlotView.resize(MaxAnalog);
 
// Alte Settingsstruktur Löschen.
if (Settings_ID < 2)
{
qDebug("Konvertiere Einstellungen Version 1 -> 2");
QSettings Setting("KeyOz-Net", "QMK-Groundstation");
 
Setting.beginGroup("AnalogWerte");
for (int a = 0; a < MaxAnalog; a++)
{
Analog1.LogView.setBit(a, Setting.value(("Analog_" + QString("%1").arg(a) + "_Log"), Def_Log[a]).toBool());
Analog1.PlotView.setBit(a, Setting.value(("Analog_" + QString("%1").arg(a) + "_Plot"), Def_Plot_Show[a]).toBool());
Analog1.Label[a] = Setting.value(("Analog_" + QString("%1").arg(a)), Def_AnalogNames[a]).toString();
}
Setting.endGroup();
 
Setting.remove("AnalogWerte-FC");
Setting.remove("AnalogWerte");
 
write_Settings_Analog();
write_Settings_AnalogLabels();
}
else
{
read_Settings_Analog();
read_Settings_AnalogLabels();
}
 
Settings_ID = 3;
}
 
// Config der Analogwert-Anzeige (Plotter / CVS)
void cSettings::write_Settings_Analog(int ID)
{
QString Hardware = HardwareType[ID];
 
QSettings Setting("KeyOz-Net", "QMK-Groundstation");
 
Setting.beginGroup("Analog-Werte");
Setting.setValue(Hardware + "-LogView", QBitArray(Analog1.LogView));
Setting.setValue(Hardware + "-PlotView", QBitArray(Analog1.PlotView));
Setting.endGroup();
}
 
void cSettings::read_Settings_Analog(int ID)
{
QBitArray Def_View;
Def_View.fill(true,MaxAnalog);
 
QString Hardware = HardwareType[ID];
 
QSettings Setting("KeyOz-Net", "QMK-Groundstation");
 
Setting.beginGroup("Analog-Werte");
Analog1.LogView = Setting.value(Hardware + "-LogView", QBitArray(Def_View)).value<QBitArray>();
Analog1.PlotView = Setting.value(Hardware + "-PlotView", QBitArray(Def_View)).value<QBitArray>();
Setting.endGroup();
}
 
// Labels der Analogwerte.
void cSettings::write_Settings_AnalogLabels(int ID)
{
QString Hardware = HardwareType[ID];
 
QSettings Setting("KeyOz-Net", "QMK-Groundstation-Labels");
 
Setting.beginGroup("Analog-Labels-" + Hardware);
Setting.setValue("Version", Analog1.Version);
for (int a=0; a<MaxAnalog; a++)
{
Setting.setValue("Label_" + QString("%1").arg(a), Analog1.Label[a]);
}
Setting.endGroup();
}
 
void cSettings::read_Settings_AnalogLabels(int ID)
{
QString Hardware = HardwareType[ID];
 
QSettings Setting("KeyOz-Net", "QMK-Groundstation-Labels");
 
Setting.beginGroup("Analog-Labels-" + Hardware);
Analog1.Version = Setting.value(("Version"), "0").toString();
for (int a=0; a<MaxAnalog; a++)
{
Analog1.Label[a] = Setting.value(("Label_" + QString("%1").arg(a)), Def_AnalogNames[a]).toString();
}
Setting.endGroup();
}
 
// Programmeinstellungen
void cSettings::read_SettingsID()
{
QSettings Setting("KeyOz-Net", "QMK-Groundstation");
 
Setting.beginGroup("Global");
Settings_ID = Setting.value("Settings ID", 1).toInt();
Setting.endGroup();
}
 
 
// Programmeinstellungen
void cSettings::read_Settings()
{
QBitArray Def_BitArray;
Def_BitArray.fill(true, 10);
 
QDir Dir;
 
QString HomeDir = (QString(Dir.homePath() + "/"));
 
QSettings Setting("KeyOz-Net", "QMK-Groundstation");
 
Setting.beginGroup("Global");
Settings_ID = Setting.value("Settings ID", 1).toInt();
Setting.endGroup();
 
Setting.beginGroup("Port");
TTY.Port = Setting.value("TTY", QString(OS_PORT)).toString();
Setting.endGroup();
 
Setting.beginGroup("GUI");
GUI.isMax = Setting.value("IsMax",false).toBool();
GUI.Size = Setting.value("Size", QSize(700, 300)).toSize();
GUI.Point = Setting.value("Point",QPoint(1,1)).toPoint();
GUI.TabViews = Setting.value("TabViews", QBitArray(Def_BitArray)).value<QBitArray>();
GUI.ToolViews = Setting.value("ToolViews", QBitArray(Def_BitArray)).value<QBitArray>();
GUI.Term_Info = Setting.value("Terminal_Info",false).toBool();
GUI.Term_Data = Setting.value("Terminal_Data",true).toBool();
GUI.Term_Always = Setting.value("Terminal_Always",false).toBool();
GUI.Term_Send = Setting.value("Terminal_Send",true).toBool();
Setting.endGroup();
 
Setting.beginGroup("Dirs");
DIR.Logging = Setting.value("LogDir", HomeDir).toString();
DIR.Parameter = Setting.value("ParDir", HomeDir).toString();
Setting.endGroup();
 
Setting.beginGroup("MKData");
Data.Plotter_Count = Setting.value("Plotter_Count", 100).toInt();
Data.Debug_Fast = Setting.value("Debug_Fast", 100).toInt();
Data.Debug_Slow = Setting.value("Debug_Slow", 500).toInt();
Data.Debug_Off = Setting.value("Debug_Off", 1000).toInt();
Data.Navi_Fast = Setting.value("Navi_Fast", 100).toInt();
Data.Navi_Slow = Setting.value("Navi_Slow", 500).toInt();
Data.Navi_Off = Setting.value("Navi_Off", 1000).toInt();
Setting.endGroup();
 
Setting.beginGroup("GoogleEarth-Server");
Server.Port = Setting.value("Port", 10664).toString();
Server.StartServer = Setting.value("StartServer", false).toBool();
Server.ToGround = Setting.value("ToGround", false).toBool();
Setting.endGroup();
 
Setting.beginGroup("QMK-Server");
Server.QMKS_Login = Setting.value("Login", "").toString();
Server.QMKS_Password = Setting.value("Password", "").toString();
Setting.endGroup();
 
}
 
void cSettings::write_Settings()
{
QSettings Setting("KeyOz-Net", "QMK-Groundstation");
 
Setting.beginGroup("Global");
Setting.setValue("Settings ID", Settings_ID);
Setting.endGroup();
 
Setting.beginGroup("Port");
Setting.setValue("TTY", TTY.Port);
Setting.endGroup();
 
Setting.beginGroup("Dirs");
Setting.setValue("LogDir", DIR.Logging);
Setting.setValue("ParDir", DIR.Parameter);
Setting.endGroup();
 
Setting.beginGroup("GUI");
Setting.setValue("IsMax", GUI.isMax);
Setting.setValue("Size", GUI.Size);
Setting.setValue("Point", GUI.Point);
Setting.setValue("TabViews", QBitArray(GUI.TabViews));
Setting.setValue("ToolViews", QBitArray(GUI.ToolViews));
Setting.setValue("Terminal_Info", GUI.Term_Info);
Setting.setValue("Terminal_Data", GUI.Term_Data);
Setting.setValue("Terminal_Always", GUI.Term_Always);
Setting.setValue("Terminal_Send", GUI.Term_Send);
Setting.endGroup();
 
Setting.beginGroup("MKData");
Setting.setValue("Plotter_Count", Data.Plotter_Count);
Setting.setValue("Debug_Fast", Data.Debug_Fast);
Setting.setValue("Debug_Slow", Data.Debug_Slow);
Setting.setValue("Debug_Off", Data.Debug_Off);
Setting.setValue("Navi_Fast", Data.Navi_Fast);
Setting.setValue("Navi_Slow", Data.Navi_Slow);
Setting.setValue("Navi_Off", Data.Navi_Off);
Setting.endGroup();
 
Setting.beginGroup("GoogleEarth-Server");
Setting.setValue("Port", Server.Port);
Setting.setValue("StartServer", Server.StartServer);
Setting.setValue("ToGround", Server.ToGround);
Setting.endGroup();
 
Setting.beginGroup("QMK-Server");
Setting.setValue("Login", Server.QMKS_Login);
Setting.setValue("Password", Server.QMKS_Password);
Setting.endGroup();
}
 
cSettings::~cSettings()
{
}
 
 
/QMK-Groundstation/branches/waypoint/Classes/cSettings.h
0,0 → 1,101
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef CSETTINGS_H
#define CSETTINGS_H
 
#include "../global.h"
 
struct set_TTY
{
QString Port;
};
 
struct set_GUI
{
bool isMax;
QSize Size;
QPoint Point;
QBitArray TabViews;
QBitArray ToolViews;
bool Term_Info;
bool Term_Data;
bool Term_Always;
bool Term_Send;
};
 
struct set_Data
{
int Plotter_Count;
int Debug_Fast;
int Debug_Slow;
int Debug_Off;
int Navi_Fast;
int Navi_Slow;
int Navi_Off;
};
 
struct set_DIR
{
QString Logging;
QString Parameter;
};
 
struct set_Server
{
QString Port;
bool StartServer;
bool ToGround;
QString QMKS_Login;
QString QMKS_Password;
};
 
 
struct set_Analog
{
QString Version;
QString Label[MaxAnalog];
QBitArray PlotView;
QBitArray LogView;
};
 
class cSettings
{
public:
cSettings();
~cSettings();
 
int Settings_ID;
 
set_GUI GUI;
set_DIR DIR;
set_TTY TTY;
set_Analog Analog1;
set_Data Data;
set_Server Server;
 
void read_Settings();
void read_SettingsID();
void write_Settings();
void write_Settings_Analog(int ID = 0);
void read_Settings_Analog(int ID = 0);
void write_Settings_AnalogLabels(int ID = 0);
void read_Settings_AnalogLabels(int ID = 0);
};
 
#endif
/QMK-Groundstation/branches/waypoint/Classes/cSpeedMeter.cpp
0,0 → 1,44
#include <qpainter.h>
#include <qwt_dial_needle.h>
#include "cSpeedMeter.h"
 
cSpeedMeter::cSpeedMeter(QWidget *parent): QwtDial(parent), d_label("m/s")
{
setWrapping(false);
setReadOnly(true);
 
setOrigin(125.0);
setScaleArc(0.0, 270.0);
scaleDraw()->setSpacing(8);
 
QwtDialSimpleNeedle *needle = new QwtDialSimpleNeedle(QwtDialSimpleNeedle::Arrow, true, Qt::red, QColor(Qt::gray).light(130));
setNeedle(needle);
 
setScaleOptions(ScaleTicks | ScaleLabel);
setScaleTicks(0, 4, 8);
}
 
void cSpeedMeter::setLabel(const QString &label)
{
d_label = label;
update();
}
 
QString cSpeedMeter::label() const
{
return d_label;
}
 
void cSpeedMeter::drawScaleContents(QPainter *painter, const QPoint &center, int radius) const
{
QRect rect(0, 0, 2 * radius, 2 * radius - 10);
rect.moveCenter(center);
 
const QColor color =
 
palette().color(QPalette::Text);
painter->setPen(color);
 
const int flags = Qt::AlignBottom | Qt::AlignHCenter;
painter->drawText(rect, flags, d_label);
}
/QMK-Groundstation/branches/waypoint/Classes/cSpeedMeter.h
0,0 → 1,17
#include <qstring.h>
#include <qwt_dial.h>
 
class cSpeedMeter: public QwtDial
{
public:
cSpeedMeter(QWidget *parent = NULL);
 
void setLabel(const QString &);
QString label() const;
 
protected:
virtual void drawScaleContents(QPainter *painter, const QPoint &center, int radius) const;
 
private:
QString d_label;
};
/QMK-Groundstation/branches/waypoint/Forms/dlg_Config.cpp
0,0 → 1,127
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "dlg_Config.h"
 
dlg_Config::dlg_Config(QWidget *parent) : QDialog(parent)
{
setupUi(this);
 
cb_Plot[0] = cb_Plot_0;
cb_Plot[1] = cb_Plot_1;
cb_Plot[2] = cb_Plot_2;
cb_Plot[3] = cb_Plot_3;
cb_Plot[4] = cb_Plot_4;
cb_Plot[5] = cb_Plot_5;
cb_Plot[6] = cb_Plot_6;
cb_Plot[7] = cb_Plot_7;
cb_Plot[8] = cb_Plot_8;
cb_Plot[9] = cb_Plot_9;
cb_Plot[10] = cb_Plot_10;
cb_Plot[11] = cb_Plot_11;
cb_Plot[12] = cb_Plot_12;
cb_Plot[13] = cb_Plot_13;
cb_Plot[14] = cb_Plot_14;
cb_Plot[15] = cb_Plot_15;
cb_Plot[16] = cb_Plot_16;
cb_Plot[17] = cb_Plot_17;
cb_Plot[18] = cb_Plot_18;
cb_Plot[19] = cb_Plot_19;
cb_Plot[20] = cb_Plot_20;
cb_Plot[21] = cb_Plot_21;
cb_Plot[22] = cb_Plot_22;
cb_Plot[23] = cb_Plot_23;
cb_Plot[24] = cb_Plot_24;
cb_Plot[25] = cb_Plot_25;
cb_Plot[26] = cb_Plot_26;
cb_Plot[27] = cb_Plot_27;
cb_Plot[28] = cb_Plot_28;
cb_Plot[29] = cb_Plot_29;
cb_Plot[30] = cb_Plot_30;
cb_Plot[31] = cb_Plot_31;
 
cb_Log[0] = cb_Log_0;
cb_Log[1] = cb_Log_1;
cb_Log[2] = cb_Log_2;
cb_Log[3] = cb_Log_3;
cb_Log[4] = cb_Log_4;
cb_Log[5] = cb_Log_5;
cb_Log[6] = cb_Log_6;
cb_Log[7] = cb_Log_7;
cb_Log[8] = cb_Log_8;
cb_Log[9] = cb_Log_9;
cb_Log[10] = cb_Log_10;
cb_Log[11] = cb_Log_11;
cb_Log[12] = cb_Log_12;
cb_Log[13] = cb_Log_13;
cb_Log[14] = cb_Log_14;
cb_Log[15] = cb_Log_15;
cb_Log[16] = cb_Log_16;
cb_Log[17] = cb_Log_17;
cb_Log[18] = cb_Log_18;
cb_Log[19] = cb_Log_19;
cb_Log[20] = cb_Log_20;
cb_Log[21] = cb_Log_21;
cb_Log[22] = cb_Log_22;
cb_Log[23] = cb_Log_23;
cb_Log[24] = cb_Log_24;
cb_Log[25] = cb_Log_25;
cb_Log[26] = cb_Log_26;
cb_Log[27] = cb_Log_27;
cb_Log[28] = cb_Log_28;
cb_Log[29] = cb_Log_29;
cb_Log[30] = cb_Log_30;
cb_Log[31] = cb_Log_31;
 
}
 
void dlg_Config::set_Settings(cSettings *Set, int ID)
{
Settings = Set;
 
lb_Hardware->setText(HardwareType[ID]);
 
for (int a = 0; a < MaxAnalog; a++)
{
cb_Plot[a]->setText(Settings->Analog1.Label[a]);
cb_Plot[a]->setChecked(Settings->Analog1.PlotView[a]);
cb_Log[a]->setText(Settings->Analog1.Label[a]);
cb_Log[a]->setChecked(Settings->Analog1.LogView[a]);
}
}
 
cSettings *dlg_Config::get_Settings()
{
for (int a = 0; a < MaxAnalog; a++)
{
Settings->Analog1.PlotView.setBit(a,cb_Plot[a]->isChecked());
}
 
for (int a = 0; a < MaxAnalog; a++)
{
Settings->Analog1.LogView.setBit(a,cb_Log[a]->isChecked());
}
 
return Settings;
}
 
dlg_Config::~dlg_Config()
{
}
 
 
/QMK-Groundstation/branches/waypoint/Forms/dlg_Config.h
0,0 → 1,45
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef DLG_CONFIG_H
#define DLG_CONFIG_H
 
#include <QCheckBox>
 
#include "ui_dlg_Config.h"
#include "../Classes/cSettings.h"
//#include "../global.h"
 
class dlg_Config : public QDialog, public Ui::dlg_Config_UI
{
public:
dlg_Config(QWidget *parent = 0);
 
~dlg_Config();
 
void set_Settings(cSettings *Set, int ID = 0);
cSettings *get_Settings();
 
private:
cSettings *Settings;
QCheckBox *cb_Plot[MaxAnalog];
QCheckBox *cb_Log[MaxAnalog];
 
};
 
#endif
/QMK-Groundstation/branches/waypoint/Forms/dlg_Config.ui
0,0 → 1,690
<ui version="4.0" >
<class>dlg_Config_UI</class>
<widget class="QDialog" name="dlg_Config_UI" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>528</width>
<height>335</height>
</rect>
</property>
<property name="windowTitle" >
<string>Auswahl Datenfelder</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="margin" >
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Datenfelder für: </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lb_Hardware" >
<property name="font" >
<font>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Default</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>131</width>
<height>31</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="okButton" >
<property name="text" >
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton" >
<property name="text" >
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" >
<widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" >
<number>0</number>
</property>
<widget class="QWidget" name="ct_3" >
<attribute name="title" >
<string>Auswahl Plotter </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_6" >
<item row="1" column="0" >
<widget class="QFrame" name="frame" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" >
<widget class="QCheckBox" name="cb_Plot_0" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="cb_Plot_1" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="cb_Plot_2" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="cb_Plot_3" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="cb_Plot_4" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="cb_Plot_5" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QCheckBox" name="cb_Plot_6" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QCheckBox" name="cb_Plot_7" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1" >
<widget class="QFrame" name="frame_2" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_3" >
<item row="0" column="0" >
<widget class="QCheckBox" name="cb_Plot_8" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="cb_Plot_9" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="cb_Plot_10" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="cb_Plot_11" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="cb_Plot_12" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="cb_Plot_13" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QCheckBox" name="cb_Plot_14" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QCheckBox" name="cb_Plot_15" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="2" >
<widget class="QFrame" name="frame_3" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4" >
<item row="0" column="0" >
<widget class="QCheckBox" name="cb_Plot_16" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="cb_Plot_17" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="cb_Plot_18" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="cb_Plot_19" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="cb_Plot_20" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="cb_Plot_21" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QCheckBox" name="cb_Plot_22" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QCheckBox" name="cb_Plot_23" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="3" >
<widget class="QFrame" name="frame_4" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_5" >
<item row="0" column="0" >
<widget class="QCheckBox" name="cb_Plot_24" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="cb_Plot_25" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="cb_Plot_26" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="cb_Plot_27" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="cb_Plot_28" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="cb_Plot_29" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QCheckBox" name="cb_Plot_30" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QCheckBox" name="cb_Plot_31" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0" colspan="4" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Auswahl der Analogwerte, die im Plotter angezeigt werden.</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="ct_2" >
<attribute name="title" >
<string>Auswahl CSV-Record </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_11" >
<item row="1" column="0" >
<widget class="QFrame" name="frame_5" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_7" >
<item row="0" column="0" >
<widget class="QCheckBox" name="cb_Log_0" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="cb_Log_1" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="cb_Log_2" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="cb_Log_3" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="cb_Log_4" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="cb_Log_5" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QCheckBox" name="cb_Log_6" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QCheckBox" name="cb_Log_7" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1" >
<widget class="QFrame" name="frame_6" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_8" >
<item row="0" column="0" >
<widget class="QCheckBox" name="cb_Log_8" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="cb_Log_9" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="cb_Log_10" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="cb_Log_11" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="cb_Log_12" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="cb_Log_13" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QCheckBox" name="cb_Log_14" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QCheckBox" name="cb_Log_15" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="2" >
<widget class="QFrame" name="frame_7" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_9" >
<item row="0" column="0" >
<widget class="QCheckBox" name="cb_Log_16" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="cb_Log_17" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="cb_Log_18" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="cb_Log_19" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="cb_Log_20" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="cb_Log_21" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QCheckBox" name="cb_Log_22" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QCheckBox" name="cb_Log_23" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="3" >
<widget class="QFrame" name="frame_8" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_10" >
<item row="0" column="0" >
<widget class="QCheckBox" name="cb_Log_24" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="cb_Log_25" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="cb_Log_26" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="cb_Log_27" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="cb_Log_28" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="cb_Log_29" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QCheckBox" name="cb_Log_30" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QCheckBox" name="cb_Log_31" >
<property name="text" >
<string>CheckBox</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0" colspan="4" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Auswahl der Analogwerte, die ins Log-File geschrieben werden.</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>okButton</sender>
<signal>clicked()</signal>
<receiver>dlg_Config_UI</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>278</x>
<y>253</y>
</hint>
<hint type="destinationlabel" >
<x>96</x>
<y>254</y>
</hint>
</hints>
</connection>
<connection>
<sender>cancelButton</sender>
<signal>clicked()</signal>
<receiver>dlg_Config_UI</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>369</x>
<y>253</y>
</hint>
<hint type="destinationlabel" >
<x>179</x>
<y>282</y>
</hint>
</hints>
</connection>
</connections>
</ui>
/QMK-Groundstation/branches/waypoint/Forms/dlg_LCD.cpp
0,0 → 1,32
/***************************************************************************
* Copyright (C) 2009 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "dlg_LCD.h"
 
dlg_LCD::dlg_LCD(QWidget *parent) : QDialog(parent)
{
setupUi(this);
}
 
void dlg_LCD::show_Data(int *Data)
{
le_LCD0->setText(ToolBox::Data2QString(Data,2,22));
le_LCD1->setText(ToolBox::Data2QString(Data,22,42));
le_LCD2->setText(ToolBox::Data2QString(Data,42,62));
le_LCD3->setText(ToolBox::Data2QString(Data,62,82));
}
/QMK-Groundstation/branches/waypoint/Forms/dlg_LCD.h
0,0 → 1,36
/***************************************************************************
* Copyright (C) 2009 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef DLG_LCD_H
#define DLG_LCD_H
 
#include <QObject>
 
#include "ui_dlg_LCD.h"
#include "../Classes/ToolBox.h"
 
class dlg_LCD : public QDialog, public Ui::dlg_LCD_UI
{
Q_OBJECT
 
public:
dlg_LCD(QWidget *parent = 0);
void show_Data(int *Data);
};
 
#endif // DLG_LCD_H
/QMK-Groundstation/branches/waypoint/Forms/dlg_LCD.ui
0,0 → 1,208
<ui version="4.0" >
<class>dlg_LCD_UI</class>
<widget class="QDialog" name="dlg_LCD_UI" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>250</width>
<height>205</height>
</rect>
</property>
<property name="windowTitle" >
<string>LCD-Display</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<layout class="QGridLayout" name="gridLayout_41" >
<item row="0" column="0" colspan="3" >
<widget class="QLineEdit" name="le_LCD0" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>240</width>
<height>0</height>
</size>
</property>
<property name="font" >
<font>
<family>Courier 10 Pitch</family>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string/>
</property>
<property name="maxLength" >
<number>22</number>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3" >
<widget class="QLineEdit" name="le_LCD1" >
<property name="minimumSize" >
<size>
<width>240</width>
<height>0</height>
</size>
</property>
<property name="font" >
<font>
<family>Courier 10 Pitch</family>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string/>
</property>
<property name="maxLength" >
<number>22</number>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="readOnly" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3" >
<widget class="QLineEdit" name="le_LCD2" >
<property name="minimumSize" >
<size>
<width>240</width>
<height>0</height>
</size>
</property>
<property name="font" >
<font>
<family>Courier 10 Pitch</family>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string/>
</property>
<property name="maxLength" >
<number>22</number>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="readOnly" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3" >
<widget class="QLineEdit" name="le_LCD3" >
<property name="minimumSize" >
<size>
<width>240</width>
<height>0</height>
</size>
</property>
<property name="font" >
<font>
<family>Courier 10 Pitch</family>
<pointsize>12</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string/>
</property>
<property name="maxLength" >
<number>22</number>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="cb_LCD" >
<property name="text" >
<string>Auto-Refresh </string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QPushButton" name="pb_LCDdown" >
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Arrows/Images/Arrows/Left-1.png</normaloff>:/Arrows/Images/Arrows/Left-1.png</iconset>
</property>
</widget>
</item>
<item row="4" column="2" >
<widget class="QPushButton" name="pb_LCDup" >
<property name="text" >
<string/>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Arrows/Images/Arrows/Right-1.png</normaloff>:/Arrows/Images/Arrows/Right-1.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" >
<widget class="QPushButton" name="pushButton" >
<property name="text" >
<string>Schließen</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../MKTool.qrc" />
</resources>
<connections>
<connection>
<sender>pushButton</sender>
<signal>clicked()</signal>
<receiver>dlg_LCD_UI</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel" >
<x>124</x>
<y>187</y>
</hint>
<hint type="destinationlabel" >
<x>124</x>
<y>102</y>
</hint>
</hints>
</connection>
</connections>
</ui>
/QMK-Groundstation/branches/waypoint/Forms/dlg_Motortest.cpp
0,0 → 1,41
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "dlg_Motortest.h"
 
dlg_Motortest::dlg_Motortest(QWidget *parent) : QDialog(parent)
{
setupUi(this);
connect(sl_Left, SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int)));
connect(sl_Right, SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int)));
connect(sl_Front, SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int)));
connect(sl_Back, SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int)));
connect(sl_All, SIGNAL(valueChanged(int)), this, SLOT(slot_Motortest(int)));
}
 
void dlg_Motortest::slot_Motortest(int Wert)
{
Wert = Wert;
emit updateMotor(sl_Front->value(),sl_Back->value(),sl_Left->value(),sl_Right->value());
}
 
dlg_Motortest::~dlg_Motortest()
{
}
 
 
/QMK-Groundstation/branches/waypoint/Forms/dlg_Motortest.h
0,0 → 1,42
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef DLG_MOTORTEST_H
#define DLG_MOTORTEST_H
 
#include <QObject>
 
#include "ui_dlg_Motortest.h"
//#include "../global.h"
 
class dlg_Motortest : public QDialog, public Ui::dlg_Motortest_UI
{
Q_OBJECT
 
public:
dlg_Motortest(QWidget *parent = 0);
~dlg_Motortest();
 
private slots:
void slot_Motortest(int Wert);
 
signals:
void updateMotor(int Motor1, int Motor2, int Motor3, int Motor4);
};
 
#endif
/QMK-Groundstation/branches/waypoint/Forms/dlg_Motortest.ui
0,0 → 1,226
<ui version="4.0" >
<class>dlg_Motortest_UI</class>
<widget class="QDialog" name="dlg_Motortest_UI" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>253</width>
<height>193</height>
</rect>
</property>
<property name="windowTitle" >
<string>Motortest</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label_133" >
<property name="text" >
<string>Links</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSlider" name="sl_Left" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximum" >
<number>255</number>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_135" >
<property name="text" >
<string>Rechts</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QSlider" name="sl_Right" >
<property name="maximum" >
<number>255</number>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_136" >
<property name="text" >
<string>Vorn</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QSlider" name="sl_Front" >
<property name="maximum" >
<number>255</number>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_137" >
<property name="text" >
<string>Hinten</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QSlider" name="sl_Back" >
<property name="maximum" >
<number>255</number>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2" >
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="label_138" >
<property name="text" >
<string>Alle</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QSlider" name="sl_All" >
<property name="maximum" >
<number>255</number>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2" >
<widget class="Line" name="line_2" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="8" column="1" >
<widget class="QPushButton" name="pb_OK" >
<property name="text" >
<string>OK</string>
</property>
</widget>
</item>
</layout>
<zorder>sl_All</zorder>
<zorder>sl_Left</zorder>
<zorder>sl_Right</zorder>
<zorder>label_137</zorder>
<zorder>label_136</zorder>
<zorder>sl_Front</zorder>
<zorder>label_138</zorder>
<zorder>sl_Back</zorder>
<zorder>label_133</zorder>
<zorder>label_135</zorder>
<zorder>line</zorder>
<zorder>line_2</zorder>
<zorder>pb_OK</zorder>
</widget>
<resources/>
<connections>
<connection>
<sender>sl_All</sender>
<signal>valueChanged(int)</signal>
<receiver>sl_Back</receiver>
<slot>setValue(int)</slot>
<hints>
<hint type="sourcelabel" >
<x>132</x>
<y>133</y>
</hint>
<hint type="destinationlabel" >
<x>131</x>
<y>108</y>
</hint>
</hints>
</connection>
<connection>
<sender>sl_All</sender>
<signal>valueChanged(int)</signal>
<receiver>sl_Front</receiver>
<slot>setValue(int)</slot>
<hints>
<hint type="sourcelabel" >
<x>166</x>
<y>137</y>
</hint>
<hint type="destinationlabel" >
<x>166</x>
<y>76</y>
</hint>
</hints>
</connection>
<connection>
<sender>sl_All</sender>
<signal>valueChanged(int)</signal>
<receiver>sl_Right</receiver>
<slot>setValue(int)</slot>
<hints>
<hint type="sourcelabel" >
<x>202</x>
<y>130</y>
</hint>
<hint type="destinationlabel" >
<x>204</x>
<y>50</y>
</hint>
</hints>
</connection>
<connection>
<sender>sl_All</sender>
<signal>valueChanged(int)</signal>
<receiver>sl_Left</receiver>
<slot>setValue(int)</slot>
<hints>
<hint type="sourcelabel" >
<x>241</x>
<y>144</y>
</hint>
<hint type="destinationlabel" >
<x>240</x>
<y>17</y>
</hint>
</hints>
</connection>
<connection>
<sender>pb_OK</sender>
<signal>clicked()</signal>
<receiver>dlg_Motortest_UI</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>63</x>
<y>174</y>
</hint>
<hint type="destinationlabel" >
<x>29</x>
<y>177</y>
</hint>
</hints>
</connection>
</connections>
</ui>
/QMK-Groundstation/branches/waypoint/Forms/dlg_Preferences.cpp
0,0 → 1,99
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "dlg_Preferences.h"
 
dlg_Preferences::dlg_Preferences(QWidget *parent) : QDialog(parent)
{
setupUi(this);
connect(pb_DIR_CVS, SIGNAL(clicked()), this, SLOT(slot_DIR_CVS()));
connect(pb_DIR_SET, SIGNAL(clicked()), this, SLOT(slot_DIR_SET()));
}
 
void dlg_Preferences::set_Settings(cSettings *Set)
{
Settings = Set;
 
le_DIR_CVS->setText(Settings->DIR.Logging);
le_DIR_SET->setText(Settings->DIR.Parameter);
le_TTY->setText(Settings->TTY.Port);
sp_Plotter_Count->setValue(Settings->Data.Plotter_Count);
sp_Debug_Fast->setValue(Settings->Data.Debug_Fast);
sp_Debug_Slow->setValue(Settings->Data.Debug_Slow);
sp_Debug_Off->setValue(Settings->Data.Debug_Off);
sp_Navi_Fast->setValue(Settings->Data.Navi_Fast);
sp_Navi_Slow->setValue(Settings->Data.Navi_Slow);
sp_Navi_Off->setValue(Settings->Data.Navi_Off);
le_ServerPort->setText(Settings->Server.Port);
cb_StartServer->setChecked(Settings->Server.StartServer);
cb_ToGround->setChecked(Settings->Server.ToGround);
le_Login->setText(Settings->Server.QMKS_Login);
le_Password->setText(Settings->Server.QMKS_Password);
}
 
cSettings *dlg_Preferences::get_Settings()
{
Settings->TTY.Port = le_TTY->text();
Settings->Data.Plotter_Count = sp_Plotter_Count->value();
Settings->Data.Debug_Fast = sp_Debug_Fast->value();
Settings->Data.Debug_Slow = sp_Debug_Slow->value();
Settings->Data.Debug_Off = sp_Debug_Off->value();
Settings->Data.Navi_Fast = sp_Navi_Fast->value();
Settings->Data.Navi_Slow = sp_Navi_Slow->value();
Settings->Data.Navi_Off = sp_Navi_Off->value();
Settings->Server.Port = le_ServerPort->text();
Settings->Server.StartServer = cb_StartServer->isChecked();
Settings->Server.ToGround = cb_ToGround->isChecked();
Settings->Server.QMKS_Login = le_Login->text();
Settings->Server.QMKS_Password = le_Password->text();
 
return Settings;
}
 
// Configuration -> Verzeichnisse
/////////////////////////////////
void dlg_Preferences::slot_DIR_CVS()
{
QString directory = QFileDialog::getExistingDirectory(this, trUtf8("Verzeichniss für CSV-Logdateien"), Settings->DIR.Logging, QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly);
 
if ((!directory.isEmpty()) && (Settings->DIR.Logging != directory))
{
Settings->DIR.Logging = directory;
le_DIR_CVS->setText(Settings->DIR.Logging);
// Settings->write_Settings();
}
}
 
void dlg_Preferences::slot_DIR_SET()
{
QString directory = QFileDialog::getExistingDirectory(this, trUtf8("Verzeichniss für Settings-Dateien"), Settings->DIR.Parameter, QFileDialog::DontResolveSymlinks | QFileDialog::ShowDirsOnly);
 
if ((!directory.isEmpty()) && (Settings->DIR.Parameter != directory))
{
Settings->DIR.Parameter = directory;
le_DIR_SET->setText(Settings->DIR.Parameter);
// Settings->write_Settings();
}
 
}
 
dlg_Preferences::~dlg_Preferences()
{
}
 
 
/QMK-Groundstation/branches/waypoint/Forms/dlg_Preferences.h
0,0 → 1,49
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef DLG_PREFERENCES_H
#define DLG_PREFERENCES_H
 
#include <QCheckBox>
#include <QFileDialog>
 
#include "ui_dlg_Preferences.h"
#include "../Classes/cSettings.h"
//#include "../global.h"
 
class dlg_Preferences : public QDialog, public Ui::dlg_Preferences_UI
{
Q_OBJECT
 
public:
dlg_Preferences(QWidget *parent = 0);
 
~dlg_Preferences();
 
void set_Settings(cSettings *Set);
cSettings *get_Settings();
 
private:
cSettings *Settings;
 
private slots:
void slot_DIR_CVS();
void slot_DIR_SET();
};
 
#endif
/QMK-Groundstation/branches/waypoint/Forms/dlg_Preferences.ui
0,0 → 1,682
<ui version="4.0" >
<class>dlg_Preferences_UI</class>
<widget class="QDialog" name="dlg_Preferences_UI" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>395</width>
<height>298</height>
</rect>
</property>
<property name="windowTitle" >
<string>Einstellungen</string>
</property>
<layout class="QGridLayout" name="gridLayout_4" >
<item row="1" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>131</width>
<height>31</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="okButton" >
<property name="text" >
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton" >
<property name="text" >
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" >
<widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" >
<number>0</number>
</property>
<property name="usesScrollButtons" >
<bool>true</bool>
</property>
<widget class="QWidget" name="Tab_1" >
<attribute name="title" >
<string>Verbindung </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_7" >
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox_5" >
<property name="title" >
<string>Serieller Port für Verbindung zum MK.</string>
</property>
<layout class="QGridLayout" name="gridLayout_6" >
<item row="0" column="0" >
<widget class="QLabel" name="label_6" >
<property name="text" >
<string>Device: </string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_TTY" >
<property name="text" >
<string>/dev/ttyS0</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" >
<widget class="QGroupBox" name="groupBox_6" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="title" >
<string>ISP-Adapter (Flash AVR)</string>
</property>
<layout class="QGridLayout" name="gridLayout_5" >
<item row="0" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>ISP-Adapter: </string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QComboBox" name="comboBox" >
<item>
<property name="text" >
<string>Sercon</string>
</property>
</item>
<item>
<property name="text" >
<string>STK200</string>
</property>
</item>
<item>
<property name="text" >
<string>USBProg</string>
</property>
</item>
<item>
<property name="text" >
<string>Atmel AVR ISP (STK500)</string>
</property>
</item>
<item>
<property name="text" >
<string>Atmel AVR ISP mkII (STK500v1)</string>
</property>
</item>
<item>
<property name="text" >
<string>Atmel AVR ISP mkII (STK500v2)</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>Device: </string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="lineEdit_2" />
</item>
<item row="2" column="0" colspan="2" >
<widget class="QCheckBox" name="checkBox_2" >
<property name="text" >
<string>Serielle Firmeware-Updates mit AVRDUDE</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" >
<spacer name="verticalSpacer_2" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>50</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_2" >
<attribute name="title" >
<string>Debug-Daten</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3" >
<item row="0" column="0" colspan="2" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Debug-Daten intervall</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Intervall langsam :</string>
</property>
</widget>
</item>
<item row="0" column="3" >
<widget class="QSpinBox" name="sp_Debug_Slow" >
<property name="suffix" >
<string> ms</string>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>2550</number>
</property>
<property name="singleStep" >
<number>10</number>
</property>
<property name="value" >
<number>500</number>
</property>
</widget>
</item>
<item rowspan="2" row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Intervall schnell :</string>
</property>
</widget>
</item>
<item rowspan="2" row="1" column="3" >
<widget class="QSpinBox" name="sp_Debug_Fast" >
<property name="suffix" >
<string> ms</string>
</property>
<property name="prefix" >
<string/>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>2550</number>
</property>
<property name="singleStep" >
<number>10</number>
</property>
<property name="value" >
<number>100</number>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_10" >
<property name="text" >
<string>Intervall offline :</string>
</property>
</widget>
</item>
<item row="3" column="3" >
<widget class="QSpinBox" name="sp_Debug_Off" >
<property name="suffix" >
<string> ms</string>
</property>
<property name="prefix" >
<string/>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>2550</number>
</property>
<property name="singleStep" >
<number>10</number>
</property>
<property name="value" >
<number>1000</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" colspan="2" >
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Plotter</string>
</property>
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Angezeigte Datensätze :</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="sp_Plotter_Count" >
<property name="minimum" >
<number>50</number>
</property>
<property name="maximum" >
<number>250</number>
</property>
<property name="singleStep" >
<number>5</number>
</property>
<property name="value" >
<number>100</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" colspan="2" >
<spacer name="verticalSpacer_4" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="Seite" >
<attribute name="title" >
<string>Navi-Daten</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_11" >
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox_9" >
<property name="title" >
<string>Navi-Daten Intervall</string>
</property>
<layout class="QGridLayout" name="gridLayout_10" >
<item row="0" column="0" >
<widget class="QLabel" name="label_8" >
<property name="text" >
<string>Intervall langsam :</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="sp_Navi_Slow" >
<property name="suffix" >
<string> ms</string>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>2550</number>
</property>
<property name="singleStep" >
<number>10</number>
</property>
<property name="value" >
<number>500</number>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_9" >
<property name="text" >
<string>Intervall schnell :</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QSpinBox" name="sp_Navi_Fast" >
<property name="suffix" >
<string> ms</string>
</property>
<property name="prefix" >
<string/>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>2550</number>
</property>
<property name="singleStep" >
<number>10</number>
</property>
<property name="value" >
<number>100</number>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_11" >
<property name="text" >
<string>Intervall offline :</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QSpinBox" name="sp_Navi_Off" >
<property name="suffix" >
<string> ms</string>
</property>
<property name="prefix" >
<string/>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>2550</number>
</property>
<property name="singleStep" >
<number>10</number>
</property>
<property name="value" >
<number>250</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" >
<spacer name="verticalSpacer_5" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>375</width>
<height>76</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_3" >
<attribute name="title" >
<string>Verzeichnisse</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3" >
<item>
<widget class="QGroupBox" name="groupBox_3" >
<property name="title" >
<string>Verzeichniss für CVS-Dateien (Datenrecorder)</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
<widget class="QLineEdit" name="le_DIR_CVS" />
</item>
<item>
<widget class="QPushButton" name="pb_DIR_CVS" >
<property name="text" >
<string>Verzeichniss auswählen</string>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/22X22/folder-print.png</normaloff>:/Actions/Images/22X22/folder-print.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4" >
<property name="title" >
<string>Verzeichniss für Setting-Dateien</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<widget class="QLineEdit" name="le_DIR_SET" />
</item>
<item>
<widget class="QPushButton" name="pb_DIR_SET" >
<property name="text" >
<string>Verzeichniss auswählen</string>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/22X22/folder.png</normaloff>:/Actions/Images/22X22/folder.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_4" >
<attribute name="title" >
<string>Google Earth</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4" >
<item>
<widget class="QGroupBox" name="groupBox_7" >
<property name="title" >
<string>Server</string>
</property>
<layout class="QGridLayout" name="gridLayout_8" >
<item row="0" column="0" >
<widget class="QLabel" name="label_7" >
<property name="text" >
<string>Serverport: </string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_ServerPort" >
<property name="text" >
<string>10664</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2" >
<widget class="QCheckBox" name="cb_StartServer" >
<property name="text" >
<string>Google Earth Server automatisch starten</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_8" >
<property name="title" >
<string>Datenanzeige</string>
</property>
<layout class="QGridLayout" name="gridLayout_9" >
<item row="0" column="0" >
<widget class="QCheckBox" name="cb_ToGround" >
<property name="text" >
<string>Höhe bis zum Boden verlängern</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>37</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="Seite_2" >
<attribute name="title" >
<string>QMK-Datenserver</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_14" >
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox_10" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="title" >
<string>Server</string>
</property>
<layout class="QGridLayout" name="gridLayout_12" >
<item row="0" column="0" >
<widget class="QLabel" name="label_12" >
<property name="text" >
<string>Server:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="lineEdit" >
<property name="text" >
<string>nimari.de</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_13" >
<property name="text" >
<string>Port:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="lineEdit_3" >
<property name="text" >
<string>16441</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" >
<widget class="QGroupBox" name="groupBox_11" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="title" >
<string>Logindaten</string>
</property>
<layout class="QGridLayout" name="gridLayout_13" >
<item row="0" column="0" >
<widget class="QLabel" name="label_14" >
<property name="text" >
<string>Loginname:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_Login" />
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_15" >
<property name="text" >
<string>Password:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_Password" >
<property name="echoMode" >
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../MKTool.qrc" />
</resources>
<connections>
<connection>
<sender>okButton</sender>
<signal>clicked()</signal>
<receiver>dlg_Preferences_UI</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>278</x>
<y>253</y>
</hint>
<hint type="destinationlabel" >
<x>96</x>
<y>254</y>
</hint>
</hints>
</connection>
<connection>
<sender>cancelButton</sender>
<signal>clicked()</signal>
<receiver>dlg_Preferences_UI</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>369</x>
<y>253</y>
</hint>
<hint type="destinationlabel" >
<x>179</x>
<y>282</y>
</hint>
</hints>
</connection>
</connections>
</ui>
/QMK-Groundstation/branches/waypoint/Forms/mktool.cpp
0,0 → 1,1724
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
#include <QtGui>
 
#include <QLineEdit>
#include <QString>
#include <QTimer>
#include <QIcon>
#include <QToolButton>
#include <QSpinBox>
#include <QAction>
#include <QPalette>
 
#include "mktool.h"
#include "dlg_Config.h"
#include "dlg_Motortest.h"
#include "dlg_Preferences.h"
#include "../global.h"
#include "../Classes/ToolBox.h"
 
#include <stdlib.h>
 
MKTool::MKTool()
{
setupUi(this);
 
Settings = new cSettings;
 
init_Arrays();
init_GUI();
 
init_Objects();
init_Connections();
 
init_Plot();
}
 
void MKTool::init_GUI()
{
setWindowTitle(QA_NAME + " v" + QA_VERSION);
 
// Tab mit Debug-Elementen verbergen
tab_Main->removeTab(6);
 
// Settings-Tab hinzufügen.
f_Settings = new wdg_Settings( this );
f_Settings->set_Config(Settings);
tab_Main->insertTab ( 2, f_Settings, ac_View2->icon(), "FC-Settings");
tab_Main->widget(2)->setObjectName("Tab_2");
 
// Develop - Nicht gebrauchte sachen abschalten.
pb_SettingsReset->hide();
pb_Flash->hide();
rb_NC->hide();
 
// Zusätzliche Widgets in die Toolbar.
tb_TTY->addWidget(lb_Port);
tb_TTY->addWidget(le_Port);
 
tb_Hardware->addWidget(rb_SelFC);
tb_Hardware->addWidget(rb_SelNC);
tb_Hardware->addWidget(rb_SelMag);
 
tb_Allgemein->setVisible(Settings->GUI.ToolViews[0]);
tb_Werkzeuge->setVisible(Settings->GUI.ToolViews[1]);
tb_Debug->setVisible(Settings->GUI.ToolViews[2]);
tb_TTY->setVisible(Settings->GUI.ToolViews[3]);
tb_Hardware->setVisible(Settings->GUI.ToolViews[4]);
 
lb_Status->setText(tr("Hallo bei QMK-Groundstation...!!!"));
 
QPalette newPalette;
 
newPalette.setColor(QPalette::Base, Qt::darkBlue);
newPalette.setColor(QPalette::Foreground, QColor(Qt::darkBlue).dark(120));
newPalette.setColor(QPalette::Text, Qt::white);
 
Compass->setScaleOptions(QwtDial::ScaleTicks | QwtDial::ScaleLabel);
Compass->setScaleTicks(0, 0, 3);
Compass->setScale(36, 5, 0);
 
// Compass->setNeedle(new QwtCompassMagnetNeedle(QwtCompassMagnetNeedle::ThinStyle));
Compass->setNeedle(new QwtDialSimpleNeedle(QwtDialSimpleNeedle::Arrow, true, Qt::red, QColor(Qt::gray).light(130)));
Compass->setPalette(newPalette);
Compass->setMaximumSize(QSize(MeterSize, MeterSize));
Compass->setMinimumSize(QSize(MeterSize, MeterSize));
 
QPalette newPalette1;
 
newPalette1.setColor(QPalette::Base, Qt::darkBlue);
newPalette1.setColor(QPalette::Foreground, QColor(255,128,0).dark(120));
newPalette1.setColor(QPalette::Text, Qt::white);
 
Attitude = new AttitudeIndicator(this);
Attitude->setMaximumSize(QSize(MeterSize, MeterSize));
Attitude->setMinimumSize(QSize(MeterSize, MeterSize));
Attitude->setPalette(newPalette1);
 
verticalLayout->addWidget(Attitude);
 
qwt_Rate->setRange(-10.0, 10.0, 0.1, 0);
 
newPalette1.setColor(QPalette::Foreground, QColor(Qt::darkBlue).dark(120));
 
SpeedMeter = new cSpeedMeter(this);
SpeedMeter->setMaximumSize(QSize(MeterSize, MeterSize));
SpeedMeter->setMinimumSize(QSize(MeterSize, MeterSize));
SpeedMeter->setPalette(newPalette1);
SpeedMeter->setRange(0.0, 5.0);
SpeedMeter->setScale(1, 2, 0.5);
SpeedMeter->setProperty("END", 5);
 
LayOut_Speed->addWidget(SpeedMeter);
 
#ifdef _EEEPC_
lb_Status->hide();
#endif
 
resize(Settings->GUI.Size);
move(Settings->GUI.Point);
 
if (Settings->GUI.isMax)
{
showMaximized();
}
 
// Analoglabels anzeigen
for (int a = 0; a < MaxAnalog; a++)
{
lb_Analog[a]->setText(Settings->Analog1.Label[a]);
}
 
// Kopie der Tabs anlegen
// for (int b = 0; b < 7; b++)
for (int b = 0; b < 6; b++)
{
TabWidgets[b] = tab_Main->widget(b);
}
 
// Ausgeblendete Tabs ausblenden
// for (int c = 0; c < 7; c++)
for (int c = 0; c < 6; c++)
{
if (Settings->GUI.TabViews[c] == false)
{
QString TabName = QString("Tab_%1").arg(c);
 
for (int d = 0; d < tab_Main->count(); d++)
{
if (tab_Main->widget(d)->objectName() == TabName)
{
tab_Main->removeTab(d);
}
}
}
}
 
ac_View0->setChecked(Settings->GUI.TabViews[0]);
ac_View1->setChecked(Settings->GUI.TabViews[1]);
ac_View2->setChecked(Settings->GUI.TabViews[2]);
ac_View3->setChecked(Settings->GUI.TabViews[3]);
ac_View4->setChecked(Settings->GUI.TabViews[4]);
ac_View5->setChecked(Settings->GUI.TabViews[5]);
// ac_View6->setChecked(Settings->GUI.TabViews[6]);
 
le_Port->setText(Settings->TTY.Port);
 
cb_ShowMSG->setChecked(Settings->GUI.Term_Info);
cb_ShowData->setChecked(Settings->GUI.Term_Data);
cb_ShowAlways->setChecked(Settings->GUI.Term_Always);
}
 
void MKTool::init_Objects()
{
// QTimer-Instanzen
Ticker = new QTimer(this);
 
// Seriell-Port
serialPort = new ManageSerialPort;
 
// neuer Logger
logger = new Logger(Settings, &Mode);
 
// LCD-Dialog
f_LCD = new dlg_LCD(this);
 
// Senden erlauben (Warum auch immer)
AllowSend = true;
 
Server = new cServer();
 
MyServer = new cQMK_Server();
MyServer->setProperty("Connect", false);
 
 
if (Settings->Server.StartServer)
{
ac_StartServer->setChecked(true);
Server->start_Server(Settings->Server.Port.toInt(), Settings);
}
}
 
void MKTool::init_Connections()
{
connect(Dec, SIGNAL(clicked()), this, SLOT(slot_Test()));
 
// Seriel-Port Empfang
connect(serialPort, SIGNAL(newDataReceived(const QByteArray &)), this, SLOT(slot_newDataReceived(const QByteArray &)));
 
// Serielle Verbundung öffnen / schließen
connect(ac_ConnectTTY, SIGNAL(triggered()), this, SLOT(slot_OpenPort()));
 
// TCP-Connection verbinden / trennen
connect(ac_QMKServer, SIGNAL(triggered()), this, SLOT(slot_QMKS_Connect()));
 
// Buttons Settings lesen / schreiben
connect(f_Settings->pb_Read, SIGNAL(clicked()), this, SLOT(slot_GetFCSettings()));
connect(f_Settings->pb_Write, SIGNAL(clicked()), this, SLOT(slot_SetFCSettings()));
 
// Actions
connect(ac_Config, SIGNAL(triggered()), this, SLOT(slot_ac_Config()));
connect(ac_Preferences, SIGNAL(triggered()), this, SLOT(slot_ac_Preferences()));
connect(ac_Motortest, SIGNAL(triggered()), this, SLOT(slot_ac_Motortest()));
connect(ac_LCD, SIGNAL(triggered()), this, SLOT(slot_ac_LCD()));
connect(ac_FastDebug, SIGNAL(triggered()), this, SLOT(slot_ac_FastDebug()));
connect(ac_NoDebug, SIGNAL(triggered()), this, SLOT(slot_ac_NoDebug()));
connect(ac_FastNavi, SIGNAL(triggered()), this, SLOT(slot_ac_FastNavi()));
connect(ac_NoNavi, SIGNAL(triggered()), this, SLOT(slot_ac_NoNavi()));
connect(ac_GetLabels, SIGNAL(triggered()), this, SLOT(slot_ac_GetLabels()));
 
// Plotter starten / scrollen
connect(scroll_plot, SIGNAL(valueChanged(int)), this, SLOT(slot_ScrollPlot(int)));
connect(ac_StartPlotter, SIGNAL(triggered()), this, SLOT(slot_ac_StartPlotter()));
connect(ac_StartServer, SIGNAL(triggered()), this, SLOT(slot_ac_StartServer()));
 
// Tabs ein & ausblenden
connect(ac_View0, SIGNAL(triggered()), this, SLOT(slot_ac_View()));
connect(ac_View1, SIGNAL(triggered()), this, SLOT(slot_ac_View()));
connect(ac_View2, SIGNAL(triggered()), this, SLOT(slot_ac_View()));
connect(ac_View3, SIGNAL(triggered()), this, SLOT(slot_ac_View()));
connect(ac_View4, SIGNAL(triggered()), this, SLOT(slot_ac_View()));
connect(ac_View5, SIGNAL(triggered()), this, SLOT(slot_ac_View()));
connect(ac_View6, SIGNAL(triggered()), this, SLOT(slot_ac_View()));
 
connect(ac_SelNC, SIGNAL(triggered()), this, SLOT(slot_ac_Hardware()));
connect(ac_SelFC, SIGNAL(triggered()), this, SLOT(slot_ac_Hardware()));
connect(ac_SelMag, SIGNAL(triggered()), this, SLOT(slot_ac_Hardware()));
 
connect(rb_SelNC, SIGNAL(clicked()), this, SLOT(slot_rb_Hardware()));
connect(rb_SelFC, SIGNAL(clicked()), this, SLOT(slot_rb_Hardware()));
connect(rb_SelMag, SIGNAL(clicked()), this, SLOT(slot_rb_Hardware()));
 
// Wegpunkt-Befehl
connect(pb_FlyTo, SIGNAL(clicked()), this, SLOT(slot_ac_SendWaypoint()));
 
// firmeware Updateen / flashen
connect(pb_Update, SIGNAL(clicked()), this, SLOT(slot_pb_Update()));
connect(pb_HexFile, SIGNAL(clicked()), this, SLOT(slot_pb_HexFile()));
 
// CVS-Record starten / stoppen
connect(ac_RecordCSV, SIGNAL(triggered()), this, SLOT(slot_RecordLog()));
 
// Timer-Events
connect(Ticker, SIGNAL(timeout()), SLOT(slot_Ticker()));
 
// Seitenwechsel
connect(tab_Main, SIGNAL(currentChanged(int)), this, SLOT(slot_TabChanged(int)));
connect(f_Settings->tab_Par, SIGNAL(currentChanged(int)), this, SLOT(slot_TabChanged(int)));
 
// About QMK & About-QT Dialog einfügen
connect(ac_About, SIGNAL(triggered()), this, SLOT(slot_ac_About()));
menu_Help->addAction(trUtf8("Über &Qt"), qApp, SLOT(aboutQt()));
}
 
void MKTool::init_Arrays()
{
lb_Analog[0] = lb_A_0;
lb_Analog[1] = lb_A_1;
lb_Analog[2] = lb_A_2;
lb_Analog[3] = lb_A_3;
lb_Analog[4] = lb_A_4;
lb_Analog[5] = lb_A_5;
lb_Analog[6] = lb_A_6;
lb_Analog[7] = lb_A_7;
lb_Analog[8] = lb_A_8;
lb_Analog[9] = lb_A_9;
lb_Analog[10] = lb_A_10;
lb_Analog[11] = lb_A_11;
lb_Analog[12] = lb_A_12;
lb_Analog[13] = lb_A_13;
lb_Analog[14] = lb_A_14;
lb_Analog[15] = lb_A_15;
lb_Analog[16] = lb_A_16;
lb_Analog[17] = lb_A_17;
lb_Analog[18] = lb_A_18;
lb_Analog[19] = lb_A_19;
lb_Analog[20] = lb_A_20;
lb_Analog[21] = lb_A_21;
lb_Analog[22] = lb_A_22;
lb_Analog[23] = lb_A_23;
lb_Analog[24] = lb_A_24;
lb_Analog[25] = lb_A_25;
lb_Analog[26] = lb_A_26;
lb_Analog[27] = lb_A_27;
lb_Analog[28] = lb_A_28;
lb_Analog[29] = lb_A_29;
lb_Analog[30] = lb_A_30;
lb_Analog[31] = lb_A_31;
}
 
void MKTool::init_Plot()
{
NextPlot = 0;
 
qwtPlot->setCanvasBackground(QColor(QRgb(0x00000000)));
 
qwtPlot->insertLegend(new QwtLegend(), QwtPlot::RightLegend);
 
QwtPlotGrid *Grid = new QwtPlotGrid();
Grid->setMajPen(QPen(Qt::gray, 0, Qt::DotLine));
 
Grid->attach(qwtPlot);
 
qwtPlot->setAxisScale(QwtPlot::xBottom,0,Settings->Data.Plotter_Count,0);
 
for (int a = 0; a < MaxAnalog; a++)
{
Plot[a] = new QwtPlotCurve(Settings->Analog1.Label[a]);
Plot[a]->setPen(QPen(QColor(Def_Colors[a])));
Plot[a]->setRenderHint(QwtPlotItem::RenderAntialiased);
 
if (Settings->Analog1.PlotView[a])
Plot[a]->attach(qwtPlot);
}
qwtPlot->replot();
}
 
 
void MKTool::slot_Test()
{
/*
sRxData RX;
 
RX.String = IN->text();
RX.Input = IN->text().toLatin1().data();
 
new_RXData(RX);
*/
}
 
void MKTool::slot_ac_Hardware()
{
QAction *Action = (QAction*)sender();
 
if (Action->isChecked() == false)
{
Action->setChecked(true);
}
 
slot_rb_Hardware();
}
 
void MKTool::slot_rb_Hardware()
{
if ((rb_SelNC->isChecked() == false) && (Mode.ID != ADDRESS_NC))
{
lb_Status->setText(tr("Schalte um auf NaviCtrl."));
TX_Data[0] = 0x1B;
TX_Data[1] = 0x1B;
TX_Data[2] = 0x55;
TX_Data[3] = 0xAA;
TX_Data[4] = 0x00;
TX_Data[5] = '\r';
send_Data('#', ADDRESS_NC, TX_Data, 6, false);
ToolBox::Wait(SLEEP);
}
 
if (rb_SelFC->isChecked())
{
lb_Status->setText(tr("Schalte um auf FlightCtrl."));
TX_Data[0] = 0;
send_Data('u', ADDRESS_NC, TX_Data, 1, false);
}
else
if (rb_SelMag->isChecked())
{
lb_Status->setText(tr("Schalte um auf MK3MAG."));
TX_Data[0] = 1;
send_Data('u', ADDRESS_NC, TX_Data, 1, false);
}
else
if (rb_SelNC->isChecked())
{
lb_Status->setText(tr("Schalte um auf NaviCtrl."));
TX_Data[0] = 0x1B;
TX_Data[1] = 0x1B;
TX_Data[2] = 0x55;
TX_Data[3] = 0xAA;
TX_Data[4] = 0x00;
TX_Data[5] = '\r';
send_Data('#', ADDRESS_NC, TX_Data, 6, false);
}
ToolBox::Wait(SLEEP);
 
// qDebug("Select RB Hardware");
send_Data('v', ADDRESS_ALL, TX_Data, 0, true);
}
 
// Ticker-Event
///////////////
void MKTool::slot_Ticker()
{
if (TickerDiv)
TickerDiv = false;
else
TickerDiv = true;
 
for (int a = 0; a < MaxTickerEvents; a++)
{
if (TickerEvent[a] == true)
{
switch(a)
{
case 0 :
if (TickerDiv)
{
QByteArray Temp(LastSend.toUtf8());
serialPort->sendData(Temp);
}
break;
case 1 :
TX_Data[0] = 0;
send_Data('p', ADDRESS_FC, TX_Data, 0, false);
break;
case 2 :
if (f_LCD->cb_LCD->isChecked())
{
if (!f_LCD->isVisible())
{
Ticker->setInterval(2000);
TickerEvent[2] = false;
}
TX_Data[0] = LCD_Page;
TX_Data[1] = 0;
send_Data('l', ADDRESS_ALL, TX_Data, 1, true);
}
break;
case 3 :
if (ac_FastDebug->isChecked())
{
TX_Data[0] = Settings->Data.Debug_Fast / 10;
send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
}
else
{
TX_Data[0] = Settings->Data.Debug_Slow / 10;
send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
}
break;
}
}
}
}
 
void MKTool::slot_QMKS_Connect()
{
if (ac_QMKServer->isChecked())
{
lb_Status->setText(tr("Verbinde zum QMK-Datenserver."));
 
MyServer->Connect("nimari.de", 16441, Settings->Server.QMKS_Login, Settings->Server.QMKS_Password);
connect(MyServer, SIGNAL(sig_Connected()), this, SLOT(slot_QMKS_Connected()));
connect(MyServer, SIGNAL(sig_Disconnected(int)), this, SLOT(slot_QMKS_Disconnected(int)));
 
}
else
{
if ((MyServer->property("Connect")) == true)
{
disconnect(MyServer, SIGNAL(sig_Disconnected(int)), 0, 0);
lb_Status->setText(tr("Trenne vom QMK-Datenserver."));
 
MyServer->Disconnect();
MyServer->setProperty("Connect", false);
ac_QMKServer->setText("QMK-Server Verbinden");
}
}
}
 
void MKTool::slot_QMKS_Connected()
{
MyServer->setProperty("Connect", true);
ac_QMKServer->setText("QMK-Server Trennnen");
lb_Status->setText(tr("Verbunden mit QMK-Datenserver."));
}
 
void MKTool::slot_QMKS_Disconnected(int Error)
{
MyServer->setProperty("Connect", false);
ac_QMKServer->setText("QMK-Server Verbinden");
ac_QMKServer->setChecked(false);
 
disconnect(MyServer, SIGNAL(sig_Disconnected(int)), 0, 0);
 
switch (Error)
{
case 1 :
{
lb_Status->setText(tr("Verbindung vom Server beendet."));
QMessageBox::warning(this, QA_NAME,"QMK-Datenserver: Verbindung wurde vom Server beendet.", QMessageBox::Ok);
}
break;
case 2 :
{
lb_Status->setText(tr("Server nicht gefunden."));
QMessageBox::warning(this, QA_NAME,"QMK-Datenserver: Kann nicht zum Server verbinden.", QMessageBox::Ok);
}
break;
case 3 :
{
lb_Status->setText(tr("Serververbindung getrennt. Logindaten falsch."));
QMessageBox::warning(this, QA_NAME,"QMK-Datenserver: Loginname oder Password falsch.", QMessageBox::Ok);
}
break;
default :
{
lb_Status->setText(tr("Getrennt vom QMK-Datenserver."));
}
break;
}
}
 
// Slots der Actions (Menüpunkte, Buttons)
//////////////////////////////////////////
void MKTool::slot_ac_Motortest()
{
dlg_Motortest *f_Motortest = new dlg_Motortest(this);
 
connect(f_Motortest, SIGNAL(updateMotor(int, int, int, int)), this, SLOT(slot_Motortest(int, int, int, int)));
 
if (f_Motortest->exec()==QDialog::Accepted)
{
}
 
disconnect(f_Motortest, 0,0,0);
slot_Motortest(0,0,0,0);
}
 
void MKTool::slot_ac_LCD()
{
if (!f_LCD->isVisible())
{
f_LCD = new dlg_LCD(this);
 
// LCD auf / ab
connect(f_LCD->pb_LCDup, SIGNAL(clicked()), this, SLOT(slot_LCD_UP()));
connect(f_LCD->pb_LCDdown, SIGNAL(clicked()), this, SLOT(slot_LCD_DOWN()));
 
f_LCD->show();
TX_Data[0] = 0;
TX_Data[1] = 0;
send_Data('l', ADDRESS_ALL, TX_Data, 1, true);
 
Ticker->setInterval(500);
TickerEvent[2] = true;
}
}
 
void MKTool::slot_Motortest(int Motor1, int Motor2, int Motor3, int Motor4)
{
TX_Data[0] = Motor1;
TX_Data[1] = Motor2;
TX_Data[2] = Motor3;
TX_Data[3] = Motor4;
send_Data('t', ADDRESS_FC, TX_Data, 4, false);
}
 
void MKTool::slot_ac_Config()
{
set_Analog Old_Analog1;
 
Old_Analog1 = Settings->Analog1;
 
dlg_Config *f_Config = new dlg_Config(this);
f_Config->set_Settings(Settings, Mode.ID);
 
if (f_Config->exec()==QDialog::Accepted)
{
Settings = f_Config->get_Settings();
Settings->write_Settings_Analog(Mode.ID);
 
// Plotter neu einrichten
if (Old_Analog1.PlotView != Settings->Analog1.PlotView)
{
config_Plot();
}
 
// CVS-Datei neu anlegen.
if ((logger->is_active()) && (Old_Analog1.LogView != Settings->Analog1.LogView))
{
logger->close();
logger->start_Log();
// update_Log();
}
 
}
}
 
//aktualisiere Logging-Status
void MKTool::update_Log()
{
if (logger->is_active())
{
// logger->write(AnalogData);
// pb_Record->setText("Log Stop");
ac_RecordCSV->setText("Log Stop");
lb_Status->setText(tr("Log-Record gestartet."));
}
else
{
// pb_Record->setText("Log Aufzeichnen");
ac_RecordCSV->setText("Log Aufzeichnen");
lb_Status->setText(tr("Log-Record gestopt."));
}
}
 
//starte/stoppe Logging, wenn auf den entsprechenden Button gedrückt wurde
void MKTool::slot_RecordLog()
{
if (!logger->is_active())
logger->start_Log();
else
logger->close();
 
update_Log();
}
 
void MKTool::slot_ac_Preferences()
{
dlg_Preferences *f_Preferences = new dlg_Preferences(this);
 
Settings->TTY.Port = le_Port->text();
f_Preferences->set_Settings(Settings);
 
if (f_Preferences->exec()==QDialog::Accepted)
{
Settings = f_Preferences->get_Settings();
Settings->write_Settings();
le_Port->setText(Settings->TTY.Port);
config_Plot();
}
}
 
void MKTool::slot_ac_StartPlotter()
{
if (ac_StartPlotter->isChecked())
{
lb_Status->setText(tr("Datenplotter gestartet."));
ac_StartPlotter->setText("Stop Plotter");
pb_StartPlotter->setText("Stop Plotter");
}
else
{
lb_Status->setText(tr("Datenplotter gestopt."));
ac_StartPlotter->setText("Start Plotter");
pb_StartPlotter->setText("Start Plotter");
}
}
 
void MKTool::slot_ac_View()
{
int Aktive = -1;
 
QAction *Action = (QAction*)sender();
 
if (Action->objectName() == QString("ac_View0"))
Aktive = 0;
if (Action->objectName() == QString("ac_View1"))
Aktive = 1;
if (Action->objectName() == QString("ac_View2"))
Aktive = 2;
if (Action->objectName() == QString("ac_View3"))
Aktive = 3;
if (Action->objectName() == QString("ac_View4"))
Aktive = 4;
if (Action->objectName() == QString("ac_View5"))
Aktive = 5;
// if (Action->objectName() == QString("ac_View6"))
// Aktive = 6;
 
QString TabName = QString("Tab_%1").arg(Aktive);
 
if (!Action->isChecked())
{
for (int a = 0; a < tab_Main->count(); a++)
{
if (tab_Main->widget(a)->objectName() == TabName)
{
tab_Main->removeTab(a);
}
}
}
else
{
tab_Main->insertTab(Aktive, TabWidgets[Aktive], Action->icon(), Action->text());
}
}
 
void MKTool::slot_ac_FastNavi() // DONE NC 0.12i
{
if (!ac_NoNavi->isChecked())
{
if (ac_FastNavi->isChecked())
{
lb_Status->setText(tr("Fordere schnelle NaviDaten an."));
TX_Data[0] = Settings->Data.Navi_Fast / 10;
}
else
{
lb_Status->setText(tr("Fordere langsame NaviDaten an."));
TX_Data[0] = Settings->Data.Navi_Slow / 10;
}
send_Data('o', ADDRESS_NC, TX_Data, 1, false);
}
}
 
void MKTool::slot_ac_NoNavi() // DONE NC 0.12i
{
if (ac_NoNavi->isChecked())
{
lb_Status->setText(tr("NaviDaten abstellen."));
TX_Data[0] = 0;
}
else
{
if (ac_FastNavi->isChecked())
{
lb_Status->setText(tr("Fordere schnelle NaviDaten an."));
TX_Data[0] = Settings->Data.Navi_Fast / 10;
}
else
{
lb_Status->setText(tr("Fordere langsame NaviDaten an."));
TX_Data[0] = Settings->Data.Navi_Slow / 10;
}
}
send_Data('o', ADDRESS_NC, TX_Data, 1, false);
}
 
void MKTool::slot_ac_FastDebug() // DONE 0.71g
{
if (!ac_NoDebug->isChecked())
{
if (ac_FastDebug->isChecked())
{
lb_Status->setText(tr("Fordere schnelle DebugDaten an."));
TX_Data[0] = Settings->Data.Debug_Fast / 10;
}
else
{
lb_Status->setText(tr("Fordere langsame DebugDaten an."));
TX_Data[0] = Settings->Data.Debug_Slow / 10;
}
send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
}
}
 
void MKTool::slot_ac_NoDebug() // DONE 0.71g
{
if (ac_NoDebug->isChecked())
{
lb_Status->setText(tr("DebugDaten abstellen."));
TickerEvent[3] = false;
TX_Data[0] = 0;
}
else
{
// Wenn MK3MAG dann andauernd Daten neu anfragen.
if (Mode.ID == ADDRESS_MK3MAG)
TickerEvent[3] = true;
 
if (ac_FastDebug->isChecked())
{
lb_Status->setText(tr("Fordere schnelle DebugDaten an."));
TX_Data[0] = Settings->Data.Debug_Fast / 10;
}
else
{
lb_Status->setText(tr("Fordere langsame DebugDaten an."));
TX_Data[0] = Settings->Data.Debug_Slow / 10;
}
}
send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
}
 
void MKTool::slot_ac_About()
{
QMessageBox::about(this, trUtf8(("Über ")) + QA_NAME, QA_ABOUT);
}
 
void MKTool::slot_ac_GetLabels() // DONE 0.71g
{
lb_Status->setText(tr("Analoglabels auslesen."));
TX_Data[0] = 0;
send_Data('a', ADDRESS_ALL, TX_Data, 1, true);
}
 
void MKTool::slot_ac_StartServer()
{
if (ac_StartServer->isChecked())
{
lb_Status->setText(tr("GoogleEarth-Server gestartet."));
Server->start_Server(Settings->Server.Port.toInt(), Settings);
}
else
{
lb_Status->setText(tr("GoogleEarth-Server gestopt."));
Server->stop_Server();
}
}
 
 
// Daten-Plotter
/////////////////
void MKTool::update_Plot()
{
for (int a = 0; a < MaxAnalog; a++)
{
Plot[a]->setData(aID,aData[a],NextPlot - 1);
}
 
if ((NextPlot > Settings->Data.Plotter_Count))
{
scroll_plot->setMaximum(NextPlot - Settings->Data.Plotter_Count);
}
 
if ((scroll_plot->value() == NextPlot - (Settings->Data.Plotter_Count + 1)))
{
qwtPlot->setAxisScale(QwtPlot::xBottom,NextPlot - Settings->Data.Plotter_Count,NextPlot,0);
scroll_plot->setValue(NextPlot - Settings->Data.Plotter_Count);
}
 
qwtPlot->replot();
}
 
void MKTool::config_Plot()
{
// qDebug("Plotter rekonfiguriert..!!");
qwtPlot->setAxisScale(QwtPlot::xBottom,0,Settings->Data.Plotter_Count,0);
 
for (int a = 0; a < MaxAnalog; a++)
{
Plot[a]->detach();
Plot[a]->setPen(QPen(QColor(Def_Colors[a])));
 
if (Settings->Analog1.PlotView[a])
{
Plot[a]->setTitle(Settings->Analog1.Label[a]);
Plot[a]->attach(qwtPlot);
}
}
qwtPlot->replot();
}
 
void MKTool::slot_ScrollPlot(int Pos)
{
qwtPlot->setAxisScale(QwtPlot::xBottom,Pos,Pos + Settings->Data.Plotter_Count,0);
qwtPlot->replot();
}
 
 
// Firmeware-Update
///////////////////
void MKTool::slot_pb_Update()
{
QString Device;
QString Hardware;
 
if (rb_FC->isChecked())
{
Device = "m644";
Hardware = "FlightCtrl";
}
else if (rb_MK3MAG->isChecked())
{
Device = "m168";
Hardware = "MK3MAG";
}
else if (rb_BL->isChecked())
{
Device = "m8";
Hardware = "BL-Ctrl";
}
 
QString Message = "Firmeware-Datei \n\n";
Message = Message + le_HexFile->text() + "\n\n";
Message = Message + "an " + Hardware + trUtf8(" mit AVRDUDE - Seriel & Bootloader über ") + le_Port->text() + trUtf8(" übertragen?\n");
 
if (le_HexFile->text() == "")
{
QMessageBox::warning(this, QA_NAME, trUtf8("Bitte Firmeware-Datei wählen."), QMessageBox::Ok);
}
else if (QMessageBox::warning(this, QA_NAME, Message, QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)
{
QString Programm = "avrdude" ;
 
QStringList Argumente;
 
Update = new QProcess();
 
if (serialPort->isOpen())
{
slot_OpenPort();
}
 
Argumente << "-P";
Argumente << le_Port->text();
Argumente << "-p";
Argumente << Device;
Argumente << "-c";
Argumente << "butterfly";
Argumente << "-b";
Argumente << "57600";
Argumente << "-U";
Argumente << "flash:w:" + le_HexFile->text();
 
// QString Programm = "/home/Manuel/bin/avrdude -p m644 -P /dev/ttyS0 -c butterfly -b 57600 -U flash:w:/home/Manuel/Documents/Mikrokopter/Firmeware/FlightCtrl/Flight-Ctrl_MEGA644_V0_71h.hex";
 
te_Shell->setText(""); // Ausgabefenster säubern
 
connect(Update, SIGNAL(readyReadStandardOutput()), this, SLOT(slot_UpdateShell()) );
connect(Update, SIGNAL(readyReadStandardError()), this, SLOT(slot_UpdateShell()) );
 
Update->start(Programm, Argumente); // Programmaufruf
}
}
 
void MKTool::slot_UpdateShell()
{
QByteArray Output;
 
Output = Update->readAllStandardError(); // Shellausgabe an Variable
te_Shell->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
te_Shell->insertPlainText(QString::fromUtf8(Output));
 
Output = Update->readAll();
te_Shell->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
te_Shell->insertPlainText(QString::fromUtf8(Output));
}
 
void MKTool::slot_pb_HexFile()
{
QString FileName = QFileDialog::getOpenFileName(this,trUtf8(("Firmeware-Datei wählen")),"",
tr("Intel Hex(*.hex);;Alle Dateien (*)"));
if (!FileName.isEmpty())
{
le_HexFile->setText(FileName);
}
}
 
 
// Wechsel der Tabs erkennen
void MKTool::slot_TabChanged(int Tab) // DONE 0.71g
{
Tab = Tab;
if (tab_Main->count() != 0)
{
if ((tab_Main->currentWidget()->objectName() == QString("Tab_2")) && (f_Settings->tab_Par->currentIndex() == 1))
{
TX_Data[0] = 0;
send_Data('p', ADDRESS_FC, TX_Data, 0, true);
 
Ticker->setInterval(500);
TickerEvent[1] = true;
}
else
{
Ticker->setInterval(2000);
TickerEvent[1] = false;
}
/*
if ((tab_Main->currentWidget()->objectName() == QString("Tab_4")))
{
TX_Data[0] = 0;
TX_Data[1] = 0;
send_Data('l', ADDRESS_ALL, TX_Data, 1, true);
 
Ticker->setInterval(500);
TickerEvent[2] = true;
}
else
{
Ticker->setInterval(2000);
TickerEvent[2] = false;
}
*/
}
}
 
// LCD-Seiten weiterschalten
void MKTool::slot_LCD_UP() // DONE 0.71g
{
if (LCD_Page == LCD_MAX_Page)
TX_Data[0] = 0;
else
TX_Data[0] = LCD_Page + 1;
 
TX_Data[1] = 0;
send_Data('l', ADDRESS_ALL, TX_Data, 1, true);
 
}
 
void MKTool::slot_LCD_DOWN() // DONE 0.71g
{
if (LCD_Page == 0)
TX_Data[0] = LCD_MAX_Page;
else
TX_Data[0] = LCD_Page - 1;
 
TX_Data[1] = 0;
send_Data('l', ADDRESS_ALL, TX_Data, 1, true);
 
aa--;
 
}
 
// Settings aus MK lesen / in MK schreiben
void MKTool::slot_GetFCSettings() // DONE 0.71g
{
lb_Status->setText(tr("Lese FlightCtrl-Settings aus."));
TX_Data[0] = f_Settings->sb_Set->value();
TX_Data[1] = 0;
send_Data('q', ADDRESS_FC, TX_Data, 1);
}
 
void MKTool::slot_SetFCSettings() // DONE 0.71g
{
char *TX_Data2 = f_Settings->GetFCSettings();
 
lb_Status->setText(tr("Schreibe FlightCtrl-Settings."));
 
send_Data('s', ADDRESS_FC, TX_Data2, MaxParameter + 2, false);
}
 
 
// Save GUI-Preferences
///////////////////////
void MKTool::set_Preferences()
{
Settings->GUI.TabViews.setBit(0, ac_View0->isChecked());
Settings->GUI.TabViews.setBit(1, ac_View1->isChecked());
Settings->GUI.TabViews.setBit(2, ac_View2->isChecked());
Settings->GUI.TabViews.setBit(3, ac_View3->isChecked());
Settings->GUI.TabViews.setBit(4, ac_View4->isChecked());
Settings->GUI.TabViews.setBit(5, ac_View5->isChecked());
Settings->GUI.TabViews.setBit(6, ac_View6->isChecked());
 
Settings->GUI.ToolViews.setBit(0, tb_Allgemein->isVisibleTo(this));
Settings->GUI.ToolViews.setBit(1, tb_Werkzeuge->isVisibleTo(this));
Settings->GUI.ToolViews.setBit(2, tb_Debug->isVisibleTo(this));
Settings->GUI.ToolViews.setBit(3, tb_TTY->isVisibleTo(this));
Settings->GUI.ToolViews.setBit(4, tb_Hardware->isVisibleTo(this));
 
Settings->GUI.Term_Info = cb_ShowMSG->isChecked();
Settings->GUI.Term_Data = cb_ShowData->isChecked();
Settings->GUI.Term_Always = cb_ShowAlways->isChecked();
Settings->GUI.Term_Send = cb_ShowSend->isChecked();
Settings->GUI.isMax = isMaximized();
Settings->GUI.Size = size();
Settings->GUI.Point = pos();
 
Settings->TTY.Port = le_Port->text();
}
 
 
void MKTool::show_DebugData()
{
if (logger->is_active())
logger->write(AnalogData);
 
if (ac_StartPlotter->isChecked())
{
aID[NextPlot] = NextPlot;
 
for (int a = 0; a < MaxAnalog; a++)
{
aData[a][NextPlot] = AnalogData[a];
}
NextPlot++;
 
if ((tab_Main->currentWidget()->objectName() == QString("Tab_1")))
update_Plot();
}
 
le_A_0->setText(QString("%1").arg(AnalogData[0]));
le_A_1->setText(QString("%1").arg(AnalogData[1]));
le_A_2->setText(QString("%1").arg(AnalogData[2]));
le_A_3->setText(QString("%1").arg(AnalogData[3]));
le_A_4->setText(QString("%1").arg(AnalogData[4]));
le_A_5->setText(QString("%1").arg(AnalogData[5]));
le_A_6->setText(QString("%1").arg(AnalogData[6]));
le_A_7->setText(QString("%1").arg(AnalogData[7]));
le_A_8->setText(QString("%1").arg(AnalogData[8]));
le_A_9->setText(QString("%1").arg(AnalogData[9]));
le_A_10->setText(QString("%1").arg(AnalogData[10]));
le_A_11->setText(QString("%1").arg(AnalogData[11]));
le_A_12->setText(QString("%1").arg(AnalogData[12]));
le_A_13->setText(QString("%1").arg(AnalogData[13]));
le_A_14->setText(QString("%1").arg(AnalogData[14]));
le_A_15->setText(QString("%1").arg(AnalogData[15]));
le_A_16->setText(QString("%1").arg(AnalogData[16]));
le_A_17->setText(QString("%1").arg(AnalogData[17]));
le_A_18->setText(QString("%1").arg(AnalogData[18]));
le_A_19->setText(QString("%1").arg(AnalogData[19]));
le_A_20->setText(QString("%1").arg(AnalogData[20]));
le_A_21->setText(QString("%1").arg(AnalogData[21]));
le_A_22->setText(QString("%1").arg(AnalogData[22]));
le_A_23->setText(QString("%1").arg(AnalogData[23]));
le_A_24->setText(QString("%1").arg(AnalogData[24]));
le_A_25->setText(QString("%1").arg(AnalogData[25]));
le_A_26->setText(QString("%1").arg(AnalogData[26]));
le_A_27->setText(QString("%1").arg(AnalogData[27]));
le_A_28->setText(QString("%1").arg(AnalogData[28]));
le_A_29->setText(QString("%1").arg(AnalogData[29]));
le_A_30->setText(QString("%1").arg(AnalogData[30]));
le_A_31->setText(QString("%1").arg(AnalogData[31]));
 
if ((Mode.ID == ADDRESS_FC) && (FCSettings[P_GYRO_ACC_FAKTOR] > 0))
{
bar_UBAT->setValue(AnalogData[9]);
bar_RX->setValue(AnalogData[10]);
 
Compass->setValue(AnalogData[8]);
 
int Roll = (AnalogData[1] * FCSettings[P_GYRO_ACC_FAKTOR]) / 1024;
int Nick = (AnalogData[0] * FCSettings[P_GYRO_ACC_FAKTOR]) / 1024;
 
if (Roll > 128)
Roll = Roll - 255;
 
if (Nick > 128)
Nick = Nick - 255;
 
Attitude->setAngle(Roll);
Attitude->setGradient(double(double(Nick) / 100.0));
}
}
 
 
void MKTool::new_NaviData(sRxData RX)
{
Navi.Current.Longitude = ToolBox::Data2Long(RX.Decode, N_CUR_LONGITUDE, true);
Navi.Current.Latitude = ToolBox::Data2Long(RX.Decode, N_CUR_LATITUDE, true);
Navi.Current.Altitude = ToolBox::Data2Long(RX.Decode, N_CUR_ALTITUDE, true);
Navi.Target.Longitude = ToolBox::Data2Long(RX.Decode, N_TAR_LONGITUDE, true);
Navi.Target.Latitude = ToolBox::Data2Long(RX.Decode, N_TAR_LATITUDE, true);
Navi.Target.Altitude = ToolBox::Data2Long(RX.Decode, N_TAR_ALTITUDE, true);
 
le_CDistance->setText(QString("%1 cm").arg(ToolBox::Data2Int(RX.Decode, N_HOME_DISTANCE)));
le_CWPA->setText(QString("%1").arg(RX.Decode[N_WP_INDEX]));
le_CWPT->setText(QString("%1").arg(RX.Decode[N_WP_NUMBER]));
le_CSats->setText(QString("%1").arg(RX.Decode[N_SATS_IN_USER]));
 
qwt_Rate->setValue(double(ToolBox::Data2Int(RX.Decode, N_VARIOMETER, true)));
 
le_CTime->setText(QString("%1 sec.").arg(ToolBox::Data2Int(RX.Decode, N_FLYING_TIME)));
 
bar_UBAT->setValue(RX.Decode[N_UBAT]);
 
double Speed = double((ToolBox::Data2Int(RX.Decode, N_GROUND_SPEED)) / 10.0);
 
if ((Speed > 4.5) && SpeedMeter->property("END") == 5)
{
SpeedMeter->setRange(0.0, 10.0);
SpeedMeter->setScale(1, 2, 1);
SpeedMeter->setProperty("END", 10);
}
 
if ((Speed > 9) && SpeedMeter->property("END") == 10)
{
SpeedMeter->setRange(0.0, 20.0);
SpeedMeter->setScale(1, 2, 2);
SpeedMeter->setProperty("END", 20);
}
 
SpeedMeter->setValue(Speed);
 
Compass->setValue(ToolBox::Data2Int(RX.Decode, N_COMAPSS_HEADING)); //(68)
 
bar_RX->setValue(RX.Decode[N_RC_QUALITY]);
 
int Nick = RX.Decode[N_ANGLE_NICK];
int Roll = RX.Decode[N_ANGLE_ROLL];
 
if (Roll > 128)
Roll = Roll - 255;
 
if (Nick > 128)
Nick = Nick - 255;
 
Attitude->setAngle(Roll);
Attitude->setGradient(double(0.0 - (double(Nick) / 100.0)));
 
sNaviString NaviString;
 
NaviString.Longitude = ToolBox::get_Float(Navi.Current.Longitude,10000000);
NaviString.Latitude = ToolBox::get_Float(Navi.Current.Latitude,10000000);
NaviString.Altitude = ToolBox::get_Float(Navi.Current.Altitude,1000);
 
Server->store_NaviString(NaviString);
 
if ((MyServer->property("Connect")) == true)
{
MyServer->NewPosition(NaviString);
}
 
/*
qDebug(NaviString.Longitude.toLatin1().data());
qDebug(NaviString.Latitude.toLatin1().data());
qDebug(NaviString.Altitude.toLatin1().data());
*/
}
 
void MKTool::slot_ac_SendWaypoint()
{
if (Navi.Current.Longitude == 0 &&
Navi.Current.Latitude == 0) {
QMessageBox msgB;
QString msg;
msgB.setText("Fehler: Es konnten keine GPS-Daten vom Mikrokopter empfangen werden");
msgB.exec();
return;
}
//erstelle einen Wegpunkt, den die NaviCtrl auswerten kann
Waypoint_t desired_pos;
bool ok_lat, ok_lon;
 
//eingegebene Daten holen
double desired_long, desired_lat;
desired_long = le_LonValue->text().toDouble(&ok_lon);
desired_lat = le_LatValue->text().toDouble(&ok_lat);
if (ok_lon && desired_long < 100)
desired_long *= 10000000+0.5;
if (ok_lat && desired_lat < 100)
desired_lat *= 10000000+0.5;
 
//fülle Wegpunkt-Daten
desired_pos.Position.Altitude= 0;
desired_pos.Position.Longitude= int32_t(desired_long);
desired_pos.Position.Latitude= int32_t(desired_lat);
desired_pos.Position.Status = NEWDATA;
desired_pos.Heading = -1;
desired_pos.ToleranceRadius = 1;
desired_pos.HoldTime = 60;
desired_pos.Event_Flag = 0;
desired_pos.reserve[0] = 0; // reserve
desired_pos.reserve[1] = 0; // reserve
desired_pos.reserve[2] = 0; // reserve
desired_pos.reserve[3] = 0; // reserve
 
//...und sende ihn an die NaviCtrl
int max_radius = 10000;
if (ok_lat && ok_lon &&
abs(Navi.Current.Longitude - desired_pos.Position.Longitude) < max_radius &&
abs(Navi.Current.Latitude - desired_pos.Position.Latitude) < max_radius) {
send_Data('s', ADDRESS_NC, (char *)&desired_pos, sizeof(desired_pos), false);
} else {
QMessageBox msgB;
QString msg;
msg += "Bitte die Eingabe ueberpruefen!\n";
msg += "Die Werte muessen sich in der Naehe der aktuellen Koordinaten befinden\n";
msg += "(Lon: ";
msg += ToolBox::get_Float(Navi.Current.Longitude,10000000);
msg += ", ";
msg += "Lat: ";
msg += ToolBox::get_Float(Navi.Current.Latitude,10000000);
msg += ")";
msgB.setText(msg);
msgB.exec();
}
}
 
// Seriel-Port Bereich, Befehle senden und Daten empfangen
//////////////////////////////////////////////////////////
 
// Neues Datenpacket empfangen -> Verarbeiten
void MKTool::new_RXData(sRxData RX) // DONE 0.71g
{
 
if (LastSend.length() > 2)
{
}
 
int HardwareID = RX.Input[1] - 'a';
 
switch(HardwareID)
{
case ADDRESS_FC :
switch(RX.Input[2])
{
// Stick-Belegung der Fernsteuerung
case 'P' : // DONE 0.71g
if (ToolBox::Decode64(RX))
{
f_Settings->pb_K1->setValue(ToolBox::Data2Int(RX.Decode, 2,true));
f_Settings->pb_K2->setValue(ToolBox::Data2Int(RX.Decode, 4,true));
f_Settings->pb_K3->setValue(ToolBox::Data2Int(RX.Decode, 6,true));
f_Settings->pb_K4->setValue(ToolBox::Data2Int(RX.Decode, 8,true));
f_Settings->pb_K5->setValue(ToolBox::Data2Int(RX.Decode, 10 ,true));
f_Settings->pb_K6->setValue(ToolBox::Data2Int(RX.Decode, 12,true));
f_Settings->pb_K7->setValue(ToolBox::Data2Int(RX.Decode, 14,true));
f_Settings->pb_K8->setValue(ToolBox::Data2Int(RX.Decode, 16,true));
}
break;
// Settings lesen
case 'Q' : // DONE 0.71g
if (ToolBox::Decode64(RX))
{
TickerEvent[0] = false;
 
if (RX.Decode[1] == VERSION_SETTINGS)
{
int Settings_ID = RX.Decode[0];
for (int a = 0; a < MaxParameter; a++)
{
FCSettings[a] = RX.Decode[a + 2];
}
//show_ParameterSet(Settings_ID);
f_Settings->show_FCSettings(Settings_ID, FCSettings);
f_Settings->pb_Read->setEnabled(true);
f_Settings->pb_Write->setEnabled(true);
}
else
{
f_Settings->pb_Read->setDisabled(true);
f_Settings->pb_Write->setDisabled(true);
 
QMessageBox::warning(this, QA_NAME,
"Versionen inkompatibel. \nParameterbearbeitung nicht moeglich.", QMessageBox::Ok);
}
}
break;
// Settings geschrieben
case 'S' : // DONE 0.71g
TickerEvent[0] = false;
break;
}
 
case ADDRESS_NC :
switch(RX.Input[2])
{
// Navigationsdaten
case 'O' : // NOT DONE 0.12h
if (ToolBox::Decode64(RX))
{
new_NaviData(RX);
}
break;
}
// case ADDRESS_MK3MAG :
 
default :
switch(RX.Input[2])
{
// LCD-Anzeige
case 'L' : // DONE 0.71g
if (ToolBox::Decode64(RX))
{
int LCD[150];
memcpy(LCD,RX.Decode, sizeof(RX.Decode));
 
f_LCD->show_Data(LCD);
 
LCD_Page = RX.Decode[0];
LCD_MAX_Page = RX.Decode[1];
 
TickerEvent[0] = false;
}
break;
// Analoglabels
case 'A' : // DONE 0.71g
if (ToolBox::Decode64(RX))
{
int Position = RX.Decode[0];
if (Position != 31)
{
Settings->Analog1.Label[Position] = ToolBox::Data2QString(RX.Decode,1,17).trimmed();
if (Settings->Analog1.Label[Position] == "")
{
Settings->Analog1.Label[Position] = "A-" + QString("%1").arg(Position);
}
Position ++;
TX_Data[0] = Position;
send_Data('a', ADDRESS_ALL, TX_Data, 1, true);
}
if (Position == 31)
{
for (int a = 0; a < MaxAnalog; a++)
{
lb_Analog[a]->setText(Settings->Analog1.Label[a]);
}
Settings->Analog1.Version = Mode.Version;
Settings->write_Settings_AnalogLabels(HardwareID);
config_Plot();
}
}
break;
// Debug-Daten
case 'D' : // DONE 0.71g
if (ToolBox::Decode64(RX))
{
for (int i = 0; i < MaxAnalog; i++)
{
AnalogData[i] = ToolBox::Data2Int(RX.Decode, (i * 2) + 2);
}
show_DebugData();
}
break;
// Version
case 'V' : // DONE 0.71h
if (ToolBox::Decode64(RX))
{
TickerEvent[0] = false;
 
Mode.ID = HardwareID;
Mode.VERSION_MAJOR = RX.Decode[0];
Mode.VERSION_MINOR = RX.Decode[1];
Mode.VERSION_PATCH = RX.Decode[4];
Mode.VERSION_SERIAL_MAJOR = RX.Decode[2];
Mode.VERSION_SERIAL_MINOR = RX.Decode[3];
 
Mode.Hardware = HardwareType[Mode.ID];
Mode.Version = QString("%1").arg(RX.Decode[0]) + "." + QString("%1").arg(RX.Decode[1]) + QString(RX.Decode[4] + 'a');
 
setWindowTitle(QA_NAME + " v" + QA_VERSION + " - " + Mode.Hardware + " " + Mode.Version);
 
if (Mode.VERSION_SERIAL_MAJOR != VERSION_SERIAL_MAJOR)
{
AllowSend = false;
QMessageBox::warning(this, QA_NAME,
"Serielles Protokoll Inkompatibel. \nBitte neue Programmversion installieren,", QMessageBox::Ok);
}
 
if (ac_NoDebug->isChecked())
{
TX_Data[0] = 0;
}
else
if (ac_FastDebug->isChecked())
{
TX_Data[0] = Settings->Data.Debug_Fast / 10;
}
else
{
TX_Data[0] = Settings->Data.Debug_Slow / 10;
}
 
send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
 
// Wenn MK3MAG dann andauernd Daten neu anfragen.
if (Mode.ID == ADDRESS_MK3MAG)
{
TickerEvent[3] = true;
rb_SelMag->setChecked(true);
}
 
// Wenn NaviCtrl dann hier.
if (Mode.ID == ADDRESS_NC)
{
rb_SelNC->setChecked(true);
 
if (ac_NoNavi->isChecked())
{
TX_Data[0] = 0;
}
else
if (ac_FastNavi->isChecked())
{
TX_Data[0] = Settings->Data.Navi_Fast / 10;
}
else
{
TX_Data[0] = Settings->Data.Navi_Slow / 10;
}
 
send_Data('o', ADDRESS_NC, TX_Data, 1, false);
}
 
 
// Wenn FlightCtrl dann Settings abfragen.
if (Mode.ID == ADDRESS_FC)
{
rb_SelFC->setChecked(true);
{
TX_Data[0] = 0xff;
TX_Data[1] = 0;
send_Data('q', ADDRESS_FC, TX_Data, 1);
}
}
// Wenn nicht Lesen und Schreiben der Settings deaktivieren.
else
{
f_Settings->pb_Read->setDisabled(true);
f_Settings->pb_Write->setDisabled(true);
}
 
Settings->read_Settings_Analog(HardwareID);
Settings->read_Settings_AnalogLabels(HardwareID);
 
if (Settings->Analog1.Version != Mode.Version)
{
lb_Status->setText("Analoglabel-Version unterschiedlich. Lese Analoglabels neu aus.");
slot_ac_GetLabels();
}
else
for (int a = 0; a < MaxAnalog; a++)
{
lb_Analog[a]->setText(Settings->Analog1.Label[a]);
}
config_Plot();
}
break;
}
}
}
 
// Neue Daten an der Schnittstelle
void MKTool::slot_newDataReceived(const QByteArray &dataReceived) // DONE 0.71g
{
const char *RXt;
RXt = dataReceived.data();
int a = 0;
 
while (RXt[a] != '\0')
{
if (RXt[a] == '\r')
{
while ((RxData.String.length() > 1) && (RxData.String.at(1) == '#'))
{
RxData.String.remove(0,1);
}
 
if (ToolBox::check_CRC(RxData.String))
{
RxData.Input = RxData.String.toLatin1().data();
new_RXData(RxData);
 
if ((cb_ShowData->isChecked()) && ((tab_Main->currentWidget()->objectName() == QString("Tab_3")) || (cb_ShowAlways->isChecked())))
{
te_RX->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
// te_RX->insertPlainText(" > " + RxData.String + '\r');
te_RX->insertHtml("<span style=\"color:#00008b;\">" + RxData.String + "<br /></span>");
}
}
else
{
if ((cb_ShowMSG->isChecked()) && ((tab_Main->currentWidget()->objectName() == QString("Tab_3")) || (cb_ShowAlways->isChecked())))
{
te_RX->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
// te_RX->insertPlainText(" > " + RxData.String + '\r');
te_RX->insertHtml("<span style=\"color:#008b00;\">" + RxData.String + "<br /></span>");
}
}
RxData.String = QString("");
}
else
{
{
RxData.String = RxData.String + QString(RXt[a]);
}
}
a++;
}
}
 
// Seriellen Port öffnen
void MKTool::slot_OpenPort()
{
if (serialPort->isOpen())
{
TX_Data[0] = Settings->Data.Debug_Off / 10;
send_Data('d', ADDRESS_ALL, TX_Data, 1, false);
ToolBox::Wait(SLEEP);
 
if (Mode.ID == ADDRESS_NC)
{
TX_Data[0] = Settings->Data.Navi_Off / 10;
send_Data('o', ADDRESS_NC, TX_Data, 1, false);
ToolBox::Wait(SLEEP);
}
 
if (Mode.ID == ADDRESS_NC)
{
TX_Data[0] = 0;
TX_Data[1] = 0;
TX_Data[2] = 0;
TX_Data[3] = 0;
send_Data('t', ADDRESS_FC, TX_Data, 4, false);
ToolBox::Wait(SLEEP);
}
serialPort->close();
// pb_Open->setText("Seriell Verbinden");
ac_ConnectTTY->setText("Seriell Verbinden");
// pb_Open->setIcon(ToolBox::Icon(9));
// ac_ConnectTTY->setIcon(ToolBox::Icon(9));
 
le_Port->setEnabled(true);
 
Ticker->stop();
}
else
{
serialPort->setPort(le_Port->text()); //Port
 
serialPort->setBaudRate(BAUD57600); //BaudRate
serialPort->setDataBits(DATA_8); //DataBits
serialPort->setParity(PAR_NONE); //Parity
serialPort->setStopBits(STOP_1); //StopBits
serialPort->setFlowControl(FLOW_OFF); //FlowControl
 
serialPort->setTimeout(0, 10);
serialPort->enableSending();
serialPort->enableReceiving();
 
serialPort->open();
if (serialPort->isOpen())
{
le_Port->setEnabled(false);
serialPort->receiveData();
 
send_Data('v', ADDRESS_ALL, TX_Data, 0, true);
 
// pb_Open->setText("Seriell Trennen");
ac_ConnectTTY->setText("Seriell Trennen");
// pb_Open->setIcon(ToolBox::Icon(8));
// ac_ConnectTTY->setIcon(ToolBox::Icon(8));
 
Ticker->start(2000);
}
}
}
 
// Daten senden
void MKTool::send_Data(char CMD, int Address, char Data[150],unsigned int Length, bool Resend) // DONE 0.71g
{
if (serialPort->isOpen() && AllowSend)
{
QByteArray Temp;
QString TX_Data;
 
if (CMD != '#')
{
// qDebug("Send data..");
TX_Data = ToolBox::Encode64(Data, Length);
 
TX_Data = QString("#") + (QString('a' + Address)) + QString(CMD) + TX_Data;
 
// qDebug(TX_Data.toLatin1().data());
 
TX_Data = ToolBox::add_CRC(TX_Data) + '\r';
 
// qDebug(TX_Data.toLatin1().data());
 
if (Resend)
{
LastSend = TX_Data;
TickerEvent[0] = true;
}
Temp = QByteArray(TX_Data.toUtf8());
}
else
{
// qDebug("Send Raw..");
for (unsigned int a = 0; a < Length; a++)
{
Temp[a] = Data[a];
// qDebug(QString("%1").arg(Temp[a]).toLatin1().data());
}
}
 
serialPort->sendData(Temp);
 
if (cb_ShowSend->isChecked() && (CMD != '#'))
{
te_RX->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
te_RX->insertHtml("<span style='color:#8b0000;'>" + TX_Data + "<br /></span>");
}
}
}
 
 
// Programm beenden
///////////////////
 
MKTool::~MKTool()
{
// qDebug(" Programm Ende ..!! ");
if (serialPort->isOpen())
{
serialPort->close();
}
 
set_Preferences();
Settings->write_Settings();
 
logger->close();
}
/QMK-Groundstation/branches/waypoint/Forms/mktool.h
0,0 → 1,222
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
 
#ifndef MKTOOL_H
#define MKTOOL_H
 
#include <QMainWindow>
#include <QSettings>
#include <QString>
#include <QTimer>
#include <QComboBox>
#include <QIcon>
#include <QProcess>
 
#include <qwt_plot_curve.h>
#include <qwt_plot_grid.h>
#include <qwt_legend.h>
#include <qwt_plot.h>
#include <qwt_compass.h>
#include <qwt_compass_rose.h>
#include <qwt_dial_needle.h>
 
#include "ui_mktool.h"
#include "wdg_Settings.h"
#include "dlg_LCD.h"
 
#include "../SerialPort/ManageSerialPort.h"
#include "../Classes/cSettings.h"
#include "../Classes/cServer.h"
#include "../Classes/cQMK_Server.h"
#include "../Classes/cAttitude.h"
#include "../Classes/cSpeedMeter.h"
#include "../Logger/Logger.h"
#include "../waypoint.h"
 
class QextSerialPort;
 
class MKTool : public QMainWindow, public Ui::dlg_mktool_UI
{
Q_OBJECT
 
public:
MKTool();
~MKTool();
 
private:
 
int aa;
 
bool AllowSend;
 
// Object für Serielport
ManageSerialPort *serialPort;
 
// Settings-Object (Programmeinstellungen)
cSettings *Settings;
 
// Settings-Widget (FC-Settings)
wdg_Settings *f_Settings;
 
// HTTP-Server-Object für Google Earth
cServer *Server;
 
// QMK-Serverobjekt
cQMK_Server *MyServer;
 
// LCD-Dialog
dlg_LCD *f_LCD;
 
//TCP-Socket
QTcpSocket *TcpSocket;
 
// Default-Ticker
QTimer *Ticker;
 
// Kopie der Tabs des Hauptfensters
QWidget *TabWidgets[7];
 
// Analogwert-Beschreibungen
QLabel *lb_Analog[MaxAnalog];
 
// Analogwerte
int AnalogData[MaxAnalog];
 
// Plots für die Analogwerte
QwtPlotCurve *Plot[MaxAnalog];
 
// Datenspeicher für die Plots
double aData[MaxAnalog][MaxPlot];
double aID[MaxPlot];
int NextPlot;
 
AttitudeIndicator *Attitude;
cSpeedMeter * SpeedMeter;
 
// Ticker-Event-Array
bool TickerEvent[MaxTickerEvents];
bool TickerDiv;
 
// Aktuelle und Max-Anzahl der LCD-Seiten
int LCD_Page;
int LCD_MAX_Page;
 
//Logger für CVS und andere
Logger * logger;
 
sMode Mode;
sRxData RxData;
sNaviData Navi;
 
QString RXS;
QString LastSend;
 
// Softwareupdate
QProcess *Update;
 
// Sendedatenbuffer
char TX_Data[150];
 
// FC-Settings
int FCSettings[MaxParameter];
 
// Programm Initialisieren
void init_GUI();
void init_Objects();
void init_Connections();
void init_Arrays();
void init_Plot();
 
// Daten-Plotter
void update_Plot();
void config_Plot();
 
void new_NaviData(sRxData RX);
// void new_Debugdata();
 
// Daten Senden, Empfangen und verarbeiten
void send_Data(char CMD, int Address, char Data[150],unsigned int Length, bool Resend = true);
void new_RXData(sRxData RX);
 
// Debugdaten anzeigen und speichern.
void show_DebugData();
void update_Log();
 
// Programmeinstellungen speichern
void set_Preferences();
 
private slots:
void slot_QMKS_Connect();
void slot_QMKS_Connected();
void slot_QMKS_Disconnected(int Error);
 
void slot_ac_Hardware();
void slot_rb_Hardware();
 
void slot_ac_StartServer();
 
void slot_Test();
 
void slot_ac_Config();
void slot_ac_Preferences();
void slot_ac_StartPlotter();
void slot_ac_View();
void slot_ac_FastDebug();
void slot_ac_NoDebug();
void slot_ac_FastNavi();
void slot_ac_NoNavi();
void slot_ac_About();
void slot_ac_GetLabels();
void slot_ac_Motortest();
void slot_ac_LCD();
void slot_pb_HexFile();
 
//Wegpunkte senden
void slot_ac_SendWaypoint();
 
// Default-Ticker
void slot_Ticker();
 
// LCD-Seite vor / zurück
void slot_LCD_UP();
void slot_LCD_DOWN();
 
void slot_Motortest(int Motor1, int Motor2, int Motor3, int Motor4);
 
// Firmeware-Update
void slot_pb_Update();
void slot_UpdateShell();
 
// Seriell-Port Slots
void slot_newDataReceived(const QByteArray &dataReceived);
void slot_OpenPort();
 
void slot_TabChanged(int Tab);
 
void slot_RecordLog();
 
void slot_ScrollPlot(int Pos);
 
// FC-Settings lesen / Schreiben
void slot_GetFCSettings();
void slot_SetFCSettings();
};
 
#endif
/QMK-Groundstation/branches/waypoint/Forms/mktool.ui
0,0 → 1,2532
<ui version="4.0" >
<class>dlg_mktool_UI</class>
<widget class="QMainWindow" name="dlg_mktool_UI" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>733</width>
<height>459</height>
</rect>
</property>
<property name="windowTitle" >
<string>MK-Tool</string>
</property>
<property name="windowIcon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Icon/Images/QMK-Groundstation.png</normaloff>:/Icon/Images/QMK-Groundstation.png</iconset>
</property>
<property name="toolButtonStyle" >
<enum>Qt::ToolButtonTextOnly</enum>
</property>
<property name="dockOptions" >
<set>QMainWindow::AllowNestedDocks|QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks|QMainWindow::ForceTabbedDocks|QMainWindow::VerticalTabs</set>
</property>
<widget class="QWidget" name="centralwidget" >
<layout class="QGridLayout" name="gridLayout_12" >
<item row="0" column="0" >
<widget class="Line" name="line_2" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="lb_Status" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="frameShape" >
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<property name="text" >
<string/>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QTabWidget" name="tab_Main" >
<property name="toolTip" >
<string/>
</property>
<property name="currentIndex" >
<number>5</number>
</property>
<widget class="QWidget" name="Tab_0" >
<attribute name="title" >
<string>Debug-Daten </string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Debug.png</normaloff>:/Actions/Images/Actions/Debug.png</iconset>
</attribute>
<layout class="QGridLayout" name="gridLayout_7" >
<item row="0" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
<widget class="QFrame" name="frame_15" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_5" >
<item row="0" column="0" >
<widget class="QLabel" name="lb_A_0" >
<property name="text" >
<string>Analog 0</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_A_0" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="lb_A_1" >
<property name="text" >
<string>Analog 1</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_A_1" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="lb_A_2" >
<property name="text" >
<string>Analog 2</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="le_A_2" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="lb_A_3" >
<property name="text" >
<string>Analog 3</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="le_A_3" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="lb_A_4" >
<property name="text" >
<string>Analog 4</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="le_A_4" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="lb_A_5" >
<property name="text" >
<string>Analog 5</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QLineEdit" name="le_A_5" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="lb_A_6" >
<property name="text" >
<string>Analog 6</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QLineEdit" name="le_A_6" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="lb_A_7" >
<property name="text" >
<string>Analog 7</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QLineEdit" name="le_A_7" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_14" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4" >
<item row="0" column="0" >
<widget class="QLabel" name="lb_A_8" >
<property name="text" >
<string>Analog 8</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_A_8" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="lb_A_9" >
<property name="text" >
<string>Analog 9</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_A_9" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="lb_A_10" >
<property name="text" >
<string>Analog 10</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="le_A_10" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="lb_A_11" >
<property name="text" >
<string>Analog 11</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="le_A_11" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="lb_A_12" >
<property name="text" >
<string>Analog 12</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="le_A_12" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="lb_A_13" >
<property name="text" >
<string>Analog 13</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QLineEdit" name="le_A_13" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="lb_A_14" >
<property name="text" >
<string>Analog 14</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QLineEdit" name="le_A_14" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="lb_A_15" >
<property name="text" >
<string>Analog 15</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QLineEdit" name="le_A_15" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_16" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_3" >
<item row="0" column="0" >
<widget class="QLabel" name="lb_A_16" >
<property name="text" >
<string>Analog 16</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_A_16" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="lb_A_17" >
<property name="text" >
<string>Analog 17</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_A_17" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="lb_A_18" >
<property name="text" >
<string>Analog 18</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="le_A_18" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="lb_A_19" >
<property name="text" >
<string>Analog 19</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="le_A_19" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="lb_A_20" >
<property name="text" >
<string>Analog 20</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="le_A_20" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="lb_A_21" >
<property name="text" >
<string>Analog 21</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QLineEdit" name="le_A_21" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="lb_A_22" >
<property name="text" >
<string>Analog 22</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QLineEdit" name="le_A_22" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="lb_A_23" >
<property name="text" >
<string>Analog 23</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QLineEdit" name="le_A_23" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_17" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_6" >
<item row="0" column="0" >
<widget class="QLabel" name="lb_A_24" >
<property name="text" >
<string>Analog 24</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_A_24" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="lb_A_25" >
<property name="text" >
<string>Analog 25</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_A_25" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="lb_A_26" >
<property name="text" >
<string>Analog 26</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="le_A_26" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="lb_A_27" >
<property name="text" >
<string>Analog 27</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="le_A_27" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="lb_A_28" >
<property name="text" >
<string>Analog 28</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="le_A_28" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="lb_A_29" >
<property name="text" >
<string>Analog 29</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QLineEdit" name="le_A_29" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="lb_A_30" >
<property name="text" >
<string>Analog 30</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QLineEdit" name="le_A_30" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="lb_A_31" >
<property name="text" >
<string>Analog 31</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QLineEdit" name="le_A_31" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_1" >
<attribute name="title" >
<string>Plotter</string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Plotter-NO.png</normaloff>:/Actions/Images/Actions/Plotter-NO.png</iconset>
</attribute>
<layout class="QGridLayout" name="gridLayout_35" >
<item row="0" column="0" >
<widget class="QwtPlot" name="qwtPlot" />
</item>
<item row="1" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_2" >
<item>
<widget class="QScrollBar" name="scroll_plot" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum" >
<number>0</number>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_StartPlotter" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Start Plotter</string>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Plotter-NO.png</normaloff>:/Actions/Images/Actions/Plotter-NO.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_3" >
<attribute name="title" >
<string>Terminal </string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Terminal.png</normaloff>:/Actions/Images/Actions/Terminal.png</iconset>
</attribute>
<layout class="QGridLayout" name="gridLayout_2" >
<item row="0" column="0" colspan="8" >
<widget class="QTextEdit" name="te_RX" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<pointsize>10</pointsize>
</font>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Adobe Courier'; font-size:10pt; font-weight:400; font-style:normal;">
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QCheckBox" name="cb_ShowData" >
<property name="text" >
<string>Datenpackete </string>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QCheckBox" name="cb_ShowMSG" >
<property name="text" >
<string>Meldungen </string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="6" >
<spacer name="horizontalSpacer_13" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>376</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="4" >
<widget class="QCheckBox" name="cb_ShowAlways" >
<property name="text" >
<string>auch wenn ausgeblendet </string>
</property>
</widget>
</item>
<item row="1" column="3" >
<widget class="QCheckBox" name="cb_ShowSend" >
<property name="text" >
<string>gesendete Daten </string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Anzeigen: </string>
</property>
</widget>
</item>
<item row="1" column="7" >
<widget class="QPushButton" name="pb_Clear" >
<property name="text" >
<string>Löschen</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_4" >
<attribute name="title" >
<string>Cockpit</string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Cockpit.png</normaloff>:/Actions/Images/Actions/Cockpit.png</iconset>
</attribute>
<layout class="QGridLayout" name="gridLayout_13" >
<item row="0" column="0" >
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Informationen</string>
</property>
<layout class="QGridLayout" name="gridLayout_8" >
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Flugzeit:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_CTime" >
<property name="minimumSize" >
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_6" >
<property name="text" >
<string>Satelliten: </string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_CSats" >
<property name="minimumSize" >
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_7" >
<property name="text" >
<string>Entfernung:</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QLineEdit" name="le_CDistance" >
<property name="minimumSize" >
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Wegpunkte Total:</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QLineEdit" name="le_CWPT" >
<property name="minimumSize" >
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_5" >
<property name="text" >
<string>Aktueller Wegpunkt:</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QLineEdit" name="le_CWPA" >
<property name="minimumSize" >
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="1" >
<spacer name="verticalSpacer_3" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" >
<spacer name="horizontalSpacer_14" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2" >
<widget class="QGroupBox" name="box_Flugdaten" >
<property name="title" >
<string>Flugdaten</string>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<layout class="QVBoxLayout" name="LayOut_Speed" >
<item>
<widget class="QLabel" name="label_145" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;">
&lt;p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Geschwindigkeit&lt;/p>
&lt;p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="alignment" >
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="1" >
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
<widget class="QLabel" name="label_143" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;">
&lt;p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Ausrichtung&lt;/p>
&lt;p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="alignment" >
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="2" >
<layout class="QVBoxLayout" name="verticalLayout_6" >
<item>
<widget class="QLabel" name="label_142" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;">
&lt;p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Flugrichtung&lt;/p>
&lt;p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="alignment" >
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QwtCompass" name="Compass" >
<property name="minimumSize" >
<size>
<width>125</width>
<height>125</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>125</width>
<height>125</height>
</size>
</property>
<property name="lineWidth" >
<number>4</number>
</property>
<property name="frameShadow" >
<enum>QwtDial::Sunken</enum>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="3" >
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<widget class="QLabel" name="label_144" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;">
&lt;p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Höhen-&lt;/p>
&lt;p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">änderung&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="alignment" >
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<widget class="QwtSlider" name="qwt_Rate" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="scalePosition" >
<enum>QwtSlider::LeftScale</enum>
</property>
<property name="bgStyle" >
<enum>QwtSlider::BgTrough</enum>
</property>
<property name="thumbLength" >
<number>10</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1" >
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" colspan="3" >
<widget class="QGroupBox" name="box_System" >
<property name="title" >
<string>System</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_12" >
<item>
<widget class="QLabel" name="label" >
<property name="text" >
<string>Spannung:</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="bar_UBAT" >
<property name="maximum" >
<number>140</number>
</property>
<property name="value" >
<number>0</number>
</property>
<property name="format" >
<string>%v</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_133" >
<property name="text" >
<string>Empfang:</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="bar_RX" >
<property name="maximum" >
<number>255</number>
</property>
<property name="value" >
<number>0</number>
</property>
<property name="format" >
<string>%v</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_5" >
<attribute name="title" >
<string>Firmware Update </string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Firmware.png</normaloff>:/Actions/Images/Actions/Firmware.png</iconset>
</attribute>
<layout class="QGridLayout" name="gridLayout_37" >
<item row="0" column="0" >
<widget class="QTextEdit" name="te_Shell" >
<property name="font" >
<font>
<family>Adobe Courier</family>
<pointsize>10</pointsize>
</font>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QFrame" name="frame_20" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3" >
<item>
<widget class="QPushButton" name="pb_SettingsReset" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>Settings zurücksetzen</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>178</width>
<height>17</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QRadioButton" name="rb_FC" >
<property name="text" >
<string>FlightCtrl </string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rb_MK3MAG" >
<property name="text" >
<string>MK3Mag </string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rb_BL" >
<property name="enabled" >
<bool>true</bool>
</property>
<property name="text" >
<string>BL-Ctrl </string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="rb_NC" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>NaviCtrl </string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_11" >
<item>
<widget class="QPushButton" name="pb_HexFile" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Firmeware-Datei auswählen</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="le_HexFile" >
<property name="text" >
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_Update" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Updaten</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_Flash" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>Flashen</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_6" >
<attribute name="title" >
<string>Wegpunkte</string>
</attribute>
<attribute name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Waypoints.png</normaloff>:/Actions/Images/Actions/Waypoints.png</iconset>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_4" >
<item>
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Wegpunkt</string>
</property>
<widget class="QWidget" name="horizontalLayoutWidget" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
<width>371</width>
<height>100</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5" >
<item>
<layout class="QFormLayout" name="formLayout" >
<property name="fieldGrowthPolicy" >
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="label_8" >
<property name="text" >
<string>Longitude</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_LonValue" />
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_9" >
<property name="text" >
<string>Latitude</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="le_LatValue" />
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="pb_FlyTo" >
<property name="text" >
<string>flieg da hin</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Seite" >
<attribute name="title" >
<string>Debug</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_9" >
<item row="0" column="0" >
<widget class="QLabel" name="lb_Port" >
<property name="text" >
<string>Device: </string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="le_Port" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>/dev/ttyUSB0</string>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QPushButton" name="pb_Open" >
<property name="text" >
<string>Verbinden</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/Actions/Images/22X22/network-disconnect.png</normaloff>:/Actions/Images/22X22/network-disconnect.png</iconset>
</property>
</widget>
</item>
<item row="0" column="3" colspan="2" >
<widget class="QPushButton" name="pb_Record" >
<property name="text" >
<string>CSV Aufzeichen</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/Actions/Images/22X22/media-record.png</normaloff>:/Actions/Images/22X22/media-record.png</iconset>
</property>
</widget>
</item>
<item row="0" column="5" >
<widget class="QPushButton" name="pb_Quit" >
<property name="text" >
<string>Beenden</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/Actions/Images/22X22/application-exit.png</normaloff>:/Actions/Images/22X22/application-exit.png</iconset>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QRadioButton" name="rb_SelFC" >
<property name="text" >
<string>FlightCtrl</string>
</property>
</widget>
</item>
<item row="1" column="3" >
<widget class="QRadioButton" name="rb_SelNC" >
<property name="text" >
<string>NaviCtrl</string>
</property>
</widget>
</item>
<item row="1" column="4" >
<widget class="QRadioButton" name="rb_SelMag" >
<property name="text" >
<string>MK3Mag</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2" >
<widget class="QPushButton" name="Dec" >
<property name="text" >
<string>Decode</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="6" >
<widget class="QLineEdit" name="IN" >
<property name="text" >
<string>#cO][`S>zNIP^y``====M==================================z[lS>|zGP^{]Y====M========[n======>o>m>omMq>|m`J==E=============yY </string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>733</width>
<height>26</height>
</rect>
</property>
<widget class="QMenu" name="menuProgramm" >
<property name="title" >
<string>&amp;Programm</string>
</property>
<addaction name="ac_ConnectTTY" />
<addaction name="ac_QMKServer" />
<addaction name="separator" />
<addaction name="ac_Quit" />
</widget>
<widget class="QMenu" name="menuEinstellungen" >
<property name="title" >
<string>&amp;Einstellungen</string>
</property>
<addaction name="ac_Config" />
<addaction name="separator" />
<addaction name="ac_Preferences" />
</widget>
<widget class="QMenu" name="menu_Help" >
<property name="title" >
<string>Hilfe</string>
</property>
<addaction name="ac_About" />
</widget>
<widget class="QMenu" name="menuDaten" >
<property name="title" >
<string>&amp;Debug-Daten</string>
</property>
<addaction name="ac_RecordCSV" />
<addaction name="ac_StartPlotter" />
<addaction name="separator" />
<addaction name="ac_FastDebug" />
<addaction name="ac_NoDebug" />
<addaction name="separator" />
<addaction name="ac_GetLabels" />
</widget>
<widget class="QMenu" name="menuAnsicht" >
<property name="title" >
<string>&amp;Ansicht</string>
</property>
<widget class="QMenu" name="menuBereiche" >
<property name="title" >
<string>Bereiche</string>
</property>
<addaction name="ac_View0" />
<addaction name="ac_View1" />
<addaction name="ac_View2" />
<addaction name="ac_View3" />
<addaction name="ac_View4" />
<addaction name="ac_View5" />
<addaction name="ac_View6" />
</widget>
<addaction name="menuBereiche" />
</widget>
<widget class="QMenu" name="menuWerkzeuge" >
<property name="title" >
<string>Werkzeuge</string>
</property>
<addaction name="ac_Motortest" />
<addaction name="ac_LCD" />
</widget>
<widget class="QMenu" name="menuHardware" >
<property name="title" >
<string>Hardware</string>
</property>
<addaction name="ac_SelFC" />
<addaction name="ac_SelNC" />
<addaction name="ac_SelMag" />
</widget>
<widget class="QMenu" name="menu_Navi_Daten" >
<property name="title" >
<string>&amp;Navi-Daten</string>
</property>
<addaction name="ac_StartServer" />
<addaction name="separator" />
<addaction name="ac_FastNavi" />
<addaction name="ac_NoNavi" />
</widget>
<addaction name="menuProgramm" />
<addaction name="menuHardware" />
<addaction name="menuAnsicht" />
<addaction name="menuDaten" />
<addaction name="menu_Navi_Daten" />
<addaction name="menuEinstellungen" />
<addaction name="menuWerkzeuge" />
<addaction name="menu_Help" />
</widget>
<widget class="QToolBar" name="tb_Allgemein" >
<property name="windowTitle" >
<string>Allgemein</string>
</property>
<property name="iconSize" >
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolButtonStyle" >
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<attribute name="toolBarArea" >
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<bool>false</bool>
</attribute>
<addaction name="ac_ConnectTTY" />
<addaction name="ac_QMKServer" />
<addaction name="separator" />
<addaction name="ac_StartServer" />
</widget>
<widget class="QToolBar" name="tb_Werkzeuge" >
<property name="windowTitle" >
<string>Werkzeuge</string>
</property>
<property name="iconSize" >
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolButtonStyle" >
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<attribute name="toolBarArea" >
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<bool>false</bool>
</attribute>
<addaction name="ac_Motortest" />
<addaction name="ac_LCD" />
</widget>
<widget class="QToolBar" name="tb_Debug" >
<property name="windowTitle" >
<string>Debug-Daten</string>
</property>
<property name="iconSize" >
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="toolButtonStyle" >
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<attribute name="toolBarArea" >
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<bool>false</bool>
</attribute>
<addaction name="ac_StartPlotter" />
<addaction name="ac_FastDebug" />
<addaction name="ac_RecordCSV" />
</widget>
<widget class="QToolBar" name="tb_TTY" >
<property name="windowTitle" >
<string>Schnittstelle</string>
</property>
<attribute name="toolBarArea" >
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<bool>false</bool>
</attribute>
</widget>
<widget class="QToolBar" name="tb_Hardware" >
<property name="windowTitle" >
<string>Hardware</string>
</property>
<attribute name="toolBarArea" >
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak" >
<bool>false</bool>
</attribute>
</widget>
<action name="ac_LogDir" >
<property name="text" >
<string>Log-Verzeichniss</string>
</property>
</action>
<action name="ac_ParameterDir" >
<property name="text" >
<string>Parameter-Verzeichniss</string>
</property>
</action>
<action name="ac_Quit" >
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Exit.png</normaloff>:/Actions/Images/Actions/Exit.png</iconset>
</property>
<property name="text" >
<string>&amp;Beenden</string>
</property>
</action>
<action name="ac_About" >
<property name="text" >
<string>Über QMK-Groundstation</string>
</property>
</action>
<action name="ac_ConnectTTY" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Seriell-NO.png</normaloff>
<normalon>:/Actions/Images/Actions/Seriell-OK.png</normalon>:/Actions/Images/Actions/Seriell-NO.png</iconset>
</property>
<property name="text" >
<string>Seriell Verbinden</string>
</property>
</action>
<action name="ac_RecordCSV" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/CVS-Record.png</normaloff>
<normalon>:/Actions/Images/Actions/CVS-Stop.png</normalon>:/Actions/Images/Actions/CVS-Record.png</iconset>
</property>
<property name="text" >
<string>CSV Aufzeichnen</string>
</property>
</action>
<action name="ac_StartPlotter" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Plotter-NO.png</normaloff>
<normalon>:/Actions/Images/Actions/Plotter-OK.png</normalon>:/Actions/Images/Actions/Plotter-NO.png</iconset>
</property>
<property name="text" >
<string>Start Plotter</string>
</property>
</action>
<action name="ac_Config" >
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Preferences-Data.png</normaloff>:/Actions/Images/Actions/Preferences-Data.png</iconset>
</property>
<property name="text" >
<string>Datenfelder wählen</string>
</property>
</action>
<action name="ac_FastDebug" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Fast-Data.png</normaloff>:/Actions/Images/Actions/Fast-Data.png</iconset>
</property>
<property name="text" >
<string>Schnelle Debugdaten</string>
</property>
</action>
<action name="ac_View0" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Debug.png</normaloff>:/Actions/Images/Actions/Debug.png</iconset>
</property>
<property name="text" >
<string>Debug-Daten</string>
</property>
</action>
<action name="ac_View1" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Plotter-NO.png</normaloff>:/Actions/Images/Actions/Plotter-NO.png</iconset>
</property>
<property name="text" >
<string>Plotter</string>
</property>
</action>
<action name="ac_View2" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/FC-Settings.png</normaloff>:/Actions/Images/Actions/FC-Settings.png</iconset>
</property>
<property name="text" >
<string>FC-Settings</string>
</property>
</action>
<action name="ac_View3" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Terminal.png</normaloff>:/Actions/Images/Actions/Terminal.png</iconset>
</property>
<property name="text" >
<string>Terminal</string>
</property>
</action>
<action name="ac_View4" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Cockpit.png</normaloff>:/Actions/Images/Actions/Cockpit.png</iconset>
</property>
<property name="text" >
<string>Cockpit</string>
</property>
</action>
<action name="ac_View5" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Firmware.png</normaloff>:/Actions/Images/Actions/Firmware.png</iconset>
</property>
<property name="text" >
<string>Firmware Update</string>
</property>
</action>
<action name="ac_GetLabels" >
<property name="text" >
<string>Beschreibungen abfragen</string>
</property>
</action>
<action name="ac_Preferences" >
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Preferences.png</normaloff>:/Actions/Images/Actions/Preferences.png</iconset>
</property>
<property name="text" >
<string>QMK Einrichten</string>
</property>
</action>
<action name="ac_Motortest" >
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Motortest.png</normaloff>:/Actions/Images/Actions/Motortest.png</iconset>
</property>
<property name="text" >
<string>Motortest</string>
</property>
</action>
<action name="ac_SelFC" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="text" >
<string>FlightCtrl</string>
</property>
</action>
<action name="ac_SelNC" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="text" >
<string>NaviCtrl</string>
</property>
</action>
<action name="ac_SelMag" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="text" >
<string>MK3Mag</string>
</property>
</action>
<action name="ac_NoDebug" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="text" >
<string>Debugdaten abschalten.</string>
</property>
</action>
<action name="ac_StartServer" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Google-NO.png</normaloff>
<normalon>:/Actions/Images/Actions/Google-OK.png</normalon>:/Actions/Images/Actions/Google-NO.png</iconset>
</property>
<property name="text" >
<string>Google Earth Server</string>
</property>
</action>
<action name="ac_FastNavi" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Fast-Data.png</normaloff>:/Actions/Images/Actions/Fast-Data.png</iconset>
</property>
<property name="text" >
<string>Schnelle Navi-Daten</string>
</property>
</action>
<action name="ac_NoNavi" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="text" >
<string>Navidaten abschalten</string>
</property>
</action>
<action name="ac_QMKServer" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="enabled" >
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Network-NO.png</normaloff>
<normalon>:/Actions/Images/Actions/Network-OK.png</normalon>:/Actions/Images/Actions/Network-NO.png</iconset>
</property>
<property name="text" >
<string>QMK Server Verbinden</string>
</property>
</action>
<action name="ac_View6" >
<property name="checkable" >
<bool>true</bool>
</property>
<property name="enabled" >
<bool>false</bool>
</property>
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/Waypoints.png</normaloff>:/Actions/Images/Actions/Waypoints.png</iconset>
</property>
<property name="text" >
<string>Wegpunkte</string>
</property>
</action>
<action name="ac_LCD" >
<property name="icon" >
<iconset resource="../MKTool.qrc" >
<normaloff>:/Actions/Images/Actions/LCD.png</normaloff>:/Actions/Images/Actions/LCD.png</iconset>
</property>
<property name="text" >
<string>LCD-Display</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<class>QwtPlot</class>
<extends>QFrame</extends>
<header>qwt_plot.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QwtCompass</class>
<extends>QwtDial</extends>
<header>qwt_compass.h</header>
</customwidget>
<customwidget>
<class>QwtSlider</class>
<extends>QWidget</extends>
<header>qwt_slider.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../MKTool.qrc" />
</resources>
<connections>
<connection>
<sender>ac_Quit</sender>
<signal>triggered()</signal>
<receiver>dlg_mktool_UI</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel" >
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel" >
<x>384</x>
<y>209</y>
</hint>
</hints>
</connection>
<connection>
<sender>pb_StartPlotter</sender>
<signal>clicked()</signal>
<receiver>ac_StartPlotter</receiver>
<slot>trigger()</slot>
<hints>
<hint type="sourcelabel" >
<x>756</x>
<y>370</y>
</hint>
<hint type="destinationlabel" >
<x>-1</x>
<y>-1</y>
</hint>
</hints>
</connection>
<connection>
<sender>pb_Quit</sender>
<signal>clicked()</signal>
<receiver>ac_Quit</receiver>
<slot>trigger()</slot>
<hints>
<hint type="sourcelabel" >
<x>663</x>
<y>117</y>
</hint>
<hint type="destinationlabel" >
<x>-1</x>
<y>-1</y>
</hint>
</hints>
</connection>
<connection>
<sender>pb_Open</sender>
<signal>clicked()</signal>
<receiver>ac_ConnectTTY</receiver>
<slot>trigger()</slot>
<hints>
<hint type="sourcelabel" >
<x>253</x>
<y>117</y>
</hint>
<hint type="destinationlabel" >
<x>-1</x>
<y>-1</y>
</hint>
</hints>
</connection>
<connection>
<sender>pb_Record</sender>
<signal>clicked()</signal>
<receiver>ac_RecordCSV</receiver>
<slot>trigger()</slot>
<hints>
<hint type="sourcelabel" >
<x>510</x>
<y>117</y>
</hint>
<hint type="destinationlabel" >
<x>-1</x>
<y>-1</y>
</hint>
</hints>
</connection>
<connection>
<sender>rb_SelFC</sender>
<signal>toggled(bool)</signal>
<receiver>ac_SelFC</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>299</x>
<y>194</y>
</hint>
<hint type="destinationlabel" >
<x>-1</x>
<y>-1</y>
</hint>
</hints>
</connection>
<connection>
<sender>rb_SelMag</sender>
<signal>toggled(bool)</signal>
<receiver>ac_SelMag</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>504</x>
<y>194</y>
</hint>
<hint type="destinationlabel" >
<x>-1</x>
<y>-1</y>
</hint>
</hints>
</connection>
<connection>
<sender>rb_SelNC</sender>
<signal>toggled(bool)</signal>
<receiver>ac_SelNC</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>404</x>
<y>194</y>
</hint>
<hint type="destinationlabel" >
<x>-1</x>
<y>-1</y>
</hint>
</hints>
</connection>
<connection>
<sender>ac_SelFC</sender>
<signal>triggered(bool)</signal>
<receiver>rb_SelFC</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel" >
<x>299</x>
<y>194</y>
</hint>
</hints>
</connection>
<connection>
<sender>ac_SelMag</sender>
<signal>triggered(bool)</signal>
<receiver>rb_SelMag</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel" >
<x>504</x>
<y>194</y>
</hint>
</hints>
</connection>
<connection>
<sender>ac_SelNC</sender>
<signal>triggered(bool)</signal>
<receiver>rb_SelNC</receiver>
<slot>setChecked(bool)</slot>
<hints>
<hint type="sourcelabel" >
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel" >
<x>404</x>
<y>194</y>
</hint>
</hints>
</connection>
<connection>
<sender>pb_Clear</sender>
<signal>clicked()</signal>
<receiver>te_RX</receiver>
<slot>clear()</slot>
<hints>
<hint type="sourcelabel" >
<x>736</x>
<y>372</y>
</hint>
<hint type="destinationlabel" >
<x>392</x>
<y>225</y>
</hint>
</hints>
</connection>
</connections>
</ui>
/QMK-Groundstation/branches/waypoint/Forms/wdg_Settings.cpp
0,0 → 1,945
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <QFileDialog>
#include <QSettings>
 
#include "wdg_Settings.h"
#include "../Classes/ToolBox.h"
 
wdg_Settings::wdg_Settings(QWidget *parent) : QWidget(parent)
{
setupUi(this);
 
#ifndef _BETA_
cb_5_8->setVisible(false);
cb_8_3->setVisible(false);
cb_12_9->setVisible(false);
cb_12_10->setVisible(false);
cb_12_11->setVisible(false);
sb_13_5->setVisible(false);
#endif
 
connect(pb_Load, SIGNAL(clicked()), this, SLOT(slot_LoadParameter()));
connect(pb_Save, SIGNAL(clicked()), this, SLOT(slot_SaveParameter()));
 
// Settings - Looping-Pfeile
connect(tb_9_6, SIGNAL(clicked()), this, SLOT(slot_tbUp()));
connect(tb_9_7, SIGNAL(clicked()), this, SLOT(slot_tbDown()));
connect(tb_9_8, SIGNAL(clicked()), this, SLOT(slot_tbLeft()));
connect(tb_9_9, SIGNAL(clicked()), this, SLOT(slot_tbRight()));
 
// Settings - LED's J16
connect(J16_0, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J16_1, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J16_2, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J16_3, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J16_4, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J16_5, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J16_6, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J16_7, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
 
// Settings - LED's J17
connect(J17_0, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J17_1, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J17_2, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J17_3, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J17_4, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J17_5, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J17_6, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
connect(J17_7, SIGNAL(clicked()), this, SLOT(slot_LEDtoValue()));
 
connect(sb_11_1, SIGNAL(valueChanged(int)), this, SLOT(slot_ValuetoLED16(int)));
connect(sb_11_3, SIGNAL(valueChanged(int)), this, SLOT(slot_ValuetoLED17(int)));
}
 
void wdg_Settings::set_Config(cSettings *pConfig)
{
Config = pConfig;
}
 
void wdg_Settings::set_LED(QToolButton *ToolButton, bool On)
{
if (ToolButton->text() == QString("0") && On)
{
ToolButton->setIcon(ToolBox::Icon(0));
ToolButton->setText("1");
}
else if (ToolButton->text() == QString("1") && !On)
{
ToolButton->setIcon(ToolBox::Icon(4));
ToolButton->setText("0");
}
else if (ToolButton->text() == QString("00") && On)
{
ToolButton->setIcon(ToolBox::Icon(0));
ToolButton->setText("11");
}
else if (ToolButton->text() == QString("11") && !On)
{
ToolButton->setIcon(ToolBox::Icon(4));
ToolButton->setText("00");
}
}
 
void wdg_Settings::slot_LEDtoValue()
{
QToolButton *ToolButton = (QToolButton*)sender();
if (ToolButton->text() == QString("0"))
{
set_LED(ToolButton, true);
sb_11_1->setValue(sb_11_1->value() + ToolButton->toolTip().toInt());
}
else if (ToolButton->text() == QString("1"))
{
set_LED(ToolButton);
sb_11_1->setValue(sb_11_1->value() - ToolButton->toolTip().toInt());
}
else if (ToolButton->text() == QString("00"))
{
set_LED(ToolButton, true);
sb_11_3->setValue(sb_11_3->value() + ToolButton->toolTip().toInt());
}
else if (ToolButton->text() == QString("11"))
{
set_LED(ToolButton);
sb_11_3->setValue(sb_11_3->value() - ToolButton->toolTip().toInt());
}
}
 
void wdg_Settings::slot_ValuetoLED16(int Wert)
{
// QSpinBox *SpinBox = (QSpinBox*)sender();
 
// int Wert = SpinBox->value();
 
set_LED(J16_0);
set_LED(J16_1);
set_LED(J16_2);
set_LED(J16_3);
set_LED(J16_4);
set_LED(J16_5);
set_LED(J16_6);
set_LED(J16_7);
 
for (int a = 0; a < 8; a++)
{
if (Wert > 127)
{
set_LED(J16_0, true);
Wert = Wert - 128;
}
if (Wert > 63)
{
set_LED(J16_1, true);
Wert = Wert - 64;
}
if (Wert > 31)
{
set_LED(J16_2, true);
Wert = Wert - 32;
}
if (Wert > 15)
{
set_LED(J16_3, true);
Wert = Wert - 16;
}
if (Wert > 7)
{
set_LED(J16_4, true);
Wert = Wert - 8;
}
if (Wert > 3)
{
set_LED(J16_5, true);
Wert = Wert - 4;
}
if (Wert > 1)
{
set_LED(J16_6, true);
Wert = Wert - 2;
}
if (Wert > 0)
{
set_LED(J16_7, true);
Wert = Wert - 1;
}
}
}
 
void wdg_Settings::slot_ValuetoLED17(int Wert)
{
// QSpinBox *SpinBox = (QSpinBox*)sender();
 
// int Wert = SpinBox->value();
 
set_LED(J17_0);
set_LED(J17_1);
set_LED(J17_2);
set_LED(J17_3);
set_LED(J17_4);
set_LED(J17_5);
set_LED(J17_6);
set_LED(J17_7);
 
for (int a = 0; a < 8; a++)
{
if (Wert > 127)
{
set_LED(J17_0, true);
Wert = Wert - 128;
}
if (Wert > 63)
{
set_LED(J17_1, true);
Wert = Wert - 64;
}
if (Wert > 31)
{
set_LED(J17_2, true);
Wert = Wert - 32;
}
if (Wert > 15)
{
set_LED(J17_3, true);
Wert = Wert - 16;
}
if (Wert > 7)
{
set_LED(J17_4, true);
Wert = Wert - 8;
}
if (Wert > 3)
{
set_LED(J17_5, true);
Wert = Wert - 4;
}
if (Wert > 1)
{
set_LED(J17_6, true);
Wert = Wert - 2;
}
if (Wert > 0)
{
set_LED(J17_7, true);
Wert = Wert - 1;
}
}
}
 
void wdg_Settings::slot_tbUp()
{
if (tb_9_6->text() == QString("0"))
{
// tb_9_6->setIcon(ToolBox::Icon(20));
tb_9_6->setText("1");
}
else
{
// tb_9_6->setIcon(ToolBox::Icon(21));
tb_9_6->setText("0");
}
}
 
void wdg_Settings::slot_tbDown()
{
if (tb_9_7->text() == QString("0"))
{
// tb_9_7->setIcon(ToolBox::Icon(22));
tb_9_7->setText("1");
}
else
{
// tb_9_7->setIcon(ToolBox::Icon(23));
tb_9_7->setText("0");
}
}
 
void wdg_Settings::slot_tbLeft()
{
if (tb_9_8->text() == QString("0"))
{
// tb_9_8->setIcon(ToolBox::Icon(24));
tb_9_8->setText("1");
}
else
{
// tb_9_8->setIcon(ToolBox::Icon(25));
tb_9_8->setText("0");
}
}
 
void wdg_Settings::slot_tbRight()
{
if (tb_9_9->text() == QString("0"))
{
// tb_9_9->setIcon(ToolBox::Icon(26));
tb_9_9->setText("1");
}
else
{
// tb_9_9->setIcon(ToolBox::Icon(27));
tb_9_9->setText("0");
}
}
 
void wdg_Settings::slot_LoadParameter() // DONE 0.71g
{
QString Filename = QFileDialog::getOpenFileName(this, "Mikrokopter Parameter laden", Config->DIR.Parameter + "", "Mikrokopter Parameter(*.mkp);;Alle Dateien (*)");
 
if (!Filename.isEmpty())
{
int Set = sb_Set->value();
QSettings Setting(Filename, QSettings::IniFormat);
 
Setting.beginGroup("Setup");
QString Name = Setting.value("Name", QString("--noname--")).toString();
char *CName = Name.toLatin1().data();
int a;
 
for (a=0; a < Name.length(); a++)
{
ParameterSet[Set][P_NAME+a] = CName[a];
}
while (a < 12)
{
ParameterSet[Set][P_NAME+a] = 0;
a++;
}
 
ParameterSet[Set][P_GLOBAL_CONF] = Setting.value("GlobalConfig", 0).toInt();
Setting.endGroup();
 
Setting.beginGroup("Channels");
ParameterSet[Set][P_KANAL_NICK] = Setting.value("Nick", 1).toInt();
ParameterSet[Set][P_KANAL_ROLL] = Setting.value("Roll", 2).toInt();
ParameterSet[Set][P_KANAL_GAS] = Setting.value("Gas", 3).toInt();
ParameterSet[Set][P_KANAL_GIER] = Setting.value("Gier", 4).toInt();
ParameterSet[Set][P_KANAL_POTI1] = Setting.value("Poti_1", 5).toInt();
ParameterSet[Set][P_KANAL_POTI2] = Setting.value("Poti_2", 6).toInt();
ParameterSet[Set][P_KANAL_POTI3] = Setting.value("Poti_3", 7).toInt();
ParameterSet[Set][P_KANAL_POTI4] = Setting.value("Poti_4", 8).toInt();
Setting.endGroup();
 
Setting.beginGroup("Stick");
ParameterSet[Set][P_STICK_P] = Setting.value("Nick_Roll-P", 4).toInt();
ParameterSet[Set][P_STICK_D] = Setting.value("Nick_Roll-D", 8).toInt();
ParameterSet[Set][P_GIER_P] = Setting.value("Gier-P", 1).toInt();
ParameterSet[Set][P_EXTERNAL] = Setting.value("ExternalControl", 1).toInt();
Setting.endGroup();
 
Setting.beginGroup("Altitude");
ParameterSet[Set][P_MAXHOEHE] = Setting.value("Setpoint", 251).toInt();
ParameterSet[Set][P_MIN_GAS] = Setting.value("MinGas", 30).toInt();
ParameterSet[Set][P_HOEHE_P] = Setting.value("P", 10).toInt();
ParameterSet[Set][P_DRUCK_D] = Setting.value("Barometric-D", 30).toInt();
ParameterSet[Set][P_HOEHE_ACC] = Setting.value("Z-ACC-Effect", 30).toInt();
ParameterSet[Set][P_HOEHE_GAIN] = Setting.value("Gain", 3).toInt();
Setting.endGroup();
 
Setting.beginGroup("Gyro");
ParameterSet[Set][P_GYRO_P] = Setting.value("P", 80).toInt();
ParameterSet[Set][P_GYRO_I] = Setting.value("I", 120).toInt();
ParameterSet[Set][P_GYRO_D] = Setting.value("D", 0).toInt();
ParameterSet[Set][P_DYNAMIC_STAB] = Setting.value("DynamicStability", 75).toInt();
ParameterSet[Set][P_GYRO_ACC_FAKTOR] = Setting.value("ACC_Gyro-Factor", 30).toInt();
ParameterSet[Set][P_GYRO_ACC_ABGL] = Setting.value("ACC_Gyro-Compensation", 32).toInt();
ParameterSet[Set][P_DRIFT_KOMP] = Setting.value("DriftCompensation", 4).toInt();
ParameterSet[Set][P_FAKTOR_I] = Setting.value("Main-I", 32).toInt();
Setting.endGroup();
 
Setting.beginGroup("Camera");
ParameterSet[Set][P_SERVO_NICK_CONT] = Setting.value("ServoNickControl", 100).toInt();
ParameterSet[Set][P_SERVO_NICK_COMP] = Setting.value("ServoNickCompensation", 40).toInt();
ParameterSet[Set][P_SERVO_NICK_COMPI] = Setting.value("ServoNickInvert", 0).toInt();
ParameterSet[Set][P_SERVO_NICK_MIN] = Setting.value("ServoNickMin", 50).toInt();
ParameterSet[Set][P_SERVO_NICK_MAX] = Setting.value("ServoNickMax", 150).toInt();
ParameterSet[Set][P_SERVO_NICK_REFR] = Setting.value("ServoNickRefreshRate", 5).toInt();
Setting.endGroup();
 
Setting.beginGroup("Others");
ParameterSet[Set][P_GAS_MIN] = Setting.value("MinGas", 8).toInt();
ParameterSet[Set][P_GAS_MAX] = Setting.value("MaxGas", 230).toInt();
ParameterSet[Set][P_KOMPASS_WIRKUNG] = Setting.value("Compass-Effect", 128).toInt();
ParameterSet[Set][P_UNTERSPANNUNG] = Setting.value("UnderVoltage", 94).toInt();
ParameterSet[Set][P_NOTGAS] = Setting.value("NotGas", 35).toInt();
ParameterSet[Set][P_NOTGASZEIT] = Setting.value("NotGasTime", 30).toInt();
Setting.endGroup();
 
Setting.beginGroup("Coupling");
ParameterSet[Set][P_ACHS_KOPPLUNG1] = Setting.value("YawPosFeedback", 90).toInt();
ParameterSet[Set][P_ACHS_KOPPLUNG2] = Setting.value("NickRollFeedback", 90).toInt();
ParameterSet[Set][P_ACHS_GKOPPLUNG] = Setting.value("YawCorrection", 5).toInt();
Setting.endGroup();
 
Setting.beginGroup("Loop");
ParameterSet[Set][P_LOOP_CONFIG] = Setting.value("Config", 0).toInt();
ParameterSet[Set][P_LOOP_GAS_LIMIT] = Setting.value("GasLimit", 50).toInt();
ParameterSet[Set][P_LOOP_THRESHOLD] = Setting.value("StickThreshold", 90).toInt();
ParameterSet[Set][P_LOOP_HYSTERESE] = Setting.value("LoopHysteresis", 50).toInt();
ParameterSet[Set][P_WINKEL_NICK] = Setting.value("TurnOverNick", 85).toInt();
ParameterSet[Set][P_WINKEL_ROLL] = Setting.value("TurnOverRoll", 85).toInt();
Setting.endGroup();
 
Setting.beginGroup("User");
ParameterSet[Set][P_USER_1] = Setting.value("Parameter_1", 0).toInt();
ParameterSet[Set][P_USER_2] = Setting.value("Parameter_2", 0).toInt();
ParameterSet[Set][P_USER_3] = Setting.value("Parameter_3", 0).toInt();
ParameterSet[Set][P_USER_4] = Setting.value("Parameter_4", 0).toInt();
ParameterSet[Set][P_USER_5] = Setting.value("Parameter_5", 0).toInt();
ParameterSet[Set][P_USER_6] = Setting.value("Parameter_6", 0).toInt();
ParameterSet[Set][P_USER_7] = Setting.value("Parameter_7", 0).toInt();
ParameterSet[Set][P_USER_8] = Setting.value("Parameter_8", 0).toInt();
Setting.endGroup();
 
Setting.beginGroup("Output");
ParameterSet[Set][P_J16_BITMASK] = Setting.value("J16_Bitmask", 255).toInt();
ParameterSet[Set][P_J16_TIMING] = Setting.value("J16_Timing", 251).toInt();
ParameterSet[Set][P_J17_BITMASK] = Setting.value("J17_Bitmask", 255).toInt();
ParameterSet[Set][P_J17_TIMING] = Setting.value("J17_Timing", 251).toInt();
Setting.endGroup();
 
Setting.beginGroup("NaviCtrl");
ParameterSet[Set][P_NAV_GPS_MODE] = Setting.value("GPS_ModeControl", 253).toInt();
ParameterSet[Set][P_NAV_GPS_GAIN] = Setting.value("GPS_Gain", 100).toInt();
ParameterSet[Set][P_NAV_GPS_P] = Setting.value("GPS_P", 90).toInt();
ParameterSet[Set][P_NAV_GPS_I] = Setting.value("GPS_I", 90).toInt();
ParameterSet[Set][P_NAV_GPS_D] = Setting.value("GPS_D", 90).toInt();
ParameterSet[Set][P_NAV_GPS_P_LIMIT] = Setting.value("GPS_P_Limit", 75).toInt();
ParameterSet[Set][P_NAV_GPS_I_LIMIT] = Setting.value("GPS_I_Limit", 75).toInt();
ParameterSet[Set][P_NAV_GPS_D_LIMIT] = Setting.value("GPS_D_Limit", 75).toInt();
ParameterSet[Set][P_NAV_GPS_ACC] = Setting.value("GPS_Acc", 0).toInt();
ParameterSet[Set][P_NAV_GPS_MIN] = Setting.value("GPS_MinSat", 6).toInt();
ParameterSet[Set][P_NAV_STICK_THRE] = Setting.value("GPS_StickThreshold", 8).toInt();
ParameterSet[Set][P_NAV_WIND_CORR] = Setting.value("GPS_WindCorrection", 90).toInt();
ParameterSet[Set][P_NAV_SPEED_COMP] = Setting.value("GPS_SpeedCompensation", 30).toInt();
ParameterSet[Set][P_NAV_RADIUS] = Setting.value("GPS_MaxRadius", 100).toInt();
ParameterSet[Set][P_NAV_ANGLE_LIMIT] = Setting.value("GPS_AngleLimit", 60).toInt();
ParameterSet[Set][P_NAV_PH_LOGINTIME] = Setting.value("GPS_PH_Login_Time", 4).toInt();
Setting.endGroup();
 
show_FCSettings(Set, ParameterSet[Set]);
}
}
 
int wdg_Settings::get_Value(QComboBox *Combo)
{
if (Combo->currentText() == QString("Poti 1"))
return 251;
if (Combo->currentText() == QString("Poti 2"))
return 252;
if (Combo->currentText() == QString("Poti 3"))
return 253;
if (Combo->currentText() == QString("Poti 4"))
return 254;
return Combo->currentText().toInt();
}
 
void wdg_Settings::store_ParameterSet(int Set) // DONE 0.71h
{
char *Name = le_SetName->text().toLatin1().data();
 
int a;
 
for (a = 0; a < le_SetName->text().length(); a++)
{
ParameterSet[Set][P_NAME+a] = Name[a];
}
 
while(a < 12)
{
ParameterSet[Set][P_NAME+a] = 0;
a++;
}
 
// Seite 1
ParameterSet[Set][P_GLOBAL_CONF] = 0;
 
if (cb_1_1->isChecked())
ParameterSet[Set][P_GLOBAL_CONF] = ParameterSet[Set][P_GLOBAL_CONF] | 0x01;
if (cb_1_2->isChecked())
ParameterSet[Set][P_GLOBAL_CONF] = ParameterSet[Set][P_GLOBAL_CONF] | 0x02;
if (cb_1_3->isChecked())
ParameterSet[Set][P_GLOBAL_CONF] = ParameterSet[Set][P_GLOBAL_CONF] | 0x04;
if (cb_1_4->isChecked())
ParameterSet[Set][P_GLOBAL_CONF] = ParameterSet[Set][P_GLOBAL_CONF] | 0x08;
if (cb_1_5->isChecked())
ParameterSet[Set][P_GLOBAL_CONF] = ParameterSet[Set][P_GLOBAL_CONF] | 0x10;
if (cb_1_6->isChecked())
ParameterSet[Set][P_GLOBAL_CONF] = ParameterSet[Set][P_GLOBAL_CONF] | 0x20;
if (cb_1_7->isChecked())
ParameterSet[Set][P_GLOBAL_CONF] = ParameterSet[Set][P_GLOBAL_CONF] | 0x40;
if (cb_1_8->isChecked())
ParameterSet[Set][P_GLOBAL_CONF] = ParameterSet[Set][P_GLOBAL_CONF] | 0x80;
 
// Seite 2
ParameterSet[Set][P_KANAL_NICK] = sb_2_1->value();
ParameterSet[Set][P_KANAL_ROLL] = sb_2_2->value();
ParameterSet[Set][P_KANAL_GAS] = sb_2_3->value();
ParameterSet[Set][P_KANAL_GIER] = sb_2_4->value();
ParameterSet[Set][P_KANAL_POTI1] = sb_2_5->value();
ParameterSet[Set][P_KANAL_POTI2] = sb_2_6->value();
ParameterSet[Set][P_KANAL_POTI3] = sb_2_7->value();
ParameterSet[Set][P_KANAL_POTI4] = sb_2_8->value();
 
// Seite 3
ParameterSet[Set][P_STICK_P] = sb_3_1->value();
ParameterSet[Set][P_STICK_D] = sb_3_2->value();
ParameterSet[Set][P_GIER_P] = get_Value(cb_3_3);
ParameterSet[Set][P_EXTERNAL] = get_Value(cb_3_4);
 
// Seite 4
ParameterSet[Set][P_MAXHOEHE] = get_Value(cb_4_1);
ParameterSet[Set][P_MIN_GAS] = sb_4_2->value();
ParameterSet[Set][P_HOEHE_P] = get_Value(cb_4_3);
ParameterSet[Set][P_DRUCK_D] = get_Value(cb_4_4);
ParameterSet[Set][P_HOEHE_ACC] = get_Value(cb_4_5);
ParameterSet[Set][P_HOEHE_GAIN] = sb_4_6->value();
 
// Seite 5
ParameterSet[Set][P_GYRO_P] = get_Value(cb_5_1);
ParameterSet[Set][P_GYRO_I] = get_Value(cb_5_2);
ParameterSet[Set][P_GYRO_D] = get_Value(cb_5_8);
ParameterSet[Set][P_DYNAMIC_STAB] = get_Value(cb_5_3);
ParameterSet[Set][P_GYRO_ACC_FAKTOR] = sb_5_4->value();
ParameterSet[Set][P_GYRO_ACC_ABGL] = sb_5_5->value();
ParameterSet[Set][P_FAKTOR_I] = get_Value(cb_5_6);
ParameterSet[Set][P_DRIFT_KOMP] = sb_5_7->value();
 
// Seite 6
ParameterSet[Set][P_SERVO_NICK_CONT] = get_Value(cb_6_1);
ParameterSet[Set][P_SERVO_NICK_COMP] = sb_6_2->value();
ParameterSet[Set][P_SERVO_NICK_MIN] = sb_6_3->value();
ParameterSet[Set][P_SERVO_NICK_MAX] = sb_6_4->value();
ParameterSet[Set][P_SERVO_NICK_REFR] = sb_6_5->value();
ParameterSet[Set][P_SERVO_NICK_COMPI] = cb_6_6->isChecked();
 
// Seite 7
ParameterSet[Set][P_GAS_MIN] = sb_7_1->value();
ParameterSet[Set][P_GAS_MAX] = sb_7_2->value();
ParameterSet[Set][P_KOMPASS_WIRKUNG] = get_Value(cb_7_3);
ParameterSet[Set][P_UNTERSPANNUNG] = sb_7_4->value();
ParameterSet[Set][P_NOTGASZEIT] = sb_7_5->value();
ParameterSet[Set][P_NOTGAS] = sb_7_6->value();
 
// Seite 8
ParameterSet[Set][P_ACHS_KOPPLUNG1] = get_Value(cb_8_1);
ParameterSet[Set][P_ACHS_KOPPLUNG2] = get_Value(cb_8_2);
ParameterSet[Set][P_ACHS_GKOPPLUNG] = get_Value(cb_8_3);
 
// Seite 9
ParameterSet[Set][P_LOOP_CONFIG] = 0;
if (tb_9_6->text() == QString("1"))
ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x01;
if (tb_9_7->text() == QString("1"))
ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x02;
if (tb_9_8->text() == QString("1"))
ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x04;
if (tb_9_9->text() == QString("1"))
ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x08;
if (cb_4_7->isChecked())
ParameterSet[Set][P_LOOP_CONFIG] = ParameterSet[Set][P_LOOP_CONFIG] | 0x10;
 
ParameterSet[Set][P_LOOP_GAS_LIMIT] = get_Value(cb_9_1);
ParameterSet[Set][P_LOOP_THRESHOLD] = sb_9_2->value();
ParameterSet[Set][P_WINKEL_NICK] = sb_9_3->value();
ParameterSet[Set][P_LOOP_HYSTERESE] = sb_9_4->value();
ParameterSet[Set][P_WINKEL_ROLL] = sb_9_5->value();
 
// Seite 10
ParameterSet[Set][P_USER_1] = get_Value(cb_10_1);
ParameterSet[Set][P_USER_2] = get_Value(cb_10_2);
ParameterSet[Set][P_USER_3] = get_Value(cb_10_3);
ParameterSet[Set][P_USER_4] = get_Value(cb_10_4);
ParameterSet[Set][P_USER_5] = get_Value(cb_10_5);
ParameterSet[Set][P_USER_6] = get_Value(cb_10_6);
ParameterSet[Set][P_USER_7] = get_Value(cb_10_7);
ParameterSet[Set][P_USER_8] = get_Value(cb_10_8);
 
// Seite 11
ParameterSet[Set][P_J16_BITMASK] = sb_11_1->value();
ParameterSet[Set][P_J16_TIMING] = get_Value(cb_11_2);
ParameterSet[Set][P_J17_BITMASK] = sb_11_3->value();
ParameterSet[Set][P_J17_TIMING] = get_Value(cb_11_4);
 
// Seite 12
ParameterSet[Set][P_NAV_GPS_MODE] = get_Value(cb_12_1);
ParameterSet[Set][P_NAV_GPS_GAIN] = get_Value(cb_12_2);
ParameterSet[Set][P_NAV_STICK_THRE] = sb_12_3->value();
ParameterSet[Set][P_NAV_GPS_MIN] = sb_12_4->value();
ParameterSet[Set][P_NAV_GPS_P] = get_Value(cb_12_5);
ParameterSet[Set][P_NAV_GPS_I] = get_Value(cb_12_6);
ParameterSet[Set][P_NAV_GPS_D] = get_Value(cb_12_7);
ParameterSet[Set][P_NAV_GPS_ACC] = get_Value(cb_12_8);
ParameterSet[Set][P_NAV_GPS_P_LIMIT] = get_Value(cb_12_9);
ParameterSet[Set][P_NAV_GPS_I_LIMIT] = get_Value(cb_12_10);
ParameterSet[Set][P_NAV_GPS_D_LIMIT] = get_Value(cb_12_11);
 
//Seite 13
ParameterSet[Set][P_NAV_WIND_CORR] = get_Value(cb_13_1);
ParameterSet[Set][P_NAV_SPEED_COMP] = get_Value(cb_13_2);
ParameterSet[Set][P_NAV_RADIUS] = get_Value(cb_13_3);
ParameterSet[Set][P_NAV_ANGLE_LIMIT] = get_Value(cb_13_4);
ParameterSet[Set][P_NAV_PH_LOGINTIME] = sb_13_5->value();
}
 
void wdg_Settings::slot_SaveParameter() // DONE 0.71g
{
int Set = sb_Set->value() + 5;
 
QString Filename = QFileDialog::getSaveFileName(this, "Mikrokopter Parameter speichern", Config->DIR.Parameter + "" + le_SetName->text(), "Mikrokopter Parameter(*.mkp);;Alle Dateien (*)");
 
if (!Filename.isEmpty())
{
if (!(Filename.endsWith(".mkp", Qt::CaseInsensitive)))
{
Filename = Filename + QString(".mkp");
}
store_ParameterSet(Set);
 
QSettings Setting(Filename, QSettings::IniFormat);
 
Setting.beginGroup("Setup");
Setting.setValue("Name", le_SetName->text());
Setting.setValue("GlobalConfig", ParameterSet[Set][P_GLOBAL_CONF]);
Setting.endGroup();
 
Setting.beginGroup("Channels");
Setting.setValue("Nick", ParameterSet[Set][P_KANAL_NICK]);
Setting.setValue("Roll", ParameterSet[Set][P_KANAL_ROLL]);
Setting.setValue("Gas", ParameterSet[Set][P_KANAL_GAS]);
Setting.setValue("Gier", ParameterSet[Set][P_KANAL_GIER]);
Setting.setValue("Poti_1", ParameterSet[Set][P_KANAL_POTI1]);
Setting.setValue("Poti_2", ParameterSet[Set][P_KANAL_POTI2]);
Setting.setValue("Poti_3", ParameterSet[Set][P_KANAL_POTI3]);
Setting.setValue("Poti_4", ParameterSet[Set][P_KANAL_POTI4]);
Setting.endGroup();
 
Setting.beginGroup("Stick");
Setting.setValue("Nick_Roll-P", ParameterSet[Set][P_STICK_P]);
Setting.setValue("Nick_Roll-D", ParameterSet[Set][P_STICK_D]);
Setting.setValue("Gier-P", ParameterSet[Set][P_GIER_P]);
Setting.setValue("ExternalControl", ParameterSet[Set][P_EXTERNAL]);
Setting.endGroup();
 
Setting.beginGroup("Altitude");
Setting.setValue("Setpoint", ParameterSet[Set][P_MAXHOEHE]);
Setting.setValue("MinGas", ParameterSet[Set][P_MIN_GAS]);
Setting.setValue("P", ParameterSet[Set][P_HOEHE_P]);
Setting.setValue("Barometric-D", ParameterSet[Set][P_DRUCK_D]);
Setting.setValue("Z-ACC-Effect", ParameterSet[Set][P_HOEHE_ACC]);
Setting.setValue("Gain", ParameterSet[Set][P_HOEHE_GAIN]);
Setting.endGroup();
 
Setting.beginGroup("Gyro");
Setting.setValue("P", ParameterSet[Set][P_GYRO_P]);
Setting.setValue("I", ParameterSet[Set][P_GYRO_I]);
Setting.setValue("DynamicStability", ParameterSet[Set][P_DYNAMIC_STAB]);
Setting.setValue("ACC_Gyro-Factor", ParameterSet[Set][P_GYRO_ACC_FAKTOR]);
Setting.setValue("ACC_Gyro-Compensation", ParameterSet[Set][P_GYRO_ACC_ABGL]);
Setting.setValue("DriftCompensation", ParameterSet[Set][P_DRIFT_KOMP]);
Setting.setValue("Main-I", ParameterSet[Set][P_FAKTOR_I]);
Setting.endGroup();
 
Setting.beginGroup("Camera");
Setting.setValue("ServoNickControl", ParameterSet[Set][P_SERVO_NICK_CONT]);
Setting.setValue("ServoNickCompensation", ParameterSet[Set][P_SERVO_NICK_COMP]);
Setting.setValue("ServoNickInvert", ParameterSet[Set][P_SERVO_NICK_COMPI]);
Setting.setValue("ServoNickMin", ParameterSet[Set][P_SERVO_NICK_MIN]);
Setting.setValue("ServoNickMax", ParameterSet[Set][P_SERVO_NICK_MAX]);
Setting.setValue("ServoNickRefreshRate", ParameterSet[Set][P_SERVO_NICK_REFR]);
Setting.endGroup();
 
Setting.beginGroup("Others");
Setting.setValue("MinGas", ParameterSet[Set][P_GAS_MIN]);
Setting.setValue("MaxGas", ParameterSet[Set][P_GAS_MAX]);
Setting.setValue("Compass-Effect", ParameterSet[Set][P_KOMPASS_WIRKUNG]);
Setting.setValue("UnderVoltage", ParameterSet[Set][P_UNTERSPANNUNG]);
Setting.setValue("NotGas", ParameterSet[Set][P_NOTGAS]);
Setting.setValue("NotGasTime", ParameterSet[Set][P_NOTGASZEIT]);
Setting.endGroup();
 
Setting.beginGroup("Coupling");
Setting.setValue("YawPosFeedback", ParameterSet[Set][P_ACHS_KOPPLUNG1]);
Setting.setValue("YawNegFeedback", ParameterSet[Set][P_ACHS_GKOPPLUNG]);
Setting.endGroup();
 
Setting.beginGroup("Loop");
Setting.setValue("Config", ParameterSet[Set][P_LOOP_CONFIG]);
Setting.setValue("GasLimit", ParameterSet[Set][P_LOOP_GAS_LIMIT]);
Setting.setValue("StickThreshold", ParameterSet[Set][P_LOOP_THRESHOLD]);
Setting.setValue("LoopHysteresis", ParameterSet[Set][P_LOOP_HYSTERESE]);
Setting.setValue("TurnOverNick", ParameterSet[Set][P_WINKEL_NICK]);
Setting.setValue("TurnOverRoll", ParameterSet[Set][P_WINKEL_ROLL]);
Setting.endGroup();
 
Setting.beginGroup("User");
Setting.setValue("Parameter_1", ParameterSet[Set][P_USER_1]);
Setting.setValue("Parameter_2", ParameterSet[Set][P_USER_2]);
Setting.setValue("Parameter_3", ParameterSet[Set][P_USER_3]);
Setting.setValue("Parameter_4", ParameterSet[Set][P_USER_4]);
Setting.setValue("Parameter_5", ParameterSet[Set][P_USER_5]);
Setting.setValue("Parameter_6", ParameterSet[Set][P_USER_6]);
Setting.setValue("Parameter_7", ParameterSet[Set][P_USER_7]);
Setting.setValue("Parameter_8", ParameterSet[Set][P_USER_8]);
Setting.endGroup();
 
Setting.beginGroup("Output");
Setting.setValue("J16_Bitmask", ParameterSet[Set][P_J16_BITMASK]);
Setting.setValue("J16_Timing", ParameterSet[Set][P_J16_TIMING]);
Setting.setValue("J17_Bitmask", ParameterSet[Set][P_J17_BITMASK]);
Setting.setValue("J17_Timing", ParameterSet[Set][P_J17_TIMING]);
Setting.endGroup();
 
Setting.beginGroup("NaviCtrl");
Setting.setValue("GPS_ModeControl", ParameterSet[Set][P_NAV_GPS_MODE]);
Setting.setValue("GPS_Gain", ParameterSet[Set][P_NAV_GPS_GAIN]);
Setting.setValue("GPS_P", ParameterSet[Set][P_NAV_GPS_P]);
Setting.setValue("GPS_I", ParameterSet[Set][P_NAV_GPS_I]);
Setting.setValue("GPS_D", ParameterSet[Set][P_NAV_GPS_D]);
Setting.setValue("GPS_Acc", ParameterSet[Set][P_NAV_GPS_ACC]);
Setting.setValue("GPS_MinSat", ParameterSet[Set][P_NAV_GPS_MIN]);
Setting.setValue("GPS_StickThreshold", ParameterSet[Set][P_NAV_STICK_THRE]);
Setting.setValue("GPS_WindCorrection", ParameterSet[Set][P_NAV_WIND_CORR]);
Setting.setValue("GPS_SpeedCompensation", ParameterSet[Set][P_NAV_SPEED_COMP]);
Setting.setValue("GPS_MaxRadius", ParameterSet[Set][P_NAV_RADIUS]);
Setting.setValue("GPS_AngleLimit", ParameterSet[Set][P_NAV_ANGLE_LIMIT]);
Setting.endGroup();
}
}
 
char *wdg_Settings::GetFCSettings() // DONE 0.71g
{
store_ParameterSet(sb_Set->value());
 
char *TX_Data = new char[150];
 
TX_Data[0] = sb_Set->value();
TX_Data[1] = VERSION_SETTINGS;
 
for (int a = 0; a < MaxParameter; a++)
{
TX_Data[a + 2] = ParameterSet[sb_Set->value()][a];
}
 
return TX_Data;
 
// store_ParameterSet(sb_Set->value());
 
// send_Data('s', ADDRESS_FC, TX_Data, MaxParameter + 2, false);
}
 
QComboBox *wdg_Settings::setCombo(QComboBox *Combo, int Set, int Wert)
{
Set = Set;
 
if (Wert <= 250)
{
Combo->setItemText(4, QString("%1").arg(Wert));
Combo->setCurrentIndex(4);
}
else
{
Combo->setCurrentIndex(Wert - 251);
}
return Combo;
}
 
void wdg_Settings::show_FCSettings(int Set, int FCSettings[MaxParameter]) // DONE 0.71h
{
memcpy(Settings, FCSettings, sizeof(FCSettings));
// memcpy(ParameterSet, ParamSet, sizeof(ParamSet));
 
memcpy(ParameterSet[Set], FCSettings, sizeof(FCSettings));
 
sb_Set->setValue(Set);
 
char Name[12];
for (int a = 0; a < 12; a++)
{
Name[a] = FCSettings[P_NAME+a];
}
le_SetName->setText(QString(Name));
 
 
// Seite 1
{
cb_1_1->setChecked(FCSettings[P_GLOBAL_CONF] & 0x01);
cb_1_2->setChecked(FCSettings[P_GLOBAL_CONF] & 0x02);
cb_1_3->setChecked(FCSettings[P_GLOBAL_CONF] & 0x04);
cb_1_4->setChecked(FCSettings[P_GLOBAL_CONF] & 0x08);
cb_1_5->setChecked(FCSettings[P_GLOBAL_CONF] & 0x10);
cb_1_6->setChecked(FCSettings[P_GLOBAL_CONF] & 0x20);
cb_1_7->setChecked(FCSettings[P_GLOBAL_CONF] & 0x40);
cb_1_8->setChecked(FCSettings[P_GLOBAL_CONF] & 0x80);
}
// Seite 2
{
sb_2_1->setValue(FCSettings[P_KANAL_NICK]);
sb_2_2->setValue(FCSettings[P_KANAL_ROLL]);
sb_2_3->setValue(FCSettings[P_KANAL_GAS]);
sb_2_4->setValue(FCSettings[P_KANAL_GIER]);
sb_2_5->setValue(FCSettings[P_KANAL_POTI1]);
sb_2_6->setValue(FCSettings[P_KANAL_POTI2]);
sb_2_7->setValue(FCSettings[P_KANAL_POTI3]);
sb_2_8->setValue(FCSettings[P_KANAL_POTI4]);
}
// Seite 3
{
sb_3_1->setValue(FCSettings[P_STICK_P]);
sb_3_2->setValue(FCSettings[P_STICK_D]);
cb_3_3 = setCombo(cb_3_3, Set, FCSettings[P_GIER_P]);
cb_3_4 = setCombo(cb_3_4, Set, FCSettings[P_EXTERNAL]);
}
// Seite 4
{
cb_4_1 = setCombo(cb_4_1, Set, FCSettings[P_MAXHOEHE]);
sb_4_2->setValue(FCSettings[P_MIN_GAS]);
cb_4_3 = setCombo(cb_4_3, Set, FCSettings[P_HOEHE_P]);
cb_4_4 = setCombo(cb_4_4, Set, FCSettings[P_DRUCK_D]);
cb_4_5 = setCombo(cb_4_5, Set, FCSettings[P_HOEHE_ACC]);
sb_4_6->setValue(FCSettings[P_HOEHE_GAIN]);
cb_4_7->setChecked(FCSettings[P_LOOP_CONFIG] & 0x10);
}
// Seite 5
{
cb_5_1 = setCombo(cb_5_1, Set, FCSettings[P_GYRO_P]);
cb_5_2 = setCombo(cb_5_2, Set, FCSettings[P_GYRO_I]);
cb_5_8 = setCombo(cb_5_8, Set, FCSettings[P_GYRO_D]);
cb_5_3 = setCombo(cb_5_3, Set, FCSettings[P_DYNAMIC_STAB]);
sb_5_4->setValue(FCSettings[P_GYRO_ACC_FAKTOR]);
sb_5_5->setValue(FCSettings[P_GYRO_ACC_ABGL]);
cb_5_6 = setCombo(cb_5_6, Set, FCSettings[P_FAKTOR_I]);
sb_5_7->setValue(FCSettings[P_DRIFT_KOMP]);
}
// Seite 6
{
cb_6_1 = setCombo(cb_6_1, Set, FCSettings[P_SERVO_NICK_CONT]);
sb_6_2->setValue(FCSettings[P_SERVO_NICK_COMP]);
sb_6_3->setValue(FCSettings[P_SERVO_NICK_MIN]);
sb_6_4->setValue(FCSettings[P_SERVO_NICK_MAX]);
sb_6_5->setValue(FCSettings[P_SERVO_NICK_REFR]);
cb_6_6->setChecked(FCSettings[P_SERVO_NICK_COMPI]);
}
// Seite 7
{
sb_7_1->setValue(FCSettings[P_GAS_MIN]);
sb_7_2->setValue(FCSettings[P_GAS_MAX]);
cb_7_3 = setCombo(cb_7_3, Set, FCSettings[P_KOMPASS_WIRKUNG]);
sb_7_4->setValue(FCSettings[P_UNTERSPANNUNG]);
sb_7_5->setValue(FCSettings[P_NOTGASZEIT]);
sb_7_6->setValue(FCSettings[P_NOTGAS]);
}
// Seite 8
{
cb_8_1 = setCombo(cb_8_1, Set, FCSettings[P_ACHS_KOPPLUNG1]);
cb_8_2 = setCombo(cb_8_2, Set, FCSettings[P_ACHS_KOPPLUNG2]);
cb_8_3 = setCombo(cb_8_3, Set, FCSettings[P_ACHS_GKOPPLUNG]);
}
// Seite 9
{
if (FCSettings[P_LOOP_CONFIG] & 0x01)
{
tb_9_6->setText("1");
tb_9_6->setChecked(true);
}
else
{
tb_9_6->setText("0");
tb_9_6->setChecked(false);
}
 
if (FCSettings[P_LOOP_CONFIG] & 0x02)
{
tb_9_7->setText("1");
}
else
{
tb_9_7->setText("0");
}
 
if (FCSettings[P_LOOP_CONFIG] & 0x04)
{
tb_9_8->setText("1");
}
else
{
tb_9_8->setText("0");
}
 
if (FCSettings[P_LOOP_CONFIG] & 0x08)
{
tb_9_9->setText("1");
}
else
{
tb_9_9->setText("0");
}
 
cb_9_1 = setCombo(cb_9_1, Set, FCSettings[P_LOOP_GAS_LIMIT]);
sb_9_2->setValue(FCSettings[P_LOOP_THRESHOLD]);
sb_9_3->setValue(FCSettings[P_WINKEL_NICK]);
sb_9_4->setValue(FCSettings[P_LOOP_HYSTERESE]);
sb_9_5->setValue(FCSettings[P_WINKEL_ROLL]);
}
// Seite 10
{
cb_10_1 = setCombo(cb_10_1, Set, FCSettings[P_USER_1]);
cb_10_2 = setCombo(cb_10_2, Set, FCSettings[P_USER_2]);
cb_10_3 = setCombo(cb_10_3, Set, FCSettings[P_USER_3]);
cb_10_4 = setCombo(cb_10_4, Set, FCSettings[P_USER_4]);
cb_10_5 = setCombo(cb_10_5, Set, FCSettings[P_USER_5]);
cb_10_6 = setCombo(cb_10_6, Set, FCSettings[P_USER_6]);
cb_10_7 = setCombo(cb_10_7, Set, FCSettings[P_USER_7]);
cb_10_8 = setCombo(cb_10_8, Set, FCSettings[P_USER_8]);
}
// Seite 11
{
sb_11_1->setValue(FCSettings[P_J16_BITMASK]);
cb_11_2 = setCombo(cb_11_2, Set, FCSettings[P_J16_TIMING]);
sb_11_3->setValue(FCSettings[P_J17_BITMASK]);
cb_11_4 = setCombo(cb_11_4, Set, FCSettings[P_J17_TIMING]);
}
// Seite 12
{
cb_12_1 = setCombo(cb_12_1, Set, FCSettings[P_NAV_GPS_MODE]);
cb_12_2 = setCombo(cb_12_2, Set, FCSettings[P_NAV_GPS_GAIN]);
sb_12_3->setValue(FCSettings[P_NAV_STICK_THRE]);
sb_12_4->setValue(FCSettings[P_NAV_GPS_MIN]);
cb_12_5 = setCombo(cb_12_5, Set, FCSettings[P_NAV_GPS_P]);
cb_12_6 = setCombo(cb_12_6, Set, FCSettings[P_NAV_GPS_I]);
cb_12_7 = setCombo(cb_12_7, Set, FCSettings[P_NAV_GPS_D]);
cb_12_8 = setCombo(cb_12_8, Set, FCSettings[P_NAV_GPS_ACC]);
cb_12_9 = setCombo(cb_12_9, Set, FCSettings[P_NAV_GPS_P_LIMIT]);
cb_12_10 = setCombo(cb_12_10, Set, FCSettings[P_NAV_GPS_I_LIMIT]);
cb_12_11 = setCombo(cb_12_11, Set, FCSettings[P_NAV_GPS_D_LIMIT]);
}
// Seite 13
{
cb_13_1 = setCombo(cb_13_1, Set, FCSettings[P_NAV_WIND_CORR]);
cb_13_2 = setCombo(cb_13_2, Set, FCSettings[P_NAV_SPEED_COMP]);
cb_13_3 = setCombo(cb_13_3, Set, FCSettings[P_NAV_RADIUS]);
cb_13_4 = setCombo(cb_13_4, Set, FCSettings[P_NAV_ANGLE_LIMIT]);
sb_13_5->setValue(FCSettings[P_NAV_PH_LOGINTIME]);
}
}
 
wdg_Settings::~wdg_Settings()
{
}
 
/QMK-Groundstation/branches/waypoint/Forms/wdg_Settings.h
0,0 → 1,68
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef WDG_SETTINGS_H
#define WDG_SETTINGS_H
 
#include <QtGui/QWidget>
#include <QIcon>
#include <QToolButton>
#include <QComboBox>
 
#include "ui_wdg_Settings.h"
#include "../global.h"
#include "../Classes/cSettings.h"
 
class wdg_Settings : public QWidget, public Ui::wdg_Settings_UI
{
Q_OBJECT
 
public:
explicit wdg_Settings(QWidget *parent = 0);
virtual ~wdg_Settings();
 
void show_FCSettings(int Set, int FCSettings[MaxParameter]);
char *GetFCSettings();
void set_Config(cSettings *pConfig);
 
private:
int Settings[MaxParameter];
int ParameterSet[11][MaxParameter];
cSettings *Config;
 
void set_LED(QToolButton *ToolButton, bool On = false);
 
QComboBox *setCombo(QComboBox *Combo, int Set, int Wert);
int get_Value(QComboBox *Combo);
void store_ParameterSet(int Set);
 
private slots:
void slot_tbUp();
void slot_tbDown();
void slot_tbLeft();
void slot_tbRight();
 
void slot_LEDtoValue();
void slot_ValuetoLED16(int Wert);
void slot_ValuetoLED17(int Wert);
 
void slot_LoadParameter();
void slot_SaveParameter();
};
 
#endif // WDG_SETTINGS_H
/QMK-Groundstation/branches/waypoint/Forms/wdg_Settings.ui
0,0 → 1,4945
<ui version="4.0" >
<class>wdg_Settings_UI</class>
<widget class="QWidget" name="wdg_Settings_UI" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>308</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2" >
<property name="horizontalSpacing" >
<number>4</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<property name="margin" >
<number>0</number>
</property>
<item row="0" column="0" >
<widget class="QFrame" name="frame_18" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize" >
<size>
<width>120</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_30" >
<item row="0" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Parametersatz</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QSpinBox" name="sb_Set" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>5</number>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLineEdit" name="le_SetName" />
</item>
<item row="3" column="0" >
<widget class="QToolButton" name="pb_Read" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Lesen</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QToolButton" name="pb_Write" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Schreiben</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QToolButton" name="pb_Load" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Laden</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QToolButton" name="pb_Save" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Speichern</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<spacer name="verticalSpacer_13" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>83</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" >
<widget class="QTabWidget" name="tab_Par" >
<property name="currentIndex" >
<number>0</number>
</property>
<widget class="QWidget" name="Tab_P1" >
<attribute name="title" >
<string>Konfiguration </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_8" >
<item row="0" column="0" >
<widget class="QFrame" name="frame_4" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_15" >
<item row="0" column="0" >
<widget class="QCheckBox" name="cb_1_1" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Höhenregler</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="cb_1_2" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>-- Höhenfunktion per Schalter</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QCheckBox" name="cb_1_3" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Heading Hold</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QCheckBox" name="cb_1_4" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Kompass</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QCheckBox" name="cb_1_5" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>-- Kompass Ausrichtung fest</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QCheckBox" name="cb_1_6" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>GPS</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QCheckBox" name="cb_1_7" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Achsenkopplung</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QCheckBox" name="cb_1_8" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Drehratenbegrenzung</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" >
<widget class="QTextEdit" name="te_Help_1" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; text-decoration: underline;">Diese Seite dient der Konfiguration der Hardware bzw. der verschiedenen Funktionen des Mikrokopters.&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Höhenregler&lt;/span>: Häkchen setzen, wenn der Luftdrucksensor bestückt ist und die Höhenregelung benutzt werden soll. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Höhenfunktion per Schalter&lt;/span>: wenn die Fernsteuerung mit einem Kippschalter auf einem freien Kanal erweitert wurde, kann die Funktion „Halten der aktuell geflogenen Höhe“ zugeschaltet werden. Wenn dies nicht angewählt wird, gilt der Setpoint (siehe unten), also z.B. ein Poti. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Heading Hold&lt;/span>: In diesem Modus richtet sich der MikroKopter nicht waagerecht aus wenn der Stick in Neutralstellung ist. Diese Funktion ist eher etwas für erfahrenen Piloten, oder Piloten, die an X-3D-Steuerung gewöhnt sind. Mit dieser Einstellung sind alle Arten der Loopings möglich. &lt;/p>
&lt;ul style="-qt-list-indent: 1;">&lt;li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">--&amp;gt; Achtung: Wer HH fliegen möchte, muss den I-Anteil des Hauptreglers erhöhen (auf 30 z.B.)! &lt;/li>&lt;/ul>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Kompass&lt;/span>: Häkchen setzen, wenn das Kompassmodul angeschlossen ist und genutzt werden soll. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Kompass Ausrichtung fest&lt;/span>: Der MikroKopter richtet sich dann immer wieder in die Richtung aus, in die er beim Start gestanden hat. Ist das Feld nicht markiert, lässt sich die Richtung mit dem Gier-Stick ändern. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">GPS&lt;/span>: alternative Software-Versionen unterstützen ein ublox-GPS-Modul. Damit sind dann GPS-Funktionen wie Position halten, Position anfliegen, coming home und das Abfliegen von Waypoints möglich. Stichwort "Autonomes Fliegen".&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Achsenkopplung&lt;/span>:Hier lässt sich die Achsenkopplung global aktivieren oder deaktivieren. Die Achsenkopplung verhindert, dass der MikroKopter nach einer Kurve schief steht, weil die Winkel intern beim Gieren korrigiert werden. Sollte immer aktiviert sein. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Drehratenbegrenzung&lt;/span>: Zusätzliche Begrenzung der Drehrate. Mit dieser Option wird die Kennlinie des Gyros an den Enden angehoben. Dies verhindert schnelle Manöver, da ab einer bestimmten Drehrate stärker gegengeregelt wird. Betrifft nur Nick und Roll. (Nur für Anfänger interessant) &lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_P2" >
<attribute name="title" >
<string>Kanäle </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_11" >
<item row="0" column="0" >
<widget class="QFrame" name="frame_2" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_9" >
<item row="5" column="1" >
<widget class="QSpinBox" name="sb_2_6" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>8</number>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_8" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Roll:</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QSpinBox" name="sb_2_4" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>8</number>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="sb_2_1" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>8</number>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_7" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Nick:</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QSpinBox" name="sb_2_7" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>8</number>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="label_12" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Poti 4:</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="label_10" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Poti 2:</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_9" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Poti 1:</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QSpinBox" name="sb_2_5" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>8</number>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="label_11" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Poti 3:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QSpinBox" name="sb_2_2" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>8</number>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_5" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Gas:</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QSpinBox" name="sb_2_3" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>8</number>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_6" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Gier:</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QSpinBox" name="sb_2_8" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>8</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" >
<widget class="QFrame" name="frame" >
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_10" >
<item row="5" column="0" >
<widget class="QLabel" name="label_16" >
<property name="text" >
<string>Kanal 6:</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Kanal 1:</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QProgressBar" name="pb_K6" >
<property name="minimum" >
<number>-128</number>
</property>
<property name="maximum" >
<number>128</number>
</property>
<property name="value" >
<number>0</number>
</property>
<property name="textDirection" >
<enum>QProgressBar::TopToBottom</enum>
</property>
<property name="format" >
<string> %v</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QProgressBar" name="pb_K5" >
<property name="minimum" >
<number>-128</number>
</property>
<property name="maximum" >
<number>128</number>
</property>
<property name="value" >
<number>0</number>
</property>
<property name="textDirection" >
<enum>QProgressBar::TopToBottom</enum>
</property>
<property name="format" >
<string> %v</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_13" >
<property name="text" >
<string>Kanal 3:</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="label_17" >
<property name="text" >
<string>Kanal 7:</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QProgressBar" name="pb_K3" >
<property name="minimum" >
<number>-128</number>
</property>
<property name="maximum" >
<number>128</number>
</property>
<property name="value" >
<number>0</number>
</property>
<property name="textDirection" >
<enum>QProgressBar::TopToBottom</enum>
</property>
<property name="format" >
<string> %v</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_14" >
<property name="text" >
<string>Kanal 4:</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QProgressBar" name="pb_K8" >
<property name="minimum" >
<number>-128</number>
</property>
<property name="maximum" >
<number>128</number>
</property>
<property name="value" >
<number>0</number>
</property>
<property name="textDirection" >
<enum>QProgressBar::TopToBottom</enum>
</property>
<property name="format" >
<string> %v</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_15" >
<property name="text" >
<string>Kanal 5:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QProgressBar" name="pb_K2" >
<property name="minimum" >
<number>-128</number>
</property>
<property name="maximum" >
<number>128</number>
</property>
<property name="value" >
<number>0</number>
</property>
<property name="invertedAppearance" >
<bool>false</bool>
</property>
<property name="textDirection" >
<enum>QProgressBar::TopToBottom</enum>
</property>
<property name="format" >
<string> %v</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QProgressBar" name="pb_K4" >
<property name="minimum" >
<number>-128</number>
</property>
<property name="maximum" >
<number>128</number>
</property>
<property name="value" >
<number>0</number>
</property>
<property name="textDirection" >
<enum>QProgressBar::TopToBottom</enum>
</property>
<property name="format" >
<string> %v</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Kanal 2:</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QProgressBar" name="pb_K7" >
<property name="minimum" >
<number>-128</number>
</property>
<property name="maximum" >
<number>128</number>
</property>
<property name="value" >
<number>0</number>
</property>
<property name="textDirection" >
<enum>QProgressBar::TopToBottom</enum>
</property>
<property name="format" >
<string> %v</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QProgressBar" name="pb_K1" >
<property name="minimum" >
<number>-128</number>
</property>
<property name="maximum" >
<number>128</number>
</property>
<property name="value" >
<number>0</number>
</property>
<property name="textDirection" >
<enum>QProgressBar::TopToBottom</enum>
</property>
<property name="format" >
<string> %v</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="label_18" >
<property name="text" >
<string>Kanal 8:</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="2" >
<widget class="QTextEdit" name="te_Help_2" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; text-decoration: underline;">Hier können die vom Sender übertragenen Kanäle den Funktionen des MikroKopters zugeordnet werden. &lt;/span>&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Port 1-4 sind per Sender frei einstellbare Werte.&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Die Balken zeigen den Ausschlag des jeweiligen Kanals an.&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_P3" >
<attribute name="title" >
<string>Stick </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_13" >
<item row="1" column="2" >
<widget class="QTextEdit" name="te_Help_3" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; text-decoration: underline;">Diese Parameter dienen zur Einstellung der Stickwirkung.&lt;/span>&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">P-Anteil:&lt;/span> Stick-Verstärkung. Je grösser, desto stärker reagiert der MK auf die Stickbewegungen. &lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">D-Anteil:&lt;/span> Der MikroKopter folgt den Bewegungen des Sticks umso spontaner, je grösser dieser Wert ist. Genaugenommen wirkt hier zusätzlich die Stick&lt;span style=" font-weight:600;">geschwindigkeit&lt;/span> auf den MK. &lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Gier-P: &lt;/span>Verhältnis Gier-Geschwindigkeit zum Stickausschlag.&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QFrame" name="frame_3" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="label_19" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Nick / Roll P-Anteil:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="sb_3_1" >
<property name="maximum" >
<number>64</number>
</property>
<property name="value" >
<number>4</number>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="label_22" >
<property name="text" >
<string>[1..6]</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_20" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Nick / Roll D-Anteil:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QSpinBox" name="sb_3_2" >
<property name="maximum" >
<number>64</number>
</property>
<property name="value" >
<number>1</number>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QLabel" name="label_23" >
<property name="text" >
<string>[0..64]</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<spacer name="verticalSpacer_4" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_21" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Gier P-Anteil:</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QComboBox" name="cb_3_3" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="3" column="2" >
<widget class="QLabel" name="label_24" >
<property name="text" >
<string>[1..20]</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3" >
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="label_51" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>External Control:</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QComboBox" name="cb_3_4" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="5" column="2" >
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
<widget class="QLabel" name="label_52" >
<property name="text" >
<string>0=OFF, Dubwise: Gain, </string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_53" >
<property name="text" >
<string>Riddim > 128 = ON</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="1" >
<spacer name="verticalSpacer_5" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>85</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_P4" >
<attribute name="title" >
<string>Höhe </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_16" >
<item row="0" column="2" >
<widget class="QTextEdit" name="te_Help_4" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; text-decoration: underline;">Hier kann der Höhenregler parametriert werden.&lt;/span>&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;">&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Soll-Höhe:&lt;/span> Gibt die maximale Höhe an. Normalerweise wird hier ein Poti als Kanal der Funke eingetragen. Kleine Werte ermöglichen nur niedrige Maximalhöhen.&lt;span style=" font-weight:600;"> &lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fluganfänger sollten das Feature nutzen, hier evtl. 0 eintragen und den Höhenregler aktivieren (siehe oben). Dann kann es nicht passieren, dass der MikroKopter zu hoch steigt. Bei Nutzung des Höhenreglers als Schalter ist hier auch das entsprechende Poti einzutragen, um den Kanal der Funke damit festzulegen. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Min Gas:&lt;/span> unter diesen Wert wird das Gas nicht gestellt, wenn die Höhe überschritten wurde. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">3-Fach-Schalter: &lt;/span>&lt;span style=" text-decoration: underline;">Höhenschalter&lt;/span> kann auf 3-Poligen Schalter gelegt werden --&amp;gt; z.B. mit dem GPS-Schalter kombiniert&lt;br />Bei Mittelstellung ist die Höhenregelung dann aus&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">P-Anteil:&lt;/span> Abhängigkeit von Rücknahme von Gas bei Höhe über. Je höher dieser Wert, desto kleiner ist der Flugbereich oberhalb der Maximalhöhe. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Luftdruck-D:&lt;/span> Dämpft das Schwingverhalten des Höhenreglers. Geringste Luftdruckänderungen haben damit grosse Wirkung auf Gas. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Z-ACC:&lt;/span> Dämpft das Schwingverhalten mittels des Beschleunigungssensors. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Verstärkung:&lt;/span> ermöglicht grössere Flughöhen, wenn dieser Wert vergrößert wird. Der Setpiont wird mit diesem Wert multipliziert. &lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QFrame" name="frame_5" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_17" >
<item row="0" column="0" >
<widget class="QLabel" name="label_25" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Soll-Höhe:</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2" >
<widget class="QComboBox" name="cb_4_1" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="0" column="3" >
<widget class="QLabel" name="label_31" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item rowspan="2" row="1" column="0" >
<widget class="QLabel" name="label_26" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Min. Gas:</string>
</property>
</widget>
</item>
<item rowspan="2" row="1" column="1" colspan="2" >
<widget class="QSpinBox" name="sb_4_2" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item rowspan="2" row="1" column="3" >
<widget class="QLabel" name="label_32" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item rowspan="2" row="5" column="0" >
<widget class="QLabel" name="label_27" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Höhe P-Anteil:</string>
</property>
</widget>
</item>
<item rowspan="2" row="5" column="1" colspan="2" >
<widget class="QComboBox" name="cb_4_3" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item rowspan="2" row="5" column="3" >
<widget class="QLabel" name="label_33" >
<property name="text" >
<string>[0..32]</string>
</property>
</widget>
</item>
<item rowspan="2" row="7" column="0" >
<widget class="QLabel" name="label_28" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Luftdruck D-Anteil:</string>
</property>
</widget>
</item>
<item rowspan="2" row="7" column="1" colspan="2" >
<widget class="QComboBox" name="cb_4_4" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item rowspan="2" row="7" column="3" >
<widget class="QLabel" name="label_34" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item rowspan="4" row="10" column="0" >
<widget class="QLabel" name="label_29" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Z-Acc Wirkung:</string>
</property>
</widget>
</item>
<item rowspan="4" row="10" column="1" colspan="2" >
<widget class="QComboBox" name="cb_4_5" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item rowspan="4" row="10" column="3" >
<widget class="QLabel" name="label_35" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="14" column="0" >
<widget class="QLabel" name="label_30" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Verstärkung:</string>
</property>
</widget>
</item>
<item row="14" column="1" colspan="2" >
<widget class="QSpinBox" name="sb_4_6" >
<property name="maximum" >
<number>50</number>
</property>
</widget>
</item>
<item row="14" column="3" >
<widget class="QLabel" name="label_36" >
<property name="text" >
<string>[0..50]</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<spacer name="verticalSpacer_6" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="9" column="1" >
<spacer name="verticalSpacer_8" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>77</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="15" column="1" >
<spacer name="verticalSpacer_10" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>74</width>
<height>34</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1" >
<widget class="QCheckBox" name="cb_4_7" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>3fach Schalter </string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_P5" >
<attribute name="title" >
<string>Gyro </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_18" >
<item row="0" column="2" >
<widget class="QTextEdit" name="te_Help_5" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; text-decoration: underline;">Hier werden die Parameter für die Gyroskope eingestellt.&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Gyro-P: &lt;/span>Einfluss des Gyros auf die Nick- und Rollgeschwindigkeit. Je höher wer Wert, desto träger bewegt sich der MikroKopter. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Gyro&lt;/span>-I: Lagestabilisierung. Je höher der Wert, desto stärker der Zusammenhang von Stickwinkel und Lagewinkel. Führt bei zu grossen Werten (gegenüber Gyro-P) zum Schwingen. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Gyro-D:&lt;/span> TEXT&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Dynamic Stability&lt;/span> Mit diesem Wert lässt sich nun einstellen, wieviel Schub die Achsenregelung zur Verfügung hat, um zu Regeln Einige haben sich daran gestört, dass der MK beim starken Regeln steigt. Das war auch der Grund für das Steigen bei Wind oder sonstigen Phänomenen wie Lagerschaden zum Beispiel. Ausserdem haben Anfänger Probleme mit dem Springen bei der Landung, was auch diese Ursache hat. Kleiner 64 -&amp;gt; der Schub wird auf unter Gas limitiert -&amp;gt; kein Steigen bei starkem Regeln Grösser 64 -&amp;gt; der Schub darf grösser werden als Gas -&amp;gt; hartes Regeln der Achsen -&amp;gt; Steigen bei starken Regeln In den Settings ist es so verteilt: 1.Sport: 100 -&amp;gt; steigt 2.Normal: 75 -&amp;gt; steigt etwas 3.Beginner: 50 -&amp;gt; steigt nicht &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">ACC/Gyro-Faktor: &lt;/span>: Abhängigkeit zwischen ACC-Sensorwert und Gyrointegral. Wird der MK einige Grad gekippt, müssen ACC-Linie und Gyro-Integral deckungsgleich sein. Ggf. kann das hier korrigiert werden. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">ACC/Gyro-Comp.: &lt;/span>Grad des Fusion zwischen ACC und Gyro (reziprok). Je kleiner der Wert, desto schneller wird der Gyrowinkel dem ACC-Sensor angepasst. Zum Schweben sind größere Werte vorteilhaft (&amp;gt;100). Zum Heizen sollte man kleine Werte nehmen (10-50) &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Hauptregler I:&lt;/span> Summe der Winkelfehler. Sorgt für grössere Präzision zwischen Stick und Lage. Sollte beim Fliegen mit Heading Hold (oben) erhöht werden. Kann bei zu grossen Werten überschwingen. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Driftkompensation:&lt;/span> Gibt an, wieviel Digits pro 500ms der Drift nachgeführt werden darf. Hier sollte ein kleiner Wert (1-3) angestrebt werden. Wert zu klein -&amp;gt; Gyrodrift (z.B. bei Temperaturänderungen) zieht den MK stark in eine Richtung. Wert zu gross -&amp;gt; MK schwebt nicht so gern still auf einer Stelle. Null -&amp;gt; Driftkompensation aus, Standart ist 4, also eher konservativ &lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QFrame" name="frame_6" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_3" >
<item row="0" column="0" >
<widget class="QLabel" name="label_37" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Gyro P-Anteil:</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2" >
<widget class="QComboBox" name="cb_5_1" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="0" column="3" colspan="2" >
<widget class="QLabel" name="label_44" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_38" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Gyro I-Anteil:</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2" >
<widget class="QComboBox" name="cb_5_2" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="1" column="3" colspan="2" >
<widget class="QLabel" name="label_45" >
<property name="text" >
<string>[0..250] (Winkels-&lt;br>tabilität)</string>
</property>
</widget>
</item>
<item row="2" column="3" colspan="2" >
<widget class="QLabel" name="label_133" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_39" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Dynamic Stability:</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2" >
<widget class="QComboBox" name="cb_5_3" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="4" column="3" colspan="2" >
<widget class="QLabel" name="label_46" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="label_40" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>ACC/Gyro-Faktor:</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2" >
<widget class="QSpinBox" name="sb_5_4" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="5" column="3" colspan="2" >
<widget class="QLabel" name="label_47" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="label_41" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>ACC/Gyro-Comp.:</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="2" >
<widget class="QSpinBox" name="sb_5_5" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="6" column="3" colspan="2" >
<widget class="QLabel" name="label_48" >
<property name="text" >
<string>[0..250] (1/x)</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="label_42" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Hauptregler I-Anteil:</string>
</property>
</widget>
</item>
<item row="7" column="1" colspan="2" >
<widget class="QComboBox" name="cb_5_6" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="7" column="3" colspan="2" >
<widget class="QLabel" name="label_49" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="8" column="0" >
<widget class="QLabel" name="label_43" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Driftkompensation:</string>
</property>
</widget>
</item>
<item row="8" column="1" colspan="2" >
<widget class="QSpinBox" name="sb_5_7" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="8" column="3" colspan="2" >
<widget class="QLabel" name="label_50" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2" >
<widget class="QComboBox" name="cb_5_8" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_135" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Gyro D-Anteil:</string>
</property>
</widget>
</item>
</layout>
<zorder>label_37</zorder>
<zorder>cb_5_1</zorder>
<zorder>label_44</zorder>
<zorder>label_38</zorder>
<zorder>cb_5_2</zorder>
<zorder>label_45</zorder>
<zorder>label_39</zorder>
<zorder>cb_5_3</zorder>
<zorder>label_46</zorder>
<zorder>label_40</zorder>
<zorder>sb_5_4</zorder>
<zorder>label_47</zorder>
<zorder>label_41</zorder>
<zorder>sb_5_5</zorder>
<zorder>label_48</zorder>
<zorder>label_42</zorder>
<zorder>cb_5_6</zorder>
<zorder>label_49</zorder>
<zorder>label_43</zorder>
<zorder>sb_5_7</zorder>
<zorder>label_50</zorder>
<zorder>label_133</zorder>
<zorder>cb_5_8</zorder>
<zorder>label_135</zorder>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_P6" >
<attribute name="title" >
<string>Kamera </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_20" >
<item row="0" column="0" >
<widget class="QFrame" name="frame_7" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_21" >
<item row="0" column="0" >
<widget class="QLabel" name="label_55" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Servo Control:</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2" >
<widget class="QComboBox" name="cb_6_1" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="0" column="3" >
<widget class="QLabel" name="label_54" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item rowspan="2" row="1" column="0" >
<widget class="QLabel" name="label_56" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Nick-Kompensation</string>
</property>
</widget>
</item>
<item rowspan="2" row="1" column="1" colspan="2" >
<widget class="QSpinBox" name="sb_6_2" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item rowspan="2" row="1" column="3" >
<widget class="QCheckBox" name="cb_6_6" >
<property name="text" >
<string>Invert direction</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_57" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Servo min:</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2" >
<widget class="QSpinBox" name="sb_6_3" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="4" column="3" >
<widget class="QLabel" name="label_61" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="label_58" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Servo max:</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2" >
<widget class="QSpinBox" name="sb_6_4" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="5" column="3" >
<widget class="QLabel" name="label_62" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="8" column="0" >
<widget class="QLabel" name="label_59" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Servo refresh rate:</string>
</property>
</widget>
</item>
<item row="8" column="1" colspan="2" >
<widget class="QSpinBox" name="sb_6_5" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="8" column="3" >
<widget class="QLabel" name="label_63" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="1" >
<spacer name="verticalSpacer_2" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>121</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="9" column="1" >
<spacer name="verticalSpacer_3" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>65</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" >
<widget class="QTextEdit" name="te_Help_6" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; text-decoration: underline;">Einstellungen für das Kamera-Servo an J7 der FlightCtrl.&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Servo-Control: &lt;/span>Servowert zum Schwenken der Kamera. Entweder fixen Wert, oder Poti eintragen. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Nick-Kompensation: &lt;/span>Einfluss des Nickwinkels auf den Servo. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Invert direction:&lt;/span> Drehrichtung invertieren. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Servo Min:&lt;/span> Minimalwert als Anschlag. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Servo Max:&lt;/span> Maximalwert als Anschlag. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Servo Refresh-Rate:&lt;/span> Ansteuergeschwindigkeit. Einige Servos können nicht mit schnellen Werten angesteuert werden &lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_P7" >
<attribute name="title" >
<string>Sonstiges </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_22" >
<item row="0" column="0" >
<widget class="QFrame" name="frame_8" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_23" >
<item row="0" column="0" >
<widget class="QLabel" name="label_68" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Min. Gas:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QSpinBox" name="sb_7_1" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="label_67" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_65" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Max. Gas:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QSpinBox" name="sb_7_2" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QLabel" name="label_64" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_66" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Kompass-Wirkung:</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QComboBox" name="cb_7_3" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="3" column="2" >
<widget class="QLabel" name="label_60" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<spacer name="verticalSpacer_7" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="label_70" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Unterspannung [0.1V]:</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QSpinBox" name="sb_7_4" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="5" column="2" >
<widget class="QLabel" name="label_69" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="3" >
<widget class="QLabel" name="label_75" >
<property name="text" >
<string>Bei Empfangsverlust:</string>
</property>
</widget>
</item>
<item row="8" column="0" >
<widget class="QLabel" name="label_72" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Not-Gas Zeit [0.1s]:</string>
</property>
</widget>
</item>
<item row="8" column="1" >
<widget class="QSpinBox" name="sb_7_5" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="8" column="2" >
<widget class="QLabel" name="label_71" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="9" column="0" >
<widget class="QLabel" name="label_74" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Not-Gas:</string>
</property>
</widget>
</item>
<item row="9" column="1" >
<widget class="QSpinBox" name="sb_7_6" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="9" column="2" >
<widget class="QLabel" name="label_73" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<spacer name="verticalSpacer_9" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>61</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" >
<widget class="QTextEdit" name="te_Help_7" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Bei Empfangsverlust: Geht der Funkempfang verloren (außer Reichweite oder Sender aus), tritt die Not-Gas-Regelung in Kraft um dem Piloten Zeit für Gegenmaßnahmen zu geben. Die gesamte Not-Gas-Regelung wird allerdings erst aktiv, wenn ein Gas-Wert von 40 für mindestens 4 Sekunden überschritten war (d.h. der Kopter wahrscheinlich fliegt)! &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;">&lt;span style=" font-weight:600;">Min.Gas &lt;/span>Minimaler Gaswert, der an die Motoren geht &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;">&lt;span style=" font-weight:600;">Max.Gas &lt;/span>Maximaler Gaswert, der an die Motoren geht. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;">&lt;span style=" font-weight:600;">Kompasswirkung &lt;/span>:Ist ein Kompass angeschlossen, kann hiermit der Einfluss auf Gier eingestellt werden &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;">&lt;span style=" font-weight:600;">Unterspannung &lt;/span>Schwellwert in 0,1V zum Melden der Akku-Unterspannung &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;">&lt;span style=" font-weight:600;">Not-Gas Zeit [0.1s]:&lt;/span> Hier wird die Zeit in Zehntelsekunden eingetragen, für die das Not-Gas nach Empfangsverlust aktiv wird. &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:1px;">&lt;span style=" font-weight:600;">Not-Gas:&lt;/span> Wert für das Not-Gas. &lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_P8" >
<attribute name="title" >
<string>Kopplung </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_24" >
<item row="0" column="0" >
<widget class="QFrame" name="frame_9" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4" >
<item row="0" column="0" >
<widget class="QLabel" name="label_80" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Gier-Feedback:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QComboBox" name="cb_8_1" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="label_76" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_79" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Nick/Roll-Feedback:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QComboBox" name="cb_8_2" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="1" column="2" >
<widget class="QLabel" name="label_78" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_81" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Gier-Korrektion:</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QComboBox" name="cb_8_3" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="2" column="2" >
<widget class="QLabel" name="label_136" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<spacer name="verticalSpacer_11" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>156</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" >
<widget class="QTextEdit" name="te_Help_8" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; text-decoration: underline;">Achskopplung&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Eine Gierbewegung verkoppelt jetzt Nick und Roll. Das bedeutet, dass der MK jetzt eine Kurve fliegt, wenn man z.B. nickt und gleichzeitig giert. Es verhindert, dass dem MK nach Kurven schwindelig wird &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:1px;">&lt;span style=" font-weight:600;">Gier-Feedback &lt;/span>: Der Grad der Achsenkopplung. Ist der Wert zu klein, hängt der MK bei (und nach) einer Linkskurve nach rechts &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:1px;">&lt;span style=" font-weight:600;">Nick/Roll-Feedback&lt;/span>: TEXT&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:1px;">&lt;span style=" font-weight:600;">Gier-Korrektion: &lt;/span>Damit versucht der MK, der (evtl. ungewollten) Richtungsänderung (siehe Video) entgegenzuwirken. Das funktioniert allerdings nur bei langsamen Manövern, weil Gier erheblich träger ist, als Nick oder Roll.&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_P9" >
<attribute name="title" >
<string>Looping </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_25" >
<item row="0" column="0" >
<widget class="QFrame" name="frame_10" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_31" >
<item row="0" column="0" colspan="4" >
<layout class="QVBoxLayout" name="verticalLayout_5" >
<property name="spacing" >
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8" >
<item>
<spacer name="horizontalSpacer_6" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_104" >
<property name="text" >
<string>loop, while stick up</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6" >
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5" >
<item>
<spacer name="horizontalSpacer_2" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_105" >
<property name="text" >
<string>Loop, while&lt;br> stick left</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tb_9_8" >
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/Arrows/Images/Arrows/Left-1.png</normaloff>
<normalon>:/Arrows/Images/Arrows/Left-2.png</normalon>:/Arrows/Images/Arrows/Left-1.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4" >
<property name="spacing" >
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="tb_9_6" >
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/Arrows/Images/Arrows/Up-1.png</normaloff>
<normalon>:/Arrows/Images/Arrows/Up-2.png</normalon>:/Arrows/Images/Arrows/Up-1.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<property name="checked" >
<bool>false</bool>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="tb_9_7" >
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/Arrows/Images/Arrows/Down-1.png</normaloff>
<normalon>:/Arrows/Images/Arrows/Down-2.png</normalon>:/Arrows/Images/Arrows/Down-1.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4" >
<item>
<widget class="QToolButton" name="tb_9_9" >
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/Arrows/Images/Arrows/Right-1.png</normaloff>
<normalon>:/Arrows/Images/Arrows/Right-2.png</normalon>:/Arrows/Images/Arrows/Right-1.png</iconset>
</property>
<property name="iconSize" >
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="checkable" >
<bool>true</bool>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_106" >
<property name="text" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p align="right" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Loop, while&lt;br />stick right&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7" >
<item>
<spacer name="horizontalSpacer_4" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_103" >
<property name="text" >
<string>Loop, while stick down</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_99" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Gas limit:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QComboBox" name="cb_9_1" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_98" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Ansprechschwelle:</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QSpinBox" name="sb_9_2" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="2" column="2" >
<widget class="QLabel" name="label_102" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Hysterese:</string>
</property>
</widget>
</item>
<item row="2" column="3" >
<widget class="QSpinBox" name="sb_9_4" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_100" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Turn over Nick:</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QSpinBox" name="sb_9_3" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="3" column="3" >
<widget class="QSpinBox" name="sb_9_5" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="3" column="2" >
<widget class="QLabel" name="label_101" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Turn over Roll:</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" >
<widget class="QTextEdit" name="te_Help_9" >
<property name="minimumSize" >
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Pfeile:&lt;/span> Der Looping wird in diese entsprechende Richtung zugelassen. Dabei zeigt der Pfeil den entsprechenden Stickanschlag an &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Gas Limit:&lt;/span> Auf diesen Wert wird das Gas während des Loopings begrenzt &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Ansprechschwelle:&lt;/span> Ab diesen Stickwert wird aus der Lageregelung eine Drehratenregelung, um den Looping durchzuführen &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Hysteresis:&lt;/span> Stick-Hysterese für die Ansprechschwelle. In der Regel immer niedriger, als die Ansprechschwelle &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">TurnOver Nick: &lt;/span>100 bedeutet 100% einer 360° Drehung. Wenn nach dem Looping der MK zu weit dreht, muss der Wert verringert werden. Dreht er nicht weit genug, muss der Wert vergrößert werden. Also entspricht 1 einem Winkel von 3,6° &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">TurnOver Roll:&lt;/span> analog &lt;span style=" font-weight:600;">TurnOver Nick&lt;/span> &lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Wichtig:&lt;/span> Ansprechschwelle - Hysteresis sollte etwa bei 20-40 liegen, da sonst der Kopter beim verlassen der Loopingfunktion versucht, sehr schnell die Schräglage, die man mit dem Stick vorgibt, einzunehmen. Dies kann gerade bei sehr flotten Settings dazu führen, das der Kopter bei der Drehung "springt" und einige Gerade der Winkelbewegung nicht mitbekommt, was dazu führt, das sich der Kopter sehr schräg steht. &lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_P10" >
<attribute name="title" >
<string>User </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_26" >
<item row="0" column="1" >
<widget class="QTextEdit" name="te_Help_10" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; text-decoration: underline;">Frei definierbare Parameter für eigene Erweiterungen im Quellcode. &lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Die Werte sind für Softwareentwickler zur freien Verfügung &lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QFrame" name="frame_11" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_14" >
<item row="0" column="0" >
<widget class="QLabel" name="label_83" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Parameter 1:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QComboBox" name="cb_10_1" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="label_82" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_85" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Parameter 2:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QComboBox" name="cb_10_2" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="1" column="2" >
<widget class="QLabel" name="label_84" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_87" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Parameter 3:</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QComboBox" name="cb_10_3" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="2" column="2" >
<widget class="QLabel" name="label_86" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_89" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Parameter 4:</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QComboBox" name="cb_10_4" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="3" column="2" >
<widget class="QLabel" name="label_88" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_91" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Parameter 5:</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QComboBox" name="cb_10_5" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="4" column="2" >
<widget class="QLabel" name="label_90" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="label_93" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Parameter 6:</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QComboBox" name="cb_10_6" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="5" column="2" >
<widget class="QLabel" name="label_92" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="label_95" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Parameter 7:</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QComboBox" name="cb_10_7" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="6" column="2" >
<widget class="QLabel" name="label_94" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="label_97" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Parameter 8:</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QComboBox" name="cb_10_8" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="7" column="2" >
<widget class="QLabel" name="label_96" >
<property name="text" >
<string>[0..250]</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_P11" >
<attribute name="title" >
<string>Output </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_27" >
<item row="0" column="2" >
<widget class="QTextEdit" name="te_Help_11" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; text-decoration: underline;">Einstellungen für die Ausgänge J16 und J17.&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Blinkmuster&lt;/span>&lt;br />Man kann ein Blinkmuster (von links nach rechts) und das Timing dafür im Koptertool einstellen. Automatisches Schalten von 10ms bis 20sek ist damit möglich&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Schaltfunktion&lt;/span>&lt;br />Wenn man als Timing einen Schalter auf der Funke belegt, kann man auch den Ausgang damit schalten. Dann nimmt der Ausgang den Pegel des obersten Bits (in der Darstellung links) an. Wenn damit etwas geschaltet werden soll (z.B. Kameraauslöser usw.), ist es besser, kein Blinkmuster einzugeben, sondern dann alle Bits entweder ein- oder auszuschalten. Ansonsten könnte das Blinkmuster während des Umschaltens einmal kurz durchlaufen.&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QFrame" name="frame_12" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_32" >
<item row="1" column="0" >
<spacer name="horizontalSpacer_8" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>121</width>
<height>23</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1" colspan="3" >
<layout class="QHBoxLayout" name="horizontalLayout_9" >
<property name="spacing" >
<number>2</number>
</property>
<item>
<widget class="QToolButton" name="J16_0" >
<property name="toolTip" >
<string>128</string>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J16_1" >
<property name="toolTip" >
<string>64</string>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J16_2" >
<property name="toolTip" >
<string>32</string>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J16_3" >
<property name="toolTip" >
<string>16</string>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J16_4" >
<property name="toolTip" >
<string>8</string>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J16_5" >
<property name="toolTip" >
<string>4</string>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J16_6" >
<property name="toolTip" >
<string>2</string>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J16_7" >
<property name="toolTip" >
<string>1</string>
</property>
<property name="text" >
<string>0</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="4" >
<spacer name="horizontalSpacer_9" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>108</width>
<height>23</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_109" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Bitmaske:</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2" >
<widget class="QSpinBox" name="sb_11_1" >
<property name="maximum" >
<number>255</number>
</property>
</widget>
</item>
<item row="4" column="3" colspan="2" >
<widget class="QLabel" name="label_108" >
<property name="text" >
<string>[0..255]</string>
</property>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="label_107" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Timing:</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2" >
<widget class="QComboBox" name="cb_11_2" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="5" column="3" colspan="2" >
<widget class="QLabel" name="label_110" >
<property name="text" >
<string>[x 10ms]</string>
</property>
</widget>
</item>
<item row="7" column="0" >
<spacer name="horizontalSpacer_10" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>121</width>
<height>23</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="1" colspan="3" >
<layout class="QHBoxLayout" name="horizontalLayout_10" >
<property name="spacing" >
<number>2</number>
</property>
<item>
<widget class="QToolButton" name="J17_0" >
<property name="toolTip" >
<string>128</string>
</property>
<property name="text" >
<string>00</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J17_1" >
<property name="toolTip" >
<string>64</string>
</property>
<property name="text" >
<string>00</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J17_2" >
<property name="toolTip" >
<string>32</string>
</property>
<property name="text" >
<string>00</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J17_3" >
<property name="toolTip" >
<string>16</string>
</property>
<property name="text" >
<string>00</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J17_4" >
<property name="toolTip" >
<string>8</string>
</property>
<property name="text" >
<string>00</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J17_5" >
<property name="toolTip" >
<string>4</string>
</property>
<property name="text" >
<string>00</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J17_6" >
<property name="toolTip" >
<string>2</string>
</property>
<property name="text" >
<string>00</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="J17_7" >
<property name="toolTip" >
<string>1</string>
</property>
<property name="text" >
<string>00</string>
</property>
<property name="icon" >
<iconset>
<normaloff>:/LED/Images/16X16/ledoff.png</normaloff>:/LED/Images/16X16/ledoff.png</iconset>
</property>
<property name="autoRaise" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="4" >
<spacer name="horizontalSpacer_11" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>108</width>
<height>23</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="0" >
<widget class="QLabel" name="label_111" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Bitmaske:</string>
</property>
</widget>
</item>
<item row="8" column="1" colspan="2" >
<widget class="QSpinBox" name="sb_11_3" >
<property name="maximum" >
<number>255</number>
</property>
</widget>
</item>
<item row="8" column="3" colspan="2" >
<widget class="QLabel" name="label_114" >
<property name="text" >
<string>[0..255]</string>
</property>
</widget>
</item>
<item row="9" column="0" >
<widget class="QLabel" name="label_112" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Timing:</string>
</property>
</widget>
</item>
<item row="9" column="1" colspan="2" >
<widget class="QComboBox" name="cb_11_4" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="9" column="3" colspan="2" >
<widget class="QLabel" name="label_113" >
<property name="text" >
<string>[x 10ms]</string>
</property>
</widget>
</item>
<item row="10" column="3" >
<spacer name="verticalSpacer_12" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>57</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="1" >
<widget class="QLabel" name="label_115" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Ausgang J17</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLabel" name="label_116" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Ausgang J16</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Tab_P12" >
<attribute name="title" >
<string>Navi-Ctrl </string>
</attribute>
<layout class="QGridLayout" name="gridLayout_28" >
<item row="0" column="1" >
<widget class="QTextEdit" name="te_Help_12" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; text-decoration: underline;">Einstellungen für das Navi-Ctrl.&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">GPS Mode Control:&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">0 = AID, 100 = Free, 200 = Coming Home&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">GPS Stick Threshold:&lt;/span>&lt;/p>
&lt;p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">0 = Position Hold by Mode Control&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QFrame" name="frame_13" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_5" >
<item row="0" column="0" >
<widget class="QLabel" name="label_120" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>GPS Mode Control:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QComboBox" name="cb_12_1" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="0" column="2" colspan="2" >
<widget class="QLabel" name="label_117" >
<property name="text" >
<string/>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_123" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>GPS Gain:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QComboBox" name="cb_12_2" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="1" column="2" colspan="2" >
<widget class="QLabel" name="label_124" >
<property name="text" >
<string>[%]</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_119" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>GPS Stick Threshold:</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QSpinBox" name="sb_12_3" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="2" column="2" colspan="2" >
<widget class="QLabel" name="label_118" >
<property name="text" >
<string/>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_122" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Min. Sat.</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QSpinBox" name="sb_12_4" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_125" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>GPS P:</string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QComboBox" name="cb_12_5" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="4" column="3" >
<widget class="QComboBox" name="cb_12_9" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="5" column="0" >
<widget class="QLabel" name="label_127" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>GPS I:</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<widget class="QComboBox" name="cb_12_6" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="5" column="3" >
<widget class="QComboBox" name="cb_12_10" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0" >
<widget class="QLabel" name="label_129" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>GPS D:</string>
</property>
</widget>
</item>
<item row="6" column="1" >
<widget class="QComboBox" name="cb_12_7" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="7" column="0" >
<widget class="QLabel" name="label_131" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>GPS ACC:</string>
</property>
</widget>
</item>
<item row="7" column="1" >
<widget class="QComboBox" name="cb_12_8" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="7" column="2" colspan="2" >
<widget class="QLabel" name="label_132" >
<property name="text" >
<string/>
</property>
</widget>
</item>
<item row="6" column="3" >
<widget class="QComboBox" name="cb_12_11" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="4" column="2" >
<widget class="QLabel" name="label" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Limit:</string>
</property>
</widget>
</item>
<item row="3" column="2" colspan="2" >
<widget class="QLabel" name="label_121" >
<property name="text" >
<string/>
</property>
</widget>
</item>
<item row="5" column="2" >
<widget class="QLabel" name="label_77" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Limit:</string>
</property>
</widget>
</item>
<item row="6" column="2" >
<widget class="QLabel" name="label_126" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Limit</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
<zorder>te_Help_12</zorder>
<zorder>frame_13</zorder>
</widget>
<widget class="QWidget" name="Tab_P13" >
<attribute name="title" >
<string>Navi-Ctrl 2</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_40" >
<item row="0" column="0" >
<widget class="QFrame" name="frame_19" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_6" >
<item row="0" column="0" >
<widget class="QLabel" name="label_134" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>GPS Wind Correction:</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QComboBox" name="cb_13_1" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="0" column="2" >
<widget class="QLabel" name="label_139" >
<property name="text" >
<string>[%]</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_140" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Speed Compensation:</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QComboBox" name="cb_13_2" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="1" column="2" >
<widget class="QLabel" name="label_141" >
<property name="text" >
<string>[%]</string>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_148" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>GPS-Maxradius:</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QComboBox" name="cb_13_3" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="2" column="2" >
<widget class="QLabel" name="label_149" >
<property name="text" >
<string>[m]</string>
</property>
</widget>
</item>
<item row="3" column="0" >
<widget class="QLabel" name="label_151" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>GPS Winkelbegrenzung:</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QComboBox" name="cb_13_4" >
<property name="editable" >
<bool>true</bool>
</property>
<item>
<property name="text" >
<string>Poti 1</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 2</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 3</string>
</property>
</item>
<item>
<property name="text" >
<string>Poti 4</string>
</property>
</item>
<item>
<property name="text" >
<string>0</string>
</property>
</item>
</widget>
</item>
<item row="3" column="2" >
<widget class="QLabel" name="label_150" >
<property name="text" >
<string>[x 0.5 Grad]</string>
</property>
</widget>
</item>
<item row="4" column="0" >
<widget class="QLabel" name="label_153" >
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:600; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Position Hold Login Time:&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
<item row="4" column="1" >
<widget class="QSpinBox" name="sb_13_5" >
<property name="maximum" >
<number>250</number>
</property>
</widget>
</item>
<item row="4" column="2" >
<widget class="QLabel" name="label_152" >
<property name="text" >
<string>[s]</string>
</property>
</widget>
</item>
<item row="5" column="1" >
<spacer name="verticalSpacer_15" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" >
<widget class="QTextEdit" name="te_Help_13" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="readOnly" >
<bool>true</bool>
</property>
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600; text-decoration: underline;">Einstellungen für das Navi-Ctrl (Seite 2).&lt;/span>&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600; text-decoration: underline;">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">GPS-Wind-Correction: &lt;/span>soll den MK bei Coming-Home direkter zurückfliegen und die Drift durch Wind kompensieren&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Speed Compensation: &lt;/span>Greift bei AID unterstützend ein, wenn man einen neuen Punkt anfliegt Wenn zuviel Geschwindigkeit aufgebaut wird, bremst das den MK&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;br />&lt;span style=" font-weight:600;">GPS-Maxradius: &lt;/span>Soll eine virtuelle Grenze bilden, die mit GPS nicht überschritten wird.&lt;br />Wenn der MK ausserhalb des Kreises einloggen soll, nimmt er als neue Position einen Punkt auf dem Kreisrand.&lt;br />Man kann den Radius auch auf ein Poti legen. Wegpunkte und Soll-Positionen werden damit auch auf einen Kreis von max. 512m Durchmesser begrenzt.&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">GPS Winkelbegrenzung: &lt;/span>Damit lässt sich die maximale Neigung der GPS-Regelung begrenzen. &lt;br />Ein Wert von 60 entspricht ca.35°&lt;/p>
&lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-weight:600;">Position Hold Login Time:&lt;/span> Das ist die maximale Zeit, nach der der MK die neue Position einloggt.&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
/QMK-Groundstation/branches/waypoint/Images/16X16/ledoff.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/16X16/ledred.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/16X16/ledyellow.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/CVS-Record.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/CVS-Stop.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Cockpit.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Debug.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Exit.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/FC-Settings.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Fast-Data.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Firmware.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Google-NO.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Google-OK.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Icons.xcf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/LCD.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Motortest.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Network-NO.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Network-OK.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Plotter-NO.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Plotter-OK.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Preferences-Data.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Preferences.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Seriell-NO.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Seriell-OK.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Terminal.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Actions/Waypoints.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Arrows/Down-1.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Arrows/Down-2.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Arrows/Left-1.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Arrows/Left-2.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Arrows/Right-1.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Arrows/Right-2.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Arrows/Up-1.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/Arrows/Up-2.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Images/QMK-Groundstation.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/QMK-Groundstation/branches/waypoint/Logger/CSVLogger.cpp
0,0 → 1,109
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* and Andreas Bresser bresser@informatik.uni-bremen.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
#include "CSVLogger.h"
 
CSVLogger::CSVLogger(cSettings * settings, sMode * mode)
{
// QFile-Instanz (Log-Datei)
csvfile = new QFile("");
this->settings = settings;
this->mode = mode;
}
 
CSVLogger::~CSVLogger()
{
close();
}
 
//datei ist geöffnet bedeutet wir sind soweit und können schreiben
bool CSVLogger::ready()
{
return csvfile->isOpen();
}
 
//Datei schließen
void CSVLogger::close()
{
if (csvfile->isOpen())
csvfile->close();
}
 
//neuen Log erstellen
void CSVLogger::newLog()
{
if (!csvfile->isOpen())
{
QString mode_name = mode->Hardware;
 
if (mode_name.size() == 0)
{
mode_name = QString("groundstation_log");
}
 
QString filename = settings->DIR.Logging + mode_name + "_" +
QDate::currentDate().toString(("yyyy-MM-dd")) + "_" +
QTime::currentTime().toString("hh-mm") + ".csv";
 
csvfile = new QFile(filename);
 
if (!csvfile->exists())
{
csvfile->open(QIODevice::Append | QIODevice::Text);
 
QTextStream Out(csvfile);
 
for (int a = 0; a < MaxAnalog; a++)
{
if (settings->Analog1.LogView[a])
{
Out << settings->Analog1.Label[a];
 
if (a < MaxAnalog - 1)
Out << ';';
}
}
Out << "\n";
}
else
{
csvfile->open(QIODevice::Append | QIODevice::Text);
}
}
}
 
//daten schreiben
void CSVLogger::write(int * analogData)
{
if (csvfile->isOpen())
{
QTextStream out(csvfile);
for (int a=0; a<MaxAnalog; a++)
{
if (settings->Analog1.LogView[a])
{
out << analogData[a];
if (a < MaxAnalog - 1)
out << ';';
}
}
out << "\n";
}
}
/QMK-Groundstation/branches/waypoint/Logger/CSVLogger.h
0,0 → 1,57
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* and Andreas Bresser bresser@informatik.uni-bremen.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
#ifndef CSVLOGGER_H
#define CSVLOGGER_H
 
#include <QString>
#include <QTextStream>
#include <QFile>
#include <QDate>
#include <QTime>
#include "../global.h"
#include "../Classes/cSettings.h"
#include "DefaultLogger.h"
 
class CSVLogger : public DefaultLogger
{
private:
// Object für das Datenfile;
QFile * csvfile;
cSettings * settings;
sMode * mode;
public:
CSVLogger(cSettings * settings, sMode * mode);
~CSVLogger();
 
//schreibe log
void write(int * analogData);
 
//erzeuge neue Log-Datei/neuen Datensatz
void newLog();
 
//alles bereit zum schreiben?
bool ready();
 
//alles schließen
void close();
};
 
#endif
/QMK-Groundstation/branches/waypoint/Logger/DefaultLogger.h
0,0 → 1,46
/***************************************************************************
* Copyright (C) 2009 by Manuel Schrape *
* manuel.schrape@gmx.de *
* and Andreas Bresser bresser@informatik.uni-bremen.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
#ifndef DEFAULTLOGGER_H
#define DEFAULTLOGGER_H
 
#include <QString>
#include "../Classes/cSettings.h"
 
//Interface für einen Logger
class DefaultLogger
{
public:
//schreibe log
virtual void write(int *) { };
 
//erzeuge neue Log-Datei/neuen Datensatz
virtual void newLog() { };
 
//alles bereit zum schreiben?
virtual bool ready() { return false; };
 
//alles schließen
virtual void close() {};
 
virtual ~DefaultLogger() {};
};
 
#endif
/QMK-Groundstation/branches/waypoint/Logger/Logger.cpp
0,0 → 1,64
/***************************************************************************
* Copyright (C) 2009 by Manuel Schrape *
* manuel.schrape@gmx.de *
* and Andreas Bresser bresser@informatik.uni-bremen.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
#include "Logger.h"
 
Logger::Logger(cSettings * settings, sMode * mode)
{
csv = new CSVLogger(settings, mode);
logger << csv;
active = false;
}
 
Logger::~Logger()
{
close();
}
 
//schreibe log
void Logger::write(int * analogData)
{
if (active == true)
foreach (DefaultLogger * log, logger)
if (log->ready())
log->write(analogData);
}
 
//starte Logging
void Logger::start_Log()
{
active = true;
foreach (DefaultLogger * log, logger)
log->newLog();
}
 
//soll geloggt werden?
bool Logger::is_active()
{
return active;
}
 
//alles schließen
void Logger::close()
{
active = false;
foreach (DefaultLogger * log, logger)
log->close();
}
/QMK-Groundstation/branches/waypoint/Logger/Logger.h
0,0 → 1,58
/***************************************************************************
* Copyright (C) 2009 by Manuel Schrape *
* manuel.schrape@gmx.de *
* and Andreas Bresser bresser@informatik.uni-bremen.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
#ifndef LOGGER_H
#define LOGGER_H
 
#include <QLinkedList>
#include <QString>
#include "DefaultLogger.h"
#include "../global.h"
#include "../Classes/cSettings.h"
 
//Die verschiedenen header der einzelnen Logger
//TODO: MySQLLogger, SQLiteLogger und/oder PostGreSQLLogger
#include "CSVLogger.h"
 
class Logger
{
private:
CSVLogger * csv;
//Liste aller bekannten Logger
QLinkedList<DefaultLogger *> logger;
 
bool active;
 
public:
Logger(cSettings * settings, sMode * mode);
~Logger();
 
void start_Log();
 
//soll geloggt werden?
bool is_active();
 
//schreibe log
void write(int * analogData);
 
//alles schließen
void close();
};
#endif
/QMK-Groundstation/branches/waypoint/MKTool.qrc
0,0 → 1,44
<RCC>
<qresource prefix="LED" >
<file>Images/16X16/ledred.png</file>
<file>Images/16X16/ledyellow.png</file>
<file>Images/16X16/ledoff.png</file>
</qresource>
<qresource prefix="Arrows" >
<file>Images/Arrows/Down-1.png</file>
<file>Images/Arrows/Down-2.png</file>
<file>Images/Arrows/Left-1.png</file>
<file>Images/Arrows/Left-2.png</file>
<file>Images/Arrows/Right-1.png</file>
<file>Images/Arrows/Right-2.png</file>
<file>Images/Arrows/Up-1.png</file>
<file>Images/Arrows/Up-2.png</file>
</qresource>
<qresource prefix="Actions" >
<file>Images/Actions/Preferences-Data.png</file>
<file>Images/Actions/Preferences.png</file>
<file>Images/Actions/Exit.png</file>
<file>Images/Actions/Fast-Data.png</file>
<file>Images/Actions/Motortest.png</file>
<file>Images/Actions/LCD.png</file>
<file>Images/Actions/Waypoints.png</file>
<file>Images/Actions/FC-Settings.png</file>
<file>Images/Actions/CVS-Record.png</file>
<file>Images/Actions/CVS-Stop.png</file>
<file>Images/Actions/Debug.png</file>
<file>Images/Actions/Cockpit.png</file>
<file>Images/Actions/Firmware.png</file>
<file>Images/Actions/Terminal.png</file>
<file>Images/Actions/Google-NO.png</file>
<file>Images/Actions/Google-OK.png</file>
<file>Images/Actions/Plotter-NO.png</file>
<file>Images/Actions/Plotter-OK.png</file>
<file>Images/Actions/Seriell-NO.png</file>
<file>Images/Actions/Seriell-OK.png</file>
<file>Images/Actions/Network-NO.png</file>
<file>Images/Actions/Network-OK.png</file>
</qresource>
<qresource prefix="Icon" >
<file>Images/QMK-Groundstation.png</file>
</qresource>
</RCC>
/QMK-Groundstation/branches/waypoint/Parameter_Positions.h
0,0 → 1,293
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef PARAMETER_POSITIONS_H
#define PARAMETER_POSITIONS_H
 
#ifdef _BETA_
// Positionen der Navidaten im OSD-Datensatz
////////////////////////////////////////////
static const int N_CUR_LONGITUDE = 0;
static const int N_CUR_LATITUDE = 4;
static const int N_CUR_ALTITUDE = 8;
static const int N_CUR_STATUS = 12;
 
static const int N_TAR_LONGITUDE = 13; //16
static const int N_TAR_LATITUDE = 17; //20
static const int N_TAR_ALTITUDE = 21; //24
static const int N_TAR_STATUS = 25; //28
static const int N_TAR_DISTANCE = 26; //32
static const int N_TAR_ANGLE = 28; //34
 
static const int N_HOME_LONGITUDE = 30; //36
static const int N_HOME_LATITUDE = 34; //40
static const int N_HOME_ALTITUDE = 38; //44
static const int N_HOME_STATUS = 42; //48
static const int N_HOME_DISTANCE = 43; //52
static const int N_HOME_ANGLE = 45; //54
 
static const int N_WP_INDEX = 47; //56
static const int N_WP_NUMBER = 48; //57
 
static const int N_SATS_IN_USER = 49; //58
static const int N_ALTIMETER = 50; //59
static const int N_VARIOMETER = 52; //61
static const int N_FLYING_TIME = 54; //63
static const int N_UBAT = 56; //65
static const int N_GROUND_SPEED = 57; //66
static const int N_HEADING = 59; //68
static const int N_COMAPSS_HEADING = 61; //70
static const int N_ANGLE_NICK = 63; //72
static const int N_ANGLE_ROLL = 64; //73
static const int N_RC_QUALITY = 65; //74
static const int N_MK_FLAGS = 66; //75
static const int N_NC_FLAGS = 67; //76
static const int N_ERRORCODE = 68; //77
 
 
// Positionen der Setting-Parameter
///////////////////////////////////
static const int VERSION_SETTINGS = 74;
 
static const int MaxParameter = 93;
 
static const int P_KANAL_GAS = 0;
static const int P_KANAL_GIER = 1;
static const int P_KANAL_NICK = 2;
static const int P_KANAL_ROLL = 3;
static const int P_KANAL_POTI1 = 4;
static const int P_KANAL_POTI2 = 5;
static const int P_KANAL_POTI3 = 6;
static const int P_KANAL_POTI4 = 7;
static const int P_GLOBAL_CONF = 8;
static const int P_MIN_GAS = 9;
 
static const int P_DRUCK_D = 10;
static const int P_MAXHOEHE = 11;
static const int P_HOEHE_P = 12;
static const int P_HOEHE_GAIN = 13;
static const int P_HOEHE_ACC = 14;
static const int P_STICK_P = 15;
static const int P_STICK_D = 16;
static const int P_GIER_P = 17;
static const int P_GAS_MIN = 18;
static const int P_GAS_MAX = 19;
 
static const int P_GYRO_ACC_FAKTOR = 20;
static const int P_KOMPASS_WIRKUNG = 21;
static const int P_GYRO_P = 22;
static const int P_GYRO_I = 23;
static const int P_GYRO_D = 24;
static const int P_UNTERSPANNUNG = 25;
static const int P_NOTGAS = 26;
static const int P_NOTGASZEIT = 27;
static const int P_AUSRICHTUNG = 28;
static const int P_FAKTOR_I = 29;
 
static const int P_USER_1 = 30;
static const int P_USER_2 = 31;
static const int P_USER_3 = 32;
static const int P_USER_4 = 33;
static const int P_SERVO_NICK_CONT = 34;
static const int P_SERVO_NICK_COMP = 35;
static const int P_SERVO_NICK_MIN = 36;
static const int P_SERVO_NICK_MAX = 37;
static const int P_SERVO_NICK_REFR = 38;
static const int P_LOOP_GAS_LIMIT = 39;
 
static const int P_LOOP_THRESHOLD = 40;
static const int P_LOOP_HYSTERESE = 41;
static const int P_ACHS_KOPPLUNG1 = 42;
static const int P_ACHS_KOPPLUNG2 = 43;
static const int P_ACHS_GKOPPLUNG = 44;
static const int P_WINKEL_NICK = 45;
static const int P_WINKEL_ROLL = 46;
static const int P_GYRO_ACC_ABGL = 47;
static const int P_DRIFT_KOMP = 48;
static const int P_DYNAMIC_STAB = 49;
 
static const int P_USER_5 = 50;
static const int P_USER_6 = 51;
static const int P_USER_7 = 52;
static const int P_USER_8 = 53;
static const int P_J16_BITMASK = 54;
static const int P_J16_TIMING = 55;
static const int P_J17_BITMASK = 56;
static const int P_J17_TIMING = 57;
static const int P_NAV_GPS_MODE = 58;
static const int P_NAV_GPS_GAIN = 59;
 
static const int P_NAV_GPS_P = 60;
static const int P_NAV_GPS_I = 61;
static const int P_NAV_GPS_D = 62;
static const int P_NAV_GPS_P_LIMIT = 63;
static const int P_NAV_GPS_I_LIMIT = 64;
static const int P_NAV_GPS_D_LIMIT = 65;
static const int P_NAV_GPS_ACC = 66;
static const int P_NAV_GPS_MIN = 67;
static const int P_NAV_STICK_THRE = 68;
static const int P_NAV_WIND_CORR = 69;
 
static const int P_NAV_SPEED_COMP = 70;
static const int P_NAV_RADIUS = 71;
static const int P_NAV_ANGLE_LIMIT = 72;
static const int P_NAV_PH_LOGINTIME = 73;
static const int P_EXTERNAL = 74;
static const int P_LOOP_CONFIG = 75;
static const int P_SERVO_NICK_COMPI = 76;
static const int P_RESERVED = 77;
static const int P_NAME = 81;
#else
// Positionen der Navidaten im OSD-Datensatz
////////////////////////////////////////////
static const int N_CUR_LONGITUDE = 0;
static const int N_CUR_LATITUDE = 4;
static const int N_CUR_ALTITUDE = 8;
static const int N_CUR_STATUS = 12;
 
static const int N_TAR_LONGITUDE = 16;
static const int N_TAR_LATITUDE = 20;
static const int N_TAR_ALTITUDE = 24;
static const int N_TAR_STATUS = 28;
static const int N_TAR_DISTANCE = 32;
static const int N_TAR_ANGLE = 34;
 
static const int N_HOME_LONGITUDE = 36;
static const int N_HOME_LATITUDE = 40;
static const int N_HOME_ALTITUDE = 44;
static const int N_HOME_STATUS = 48;
static const int N_HOME_DISTANCE = 52;
static const int N_HOME_ANGLE = 54;
 
static const int N_WP_INDEX = 56;
static const int N_WP_NUMBER = 57;
 
static const int N_SATS_IN_USER = 58;
static const int N_ALTIMETER = 59;
static const int N_VARIOMETER = 61;
static const int N_FLYING_TIME = 63;
static const int N_UBAT = 65;
static const int N_GROUND_SPEED = 66;
static const int N_HEADING = 68;
static const int N_COMAPSS_HEADING = 70;
static const int N_ANGLE_NICK = 72;
static const int N_ANGLE_ROLL = 73;
static const int N_RC_QUALITY = 74;
static const int N_MK_FLAGS = 75;
static const int N_NC_FLAGS = 76;
static const int N_ERRORCODE = 77;
 
 
// Positionen der Setting-Parameter
///////////////////////////////////
 
 
static const int P_GYRO_D = 0;
static const int P_ACHS_KOPPLUNG2 = 0;
static const int P_NAV_GPS_P_LIMIT = 0;
static const int P_NAV_GPS_I_LIMIT = 0;
static const int P_NAV_GPS_D_LIMIT = 0;
static const int P_NAV_PH_LOGINTIME = 0;
 
static const int VERSION_SETTINGS = 73;
 
static const int MaxParameter = 87;
 
static const int P_KANAL_GAS = 0;
static const int P_KANAL_GIER = 1;
static const int P_KANAL_NICK = 2;
static const int P_KANAL_ROLL = 3;
static const int P_KANAL_POTI1 = 4;
static const int P_KANAL_POTI2 = 5;
static const int P_KANAL_POTI3 = 6;
static const int P_KANAL_POTI4 = 7;
static const int P_GLOBAL_CONF = 8;
static const int P_MIN_GAS = 9;
 
static const int P_DRUCK_D = 10;
static const int P_MAXHOEHE = 11;
static const int P_HOEHE_P = 12;
static const int P_HOEHE_GAIN = 13;
static const int P_HOEHE_ACC = 14;
static const int P_STICK_P = 15;
static const int P_STICK_D = 16;
static const int P_GIER_P = 17;
static const int P_GAS_MIN = 18;
static const int P_GAS_MAX = 19;
 
static const int P_GYRO_ACC_FAKTOR = 20;
static const int P_KOMPASS_WIRKUNG = 21;
static const int P_GYRO_P = 22;
static const int P_GYRO_I = 23;
static const int P_UNTERSPANNUNG = 24;
static const int P_NOTGAS = 25;
static const int P_NOTGASZEIT = 26;
static const int P_AUSRICHTUNG = 27;
static const int P_FAKTOR_I = 28;
static const int P_USER_1 = 29;
 
static const int P_USER_2 = 30;
static const int P_USER_3 = 31;
static const int P_USER_4 = 32;
static const int P_SERVO_NICK_CONT = 33;
static const int P_SERVO_NICK_COMP = 34;
static const int P_SERVO_NICK_MIN = 35;
static const int P_SERVO_NICK_MAX = 36;
static const int P_SERVO_NICK_REFR = 37;
static const int P_LOOP_GAS_LIMIT = 38;
static const int P_LOOP_THRESHOLD = 39;
 
static const int P_LOOP_HYSTERESE = 40;
static const int P_ACHS_KOPPLUNG1 = 41;
static const int P_ACHS_GKOPPLUNG = 42;
static const int P_WINKEL_NICK = 43;
static const int P_WINKEL_ROLL = 44;
static const int P_GYRO_ACC_ABGL = 45;
static const int P_DRIFT_KOMP = 46;
static const int P_DYNAMIC_STAB = 47;
static const int P_USER_5 = 48;
static const int P_USER_6 = 49;
 
static const int P_USER_7 = 50;
static const int P_USER_8 = 51;
static const int P_J16_BITMASK = 52;
static const int P_J16_TIMING = 53;
static const int P_J17_BITMASK = 54;
static const int P_J17_TIMING = 55;
static const int P_NAV_GPS_MODE = 56;
static const int P_NAV_GPS_GAIN = 57;
static const int P_NAV_GPS_P = 58;
static const int P_NAV_GPS_I = 59;
 
static const int P_NAV_GPS_D = 60;
static const int P_NAV_GPS_ACC = 61;
static const int P_NAV_GPS_MIN = 62;
static const int P_NAV_STICK_THRE = 63;
static const int P_NAV_WIND_CORR = 64;
static const int P_NAV_SPEED_COMP = 65;
static const int P_NAV_RADIUS = 66;
static const int P_NAV_ANGLE_LIMIT = 67;
 
static const int P_EXTERNAL = 68;
static const int P_LOOP_CONFIG = 69;
static const int P_SERVO_NICK_COMPI = 70;
static const int P_RESERVED = 71;
static const int P_NAME = 75;
#endif
 
#endif
/QMK-Groundstation/branches/waypoint/SerialPort/ManageSerialPort.cpp
0,0 → 1,577
/********************************************************************************************************
* PROGRAM : QSerialPortTerminal
* DATE - TIME : vendredi 03 octobre 2008 - 11h15
* AUTHOR : VIANNEY-LIAUD Philippe ( philippe.vianney.liaud gmail.com )
* FILENAME : ManageSerialPort.cpp
* LICENSE : GPL
* COMMENTARY :
********************************************************************************************************/
#include <QtDebug>
#include "ManageSerialPort.h"
 
/********************************************************************************************************
* Classe ManageSerialPort
*****************************************************************************************************/
 
//Constructeur
ManageSerialPort::ManageSerialPort()
{
//Init pointeur a NULL
threadSend = NULL;
threadReceive = NULL;
//Init des bool
sendingEnabled = false;
receivingEnabled = false;
closeCalled = false;
saveStateSendEnabled = false;
saveStateReceivedEnabled = false;
saveStateReceiveData = false;
}
 
ManageSerialPort::ManageSerialPort(const QString &name, const BaudRateType baudRate, \
const DataBitsType dataBits, const ParityType parity, \
const StopBitsType stopBits, const FlowType flowControl, \
ulong seconds, ulong milliseconds)
{
//Init pointeur a NULL
threadSend = NULL;
threadReceive = NULL;
//Init des bool
sendingEnabled = false;
receivingEnabled = false;
closeCalled = false;
saveStateSendEnabled = false;
saveStateReceivedEnabled = false;
saveStateReceiveData = false;
setPort(name);
setBaudRate(baudRate);
setDataBits(dataBits);
setParity(parity);
setStopBits(stopBits);
setFlowControl(flowControl);
setTimeout(seconds, milliseconds);
}
 
//Destructeur
ManageSerialPort::~ManageSerialPort()
{
if (threadSend != NULL)
{
delete threadSend;
threadSend = NULL;
}
if (threadReceive != NULL)
{
delete threadReceive;
threadReceive = NULL;
}
if (isOpen())
extSerialPort.close();
}
 
bool ManageSerialPort::open()
{
bool res = extSerialPort.open(QIODevice::ReadWrite);
if (closeCalled)
{
if (saveStateSendEnabled)
enableSending();
if (saveStateReceivedEnabled)
enableReceiving();
if (saveStateReceiveData)
receiveData();
closeCalled = false;
}
return res;
}
 
bool ManageSerialPort::open(const QString &name, const BaudRateType baudRate, \
const DataBitsType dataBits,const ParityType parity, \
const StopBitsType stopBits, const FlowType flowControl, \
ulong seconds, ulong milliseconds)
{
setPort(name);
setBaudRate(baudRate);
setDataBits(dataBits);
setParity(parity);
setStopBits(stopBits);
setFlowControl(flowControl);
setTimeout(seconds, milliseconds);
bool res = extSerialPort.open(QIODevice::ReadWrite);
return res;
}
 
bool ManageSerialPort::isOpen()
{
return extSerialPort.isOpen();
}
 
void ManageSerialPort::close()
{
closeCalled = true;
saveStateSendEnabled = isSendingEnabled();
saveStateReceivedEnabled = isReceivingEnabled();
disableSending();
disableReceiving();
extSerialPort.close();
}
 
void ManageSerialPort::setPort(const QString &name)
{
extSerialPort.setPortName(name);
}
 
QString ManageSerialPort::getPort()
{
return extSerialPort.portName();
}
 
 
void ManageSerialPort::setBaudRate(const BaudRateType baudRate)
{
extSerialPort.setBaudRate(baudRate);
}
 
QString ManageSerialPort::getBaudRate()
{
switch (extSerialPort.baudRate())
{
case BAUD50:
return QString("50");
case BAUD75:
return QString("75");
case BAUD110:
return QString("110");
case BAUD134:
return QString("134");
case BAUD150:
return QString("150");
case BAUD200:
return QString("200");
case BAUD300:
return QString("300");
case BAUD600:
return QString("600");
case BAUD1200:
return QString("1200");
case BAUD1800:
return QString("1800");
case BAUD2400:
return QString("2400");
case BAUD4800:
return QString("4800");
case BAUD9600:
return QString("9600");
case BAUD14400:
return QString("14400");
case BAUD19200:
return QString("19200");
case BAUD38400:
return QString("38400");
case BAUD56000:
return QString("56000");
case BAUD57600:
return QString("57600");
case BAUD76800:
return QString("76800");
case BAUD115200:
return QString("115200");
case BAUD128000:
return QString("128000");
case BAUD256000:
return QString("256000");
}
return 0;
}
 
 
void ManageSerialPort::setDataBits(const DataBitsType dataBits)
{
extSerialPort.setDataBits(dataBits);
}
 
QChar ManageSerialPort::getDataBits()
{
switch (extSerialPort.dataBits())
{
case DATA_5:
return QChar('5');
case DATA_6:
return QChar('6');
case DATA_7:
return QChar('7');
case DATA_8:
return QChar('8');
}
return 0;
}
 
 
void ManageSerialPort::setParity(const ParityType parity)
{
extSerialPort.setParity(parity);
}
 
QString ManageSerialPort::getParity()
{
switch (extSerialPort.parity())
{
case PAR_NONE:
return QString(tr("None"));
case PAR_ODD:
return QString(tr("Odd"));
case PAR_EVEN:
return QString(tr("Even"));
case PAR_MARK:
return QString(tr("Mark"));
case PAR_SPACE:
return QString(tr("Space"));
}
return 0;
}
 
 
void ManageSerialPort::setStopBits(const StopBitsType stopBits)
{
extSerialPort.setStopBits(stopBits);
}
 
QString ManageSerialPort::getStopBit()
{
switch (extSerialPort.stopBits())
{
case STOP_1:
return QString("1");
case STOP_1_5:
return QString("1.5");
case STOP_2:
return QString("2");
}
return 0;
}
 
 
void ManageSerialPort::setFlowControl(const FlowType flowControl)
{
extSerialPort.setFlowControl(flowControl);
}
 
QString ManageSerialPort::getFlowControl()
{
switch (extSerialPort.flowControl())
{
case FLOW_OFF:
return QString(tr("None"));
case FLOW_HARDWARE :
return QString(tr("Hardware"));
case FLOW_XONXOFF :
return QString(tr("Xon/Xoff"));
}
return 0;
}
 
 
void ManageSerialPort::setTimeout(ulong seconds, ulong milliseconds)
{
extSerialPort.setTimeout(seconds,milliseconds);
}
 
/*
QString ManageSerialPort::getLastErrorToString()
{
ulong res = extSerialPort.lastError();
switch (res)
{
case E_NO_ERROR:
return QString(tr("No Error has occured"));
case E_INVALID_FD:
return QString(tr("Invalid file descriptor (port was not opened correctly)"));
case E_NO_MEMORY:
return QString(tr("Unable to allocate memory tables (POSIX)"));
case E_CAUGHT_NON_BLOCKED_SIGNAL:
return QString(tr("Caught a non-blocked signal (POSIX)"));
case E_PORT_TIMEOUT:
return QString(tr("Operation timed out (POSIX)"));
case E_INVALID_DEVICE:
return QString(tr("The file opened by the port is not a character device (POSIX)"));
case E_BREAK_CONDITION:
return QString(tr("The port detected a break condition"));
case E_FRAMING_ERROR:
return QString(tr("The port detected a framing error (usually caused by incorrect baud rate settings)"));
case E_IO_ERROR:
return QString(tr("There was an I/O error while communicating with the port"));
case E_BUFFER_OVERRUN:
return QString(tr("Character buffer overrun"));
case E_RECEIVE_OVERFLOW:
return QString(tr("Receive buffer overflow"));
case E_RECEIVE_PARITY_ERROR:
return QString(tr("The port detected a parity error in the received data"));
case E_TRANSMIT_OVERFLOW:
return QString(tr("Transmit buffer overflow"));
case E_READ_FAILED:
return QString(tr("General read operation failure"));
case E_WRITE_FAILED:
return QString(tr("General write operation failure"));
}
return 0;
}*/
 
/*
ulong ManageSerialPort::getLastError()
{
return extSerialPort.lastError();
}
*/
 
 
void ManageSerialPort::enableSending()
{
if (!sendingEnabled && threadSend == NULL) //Si l'envoi n'est pas active && si threadSend n'est pas alloue
{
threadSend = new ThreadSend(extSerialPort);
sendingEnabled = true;
}
}
 
void ManageSerialPort::disableSending()
{
if (sendingEnabled && threadSend != NULL) //Si l'envoi est active && si threadSend est alloue
{
delete (threadSend);
threadSend = NULL;
sendingEnabled = false;
}
}
 
bool ManageSerialPort::isSendingEnabled()
{
return sendingEnabled;
}
 
uchar ManageSerialPort::sendData(QByteArray &dataToSend)
{
if (!isOpen()) //Si le port n'est pas ouvert
return 2;
if (!sendingEnabled || threadSend == NULL) //Si l'envoi n'est pas active || si threadSend n'est pas alloue
return 3;
threadSend->addDataToSend(dataToSend); //Ajout des donnees a envoyer
return 1;
}
 
void ManageSerialPort::stopSending()
{
if (!sendingEnabled || threadSend == NULL) //Si l'envoi n'est pas active || si threadSend n'est pas été alloue
return;
if (threadSend->isRunning()) //si un envoi est en cour
{
threadSend->stopSending(); //on donne l'ordre d'arreter l'envoi
 
long tmp = ULONG_MAX;
threadSend->wait(tmp); //on attend l'arret
}
}
 
 
 
void ManageSerialPort::enableReceiving()
{
if (!receivingEnabled && threadReceive == NULL) //Si la reception n'est pas active && si threadReceive n'est pas alloue
{
threadReceive = new ThreadReceive(extSerialPort);
connect(threadReceive, SIGNAL(newDataReceived(const QByteArray &)), this, SIGNAL(newDataReceived(const QByteArray &)));
receivingEnabled = true;
}
}
 
void ManageSerialPort::disableReceiving()
{
if (receivingEnabled && threadReceive != NULL) //Si la reception est pas active && si threadReceive est alloue
{
delete (threadReceive);
threadReceive = NULL;
receivingEnabled = false;
}
}
 
bool ManageSerialPort::isReceivingEnabled()
{
return receivingEnabled;
}
 
uchar ManageSerialPort::receiveData()
{
if (!isOpen()) //Si le port n'est pas ouvert
return 2;
if (!receivingEnabled || threadReceive == NULL) //Si la reception n'est pas active || si threadReceive n'est pas été alloue
return 3;
if (!threadReceive->isRunning())
{
saveStateReceiveData = true;
threadReceive->start(); //Demarrage du thread de reception
}
return 1;
}
 
void ManageSerialPort::stopReceiving()
{
if (!receivingEnabled || threadReceive == NULL) //Si la reception n'est pas active || si threadReceive n'est pas alloue
return;
if (threadReceive->isRunning()) //Si le thread de reception est en fonctionnement
{
saveStateReceiveData = false;
threadReceive->stopReceiving(); //on donne l'ordre d'arreter la reception
 
long tmp = ULONG_MAX;
threadReceive->wait(tmp); //on attend l'arret
}
}
 
 
 
 
 
 
 
 
 
 
 
/********************************************************************************************************
* Classe ThreadSend
*****************************************************************************************************/
 
ThreadSend::ThreadSend(QextSerialPort &addressSerialPort) : extSerialPort(addressSerialPort)
{
dataToSend.clear();
stopped=false;
}
 
ThreadSend::~ThreadSend()
{
if (isRunning())
{
stopSending();
wait();
}
}
 
 
void ThreadSend::addDataToSend(QByteArray &dataToAdd)
{
QMutexLocker locker(&mutexSend);
for (int i=0; i<dataToAdd.size(); i++)
dataToSend.enqueue(QByteArray(1,dataToAdd.at(i)));
if (!isRunning())
start();
}
 
void ThreadSend::stopSending()
{
stopped=true;
}
 
void ThreadSend::run()
{
QByteArray byteArray;
forever
{
if (dataToSend.isEmpty() || stopped)
{
stopped = false;
break;
}
mutexSend.lock();
byteArray = dataToSend.dequeue();
mutexSend.unlock();
extSerialPort.write(byteArray, 1);
}
}
 
 
 
 
 
/********************************************************************************************************
* Classe ThreadReceive - A TERMINER
*****************************************************************************************************/
 
ThreadReceive::ThreadReceive(QextSerialPort &addressSerialPort) : extSerialPort(addressSerialPort)
{
stopped=false;
}
 
ThreadReceive::~ThreadReceive()
{
if (isRunning())
{
stopReceiving();
wait();
}
}
 
void ThreadReceive::stopReceiving()
{
stopped = true;
}
 
void ThreadReceive::run()
{
int numBytes=0;
char data[1024];
QByteArray dataReceived;
forever
{
if (stopped)
{
stopped = false;
break;
}
 
mutexReceive.lock();
 
numBytes = extSerialPort.bytesAvailable();
if (numBytes > 0)
{
extSerialPort.read(data, numBytes);
 
for (int xy=1; xy < numBytes; xy++)
{
if (data[xy] == 0)
{
data[xy] = 'a';
}
}
 
data[numBytes]='\0';
dataReceived = data;
emit newDataReceived(dataReceived);
}
mutexReceive.unlock();
}
}
 
/QMK-Groundstation/branches/waypoint/SerialPort/ManageSerialPort.h
0,0 → 1,322
/********************************************************************************************************
* PROGRAM : QSerialPortTerminal
* DATE - TIME : vendredi 03 octobre 2008 - 11h15
* AUTHOR : VIANNEY-LIAUD Philippe ( philippe.vianney.liaud gmail.com )
* FILENAME : ManageSerialPort.h
* LICENSE : GPL
* COMMENTARY : Manage qExtSerialPort
********************************************************************************************************/
#ifndef MANAGESERIALPORT_H
#define MANAGESERIALPORT_H
 
#include <QThread>
#include <QQueue>
#include <QMetaType>
#include <QMutex>
#include "qextserialport.h"
 
Q_DECLARE_METATYPE(BaudRateType);
Q_DECLARE_METATYPE(DataBitsType);
Q_DECLARE_METATYPE(ParityType);
Q_DECLARE_METATYPE(StopBitsType);
Q_DECLARE_METATYPE(FlowType);
 
class ThreadSend;
class ThreadReceive;
 
 
class ManageSerialPort : public QObject
{
Q_OBJECT
 
public:
//Constructeurs + destructeur
ManageSerialPort();
ManageSerialPort(const QString &name, const BaudRateType baudRate, const DataBitsType dataBits,\
const ParityType parity, const StopBitsType stopBits, \
const FlowType flowControl, ulong seconds, ulong milliseconds);
~ManageSerialPort();
 
//General
bool open();
bool open(const QString &name, const BaudRateType baudRate, const DataBitsType dataBits,\
const ParityType parity, const StopBitsType stopBits, \
const FlowType flowControl, ulong seconds, ulong milliseconds);
bool isOpen();
void close();
 
//Sets the name of the device associated with the object, e.g. "COM1", or "/dev/ttyS0"
void setPort(const QString &name);
QString getPort();
 
/*Most used : '*' (POSTX & Windows)
RATE Windows Speed POSIX Speed
----------- ------------- -----------
enum BaudRateType{
BAUD50 110 50 //POSIX ONLY
BAUD75 110 75 //POSIX ONLY
*BAUD110 110 110
BAUD134 110 134.5 //POSIX ONLY
BAUD150 110 150 //POSIX ONLY
BAUD200 110 200 //POSIX ONLY
*BAUD300 300 300
*BAUD600 600 600
*BAUD1200 1200 1200
BAUD1800 1200 1800 //POSIX ONLY
*BAUD2400 2400 2400
*BAUD4800 4800 4800
*BAUD9600 9600 9600
BAUD14400 14400 9600 //WINDOWS ONLY
*BAUD19200 19200 19200
*BAUD38400 38400 38400
BAUD56000 56000 38400 //WINDOWS ONLY
*BAUD57600 57600 57600
BAUD76800 57600 76800 //POSIX ONLY
*BAUD115200 115200 115200
BAUD128000 128000 115200 //WINDOWS ONLY
BAUD256000 256000 115200 //WINDOWS ONLY
}*/
void setBaudRate(const BaudRateType baudRate);
 
/*getBaudRate
return "50";
return "75";
return "110";
return "134";
return "150";
return "200";
return "300";
return "600";
return "1200";
return "1800";
return "2400";
return "4800";
return "9600";
return "14400";
return "19200";
return "38400";
return "56000";
return "57600";
return "76800";
return "115200";
return "128000";
return "256000";*/
QString getBaudRate();
 
 
/*enum DataBitsType {
DATA_5
DATA_6
DATA_7
DATA_8
};*/
void setDataBits(const DataBitsType dataBits);
 
/*getDataBits
return '5';
return '6';
return '7';
return '8';*/
QChar getDataBits();
 
 
/*enum ParityType {
PAR_NONE //None means that no parity bit is sent at all
PAR_ODD //Odd
PAR_EVEN //Even
PAR_MARK //Windows only : Mark parity means that the parity bit is always set to the mark signal condition (logical 1)
PAR_SPACE //Space parity always sends the parity bit in the space signal condition
};*/
void setParity(const ParityType parity);
 
/*getParity
return "None";
return "Odd";
return "Even";
return "Mark"; Windows only
return "Space";*/
QString getParity();
 
 
/*enum StopBitsType {
STOP_1
STOP_1_5 //WINDOWS ONLY
STOP_2
};*/
void setStopBits(const StopBitsType stopBits);
 
/*getStopBit
return "1"
return "1.5"
return "2"*/
QString getStopBit();
 
 
/*enum FlowType {
FLOW_OFF
FLOW_HARDWARE
FLOW_XONXOFF
};*/
void setFlowControl(const FlowType flowControl);
 
/*getFlowControl
return "None"
return "Hardware"
return "Xon/Xoff"*/
QString getFlowControl();
 
 
void setTimeout(ulong seconds, ulong milliseconds);
 
/*getLastErrorToString
return "No Error has occured"
return "Invalid file descriptor (port was not opened correctly)"
return "Unable to allocate memory tables (POSIX)"
return "Caught a non-blocked signal (POSIX)"
return "Operation timed out (POSIX)"
return "The file opened by the port is not a character device (POSIX)"
return "The port detected a break condition"
return "The port detected a framing error (usually caused by incorrect baud rate settings)"
 
return "There was an I/O error while communicating with the port"
return "Character buffer overrun"
return "Receive buffer overflow"
return "The port detected a parity error in the received data"
return "Transmit buffer overflow"
return "General read operation failure"
return "General write operation failure"*/
/*QString getLastErrorToString();*/
 
/*getLastError
return 0 : No Error has occured
return 1 : Invalid file descriptor (port was not opened correctly)
return 2 : Unable to allocate memory tables (POSIX)
return 3 : Caught a non-blocked signal (POSIX)
return 4 : Operation timed out (POSIX)
return 5 : The file opened by the port is not a character device (POSIX)
return 6 : The port detected a break condition"
return 7 : The port detected a framing error (usually caused by incorrect baud rate settings)
 
return 8 : There was an I/O error while communicating with the port
return 9 : Character buffer overrun
return 10 : Receive buffer overflow
return 11 : The port detected a parity error in the received data
return 12 : Transmit buffer overflow
return 13 : General read operation failure
return 14 : General write operation failure*/
/*ulong getLastError();*/
 
 
 
//Emission
void enableSending();
void disableSending();
 
/*isSendingEnabled
return 0 : sending is not enable
return 1 : sending is enable*/
bool isSendingEnabled();
 
/*sendData
return 1 : add OK
return 2 : port is not open
return 3 : sending is not enable*/
uchar sendData(QByteArray &dataToSend);
 
void stopSending();
 
//Reception
void enableReceiving();
void disableReceiving();
 
/*isReceivingEnabled
return 0 : receiving is not enable
return 1 : receiving is enable*/
bool isReceivingEnabled();
 
/*receiveData
return 1 : start thread OK
return 2 : port is not open
return 3 : receiving is not enable*/
uchar receiveData();
 
void stopReceiving();
 
signals:
void newDataReceived(const QByteArray &dataReceived);
 
private:
//Variables privees
QextSerialPort extSerialPort;
ThreadSend *threadSend;
ThreadReceive *threadReceive;
 
bool sendingEnabled;
bool receivingEnabled;
 
bool closeCalled;
bool saveStateSendEnabled;
bool saveStateReceivedEnabled;
bool saveStateReceiveData;
 
};
 
#endif // MANAGESERIALPORT_H
 
 
 
 
 
 
 
 
 
class ThreadSend : public QThread
{
Q_OBJECT
 
public:
ThreadSend(QextSerialPort &addressSerialPort);
~ThreadSend();
void addDataToSend(QByteArray &dataToAdd);
void stopSending();
 
protected:
void run();
 
private:
QMutex mutexSend;
QextSerialPort &extSerialPort;
QQueue<QByteArray> dataToSend;
bool stopped;
};
 
 
 
 
 
 
 
 
 
 
class ThreadReceive : public QThread
{
Q_OBJECT
 
public:
ThreadReceive(QextSerialPort &addressSerialPort);
~ThreadReceive();
void stopReceiving();
 
protected:
void run();
 
private :
QMutex mutexReceive;
QextSerialPort &extSerialPort;
bool stopped;
 
signals:
void newDataReceived(const QByteArray &dataReceived);
};
/QMK-Groundstation/branches/waypoint/SerialPort/posix_qextserialport.cpp
0,0 → 1,1114
 
/*!
\class Posix_QextSerialPort
\version 1.0.0
\author Stefan Sander
 
A cross-platform serial port class.
This class encapsulates the POSIX portion of QextSerialPort. The user will be notified of errors
and possible portability conflicts at run-time by default - this behavior can be turned off by
defining _TTY_NOWARN_ (to turn off all warnings) or _TTY_NOWARN_PORT_ (to turn off portability
warnings) in the project. Note that _TTY_NOWARN_ will also turn off portability warnings.
*/
 
#include <stdio.h>
#include "posix_qextserialport.h"
 
/*!
\fn Posix_QextSerialPort::Posix_QextSerialPort()
Default constructor. Note that the name of the device used by a QextSerialPort constructed with
this constructor will be determined by #defined constants, or lack thereof - the default behavior
is the same as _TTY_LINUX_. Possible naming conventions and their associated constants are:
 
\verbatim
 
Constant Used By Naming Convention
---------- ------------- ------------------------
_TTY_WIN_ Windows COM1, COM2
_TTY_IRIX_ SGI/IRIX /dev/ttyf1, /dev/ttyf2
_TTY_HPUX_ HP-UX /dev/tty1p0, /dev/tty2p0
_TTY_SUN_ SunOS/Solaris /dev/ttya, /dev/ttyb
_TTY_DIGITAL_ Digital UNIX /dev/tty01, /dev/tty02
_TTY_FREEBSD_ FreeBSD /dev/ttyd0, /dev/ttyd1
_TTY_LINUX_ Linux /dev/ttyS0, /dev/ttyS1
<none> Linux /dev/ttyS0, /dev/ttyS1
\endverbatim
 
This constructor assigns the device name to the name of the first port on the specified system.
See the other constructors if you need to open a different port.
*/
Posix_QextSerialPort::Posix_QextSerialPort()
: QextSerialBase()
{
Posix_File=new QFile();
}
 
/*!
\fn Posix_QextSerialPort::Posix_QextSerialPort(const Posix_QextSerialPort&)
Copy constructor.
*/
Posix_QextSerialPort::Posix_QextSerialPort(const Posix_QextSerialPort& s)
: QextSerialBase(s.port)
{
setOpenMode(s.openMode());
port = s.port;
Settings.BaudRate=s.Settings.BaudRate;
Settings.DataBits=s.Settings.DataBits;
Settings.Parity=s.Settings.Parity;
Settings.StopBits=s.Settings.StopBits;
Settings.FlowControl=s.Settings.FlowControl;
lastErr=s.lastErr;
Posix_File=new QFile();
Posix_File=s.Posix_File;
memcpy(&Posix_Timeout, &s.Posix_Timeout, sizeof(struct timeval));
memcpy(&Posix_Copy_Timeout, &s.Posix_Copy_Timeout, sizeof(struct timeval));
memcpy(&Posix_CommConfig, &s.Posix_CommConfig, sizeof(struct termios));
}
 
/*!
\fn Posix_QextSerialPort::Posix_QextSerialPort(const QString & name)
Constructs a serial port attached to the port specified by name.
name is the name of the device, which is windowsystem-specific,
e.g."COM1" or "/dev/ttyS0".
*/
Posix_QextSerialPort::Posix_QextSerialPort(const QString & name)
: QextSerialBase(name)
{
Posix_File=new QFile();
}
 
/*!
\fn Posix_QextSerialPort::Posix_QextSerialPort(const PortSettings& settings)
Constructs a port with default name and specified settings.
*/
Posix_QextSerialPort::Posix_QextSerialPort(const PortSettings& settings)
: QextSerialBase()
{
setBaudRate(settings.BaudRate);
setDataBits(settings.DataBits);
setParity(settings.Parity);
setStopBits(settings.StopBits);
setFlowControl(settings.FlowControl);
Posix_File=new QFile();
setTimeout(settings.Timeout_Sec, settings.Timeout_Millisec);
}
 
/*!
\fn Posix_QextSerialPort::Posix_QextSerialPort(const QString & name, const PortSettings& settings)
Constructs a port with specified name and settings.
*/
Posix_QextSerialPort::Posix_QextSerialPort(const QString & name, const PortSettings& settings)
: QextSerialBase(name)
{
setBaudRate(settings.BaudRate);
setDataBits(settings.DataBits);
setParity(settings.Parity);
setStopBits(settings.StopBits);
setFlowControl(settings.FlowControl);
Posix_File=new QFile();
setTimeout(settings.Timeout_Sec, settings.Timeout_Millisec);
}
 
/*!
\fn Posix_QextSerialPort& Posix_QextSerialPort::operator=(const Posix_QextSerialPort& s)
Override the = operator.
*/
Posix_QextSerialPort& Posix_QextSerialPort::operator=(const Posix_QextSerialPort& s)
{
setOpenMode(s.openMode());
port = s.port;
Settings.BaudRate=s.Settings.BaudRate;
Settings.DataBits=s.Settings.DataBits;
Settings.Parity=s.Settings.Parity;
Settings.StopBits=s.Settings.StopBits;
Settings.FlowControl=s.Settings.FlowControl;
lastErr=s.lastErr;
Posix_File=s.Posix_File;
memcpy(&Posix_Timeout, &(s.Posix_Timeout), sizeof(struct timeval));
memcpy(&Posix_Copy_Timeout, &(s.Posix_Copy_Timeout), sizeof(struct timeval));
memcpy(&Posix_CommConfig, &(s.Posix_CommConfig), sizeof(struct termios));
return *this;
}
 
/*!
\fn Posix_QextSerialPort::~Posix_QextSerialPort()
Standard destructor.
*/
Posix_QextSerialPort::~Posix_QextSerialPort()
{
if (isOpen()) {
close();
}
Posix_File->close();
delete Posix_File;
}
 
/*!
\fn void Posix_QextSerialPort::setBaudRate(BaudRateType baudRate)
Sets the baud rate of the serial port. Note that not all rates are applicable on
all platforms. The following table shows translations of the various baud rate
constants on Windows(including NT/2000) and POSIX platforms. Speeds marked with an *
are speeds that are usable on both Windows and POSIX.
 
\note
BAUD76800 may not be supported on all POSIX systems. SGI/IRIX systems do not support
BAUD1800.
 
\verbatim
 
RATE Windows Speed POSIX Speed
----------- ------------- -----------
BAUD50 110 50
BAUD75 110 75
*BAUD110 110 110
BAUD134 110 134.5
BAUD150 110 150
BAUD200 110 200
*BAUD300 300 300
*BAUD600 600 600
*BAUD1200 1200 1200
BAUD1800 1200 1800
*BAUD2400 2400 2400
*BAUD4800 4800 4800
*BAUD9600 9600 9600
BAUD14400 14400 9600
*BAUD19200 19200 19200
*BAUD38400 38400 38400
BAUD56000 56000 38400
*BAUD57600 57600 57600
BAUD76800 57600 76800
*BAUD115200 115200 115200
BAUD128000 128000 115200
BAUD256000 256000 115200
\endverbatim
*/
void Posix_QextSerialPort::setBaudRate(BaudRateType baudRate)
{
LOCK_MUTEX();
if (Settings.BaudRate!=baudRate) {
switch (baudRate) {
case BAUD14400:
Settings.BaudRate=BAUD9600;
break;
case BAUD56000:
Settings.BaudRate=BAUD38400;
break;
case BAUD76800:
#ifndef B76800
Settings.BaudRate=BAUD57600;
#else
Settings.BaudRate=baudRate;
#endif
break;
case BAUD128000:
case BAUD256000:
Settings.BaudRate=BAUD115200;
break;
default:
Settings.BaudRate=baudRate;
break;
}
}
if (isOpen()) {
switch (baudRate) {
/*50 baud*/
case BAUD50:
TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 50 baud operation.");
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B50;
#else
cfsetispeed(&Posix_CommConfig, B50);
cfsetospeed(&Posix_CommConfig, B50);
#endif
break;
/*75 baud*/
case BAUD75:
TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 75 baud operation.");
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B75;
#else
cfsetispeed(&Posix_CommConfig, B75);
cfsetospeed(&Posix_CommConfig, B75);
#endif
break;
/*110 baud*/
case BAUD110:
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B110;
#else
cfsetispeed(&Posix_CommConfig, B110);
cfsetospeed(&Posix_CommConfig, B110);
#endif
break;
/*134.5 baud*/
case BAUD134:
TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 134.5 baud operation.");
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B134;
#else
cfsetispeed(&Posix_CommConfig, B134);
cfsetospeed(&Posix_CommConfig, B134);
#endif
break;
/*150 baud*/
case BAUD150:
TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 150 baud operation.");
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B150;
#else
cfsetispeed(&Posix_CommConfig, B150);
cfsetospeed(&Posix_CommConfig, B150);
#endif
break;
/*200 baud*/
case BAUD200:
TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows does not support 200 baud operation.");
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B200;
#else
cfsetispeed(&Posix_CommConfig, B200);
cfsetospeed(&Posix_CommConfig, B200);
#endif
break;
/*300 baud*/
case BAUD300:
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B300;
#else
cfsetispeed(&Posix_CommConfig, B300);
cfsetospeed(&Posix_CommConfig, B300);
#endif
break;
/*600 baud*/
case BAUD600:
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B600;
#else
cfsetispeed(&Posix_CommConfig, B600);
cfsetospeed(&Posix_CommConfig, B600);
#endif
break;
/*1200 baud*/
case BAUD1200:
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B1200;
#else
cfsetispeed(&Posix_CommConfig, B1200);
cfsetospeed(&Posix_CommConfig, B1200);
#endif
break;
/*1800 baud*/
case BAUD1800:
TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows and IRIX do not support 1800 baud operation.");
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B1800;
#else
cfsetispeed(&Posix_CommConfig, B1800);
cfsetospeed(&Posix_CommConfig, B1800);
#endif
break;
/*2400 baud*/
case BAUD2400:
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B2400;
#else
cfsetispeed(&Posix_CommConfig, B2400);
cfsetospeed(&Posix_CommConfig, B2400);
#endif
break;
/*4800 baud*/
case BAUD4800:
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B4800;
#else
cfsetispeed(&Posix_CommConfig, B4800);
cfsetospeed(&Posix_CommConfig, B4800);
#endif
break;
/*9600 baud*/
case BAUD9600:
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B9600;
#else
cfsetispeed(&Posix_CommConfig, B9600);
cfsetospeed(&Posix_CommConfig, B9600);
#endif
break;
/*14400 baud*/
case BAUD14400:
TTY_WARNING("Posix_QextSerialPort: POSIX does not support 14400 baud operation. Switching to 9600 baud.");
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B9600;
#else
cfsetispeed(&Posix_CommConfig, B9600);
cfsetospeed(&Posix_CommConfig, B9600);
#endif
break;
/*19200 baud*/
case BAUD19200:
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B19200;
#else
cfsetispeed(&Posix_CommConfig, B19200);
cfsetospeed(&Posix_CommConfig, B19200);
#endif
break;
/*38400 baud*/
case BAUD38400:
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B38400;
#else
cfsetispeed(&Posix_CommConfig, B38400);
cfsetospeed(&Posix_CommConfig, B38400);
#endif
break;
/*56000 baud*/
case BAUD56000:
TTY_WARNING("Posix_QextSerialPort: POSIX does not support 56000 baud operation. Switching to 38400 baud.");
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B38400;
#else
cfsetispeed(&Posix_CommConfig, B38400);
cfsetospeed(&Posix_CommConfig, B38400);
#endif
break;
/*57600 baud*/
case BAUD57600:
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B57600;
#else
cfsetispeed(&Posix_CommConfig, B57600);
cfsetospeed(&Posix_CommConfig, B57600);
#endif
break;
/*76800 baud*/
case BAUD76800:
TTY_PORTABILITY_WARNING("Posix_QextSerialPort Portability Warning: Windows and some POSIX systems do not support 76800 baud operation.");
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
#ifdef B76800
Posix_CommConfig.c_cflag|=B76800;
#else
TTY_WARNING("Posix_QextSerialPort: Posix_QextSerialPort was compiled without 76800 baud support. Switching to 57600 baud.");
Posix_CommConfig.c_cflag|=B57600;
#endif //B76800
#else //CBAUD
#ifdef B76800
cfsetispeed(&Posix_CommConfig, B76800);
cfsetospeed(&Posix_CommConfig, B76800);
#else
TTY_WARNING("Posix_QextSerialPort: Posix_QextSerialPort was compiled without 76800 baud support. Switching to 57600 baud.");
cfsetispeed(&Posix_CommConfig, B57600);
cfsetospeed(&Posix_CommConfig, B57600);
#endif //B76800
#endif //CBAUD
break;
/*115200 baud*/
case BAUD115200:
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B115200;
#else
cfsetispeed(&Posix_CommConfig, B115200);
cfsetospeed(&Posix_CommConfig, B115200);
#endif
break;
/*128000 baud*/
case BAUD128000:
TTY_WARNING("Posix_QextSerialPort: POSIX does not support 128000 baud operation. Switching to 115200 baud.");
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B115200;
#else
cfsetispeed(&Posix_CommConfig, B115200);
cfsetospeed(&Posix_CommConfig, B115200);
#endif
break;
/*256000 baud*/
case BAUD256000:
TTY_WARNING("Posix_QextSerialPort: POSIX does not support 256000 baud operation. Switching to 115200 baud.");
#ifdef CBAUD
Posix_CommConfig.c_cflag&=(~CBAUD);
Posix_CommConfig.c_cflag|=B115200;
#else
cfsetispeed(&Posix_CommConfig, B115200);
cfsetospeed(&Posix_CommConfig, B115200);
#endif
break;
}
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Posix_QextSerialPort::setDataBits(DataBitsType dataBits)
Sets the number of data bits used by the serial port. Possible values of dataBits are:
\verbatim
DATA_5 5 data bits
DATA_6 6 data bits
DATA_7 7 data bits
DATA_8 8 data bits
\endverbatim
 
\note
This function is subject to the following restrictions:
\par
5 data bits cannot be used with 2 stop bits.
\par
8 data bits cannot be used with space parity on POSIX systems.
 
*/
void Posix_QextSerialPort::setDataBits(DataBitsType dataBits)
{
LOCK_MUTEX();
if (Settings.DataBits!=dataBits) {
if ((Settings.StopBits==STOP_2 && dataBits==DATA_5) ||
(Settings.StopBits==STOP_1_5 && dataBits!=DATA_5) ||
(Settings.Parity==PAR_SPACE && dataBits==DATA_8)) {
}
else {
Settings.DataBits=dataBits;
}
}
if (isOpen()) {
switch(dataBits) {
/*5 data bits*/
case DATA_5:
if (Settings.StopBits==STOP_2) {
TTY_WARNING("Posix_QextSerialPort: 5 Data bits cannot be used with 2 stop bits.");
}
else {
Settings.DataBits=dataBits;
Posix_CommConfig.c_cflag&=(~CSIZE);
Posix_CommConfig.c_cflag|=CS5;
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
}
break;
/*6 data bits*/
case DATA_6:
if (Settings.StopBits==STOP_1_5) {
TTY_WARNING("Posix_QextSerialPort: 6 Data bits cannot be used with 1.5 stop bits.");
}
else {
Settings.DataBits=dataBits;
Posix_CommConfig.c_cflag&=(~CSIZE);
Posix_CommConfig.c_cflag|=CS6;
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
}
break;
/*7 data bits*/
case DATA_7:
if (Settings.StopBits==STOP_1_5) {
TTY_WARNING("Posix_QextSerialPort: 7 Data bits cannot be used with 1.5 stop bits.");
}
else {
Settings.DataBits=dataBits;
Posix_CommConfig.c_cflag&=(~CSIZE);
Posix_CommConfig.c_cflag|=CS7;
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
}
break;
/*8 data bits*/
case DATA_8:
if (Settings.StopBits==STOP_1_5) {
TTY_WARNING("Posix_QextSerialPort: 8 Data bits cannot be used with 1.5 stop bits.");
}
else {
Settings.DataBits=dataBits;
Posix_CommConfig.c_cflag&=(~CSIZE);
Posix_CommConfig.c_cflag|=CS8;
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
}
break;
}
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Posix_QextSerialPort::setParity(ParityType parity)
Sets the parity associated with the serial port. The possible values of parity are:
\verbatim
PAR_SPACE Space Parity
PAR_MARK Mark Parity
PAR_NONE No Parity
PAR_EVEN Even Parity
PAR_ODD Odd Parity
\endverbatim
 
\note
This function is subject to the following limitations:
\par
POSIX systems do not support mark parity.
\par
POSIX systems support space parity only if tricked into doing so, and only with
fewer than 8 data bits. Use space parity very carefully with POSIX systems.
 
*/
void Posix_QextSerialPort::setParity(ParityType parity)
{
LOCK_MUTEX();
if (Settings.Parity!=parity) {
if (parity==PAR_MARK || (parity==PAR_SPACE && Settings.DataBits==DATA_8)) {
}
else {
Settings.Parity=parity;
}
}
if (isOpen()) {
switch (parity) {
/*space parity*/
case PAR_SPACE:
if (Settings.DataBits==DATA_8) {
TTY_PORTABILITY_WARNING("Posix_QextSerialPort: Space parity is only supported in POSIX with 7 or fewer data bits");
}
else {
/*space parity not directly supported - add an extra data bit to simulate it*/
Posix_CommConfig.c_cflag&=~(PARENB|CSIZE);
switch(Settings.DataBits) {
case DATA_5:
Settings.DataBits=DATA_6;
Posix_CommConfig.c_cflag|=CS6;
break;
case DATA_6:
Settings.DataBits=DATA_7;
Posix_CommConfig.c_cflag|=CS7;
break;
case DATA_7:
Settings.DataBits=DATA_8;
Posix_CommConfig.c_cflag|=CS8;
break;
case DATA_8:
break;
}
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
}
break;
/*mark parity - WINDOWS ONLY*/
case PAR_MARK:
TTY_WARNING("Posix_QextSerialPort: Mark parity is not supported by POSIX.");
break;
/*no parity*/
case PAR_NONE:
Posix_CommConfig.c_cflag&=(~PARENB);
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
break;
/*even parity*/
case PAR_EVEN:
Posix_CommConfig.c_cflag&=(~PARODD);
Posix_CommConfig.c_cflag|=PARENB;
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
break;
/*odd parity*/
case PAR_ODD:
Posix_CommConfig.c_cflag|=(PARENB|PARODD);
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
break;
}
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Posix_QextSerialPort::setStopBits(StopBitsType stopBits)
Sets the number of stop bits used by the serial port. Possible values of stopBits are:
\verbatim
STOP_1 1 stop bit
STOP_1_5 1.5 stop bits
STOP_2 2 stop bits
\endverbatim
\note
This function is subject to the following restrictions:
\par
2 stop bits cannot be used with 5 data bits.
\par
POSIX does not support 1.5 stop bits.
 
*/
void Posix_QextSerialPort::setStopBits(StopBitsType stopBits)
{
LOCK_MUTEX();
if (Settings.StopBits!=stopBits) {
if ((Settings.DataBits==DATA_5 && stopBits==STOP_2) || stopBits==STOP_1_5) {}
else {
Settings.StopBits=stopBits;
}
}
if (isOpen()) {
switch (stopBits) {
/*one stop bit*/
case STOP_1:
Settings.StopBits=stopBits;
Posix_CommConfig.c_cflag&=(~CSTOPB);
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
break;
/*1.5 stop bits*/
case STOP_1_5:
TTY_WARNING("Posix_QextSerialPort: 1.5 stop bit operation is not supported by POSIX.");
break;
/*two stop bits*/
case STOP_2:
if (Settings.DataBits==DATA_5) {
TTY_WARNING("Posix_QextSerialPort: 2 stop bits cannot be used with 5 data bits");
}
else {
Settings.StopBits=stopBits;
Posix_CommConfig.c_cflag|=CSTOPB;
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
}
break;
}
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Posix_QextSerialPort::setFlowControl(FlowType flow)
Sets the flow control used by the port. Possible values of flow are:
\verbatim
FLOW_OFF No flow control
FLOW_HARDWARE Hardware (RTS/CTS) flow control
FLOW_XONXOFF Software (XON/XOFF) flow control
\endverbatim
\note
FLOW_HARDWARE may not be supported on all versions of UNIX. In cases where it is
unsupported, FLOW_HARDWARE is the same as FLOW_OFF.
 
*/
void Posix_QextSerialPort::setFlowControl(FlowType flow)
{
LOCK_MUTEX();
if (Settings.FlowControl!=flow) {
Settings.FlowControl=flow;
}
if (isOpen()) {
switch(flow) {
/*no flow control*/
case FLOW_OFF:
Posix_CommConfig.c_cflag&=(~CRTSCTS);
Posix_CommConfig.c_iflag&=(~(IXON|IXOFF|IXANY));
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
break;
/*software (XON/XOFF) flow control*/
case FLOW_XONXOFF:
Posix_CommConfig.c_cflag&=(~CRTSCTS);
Posix_CommConfig.c_iflag|=(IXON|IXOFF|IXANY);
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
break;
case FLOW_HARDWARE:
Posix_CommConfig.c_cflag|=CRTSCTS;
Posix_CommConfig.c_iflag&=(~(IXON|IXOFF|IXANY));
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
break;
}
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Posix_QextSerialPort::setTimeout(ulong sec, ulong millisec);
Sets the read and write timeouts for the port to sec seconds and millisec milliseconds.
Note that this is a per-character timeout, i.e. the port will wait this long for each
individual character, not for the whole read operation. This timeout also applies to the
bytesWaiting() function.
 
\note
POSIX does not support millisecond-level control for I/O timeout values. Any
timeout set using this function will be set to the next lowest tenth of a second for
the purposes of detecting read or write timeouts. For example a timeout of 550 milliseconds
will be seen by the class as a timeout of 500 milliseconds for the purposes of reading and
writing the port. However millisecond-level control is allowed by the select() system call,
so for example a 550-millisecond timeout will be seen as 550 milliseconds on POSIX systems for
the purpose of detecting available bytes in the read buffer.
 
*/
void Posix_QextSerialPort::setTimeout(ulong sec, ulong millisec)
{
LOCK_MUTEX();
Settings.Timeout_Sec=sec;
Settings.Timeout_Millisec=millisec;
Posix_Copy_Timeout.tv_sec=sec;
Posix_Copy_Timeout.tv_usec=millisec;
if (isOpen()) {
tcgetattr(Posix_File->handle(), &Posix_CommConfig);
Posix_CommConfig.c_cc[VTIME]=sec*10+millisec/100;
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
}
UNLOCK_MUTEX();
}
 
/*!
\fn bool Posix_QextSerialPort::open(OpenMode mode)
Opens the serial port associated to this class.
This function has no effect if the port associated with the class is already open.
The port is also configured to the current settings, as stored in the Settings structure.
*/
bool Posix_QextSerialPort::open(OpenMode mode)
{
LOCK_MUTEX();
if (mode == QIODevice::NotOpen)
return isOpen();
if (!isOpen()) {
/*open the port*/
Posix_File->setFileName(port);
if (Posix_File->open(QIODevice::ReadWrite|QIODevice::Unbuffered)) {
/*set open mode*/
QIODevice::open(mode);
/*configure port settings*/
tcgetattr(Posix_File->handle(), &Posix_CommConfig);
/*set up other port settings*/
Posix_CommConfig.c_cflag|=CREAD|CLOCAL;
Posix_CommConfig.c_lflag&=(~(ICANON|ECHO|ECHOE|ECHOK|ECHONL|ISIG));
Posix_CommConfig.c_iflag&=(~(INPCK|IGNPAR|PARMRK|ISTRIP|ICRNL|IXANY));
Posix_CommConfig.c_oflag&=(~OPOST);
Posix_CommConfig.c_cc[VMIN]=0;
Posix_CommConfig.c_cc[VINTR] = _POSIX_VDISABLE;
Posix_CommConfig.c_cc[VQUIT] = _POSIX_VDISABLE;
Posix_CommConfig.c_cc[VSTART] = _POSIX_VDISABLE;
Posix_CommConfig.c_cc[VSTOP] = _POSIX_VDISABLE;
Posix_CommConfig.c_cc[VSUSP] = _POSIX_VDISABLE;
setBaudRate(Settings.BaudRate);
setDataBits(Settings.DataBits);
setParity(Settings.Parity);
setStopBits(Settings.StopBits);
setFlowControl(Settings.FlowControl);
setTimeout(Settings.Timeout_Sec, Settings.Timeout_Millisec);
tcsetattr(Posix_File->handle(), TCSAFLUSH, &Posix_CommConfig);
} else {
}
}
UNLOCK_MUTEX();
return isOpen();
}
 
/*!
\fn void Posix_QextSerialPort::close()
Closes a serial port. This function has no effect if the serial port associated with the class
is not currently open.
*/
void Posix_QextSerialPort::close()
{
LOCK_MUTEX();
Posix_File->close();
QIODevice::close();
UNLOCK_MUTEX();
}
 
/*!
\fn void Posix_QextSerialPort::flush()
Flushes all pending I/O to the serial port. This function has no effect if the serial port
associated with the class is not currently open.
*/
void Posix_QextSerialPort::flush()
{
LOCK_MUTEX();
if (isOpen()) {
Posix_File->flush();
}
UNLOCK_MUTEX();
}
 
/*!
\fn qint64 Posix_QextSerialPort::size() const
This function will return the number of bytes waiting in the receive queue of the serial port.
It is included primarily to provide a complete QIODevice interface, and will not record errors
in the lastErr member (because it is const). This function is also not thread-safe - in
multithreading situations, use Posix_QextSerialPort::bytesWaiting() instead.
*/
qint64 Posix_QextSerialPort::size() const
{
int numBytes;
if (ioctl(Posix_File->handle(), FIONREAD, &numBytes)<0) {
numBytes=0;
}
return (qint64)numBytes;
}
 
/*!
\fn qint64 Posix_QextSerialPort::bytesAvailable()
Returns the number of bytes waiting in the port's receive queue. This function will return 0 if
the port is not currently open, or -1 on error. Error information can be retrieved by calling
Posix_QextSerialPort::getLastError().
*/
qint64 Posix_QextSerialPort::bytesAvailable()
{
LOCK_MUTEX();
if (isOpen()) {
int bytesQueued;
fd_set fileSet;
FD_ZERO(&fileSet);
FD_SET(Posix_File->handle(), &fileSet);
/*on Linux systems the Posix_Timeout structure will be altered by the select() call.
Make sure we use the right timeout values*/
//memcpy(&Posix_Timeout, &Posix_Copy_Timeout, sizeof(struct timeval));
Posix_Timeout = Posix_Copy_Timeout;
int n=select(Posix_File->handle()+1, &fileSet, NULL, &fileSet, &Posix_Timeout);
if (!n) {
lastErr=E_PORT_TIMEOUT;
UNLOCK_MUTEX();
return -1;
}
if (n==-1 || ioctl(Posix_File->handle(), FIONREAD, &bytesQueued)==-1) {
translateError(errno);
UNLOCK_MUTEX();
return -1;
}
lastErr=E_NO_ERROR;
UNLOCK_MUTEX();
return bytesQueued + QIODevice::bytesAvailable();
}
UNLOCK_MUTEX();
return 0;
}
 
/*!
\fn void Posix_QextSerialPort::ungetChar(char)
This function is included to implement the full QIODevice interface, and currently has no
purpose within this class. This function is meaningless on an unbuffered device and currently
only prints a warning message to that effect.
*/
void Posix_QextSerialPort::ungetChar(char)
{
/*meaningless on unbuffered sequential device - return error and print a warning*/
TTY_WARNING("Posix_QextSerialPort: ungetChar() called on an unbuffered sequential device - operation is meaningless");
}
 
/*!
\fn void Posix_QextSerialPort::translateError(ulong error)
Translates a system-specific error code to a QextSerialPort error code. Used internally.
*/
void Posix_QextSerialPort::translateError(ulong error)
{
switch (error) {
case EBADF:
case ENOTTY:
lastErr=E_INVALID_FD;
break;
case EINTR:
lastErr=E_CAUGHT_NON_BLOCKED_SIGNAL;
break;
case ENOMEM:
lastErr=E_NO_MEMORY;
break;
}
}
 
/*!
\fn void Posix_QextSerialPort::setDtr(bool set)
Sets DTR line to the requested state (high by default). This function will have no effect if
the port associated with the class is not currently open.
*/
void Posix_QextSerialPort::setDtr(bool set)
{
LOCK_MUTEX();
if (isOpen()) {
int status;
ioctl(Posix_File->handle(), TIOCMGET, &status);
if (set) {
status|=TIOCM_DTR;
}
else {
status&=~TIOCM_DTR;
}
ioctl(Posix_File->handle(), TIOCMSET, &status);
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Posix_QextSerialPort::setRts(bool set)
Sets RTS line to the requested state (high by default). This function will have no effect if
the port associated with the class is not currently open.
*/
void Posix_QextSerialPort::setRts(bool set)
{
LOCK_MUTEX();
if (isOpen()) {
int status;
ioctl(Posix_File->handle(), TIOCMGET, &status);
if (set) {
status|=TIOCM_RTS;
}
else {
status&=~TIOCM_RTS;
}
ioctl(Posix_File->handle(), TIOCMSET, &status);
}
UNLOCK_MUTEX();
}
 
/*!
\fn unsigned long Posix_QextSerialPort::lineStatus()
returns the line status as stored by the port function. This function will retrieve the states
of the following lines: DCD, CTS, DSR, and RI. On POSIX systems, the following additional lines
can be monitored: DTR, RTS, Secondary TXD, and Secondary RXD. The value returned is an unsigned
long with specific bits indicating which lines are high. The following constants should be used
to examine the states of individual lines:
 
\verbatim
Mask Line
------ ----
LS_CTS CTS
LS_DSR DSR
LS_DCD DCD
LS_RI RI
LS_RTS RTS (POSIX only)
LS_DTR DTR (POSIX only)
LS_ST Secondary TXD (POSIX only)
LS_SR Secondary RXD (POSIX only)
\endverbatim
 
This function will return 0 if the port associated with the class is not currently open.
*/
unsigned long Posix_QextSerialPort::lineStatus()
{
unsigned long Status=0, Temp=0;
LOCK_MUTEX();
if (isOpen()) {
ioctl(Posix_File->handle(), TIOCMGET, &Temp);
if (Temp&TIOCM_CTS) {
Status|=LS_CTS;
}
if (Temp&TIOCM_DSR) {
Status|=LS_DSR;
}
if (Temp&TIOCM_RI) {
Status|=LS_RI;
}
if (Temp&TIOCM_CD) {
Status|=LS_DCD;
}
if (Temp&TIOCM_DTR) {
Status|=LS_DTR;
}
if (Temp&TIOCM_RTS) {
Status|=LS_RTS;
}
if (Temp&TIOCM_ST) {
Status|=LS_ST;
}
if (Temp&TIOCM_SR) {
Status|=LS_SR;
}
}
UNLOCK_MUTEX();
return Status;
}
 
/*!
\fn qint64 Posix_QextSerialPort::readData(char * data, qint64 maxSize)
Reads a block of data from the serial port. This function will read at most maxSize bytes from
the serial port and place them in the buffer pointed to by data. Return value is the number of
bytes actually read, or -1 on error.
 
\warning before calling this function ensure that serial port associated with this class
is currently open (use isOpen() function to check if port is open).
*/
qint64 Posix_QextSerialPort::readData(char * data, qint64 maxSize)
{
LOCK_MUTEX();
int retVal=0;
retVal=Posix_File->read(data, maxSize);
if (retVal==-1)
lastErr=E_READ_FAILED;
UNLOCK_MUTEX();
return retVal;
}
 
/*!
\fn qint64 Posix_QextSerialPort::writeData(const char * data, qint64 maxSize)
Writes a block of data to the serial port. This function will write maxSize bytes
from the buffer pointed to by data to the serial port. Return value is the number
of bytes actually written, or -1 on error.
 
\warning before calling this function ensure that serial port associated with this class
is currently open (use isOpen() function to check if port is open).
*/
qint64 Posix_QextSerialPort::writeData(const char * data, qint64 maxSize)
{
LOCK_MUTEX();
int retVal=0;
retVal=Posix_File->write(data, maxSize);
if (retVal==-1)
lastErr=E_WRITE_FAILED;
UNLOCK_MUTEX();
flush();
return retVal;
}
/QMK-Groundstation/branches/waypoint/SerialPort/posix_qextserialport.h
0,0 → 1,56
 
#ifndef _POSIX_QEXTSERIALPORT_H_
#define _POSIX_QEXTSERIALPORT_H_
 
#include <stdio.h>
#include <termios.h>
#include <errno.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/select.h>
#include "qextserialbase.h"
 
class Posix_QextSerialPort:public QextSerialBase {
public:
Posix_QextSerialPort();
Posix_QextSerialPort(const Posix_QextSerialPort& s);
Posix_QextSerialPort(const QString & name);
Posix_QextSerialPort(const PortSettings& settings);
Posix_QextSerialPort(const QString & name, const PortSettings& settings);
Posix_QextSerialPort& operator=(const Posix_QextSerialPort& s);
virtual ~Posix_QextSerialPort();
virtual void setBaudRate(BaudRateType);
virtual void setDataBits(DataBitsType);
virtual void setParity(ParityType);
virtual void setStopBits(StopBitsType);
virtual void setFlowControl(FlowType);
virtual void setTimeout(ulong, ulong);
virtual bool open(OpenMode mode=0);
virtual void close();
virtual void flush();
virtual qint64 size() const;
virtual qint64 bytesAvailable();
virtual void ungetChar(char c);
virtual void translateError(ulong error);
virtual void setDtr(bool set=true);
virtual void setRts(bool set=true);
virtual ulong lineStatus();
protected:
QFile* Posix_File;
struct termios Posix_CommConfig;
struct timeval Posix_Timeout;
struct timeval Posix_Copy_Timeout;
virtual qint64 readData(char * data, qint64 maxSize);
virtual qint64 writeData(const char * data, qint64 maxSize);
};
 
#endif
/QMK-Groundstation/branches/waypoint/SerialPort/qextserialbase.cpp
0,0 → 1,250
 
#include "qextserialbase.h"
 
/*!
\class QextSerialBase
\version 1.0.0
\author Stefan Sander
 
A common base class for Win_QextSerialBase, Posix_QextSerialBase and QextSerialPort.
*/
#ifdef QT_THREAD_SUPPORT
QMutex* QextSerialBase::mutex=NULL;
unsigned long QextSerialBase::refCount=0;
#endif
 
/*!
\fn QextSerialBase::QextSerialBase()
Default constructor.
*/
QextSerialBase::QextSerialBase()
: QIODevice()
{
 
#ifdef _TTY_WIN_
setPortName("COM1");
 
#elif defined(_TTY_IRIX_)
setPortName("/dev/ttyf1");
 
#elif defined(_TTY_HPUX_)
setPortName("/dev/tty1p0");
 
#elif defined(_TTY_SUN_)
setPortName("/dev/ttya");
 
#elif defined(_TTY_DIGITAL_)
setPortName("/dev/tty01");
 
#elif defined(_TTY_FREEBSD_)
setPortName("/dev/ttyd1");
 
#else
setPortName("/dev/ttyS0");
#endif
 
construct();
}
 
/*!
\fn QextSerialBase::QextSerialBase(const QString & name)
Construct a port and assign it to the device specified by the name parameter.
*/
QextSerialBase::QextSerialBase(const QString & name)
: QIODevice()
{
setPortName(name);
construct();
}
 
/*!
\fn QextSerialBase::~QextSerialBase()
Standard destructor.
*/
QextSerialBase::~QextSerialBase()
{
 
#ifdef QT_THREAD_SUPPORT
refCount--;
if (mutex && refCount==0) {
delete mutex;
mutex=NULL;
}
#endif
 
}
 
/*!
\fn void QextSerialBase::construct()
Common constructor function for setting up default port settings.
(9600 Baud, 8N1, no flow control where supported, otherwise no flow control, and 20 ms timeout).
*/
void QextSerialBase::construct()
{
Settings.BaudRate=BAUD9600;
Settings.DataBits=DATA_8;
Settings.Parity=PAR_NONE;
Settings.StopBits=STOP_1;
Settings.FlowControl=FLOW_OFF;
Settings.Timeout_Sec=0;
Settings.Timeout_Millisec=20;
 
#ifdef QT_THREAD_SUPPORT
if (!mutex) {
mutex=new QMutex( QMutex::Recursive );
}
refCount++;
#endif
 
setOpenMode(QIODevice::NotOpen);
}
 
/*!
\fn void QextSerialBase::setPortName(const QString & name)
Sets the name of the device associated with the object, e.g. "COM1", or "/dev/ttyS0".
*/
void QextSerialBase::setPortName(const QString & name)
{
port = name;
}
 
/*!
\fn QString QextSerialBase::portName() const
Returns the name set by setPortName().
*/
QString QextSerialBase::portName() const
{
return port;
}
 
/*!
\fn BaudRateType QextSerialBase::baudRate(void) const
Returns the baud rate of the serial port. For a list of possible return values see
the definition of the enum BaudRateType.
*/
BaudRateType QextSerialBase::baudRate(void) const
{
return Settings.BaudRate;
}
 
/*!
\fn DataBitsType QextSerialBase::dataBits() const
Returns the number of data bits used by the port. For a list of possible values returned by
this function, see the definition of the enum DataBitsType.
*/
DataBitsType QextSerialBase::dataBits() const
{
return Settings.DataBits;
}
 
/*!
\fn ParityType QextSerialBase::parity() const
Returns the type of parity used by the port. For a list of possible values returned by
this function, see the definition of the enum ParityType.
*/
ParityType QextSerialBase::parity() const
{
return Settings.Parity;
}
 
/*!
\fn StopBitsType QextSerialBase::stopBits() const
Returns the number of stop bits used by the port. For a list of possible return values, see
the definition of the enum StopBitsType.
*/
StopBitsType QextSerialBase::stopBits() const
{
return Settings.StopBits;
}
 
/*!
\fn FlowType QextSerialBase::flowControl() const
Returns the type of flow control used by the port. For a list of possible values returned
by this function, see the definition of the enum FlowType.
*/
FlowType QextSerialBase::flowControl() const
{
return Settings.FlowControl;
}
 
/*!
\fn bool QextSerialBase::isSequential() const
Returns true if device is sequential, otherwise returns false. Serial port is sequential device
so this function always returns true. Check QIODevice::isSequential() documentation for more
information.
*/
bool QextSerialBase::isSequential() const
{
return true;
}
 
/*!
\fn bool QextSerialBase::atEnd() const
This function will return true if the input buffer is empty (or on error), and false otherwise.
Call QextSerialBase::lastError() for error information.
*/
bool QextSerialBase::atEnd() const
{
if (size()) {
return true;
}
return false;
}
 
/*!
\fn qint64 QextSerialBase::readLine(char * data, qint64 maxSize)
This function will read a line of buffered input from the port, stopping when either maxSize bytes
have been read, the port has no more data available, or a newline is encountered.
The value returned is the length of the string that was read.
*/
qint64 QextSerialBase::readLine(char * data, qint64 maxSize)
{
qint64 numBytes = bytesAvailable();
char* pData = data;
 
if (maxSize < 2) //maxSize must be larger than 1
return -1;
 
/*read a byte at a time for MIN(bytesAvail, maxSize - 1) iterations, or until a newline*/
while (pData<(data+numBytes) && --maxSize) {
readData(pData, 1);
if (*pData++ == '\n') {
break;
}
}
*pData='\0';
 
/*return size of data read*/
return (pData-data);
}
 
/*!
\fn ulong QextSerialBase::lastError() const
Returns the code for the last error encountered by the port, or E_NO_ERROR if the last port
operation was successful. Possible error codes are:
 
\verbatim
Error Explanation
--------------------------- -------------------------------------------------------------
E_NO_ERROR No Error has occured
E_INVALID_FD Invalid file descriptor (port was not opened correctly)
E_NO_MEMORY Unable to allocate memory tables (POSIX)
E_CAUGHT_NON_BLOCKED_SIGNAL Caught a non-blocked signal (POSIX)
E_PORT_TIMEOUT Operation timed out (POSIX)
E_INVALID_DEVICE The file opened by the port is not a character device (POSIX)
E_BREAK_CONDITION The port detected a break condition
E_FRAMING_ERROR The port detected a framing error
(usually caused by incorrect baud rate settings)
E_IO_ERROR There was an I/O error while communicating with the port
E_BUFFER_OVERRUN Character buffer overrun
E_RECEIVE_OVERFLOW Receive buffer overflow
E_RECEIVE_PARITY_ERROR The port detected a parity error in the received data
E_TRANSMIT_OVERFLOW Transmit buffer overflow
E_READ_FAILED General read operation failure
E_WRITE_FAILED General write operation failure
\endverbatim
*/
ulong QextSerialBase::lastError() const
{
return lastErr;
}
/QMK-Groundstation/branches/waypoint/SerialPort/qextserialbase.h
0,0 → 1,196
 
#ifndef _QEXTSERIALBASE_H_
#define _QEXTSERIALBASE_H_
 
#include <QIODevice>
#include <QFile>
 
#ifdef QT_THREAD_SUPPORT
#include <QThread>
#include <QMutex>
#endif
 
/*if all warning messages are turned off, flag portability warnings to be turned off as well*/
#ifdef _TTY_NOWARN_
#define _TTY_NOWARN_PORT_
#endif
 
/*macros for thread support*/
#ifdef QT_THREAD_SUPPORT
#define LOCK_MUTEX() mutex->lock()
#define UNLOCK_MUTEX() mutex->unlock()
#else
#define LOCK_MUTEX()
#define UNLOCK_MUTEX()
#endif
 
/*macros for warning messages*/
#ifdef _TTY_NOWARN_PORT_
#define TTY_PORTABILITY_WARNING(s)
#else
#define TTY_PORTABILITY_WARNING(s) qWarning(s)
#endif
#ifdef _TTY_NOWARN_
#define TTY_WARNING(s)
#else
#define TTY_WARNING(s) qWarning(s)
#endif
 
 
/*line status constants*/
#define LS_CTS 0x01
#define LS_DSR 0x02
#define LS_DCD 0x04
#define LS_RI 0x08
#define LS_RTS 0x10
#define LS_DTR 0x20
#define LS_ST 0x40
#define LS_SR 0x80
 
/*error constants*/
#define E_NO_ERROR 0
#define E_INVALID_FD 1
#define E_NO_MEMORY 2
#define E_CAUGHT_NON_BLOCKED_SIGNAL 3
#define E_PORT_TIMEOUT 4
#define E_INVALID_DEVICE 5
#define E_BREAK_CONDITION 6
#define E_FRAMING_ERROR 7
#define E_IO_ERROR 8
#define E_BUFFER_OVERRUN 9
#define E_RECEIVE_OVERFLOW 10
#define E_RECEIVE_PARITY_ERROR 11
#define E_TRANSMIT_OVERFLOW 12
#define E_READ_FAILED 13
#define E_WRITE_FAILED 14
 
/*enums for port settings*/
enum NamingConvention {
WIN_NAMES,
IRIX_NAMES,
HPUX_NAMES,
SUN_NAMES,
DIGITAL_NAMES,
FREEBSD_NAMES,
LINUX_NAMES
};
 
enum BaudRateType {
BAUD50, //POSIX ONLY
BAUD75, //POSIX ONLY
BAUD110,
BAUD134, //POSIX ONLY
BAUD150, //POSIX ONLY
BAUD200, //POSIX ONLY
BAUD300,
BAUD600,
BAUD1200,
BAUD1800, //POSIX ONLY
BAUD2400,
BAUD4800,
BAUD9600,
BAUD14400, //WINDOWS ONLY
BAUD19200,
BAUD38400,
BAUD56000, //WINDOWS ONLY
BAUD57600,
BAUD76800, //POSIX ONLY
BAUD115200,
BAUD128000, //WINDOWS ONLY
BAUD256000 //WINDOWS ONLY
};
 
enum DataBitsType {
DATA_5,
DATA_6,
DATA_7,
DATA_8
};
 
enum ParityType {
PAR_NONE,
PAR_ODD,
PAR_EVEN,
PAR_MARK, //WINDOWS ONLY
PAR_SPACE
};
 
enum StopBitsType {
STOP_1,
STOP_1_5, //WINDOWS ONLY
STOP_2
};
 
enum FlowType {
FLOW_OFF,
FLOW_HARDWARE,
FLOW_XONXOFF
};
 
/*structure to contain port settings*/
struct PortSettings {
BaudRateType BaudRate;
DataBitsType DataBits;
ParityType Parity;
StopBitsType StopBits;
FlowType FlowControl;
ulong Timeout_Sec;
ulong Timeout_Millisec;
};
 
class QextSerialBase : public QIODevice {
public:
QextSerialBase();
QextSerialBase(const QString & name);
virtual ~QextSerialBase();
virtual void construct();
virtual void setPortName(const QString & name);
virtual QString portName() const;
 
virtual void setBaudRate(BaudRateType)=0;
virtual BaudRateType baudRate() const;
virtual void setDataBits(DataBitsType)=0;
virtual DataBitsType dataBits() const;
virtual void setParity(ParityType)=0;
virtual ParityType parity() const;
virtual void setStopBits(StopBitsType)=0;
virtual StopBitsType stopBits() const;
virtual void setFlowControl(FlowType)=0;
virtual FlowType flowControl() const;
virtual void setTimeout(ulong, ulong)=0;
 
virtual bool open(OpenMode mode=0)=0;
virtual bool isSequential() const;
virtual void close()=0;
virtual void flush()=0;
 
virtual qint64 size() const=0;
virtual qint64 bytesAvailable()=0;
virtual bool atEnd() const;
 
virtual void ungetChar(char c)=0;
virtual qint64 readLine(char * data, qint64 maxSize);
 
virtual ulong lastError() const;
virtual void translateError(ulong error)=0;
 
virtual void setDtr(bool set=true)=0;
virtual void setRts(bool set=true)=0;
virtual ulong lineStatus()=0;
 
protected:
QString port;
PortSettings Settings;
ulong lastErr;
 
#ifdef QT_THREAD_SUPPORT
static QMutex* mutex;
static ulong refCount;
#endif
 
virtual qint64 readData(char * data, qint64 maxSize)=0;
virtual qint64 writeData(const char * data, qint64 maxSize)=0;
 
};
 
#endif
/QMK-Groundstation/branches/waypoint/SerialPort/qextserialport.cpp
0,0 → 1,98
 
/*!
\class QextSerialPort
\version 1.0.0
\author Stefan Sander
 
A cross-platform serial port class.
This class encapsulates a serial port on both POSIX and Windows systems. The user will be
notified of errors and possible portability conflicts at run-time by default - this behavior can
be turned off by defining _TTY_NOWARN_ (to turn off all warnings) or _TTY_NOWARN_PORT_ (to turn
off portability warnings) in the project.
 
\note
On Windows NT/2000/XP this class uses Win32 serial port functions by default. The user may
select POSIX behavior under NT, 2000, or XP ONLY by defining _TTY_POSIX_ in the project. I can
make no guarantees as to the quality of POSIX support under NT/2000 however.
 
*/
 
#include <stdio.h>
#include "qextserialport.h"
 
/*!
\fn QextSerialPort::QextSerialPort()
Default constructor. Note that the naming convention used by a QextSerialPort constructed with
this constructor will be determined by #defined constants, or lack thereof - the default behavior
is the same as _TTY_LINUX_. Possible naming conventions and their associated constants are:
 
\verbatim
 
Constant Used By Naming Convention
---------- ------------- ------------------------
_TTY_WIN_ Windows COM1, COM2
_TTY_IRIX_ SGI/IRIX /dev/ttyf1, /dev/ttyf2
_TTY_HPUX_ HP-UX /dev/tty1p0, /dev/tty2p0
_TTY_SUN_ SunOS/Solaris /dev/ttya, /dev/ttyb
_TTY_DIGITAL_ Digital UNIX /dev/tty01, /dev/tty02
_TTY_FREEBSD_ FreeBSD /dev/ttyd0, /dev/ttyd1
_TTY_LINUX_ Linux /dev/ttyS0, /dev/ttyS1
<none> Linux /dev/ttyS0, /dev/ttyS1
\endverbatim
 
The object will be associated with the first port in the system, e.g. COM1 on Windows systems.
See the other constructors if you need to use a port other than the first.
*/
QextSerialPort::QextSerialPort()
: QextBaseType()
{}
 
/*!
\fn QextSerialPort::QextSerialPort(const QString & name)
Constructs a serial port attached to the port specified by name.
name is the name of the device, which is windowsystem-specific,
e.g."COM1" or "/dev/ttyS0".
*/
QextSerialPort::QextSerialPort(const QString & name)
: QextBaseType(name)
{}
 
/*!
\fn QextSerialPort::QextSerialPort(PortSettings const& settings)
Constructs a port with default name and settings specified by the settings parameter.
*/
QextSerialPort::QextSerialPort(PortSettings const& settings)
: QextBaseType(settings)
{}
 
/*!
\fn QextSerialPort::QextSerialPort(const QString & name, PortSettings const& settings)
Constructs a port with the name and settings specified.
*/
QextSerialPort::QextSerialPort(const QString & name, PortSettings const& settings)
: QextBaseType(name, settings)
{}
 
/*!
\fn QextSerialPort::QextSerialPort(const QextSerialPort& s)
Copy constructor.
*/
QextSerialPort::QextSerialPort(const QextSerialPort& s)
: QextBaseType(s)
{}
 
/*!
\fn QextSerialPort& QextSerialPort::operator=(const QextSerialPort& s)
Overrides the = operator.
*/
QextSerialPort& QextSerialPort::operator=(const QextSerialPort& s)
{
return (QextSerialPort&)QextBaseType::operator=(s);
}
 
/*!
\fn QextSerialPort::~QextSerialPort()
Standard destructor.
*/
QextSerialPort::~QextSerialPort()
{}
/QMK-Groundstation/branches/waypoint/SerialPort/qextserialport.h
0,0 → 1,27
 
#ifndef _QEXTSERIALPORT_H_
#define _QEXTSERIALPORT_H_
 
/*POSIX CODE*/
#ifdef _TTY_POSIX_
#include "posix_qextserialport.h"
#define QextBaseType Posix_QextSerialPort
 
/*MS WINDOWS CODE*/
#else
#include "win_qextserialport.h"
#define QextBaseType Win_QextSerialPort
#endif
 
class QextSerialPort: public QextBaseType {
public:
QextSerialPort();
QextSerialPort(const QString & name);
QextSerialPort(PortSettings const& s);
QextSerialPort(const QString & name, PortSettings const& s);
QextSerialPort(const QextSerialPort& s);
QextSerialPort& operator=(const QextSerialPort&);
virtual ~QextSerialPort();
};
 
#endif
/QMK-Groundstation/branches/waypoint/SerialPort/win_qextserialport.cpp
0,0 → 1,877
/*!
\class Win_QextSerialPort
\version 1.0.0
\author Stefan Sander
 
A cross-platform serial port class.
This class encapsulates the Windows portion of QextSerialPort. The user will be notified of
errors and possible portability conflicts at run-time by default - this behavior can be turned
off by defining _TTY_NOWARN_ (to turn off all warnings) or _TTY_NOWARN_PORT_ (to turn off
portability warnings) in the project. Note that defining _TTY_NOWARN_ also defines
_TTY_NOWARN_PORT_.
 
\note
On Windows NT/2000/XP this class uses Win32 serial port functions by default. The user may
select POSIX behavior under NT, 2000, or XP ONLY by defining _TTY_POSIX_ in the project. I can
make no guarantees as to the quality of POSIX support under NT/2000 however.
 
*/
 
#include <stdio.h>
#include "win_qextserialport.h"
 
/*!
\fn Win_QextSerialPort::Win_QextSerialPort()
Default constructor. Note that the name of the device used by a Win_QextSerialPort constructed
with this constructor will be determined by #defined constants, or lack thereof - the default
behavior is the same as _TTY_LINUX_. Possible naming conventions and their associated constants
are:
 
\verbatim
 
Constant Used By Naming Convention
---------- ------------- ------------------------
_TTY_WIN_ Windows COM1, COM2
_TTY_IRIX_ SGI/IRIX /dev/ttyf1, /dev/ttyf2
_TTY_HPUX_ HP-UX /dev/tty1p0, /dev/tty2p0
_TTY_SUN_ SunOS/Solaris /dev/ttya, /dev/ttyb
_TTY_DIGITAL_ Digital UNIX /dev/tty01, /dev/tty02
_TTY_FREEBSD_ FreeBSD /dev/ttyd0, /dev/ttyd1
_TTY_LINUX_ Linux /dev/ttyS0, /dev/ttyS1
<none> Linux /dev/ttyS0, /dev/ttyS1
\endverbatim
 
This constructor associates the object with the first port on the system, e.g. COM1 for Windows
platforms. See the other constructor if you need a port other than the first.
*/
Win_QextSerialPort::Win_QextSerialPort():QextSerialBase() {
Win_Handle=INVALID_HANDLE_VALUE;
}
 
/*!Win_QextSerialPort::Win_QextSerialPort(const Win_QextSerialPort&)
Copy constructor.
*/
Win_QextSerialPort::Win_QextSerialPort(const Win_QextSerialPort& s):QextSerialBase(s.port) {
Win_Handle=INVALID_HANDLE_VALUE;
setOpenMode(s.openMode());
lastErr=s.lastErr;
port = s.port;
Settings.FlowControl=s.Settings.FlowControl;
Settings.Parity=s.Settings.Parity;
Settings.DataBits=s.Settings.DataBits;
Settings.StopBits=s.Settings.StopBits;
Settings.BaudRate=s.Settings.BaudRate;
Win_Handle=s.Win_Handle;
memcpy(&Win_CommConfig, &s.Win_CommConfig, sizeof(COMMCONFIG));
memcpy(&Win_CommTimeouts, &s.Win_CommTimeouts, sizeof(COMMTIMEOUTS));
}
 
/*!
\fn Win_QextSerialPort::Win_QextSerialPort(const QString & name)
Constructs a serial port attached to the port specified by devName.
devName is the name of the device, which is windowsystem-specific,
e.g."COM2" or "/dev/ttyS0".
*/
Win_QextSerialPort::Win_QextSerialPort(const QString & name):QextSerialBase(name) {
Win_Handle=INVALID_HANDLE_VALUE;
}
 
/*!
\fn Win_QextSerialPort::Win_QextSerialPort(const PortSettings& settings)
Constructs a port with default name and specified settings.
*/
Win_QextSerialPort::Win_QextSerialPort(const PortSettings& settings) {
Win_Handle=INVALID_HANDLE_VALUE;
setBaudRate(settings.BaudRate);
setDataBits(settings.DataBits);
setStopBits(settings.StopBits);
setParity(settings.Parity);
setFlowControl(settings.FlowControl);
setTimeout(settings.Timeout_Sec, settings.Timeout_Millisec);
}
 
/*!
\fn Win_QextSerialPort::Win_QextSerialPort(const QString & name, const PortSettings& settings)
Constructs a port with specified name and settings.
*/
Win_QextSerialPort::Win_QextSerialPort(const QString & name, const PortSettings& settings) {
Win_Handle=INVALID_HANDLE_VALUE;
setPortName(name);
setBaudRate(settings.BaudRate);
setDataBits(settings.DataBits);
setStopBits(settings.StopBits);
setParity(settings.Parity);
setFlowControl(settings.FlowControl);
setTimeout(settings.Timeout_Sec, settings.Timeout_Millisec);
}
 
/*!
\fn Win_QextSerialPort::~Win_QextSerialPort()
Standard destructor.
*/
Win_QextSerialPort::~Win_QextSerialPort() {
if (isOpen()) {
close();
}
}
 
/*!
\fn Win_QextSerialPort& Win_QextSerialPort::operator=(const Win_QextSerialPort& s)
overrides the = operator
*/
Win_QextSerialPort& Win_QextSerialPort::operator=(const Win_QextSerialPort& s) {
setOpenMode(s.openMode());
lastErr=s.lastErr;
port = s.port;
Settings.FlowControl=s.Settings.FlowControl;
Settings.Parity=s.Settings.Parity;
Settings.DataBits=s.Settings.DataBits;
Settings.StopBits=s.Settings.StopBits;
Settings.BaudRate=s.Settings.BaudRate;
Win_Handle=s.Win_Handle;
memcpy(&Win_CommConfig, &s.Win_CommConfig, sizeof(COMMCONFIG));
memcpy(&Win_CommTimeouts, &s.Win_CommTimeouts, sizeof(COMMTIMEOUTS));
return *this;
}
 
/*!
\fn bool Win_QextSerialPort::open(OpenMode mode)
Opens a serial port. Note that this function does not specify which device to open. If you need
to open a device by name, see Win_QextSerialPort::open(const char*). This function has no effect
if the port associated with the class is already open. The port is also configured to the current
settings, as stored in the Settings structure.
*/
bool Win_QextSerialPort::open(OpenMode mode) {
unsigned long confSize = sizeof(COMMCONFIG);
Win_CommConfig.dwSize = confSize;
LOCK_MUTEX();
if (mode == QIODevice::NotOpen)
return isOpen();
if (!isOpen()) {
/*open the port*/
Win_Handle=CreateFileA(port.toAscii(), GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
if (Win_Handle!=INVALID_HANDLE_VALUE) {
/*set open mode*/
QIODevice::open(mode);
/*configure port settings*/
GetCommConfig(Win_Handle, &Win_CommConfig, &confSize);
GetCommState(Win_Handle, &(Win_CommConfig.dcb));
/*set up parameters*/
Win_CommConfig.dcb.fBinary=TRUE;
Win_CommConfig.dcb.fInX=FALSE;
Win_CommConfig.dcb.fOutX=FALSE;
Win_CommConfig.dcb.fAbortOnError=FALSE;
Win_CommConfig.dcb.fNull=FALSE;
setBaudRate(Settings.BaudRate);
setDataBits(Settings.DataBits);
setStopBits(Settings.StopBits);
setParity(Settings.Parity);
setFlowControl(Settings.FlowControl);
setTimeout(Settings.Timeout_Sec, Settings.Timeout_Millisec);
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
}
}
UNLOCK_MUTEX();
return isOpen();
}
 
/*!
\fn void Win_QextSerialPort::close()
Closes a serial port. This function has no effect if the serial port associated with the class
is not currently open.
*/
void Win_QextSerialPort::close() {
LOCK_MUTEX();
CloseHandle(Win_Handle);
QIODevice::close();
UNLOCK_MUTEX();
}
 
/*!
\fn void Win_QextSerialPort::flush()
Flushes all pending I/O to the serial port. This function has no effect if the serial port
associated with the class is not currently open.
*/
void Win_QextSerialPort::flush() {
LOCK_MUTEX();
if (isOpen()) {
FlushFileBuffers(Win_Handle);
}
UNLOCK_MUTEX();
}
 
/*!
\fn qint64 Win_QextSerialPort::size() const
This function will return the number of bytes waiting in the receive queue of the serial port.
It is included primarily to provide a complete QIODevice interface, and will not record errors
in the lastErr member (because it is const). This function is also not thread-safe - in
multithreading situations, use Win_QextSerialPort::bytesAvailable() instead.
*/
qint64 Win_QextSerialPort::size() const {
int availBytes;
COMSTAT Win_ComStat;
DWORD Win_ErrorMask=0;
ClearCommError(Win_Handle, &Win_ErrorMask, &Win_ComStat);
availBytes = Win_ComStat.cbInQue;
return (qint64)availBytes;
}
 
/*!
\fn qint64 Win_QextSerialPort::bytesAvailable()
Returns the number of bytes waiting in the port's receive queue. This function will return 0 if
the port is not currently open, or -1 on error. Error information can be retrieved by calling
Win_QextSerialPort::getLastError().
*/
qint64 Win_QextSerialPort::bytesAvailable() {
LOCK_MUTEX();
if (isOpen()) {
DWORD Errors;
COMSTAT Status;
bool success=ClearCommError(Win_Handle, &Errors, &Status);
translateError(Errors);
if (success) {
lastErr=E_NO_ERROR;
UNLOCK_MUTEX();
return Status.cbInQue + QIODevice::bytesAvailable();
}
UNLOCK_MUTEX();
return (unsigned int)-1;
}
UNLOCK_MUTEX();
return 0;
}
 
/*!
\fn void Win_QextSerialPort::translateError(ulong error)
Translates a system-specific error code to a QextSerialPort error code. Used internally.
*/
void Win_QextSerialPort::translateError(ulong error) {
if (error&CE_BREAK) {
lastErr=E_BREAK_CONDITION;
}
else if (error&CE_FRAME) {
lastErr=E_FRAMING_ERROR;
}
else if (error&CE_IOE) {
lastErr=E_IO_ERROR;
}
else if (error&CE_MODE) {
lastErr=E_INVALID_FD;
}
else if (error&CE_OVERRUN) {
lastErr=E_BUFFER_OVERRUN;
}
else if (error&CE_RXPARITY) {
lastErr=E_RECEIVE_PARITY_ERROR;
}
else if (error&CE_RXOVER) {
lastErr=E_RECEIVE_OVERFLOW;
}
else if (error&CE_TXFULL) {
lastErr=E_TRANSMIT_OVERFLOW;
}
}
 
/*!
\fn qint64 Win_QextSerialPort::readData(char *data, qint64 maxSize)
Reads a block of data from the serial port. This function will read at most maxlen bytes from
the serial port and place them in the buffer pointed to by data. Return value is the number of
bytes actually read, or -1 on error.
 
\warning before calling this function ensure that serial port associated with this class
is currently open (use isOpen() function to check if port is open).
*/
qint64 Win_QextSerialPort::readData(char *data, qint64 maxSize)
{
LOCK_MUTEX();
int retVal=0;
COMSTAT Win_ComStat;
DWORD Win_BytesRead=0;
DWORD Win_ErrorMask=0;
ClearCommError(Win_Handle, &Win_ErrorMask, &Win_ComStat);
if (Win_ComStat.cbInQue &&
(!ReadFile(Win_Handle, (void*)data, (DWORD)maxSize, &Win_BytesRead, NULL)
|| Win_BytesRead==0)) {
lastErr=E_READ_FAILED;
retVal=-1;
}
else {
retVal=((int)Win_BytesRead);
}
UNLOCK_MUTEX();
return retVal;
}
 
/*!
\fn qint64 Win_QextSerialPort::writeData(const char *data, qint64 maxSize)
Writes a block of data to the serial port. This function will write len bytes
from the buffer pointed to by data to the serial port. Return value is the number
of bytes actually written, or -1 on error.
 
\warning before calling this function ensure that serial port associated with this class
is currently open (use isOpen() function to check if port is open).
*/
qint64 Win_QextSerialPort::writeData(const char *data, qint64 maxSize)
{
LOCK_MUTEX();
int retVal=0;
DWORD Win_BytesWritten;
if (!WriteFile(Win_Handle, (void*)data, (DWORD)maxSize, &Win_BytesWritten, NULL)) {
lastErr=E_WRITE_FAILED;
retVal=-1;
}
else {
retVal=((int)Win_BytesWritten);
}
UNLOCK_MUTEX();
flush();
return retVal;
}
 
/*!
\fn void Win_QextSerialPort::ungetChar(char c)
This function is included to implement the full QIODevice interface, and currently has no
purpose within this class. This function is meaningless on an unbuffered device and currently
only prints a warning message to that effect.
*/
void Win_QextSerialPort::ungetChar(char c) {
/*meaningless on unbuffered sequential device - return error and print a warning*/
TTY_WARNING("Win_QextSerialPort: ungetChar() called on an unbuffered sequential device - operation is meaningless");
}
 
/*!
\fn void Win_QextSerialPort::setFlowControl(FlowType flow)
Sets the flow control used by the port. Possible values of flow are:
\verbatim
FLOW_OFF No flow control
FLOW_HARDWARE Hardware (RTS/CTS) flow control
FLOW_XONXOFF Software (XON/XOFF) flow control
\endverbatim
*/
void Win_QextSerialPort::setFlowControl(FlowType flow) {
LOCK_MUTEX();
if (Settings.FlowControl!=flow) {
Settings.FlowControl=flow;
}
if (isOpen()) {
switch(flow) {
/*no flow control*/
case FLOW_OFF:
Win_CommConfig.dcb.fOutxCtsFlow=FALSE;
Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_DISABLE;
Win_CommConfig.dcb.fInX=FALSE;
Win_CommConfig.dcb.fOutX=FALSE;
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
break;
/*software (XON/XOFF) flow control*/
case FLOW_XONXOFF:
Win_CommConfig.dcb.fOutxCtsFlow=FALSE;
Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_DISABLE;
Win_CommConfig.dcb.fInX=TRUE;
Win_CommConfig.dcb.fOutX=TRUE;
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
break;
case FLOW_HARDWARE:
Win_CommConfig.dcb.fOutxCtsFlow=TRUE;
Win_CommConfig.dcb.fRtsControl=RTS_CONTROL_HANDSHAKE;
Win_CommConfig.dcb.fInX=FALSE;
Win_CommConfig.dcb.fOutX=FALSE;
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
break;
}
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Win_QextSerialPort::setParity(ParityType parity)
Sets the parity associated with the serial port. The possible values of parity are:
\verbatim
PAR_SPACE Space Parity
PAR_MARK Mark Parity
PAR_NONE No Parity
PAR_EVEN Even Parity
PAR_ODD Odd Parity
\endverbatim
*/
void Win_QextSerialPort::setParity(ParityType parity) {
LOCK_MUTEX();
if (Settings.Parity!=parity) {
Settings.Parity=parity;
}
if (isOpen()) {
Win_CommConfig.dcb.Parity=(unsigned char)parity;
switch (parity) {
/*space parity*/
case PAR_SPACE:
if (Settings.DataBits==DATA_8) {
TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: Space parity with 8 data bits is not supported by POSIX systems.");
}
Win_CommConfig.dcb.fParity=TRUE;
break;
/*mark parity - WINDOWS ONLY*/
case PAR_MARK:
TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: Mark parity is not supported by POSIX systems");
Win_CommConfig.dcb.fParity=TRUE;
break;
/*no parity*/
case PAR_NONE:
Win_CommConfig.dcb.fParity=FALSE;
break;
/*even parity*/
case PAR_EVEN:
Win_CommConfig.dcb.fParity=TRUE;
break;
/*odd parity*/
case PAR_ODD:
Win_CommConfig.dcb.fParity=TRUE;
break;
}
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Win_QextSerialPort::setDataBits(DataBitsType dataBits)
Sets the number of data bits used by the serial port. Possible values of dataBits are:
\verbatim
DATA_5 5 data bits
DATA_6 6 data bits
DATA_7 7 data bits
DATA_8 8 data bits
\endverbatim
 
\note
This function is subject to the following restrictions:
\par
5 data bits cannot be used with 2 stop bits.
\par
1.5 stop bits can only be used with 5 data bits.
\par
8 data bits cannot be used with space parity on POSIX systems.
 
*/
void Win_QextSerialPort::setDataBits(DataBitsType dataBits) {
LOCK_MUTEX();
if (Settings.DataBits!=dataBits) {
if ((Settings.StopBits==STOP_2 && dataBits==DATA_5) ||
(Settings.StopBits==STOP_1_5 && dataBits!=DATA_5)) {
}
else {
Settings.DataBits=dataBits;
}
}
if (isOpen()) {
switch(dataBits) {
/*5 data bits*/
case DATA_5:
if (Settings.StopBits==STOP_2) {
TTY_WARNING("Win_QextSerialPort: 5 Data bits cannot be used with 2 stop bits.");
}
else {
Win_CommConfig.dcb.ByteSize=5;
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
}
break;
/*6 data bits*/
case DATA_6:
if (Settings.StopBits==STOP_1_5) {
TTY_WARNING("Win_QextSerialPort: 6 Data bits cannot be used with 1.5 stop bits.");
}
else {
Win_CommConfig.dcb.ByteSize=6;
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
}
break;
/*7 data bits*/
case DATA_7:
if (Settings.StopBits==STOP_1_5) {
TTY_WARNING("Win_QextSerialPort: 7 Data bits cannot be used with 1.5 stop bits.");
}
else {
Win_CommConfig.dcb.ByteSize=7;
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
}
break;
/*8 data bits*/
case DATA_8:
if (Settings.StopBits==STOP_1_5) {
TTY_WARNING("Win_QextSerialPort: 8 Data bits cannot be used with 1.5 stop bits.");
}
else {
Win_CommConfig.dcb.ByteSize=8;
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
}
break;
}
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Win_QextSerialPort::setStopBits(StopBitsType stopBits)
Sets the number of stop bits used by the serial port. Possible values of stopBits are:
\verbatim
STOP_1 1 stop bit
STOP_1_5 1.5 stop bits
STOP_2 2 stop bits
\endverbatim
 
\note
This function is subject to the following restrictions:
\par
2 stop bits cannot be used with 5 data bits.
\par
1.5 stop bits cannot be used with 6 or more data bits.
\par
POSIX does not support 1.5 stop bits.
*/
void Win_QextSerialPort::setStopBits(StopBitsType stopBits) {
LOCK_MUTEX();
if (Settings.StopBits!=stopBits) {
if ((Settings.DataBits==DATA_5 && stopBits==STOP_2) ||
(stopBits==STOP_1_5 && Settings.DataBits!=DATA_5)) {
}
else {
Settings.StopBits=stopBits;
}
}
if (isOpen()) {
switch (stopBits) {
/*one stop bit*/
case STOP_1:
Win_CommConfig.dcb.StopBits=ONESTOPBIT;
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
break;
/*1.5 stop bits*/
case STOP_1_5:
TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: 1.5 stop bit operation is not supported by POSIX.");
if (Settings.DataBits!=DATA_5) {
TTY_WARNING("Win_QextSerialPort: 1.5 stop bits can only be used with 5 data bits");
}
else {
Win_CommConfig.dcb.StopBits=ONE5STOPBITS;
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
}
break;
/*two stop bits*/
case STOP_2:
if (Settings.DataBits==DATA_5) {
TTY_WARNING("Win_QextSerialPort: 2 stop bits cannot be used with 5 data bits");
}
else {
Win_CommConfig.dcb.StopBits=TWOSTOPBITS;
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
}
break;
}
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Win_QextSerialPort::setBaudRate(BaudRateType baudRate)
Sets the baud rate of the serial port. Note that not all rates are applicable on
all platforms. The following table shows translations of the various baud rate
constants on Windows(including NT/2000) and POSIX platforms. Speeds marked with an *
are speeds that are usable on both Windows and POSIX.
\verbatim
 
RATE Windows Speed POSIX Speed
----------- ------------- -----------
BAUD50 110 50
BAUD75 110 75
*BAUD110 110 110
BAUD134 110 134.5
BAUD150 110 150
BAUD200 110 200
*BAUD300 300 300
*BAUD600 600 600
*BAUD1200 1200 1200
BAUD1800 1200 1800
*BAUD2400 2400 2400
*BAUD4800 4800 4800
*BAUD9600 9600 9600
BAUD14400 14400 9600
*BAUD19200 19200 19200
*BAUD38400 38400 38400
BAUD56000 56000 38400
*BAUD57600 57600 57600
BAUD76800 57600 76800
*BAUD115200 115200 115200
BAUD128000 128000 115200
BAUD256000 256000 115200
\endverbatim
*/
void Win_QextSerialPort::setBaudRate(BaudRateType baudRate) {
LOCK_MUTEX();
if (Settings.BaudRate!=baudRate) {
switch (baudRate) {
case BAUD50:
case BAUD75:
case BAUD134:
case BAUD150:
case BAUD200:
Settings.BaudRate=BAUD110;
break;
case BAUD1800:
Settings.BaudRate=BAUD1200;
break;
case BAUD76800:
Settings.BaudRate=BAUD57600;
break;
default:
Settings.BaudRate=baudRate;
break;
}
}
if (isOpen()) {
switch (baudRate) {
/*50 baud*/
case BAUD50:
TTY_WARNING("Win_QextSerialPort: Windows does not support 50 baud operation. Switching to 110 baud.");
Win_CommConfig.dcb.BaudRate=CBR_110;
break;
/*75 baud*/
case BAUD75:
TTY_WARNING("Win_QextSerialPort: Windows does not support 75 baud operation. Switching to 110 baud.");
Win_CommConfig.dcb.BaudRate=CBR_110;
break;
/*110 baud*/
case BAUD110:
Win_CommConfig.dcb.BaudRate=CBR_110;
break;
/*134.5 baud*/
case BAUD134:
TTY_WARNING("Win_QextSerialPort: Windows does not support 134.5 baud operation. Switching to 110 baud.");
Win_CommConfig.dcb.BaudRate=CBR_110;
break;
/*150 baud*/
case BAUD150:
TTY_WARNING("Win_QextSerialPort: Windows does not support 150 baud operation. Switching to 110 baud.");
Win_CommConfig.dcb.BaudRate=CBR_110;
break;
/*200 baud*/
case BAUD200:
TTY_WARNING("Win_QextSerialPort: Windows does not support 200 baud operation. Switching to 110 baud.");
Win_CommConfig.dcb.BaudRate=CBR_110;
break;
/*300 baud*/
case BAUD300:
Win_CommConfig.dcb.BaudRate=CBR_300;
break;
/*600 baud*/
case BAUD600:
Win_CommConfig.dcb.BaudRate=CBR_600;
break;
/*1200 baud*/
case BAUD1200:
Win_CommConfig.dcb.BaudRate=CBR_1200;
break;
/*1800 baud*/
case BAUD1800:
TTY_WARNING("Win_QextSerialPort: Windows does not support 1800 baud operation. Switching to 1200 baud.");
Win_CommConfig.dcb.BaudRate=CBR_1200;
break;
/*2400 baud*/
case BAUD2400:
Win_CommConfig.dcb.BaudRate=CBR_2400;
break;
/*4800 baud*/
case BAUD4800:
Win_CommConfig.dcb.BaudRate=CBR_4800;
break;
/*9600 baud*/
case BAUD9600:
Win_CommConfig.dcb.BaudRate=CBR_9600;
break;
/*14400 baud*/
case BAUD14400:
TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 14400 baud operation.");
Win_CommConfig.dcb.BaudRate=CBR_14400;
break;
/*19200 baud*/
case BAUD19200:
Win_CommConfig.dcb.BaudRate=CBR_19200;
break;
/*38400 baud*/
case BAUD38400:
Win_CommConfig.dcb.BaudRate=CBR_38400;
break;
/*56000 baud*/
case BAUD56000:
TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 56000 baud operation.");
Win_CommConfig.dcb.BaudRate=CBR_56000;
break;
/*57600 baud*/
case BAUD57600:
Win_CommConfig.dcb.BaudRate=CBR_57600;
break;
/*76800 baud*/
case BAUD76800:
TTY_WARNING("Win_QextSerialPort: Windows does not support 76800 baud operation. Switching to 57600 baud.");
Win_CommConfig.dcb.BaudRate=CBR_57600;
break;
/*115200 baud*/
case BAUD115200:
Win_CommConfig.dcb.BaudRate=CBR_115200;
break;
/*128000 baud*/
case BAUD128000:
TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 128000 baud operation.");
Win_CommConfig.dcb.BaudRate=CBR_128000;
break;
/*256000 baud*/
case BAUD256000:
TTY_PORTABILITY_WARNING("Win_QextSerialPort Portability Warning: POSIX does not support 256000 baud operation.");
Win_CommConfig.dcb.BaudRate=CBR_256000;
break;
}
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Win_QextSerialPort::setDtr(bool set)
Sets DTR line to the requested state (high by default). This function will have no effect if
the port associated with the class is not currently open.
*/
void Win_QextSerialPort::setDtr(bool set) {
LOCK_MUTEX();
if (isOpen()) {
if (set) {
EscapeCommFunction(Win_Handle, SETDTR);
}
else {
EscapeCommFunction(Win_Handle, CLRDTR);
}
}
UNLOCK_MUTEX();
}
 
/*!
\fn void Win_QextSerialPort::setRts(bool set)
Sets RTS line to the requested state (high by default). This function will have no effect if
the port associated with the class is not currently open.
*/
void Win_QextSerialPort::setRts(bool set) {
LOCK_MUTEX();
if (isOpen()) {
if (set) {
EscapeCommFunction(Win_Handle, SETRTS);
}
else {
EscapeCommFunction(Win_Handle, CLRRTS);
}
}
UNLOCK_MUTEX();
}
 
/*!
\fn ulong Win_QextSerialPort::lineStatus(void)
returns the line status as stored by the port function. This function will retrieve the states
of the following lines: DCD, CTS, DSR, and RI. On POSIX systems, the following additional lines
can be monitored: DTR, RTS, Secondary TXD, and Secondary RXD. The value returned is an unsigned
long with specific bits indicating which lines are high. The following constants should be used
to examine the states of individual lines:
 
\verbatim
Mask Line
------ ----
LS_CTS CTS
LS_DSR DSR
LS_DCD DCD
LS_RI RI
\endverbatim
 
This function will return 0 if the port associated with the class is not currently open.
*/
ulong Win_QextSerialPort::lineStatus(void) {
unsigned long Status=0, Temp=0;
LOCK_MUTEX();
if (isOpen()) {
GetCommModemStatus(Win_Handle, &Temp);
if (Temp&MS_CTS_ON) {
Status|=LS_CTS;
}
if (Temp&MS_DSR_ON) {
Status|=LS_DSR;
}
if (Temp&MS_RING_ON) {
Status|=LS_RI;
}
if (Temp&MS_RLSD_ON) {
Status|=LS_DCD;
}
}
UNLOCK_MUTEX();
return Status;
}
 
/*!
\fn void Win_QextSerialPort::setTimeout(ulong sec, ulong millisec);
Sets the read and write timeouts for the port to sec seconds and millisec milliseconds.
*/
void Win_QextSerialPort::setTimeout(ulong sec, ulong millisec) {
LOCK_MUTEX();
Settings.Timeout_Sec=sec;
Settings.Timeout_Millisec=millisec;
if(isOpen()) {
Win_CommTimeouts.ReadIntervalTimeout = sec*1000+millisec;
Win_CommTimeouts.ReadTotalTimeoutMultiplier = sec*1000+millisec;
Win_CommTimeouts.ReadTotalTimeoutConstant = 0;
Win_CommTimeouts.WriteTotalTimeoutMultiplier = sec*1000+millisec;
Win_CommTimeouts.WriteTotalTimeoutConstant = 0;
SetCommTimeouts(Win_Handle, &Win_CommTimeouts);
}
UNLOCK_MUTEX();
}
/QMK-Groundstation/branches/waypoint/SerialPort/win_qextserialport.h
0,0 → 1,48
#ifndef _WIN_QEXTSERIALPORT_H_
#define _WIN_QEXTSERIALPORT_H_
 
#include "qextserialbase.h"
 
/*if all warning messages are turned off, flag portability warnings to be turned off as well*/
#ifdef _TTY_NOWARN_
#define _TTY_NOWARN_PORT_
#endif
 
#include <windows.h>
 
class Win_QextSerialPort:public QextSerialBase {
public:
Win_QextSerialPort();
Win_QextSerialPort(Win_QextSerialPort const& s);
Win_QextSerialPort(const QString & name);
Win_QextSerialPort(const PortSettings& settings);
Win_QextSerialPort(const QString & name, const PortSettings& settings);
Win_QextSerialPort& operator=(const Win_QextSerialPort& s);
virtual ~Win_QextSerialPort();
virtual bool open(OpenMode mode=0);
virtual void close();
virtual void flush();
virtual qint64 size() const;
virtual void ungetChar(char c);
virtual void setFlowControl(FlowType);
virtual void setParity(ParityType);
virtual void setDataBits(DataBitsType);
virtual void setStopBits(StopBitsType);
virtual void setBaudRate(BaudRateType);
virtual void setDtr(bool set=true);
virtual void setRts(bool set=true);
virtual ulong lineStatus(void);
virtual qint64 bytesAvailable();
virtual void translateError(ulong);
virtual void setTimeout(ulong, ulong);
protected:
HANDLE Win_Handle;
COMMCONFIG Win_CommConfig;
COMMTIMEOUTS Win_CommTimeouts;
virtual qint64 readData(char *data, qint64 maxSize);
virtual qint64 writeData(const char *data, qint64 maxSize);
};
 
#endif
/QMK-Groundstation/branches/waypoint/debian.pro
0,0 → 1,77
TEMPLATE = app
 
OBJECTS_DIR = build/.o_unix
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
DEFINES += _TTY_POSIX_
 
LIBS += -lqwt-qt4
INCLUDEPATH += $(HOME)/include /usr/include/qwt-qt4
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp
 
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
waypoint.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
/QMK-Groundstation/branches/waypoint/eeepc.pro
0,0 → 1,77
TEMPLATE = app
 
OBJECTS_DIR = build/.o_unix
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
DEFINES += _TTY_POSIX_ _EEEPC_
 
LIBS += -lqwt-qt4
INCLUDEPATH += $(HOME)/include /usr/include/qwt-qt4
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp
 
win32 : SOURCES += SerialPort/win_qextserialport.cpp
unix : SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
waypoint.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h
 
win32 : HEADERS += SerialPort/win_qextserialport.h
unix : HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
/QMK-Groundstation/branches/waypoint/gentoo.pro
0,0 → 1,77
TEMPLATE = app
 
OBJECTS_DIR = build/.o_unix
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
DEFINES += _TTY_POSIX_
 
LIBS += -lqwt
INCLUDEPATH += $(HOME)/include /usr/include/qwt5
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp
 
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
waypoint.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
/QMK-Groundstation/branches/waypoint/global.h
0,0 → 1,149
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef GLOBAL_H
#define GLOBAL_H
 
#include <QString>
#include <QSize>
#include <QPoint>
#include <QColor>
#include <QBitArray>
 
#include "Parameter_Positions.h"
 
#ifdef _WIN32_
static const QString OS_PORT = "COM1";
#else
static const QString OS_PORT = "/dev/ttyUSB0";
#endif
 
//#define _EEEPC_
 
#ifdef _EEEPC_
static const int MeterSize = 125;
#else
static const int MeterSize = 160;
#endif
 
// Version des Seriellen Protokoll
static const int VERSION_SERIAL_MAJOR = 10;
static const int VERSION_SERIAL_MINOR = 0;
 
// Basis-Addressen der verschiedenen Hardware
static const int ADDRESS_ALL = 0;
static const int ADDRESS_FC = 1;
static const int ADDRESS_NC = 2;
static const int ADDRESS_MK3MAG = 3;
 
static const int SETTINGS_ID = 2;
 
static const int SLEEP = 500000;
 
static const QString QA_NAME = "QMK-Groundstation";
static const QString QA_VERSION_NR = "0.7.0m";
 
#ifdef _BETA_
static const QString QA_VERSION = QA_VERSION_NR + " (BETA)";
static const QString QA_HWVERSION = "FlightCtrl v0.72f & NaviCtrl v0.13a";
#else
static const QString QA_VERSION = QA_VERSION_NR;
static const QString QA_HWVERSION = "FlightCtrl v0.71h & NaviCtrl v0.12i";
#endif
 
static const QString QA_DATE = "03.02.2009";
static const QString QA_YEAR = "2008-2009";
static const QString QA_AUTHOR = "Manuel Schrape";
static const QString QA_EMAIL = "manuel.schrape@gmx.de";
 
static const QString QA_ABOUT =
"<HTML>"
"<p><b><font size=8>" + QA_NAME + "</font></b></p>"
"<br />"
"Version " + QA_VERSION + " - " + QA_DATE + ""
"<br /><b>kompatibel zu " + QA_HWVERSION + "</b>"
"<br /><br />"
"(C) " + QA_YEAR + " by " + QA_AUTHOR + " - "
"<a href=\"mailto:" + QA_EMAIL + "\">" + QA_EMAIL + "</a> <br /><br />"
"Groundstation-Programm f&uuml;r den Mikrokopter zum <br>Parametrieren und Debug-Werte anzeigen, aufzeichnen & Visualisieren."
"<br /><br /> Dieses Programm wird unter den Bedingungen der GPL v2 ver&ouml;ffentlicht."
"</HTML>";
 
static const QString Def_AnalogNames[] = {"Integral Nick", "Integral Roll", "ACC Nick", "ACC Roll", "Gyro Gier", "Hoehen-Wert", "ACC Z", "GAS", "Kompass-Value", "Spannung", "Empfang", "Ersatzkompass", "Motor Vorne", "Motor Hinten", "Motor Links", "Motor Rechts", "Analog 16", "Distance", "OSD-Bar", "MK3Mag", "Servo", "Nick", "Roll", "Analog 23", "Analog 24", "Analog 25", "Analog 26", "Kalman Max", "Analog 28", "Kalman K", "GPS Nick", "GPS Roll"};
 
static const QRgb Def_Colors[] = {0x00FF0000, 0x0000FF00, 0x00FFFF00, 0x000000FF, 0x00FF00FF, 0x0000FFFF, 0x00FFFFFF, 0x00660000, 0x00006600, 0x00666600, 0x00000066, 0x00660066, 0x000066, 0x00666666, 0x00990000, 0x00009900, 0x00999900, 0x00000099, 0x00990099, 0x00009999, 0x00999999, 0x00CC0000, 0x0000CC00, 0x00CCCC00, 0x000000CC, 0x00CC00CC, 0x0000CCCC, 0x00CCCCCC, 0x0066FF99, 0x009966FF, 0x00FF9966, 0x0099FF66};
 
static const bool Def_Plot_Show[] = {1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0};
static const bool Def_Log[] = {1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0};
 
static const QString HardwareType[] = {"Default", "FlightCtrl", "NaviCtrl", "MK3Mag"};
 
static const int MaxTickerEvents = 5;
 
static const int MaxAnalog = 32;
static const int MaxPlot = 50000;
 
static const int MaxNaviPos = 2000;
 
struct sMode
{
int ID;
int VERSION_MAJOR;
int VERSION_MINOR;
int VERSION_PATCH;
int VERSION_SERIAL_MAJOR;
int VERSION_SERIAL_MINOR;
QString Hardware;
QString Version;
};
 
struct sRxData
{
char *Input;
QString String;
int Decode[150];
int DecLen;
};
 
struct sGPS_Pos
{
long Longitude;
long Latitude;
long Altitude;
};
 
struct sNaviData
{
sGPS_Pos Current;
sGPS_Pos Target;
sGPS_Pos Home;
 
 
long Longitude;
long Latitude;
long Altitude;
};
 
struct sNaviString
{
QString Longitude;
QString Latitude;
QString Altitude;
};
 
#endif
/QMK-Groundstation/branches/waypoint/main.cpp
0,0 → 1,38
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
 
 
#include <QApplication>
#include "Forms/mktool.h"
 
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
 
MKTool * mw = new MKTool();
 
mw->show();
 
int iRet = app.exec();
 
delete mw;
 
return iRet;
}
 
/QMK-Groundstation/branches/waypoint/osx.pro
0,0 → 1,77
TEMPLATE = app
 
OBJECTS_DIR = build/.o_mac
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
DEFINES += _TTY_POSIX_
 
LIBS += -L/opt/local/lib -lqwt
INCLUDEPATH += /opt/local/include
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp
 
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
waypoint.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
/QMK-Groundstation/branches/waypoint/suse.pro
0,0 → 1,77
TEMPLATE = app
 
OBJECTS_DIR = build/.o_unix
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
DEFINES += _TTY_POSIX_
 
LIBS += -lqwt
INCLUDEPATH += $(HOME)/include /usr/include/qwt
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp
 
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
waypoint.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
/QMK-Groundstation/branches/waypoint/win.pro
0,0 → 1,98
include( ../examples.pri )
 
QWT_ROOT = ../qwt-5.1.1
 
include( $${QWT_ROOT}/qwtconfig.pri )
 
SUFFIX_STR = $${RELEASE_SUFFIX}
 
INCLUDEPATH += $${QWT_ROOT}/src
DEPENDPATH += $${QWT_ROOT}/src
 
QWTLIB = qwt$${SUFFIX_STR}
 
contains(CONFIG, QwtDll)
{
DEFINES += QT_DLL QWT_DLL
QWTLIB = $${QWTLIB}$${VER_MAJ}
}
 
win32-msvc:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib
win32-msvc.net:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib
win32-msvc2005:LIBS += $${QWT_ROOT}/lib/$${QWTLIB}.lib
win32-g++:LIBS += -L$${QWT_ROOT}/lib -l$${QWTLIB}
 
TEMPLATE = app
 
OBJECTS_DIR = build/.o_win32
UI_DIR = build/.ui
MOC_DIR = build/.moc
RCC_DIR = build/.rcc
DESTDIR = build/bin
 
DEFINES += _TTY_WIN_ QWT_DLL QT_DLL _WIN32_
 
QT *= gui core network
 
CONFIG += warn_on thread qt
 
TARGET = QMK-Groundstation
 
RESOURCES += MKTool.qrc
 
SOURCES = \
main.cpp \
waypoint.h \
SerialPort/qextserialbase.cpp \
SerialPort/qextserialport.cpp \
SerialPort/ManageSerialPort.cpp \
Forms/mktool.cpp \
Forms/dlg_Config.cpp \
Forms/dlg_Motortest.cpp \
Forms/dlg_Preferences.cpp \
Forms/wdg_Settings.cpp \
Classes/cSettings.cpp \
Classes/cServer.cpp \
Classes/ToolBox.cpp \
Classes/cAttitude.cpp \
Classes/cSpeedMeter.cpp \
Classes/cQMK_Server.cpp \
Logger/Logger.cpp \
Logger/CSVLogger.cpp \
Forms/dlg_LCD.cpp
 
win32:SOURCES += SerialPort/win_qextserialport.cpp
unix:SOURCES += SerialPort/posix_qextserialport.cpp
 
HEADERS = \
global.h \
Parameter_Positions.h \
SerialPort/qextserialbase.h \
SerialPort/qextserialport.h \
SerialPort/ManageSerialPort.h \
Forms/mktool.h \
Forms/dlg_Config.h \
Forms/dlg_Motortest.h \
Forms/dlg_Preferences.h \
Forms/wdg_Settings.h \
Classes/cSettings.h \
Classes/cServer.h \
Classes/ToolBox.h \
Classes/cAttitude.h \
Classes/cSpeedMeter.h \
Classes/cQMK_Server.h \
Logger/Logger.h \
Logger/CSVLogger.h \
Logger/DefaultLogger.h \
Forms/dlg_LCD.h
 
win32:HEADERS += SerialPort/win_qextserialport.h
unix:HEADERS += SerialPort/posix_qextserialport.h
 
FORMS += \
Forms/mktool.ui \
Forms/dlg_Config.ui \
Forms/dlg_Preferences.ui \
Forms/dlg_Motortest.ui \
Forms/wdg_Settings.ui \
Forms/dlg_LCD.ui
/QMK-Groundstation/branches/waypoint/.
Property changes:
Added: svn:mergeinfo