Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
9b657f8e
Commit
9b657f8e
authored
Jul 14, 2011
by
LM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusted a large number of files to work with VS2008 compiler
parent
99d25403
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
150 additions
and
124 deletions
+150
-124
SerialLink.cc
src/comm/SerialLink.cc
+18
-3
point.cpp
src/libs/opmapcontrol/src/core/point.cpp
+2
-11
point.h
src/libs/opmapcontrol/src/core/point.h
+9
-3
urlfactory.cpp
src/libs/opmapcontrol/src/core/urlfactory.cpp
+1
-0
lks94projection.cpp
...pmapcontrol/src/internals/projections/lks94projection.cpp
+6
-5
mercatorprojection.cpp
...pcontrol/src/internals/projections/mercatorprojection.cpp
+1
-1
mercatorprojectionyandex.cpp
...ol/src/internals/projections/mercatorprojectionyandex.cpp
+2
-2
platecarreeprojection.cpp
...ntrol/src/internals/projections/platecarreeprojection.cpp
+1
-1
platecarreeprojectionpergo.cpp
.../src/internals/projections/platecarreeprojectionpergo.cpp
+1
-1
pureprojection.cpp
src/libs/opmapcontrol/src/internals/pureprojection.cpp
+6
-5
pureprojection.h
src/libs/opmapcontrol/src/internals/pureprojection.h
+1
-1
rectlatlng.h
src/libs/opmapcontrol/src/internals/rectlatlng.h
+8
-8
gpsitem.cpp
src/libs/opmapcontrol/src/mapwidget/gpsitem.cpp
+1
-1
uavitem.cpp
src/libs/opmapcontrol/src/mapwidget/uavitem.cpp
+1
-1
coordinateconversions.cpp
src/libs/utils/coordinateconversions.cpp
+1
-0
qtcolorbutton.cpp
src/libs/utils/qtcolorbutton.cpp
+1
-1
utils_external.pri
src/libs/utils/utils_external.pri
+80
-78
worldmagmodel.cpp
src/libs/utils/worldmagmodel.cpp
+1
-0
UAS.cc
src/uas/UAS.cc
+2
-0
UASManager.cc
src/uas/UASManager.cc
+2
-1
HSIDisplay.cc
src/ui/HSIDisplay.cc
+2
-0
SerialConfigurationWindow.cc
src/ui/SerialConfigurationWindow.cc
+1
-1
QGCMAVLinkTextEdit.cc
src/ui/mavlink/QGCMAVLinkTextEdit.cc
+2
-0
No files found.
src/comm/SerialLink.cc
View file @
9b657f8e
...
...
@@ -344,6 +344,7 @@ qint64 SerialLink::getNominalDataRate()
{
qint64
dataRate
=
0
;
switch
(
portSettings
.
baudRate
())
{
#ifndef Q_OS_WIN
case
QPortSettings
:
:
BAUDR_50
:
dataRate
=
50
;
break
;
...
...
@@ -362,6 +363,7 @@ qint64 SerialLink::getNominalDataRate()
case
QPortSettings
:
:
BAUDR_200
:
dataRate
=
200
;
break
;
#endif
case
QPortSettings
:
:
BAUDR_300
:
dataRate
=
300
;
break
;
...
...
@@ -371,9 +373,11 @@ qint64 SerialLink::getNominalDataRate()
case
QPortSettings
:
:
BAUDR_1200
:
dataRate
=
1200
;
break
;
#ifndef Q_OS_WIN
case
QPortSettings
:
:
BAUDR_1800
:
dataRate
=
1800
;
break
;
#endif
case
QPortSettings
:
:
BAUDR_2400
:
dataRate
=
2400
;
break
;
...
...
@@ -402,7 +406,7 @@ qint64 SerialLink::getNominalDataRate()
case
QPortSettings
:
:
BAUDR_57600
:
dataRate
=
57600
;
break
;
#ifdef Q_OS_WIN
#ifdef Q_OS_WIN
_XXXX // FIXME
case
QPortSettings
:
:
BAUDR_76800
:
dataRate
=
76800
;
break
;
...
...
@@ -598,7 +602,13 @@ bool SerialLink::setBaudRateType(int rateIndex)
if
(
isConnected
())
reconnect
=
true
;
disconnect
();
if
(
rateIndex
>=
(
int
)
QPortSettings
::
BAUDR_50
&&
rateIndex
<=
(
int
)
QPortSettings
::
BAUDR_921600
)
#ifdef Q_OS_WIN
const
int
minBaud
=
(
int
)
QPortSettings
::
BAUDR_14400
;
#else
const
int
minBaud
=
(
int
)
QPortSettings
::
BAUDR_50
;
#endif
if
(
rateIndex
>=
minBaud
&&
rateIndex
<=
(
int
)
QPortSettings
::
BAUDR_921600
)
{
portSettings
.
setBaudRate
((
QPortSettings
::
BaudRate
)
rateIndex
);
}
...
...
@@ -627,6 +637,8 @@ bool SerialLink::setBaudRate(int rate)
disconnect
();
switch
(
rate
)
{
#ifndef Q_OS_WIN
case
50
:
portSettings
.
setBaudRate
(
QPortSettings
::
BAUDR_50
);
break
;
...
...
@@ -645,6 +657,7 @@ bool SerialLink::setBaudRate(int rate)
case
200
:
portSettings
.
setBaudRate
(
QPortSettings
::
BAUDR_200
);
break
;
#endif
case
300
:
portSettings
.
setBaudRate
(
QPortSettings
::
BAUDR_300
);
break
;
...
...
@@ -654,9 +667,11 @@ bool SerialLink::setBaudRate(int rate)
case
1200
:
portSettings
.
setBaudRate
(
QPortSettings
::
BAUDR_1200
);
break
;
#ifndef Q_OS_WIN
case
1800
:
portSettings
.
setBaudRate
(
QPortSettings
::
BAUDR_1800
);
break
;
#endif
case
2400
:
portSettings
.
setBaudRate
(
QPortSettings
::
BAUDR_2400
);
break
;
...
...
@@ -685,7 +700,7 @@ bool SerialLink::setBaudRate(int rate)
case
57600
:
portSettings
.
setBaudRate
(
QPortSettings
::
BAUDR_57600
);
break
;
#ifdef Q_OS_WIN
#ifdef Q_OS_WIN
_XXXX // FIXME CHECK THIS
case
76800
:
portSettings
.
setBaudRate
(
QPortSettings
::
BAUDR_76800
);
break
;
...
...
src/libs/opmapcontrol/src/core/point.cpp
View file @
9b657f8e
...
...
@@ -30,8 +30,8 @@
namespace
core
{
Point
::
Point
(
int
dw
)
{
this
->
x
=
(
short
)
Point
::
LOWORD
(
dw
);
this
->
y
=
(
short
)
Point
::
HIWORD
(
dw
);
this
->
x
=
(
short
)
Point
::
loWord
(
dw
);
this
->
y
=
(
short
)
Point
::
hiWord
(
dw
);
empty
=
false
;
}
Point
::
Point
(
Size
sz
)
...
...
@@ -60,15 +60,6 @@ namespace core {
{
return
!
(
lhs
==
rhs
);
}
int
Point
::
HIWORD
(
int
n
)
{
return
(
n
>>
16
)
&
0xffff
;
}
int
Point
::
LOWORD
(
int
n
)
{
return
n
&
0xffff
;
}
Point
Point
::
Empty
=
Point
();
}
src/libs/opmapcontrol/src/core/point.h
View file @
9b657f8e
...
...
@@ -27,7 +27,6 @@
#ifndef OPOINT_H
#define OPOINT_H
#include <QString>
namespace
core
{
...
...
@@ -60,8 +59,15 @@ namespace core {
{
Offset
(
p
.
x
,
p
.
y
);
}
static
int
HIWORD
(
int
n
);
static
int
LOWORD
(
int
n
);
static
int
hiWord
(
int
n
)
{
return
(
n
>>
16
)
&
0xffff
;
}
static
int
loWord
(
int
n
)
{
return
n
&
0xffff
;
}
private:
int
x
;
...
...
src/libs/opmapcontrol/src/core/urlfactory.cpp
View file @
9b657f8e
...
...
@@ -26,6 +26,7 @@
*/
#include "urlfactory.h"
#include <QRegExp>
#include <qmath.h>
namespace
core
{
...
...
src/libs/opmapcontrol/src/internals/projections/lks94projection.cpp
View file @
9b657f8e
...
...
@@ -25,6 +25,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "lks94projection.h"
#include <qmath.h>
...
...
@@ -105,7 +106,7 @@ QVector <double> LKS94Projection::DTM10(const QVector <double>& lonlat)
double
lon
=
DegreesToRadians
(
lonlat
[
0
]);
double
lat
=
DegreesToRadians
(
lonlat
[
1
]);
double
h
=
lonlat
.
count
()
<
3
?
0
:
std
::
isnan
(
lonlat
[
2
])
?
0
:
lonlat
[
2
];
//TODO NAN
double
h
=
lonlat
.
count
()
<
3
?
0
:
(
lonlat
[
2
]
!=
lonlat
[
2
])
?
0
:
lonlat
[
2
];
//TODO NAN
double
v
=
semiMajor
/
sqrt
(
1
-
es
*
pow
(
sin
(
lat
),
2
));
double
x
=
(
v
+
h
)
*
cos
(
lat
)
*
cos
(
lon
);
double
y
=
(
v
+
h
)
*
cos
(
lat
)
*
sin
(
lon
);
...
...
@@ -137,7 +138,7 @@ QVector <double> LKS94Projection::MTD10(QVector <double>& pnt)
// ...
bool
AtPole
=
false
;
// is location in polar region
double
Z
=
pnt
.
count
()
<
3
?
0
:
std
::
isnan
(
pnt
[
2
])
?
0
:
pnt
[
2
];
//TODO NaN
double
Z
=
pnt
.
count
()
<
3
?
0
:
(
pnt
[
2
]
!=
pnt
[
2
])
?
0
:
pnt
[
2
];
//TODO NaN
double
lon
=
0
;
double
lat
=
0
;
...
...
@@ -304,8 +305,8 @@ QVector <double> LKS94Projection::DTM01(QVector <double>& lonlat)
double
lon
=
DegreesToRadians
(
lonlat
[
0
]);
double
lat
=
DegreesToRadians
(
lonlat
[
1
]);
double
h
=
lonlat
.
count
()
<
3
?
0
:
std
::
isnan
(
lonlat
[
2
])
?
0
:
lonlat
[
2
];
//TODO NaN
double
v
=
semiMajor
/
sqrt
(
1
-
es
*
pow
(
sin
(
lat
),
2
));
double
h
=
lonlat
.
count
()
<
3
?
0
:
(
lonlat
[
2
]
!=
lonlat
[
2
])
?
0
:
lonlat
[
2
];
//TODO NaN
double
v
=
semiMajor
/
sqrt
(
1
-
es
*
pow
(
sin
(
lat
),
2
.0
));
double
x
=
(
v
+
h
)
*
cos
(
lat
)
*
cos
(
lon
);
double
y
=
(
v
+
h
)
*
cos
(
lat
)
*
sin
(
lon
);
double
z
=
((
1
-
es
)
*
v
+
h
)
*
sin
(
lat
);
...
...
@@ -335,7 +336,7 @@ QVector <double> LKS94Projection::MTD01(QVector <double>& pnt)
// ...
bool
At_Pole
=
false
;
// is location in polar region
double
Z
=
pnt
.
count
()
<
3
?
0
:
std
::
isnan
(
pnt
[
2
])
?
0
:
pnt
[
2
];
//TODO NaN
double
Z
=
pnt
.
count
()
<
3
?
0
:
(
pnt
[
2
]
!=
pnt
[
2
])
?
0
:
pnt
[
2
];
//TODO NaN
double
lon
=
0
;
double
lat
=
0
;
...
...
src/libs/opmapcontrol/src/internals/projections/mercatorprojection.cpp
View file @
9b657f8e
...
...
@@ -25,7 +25,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "mercatorprojection.h"
#include <qmath.h>
namespace
projections
{
MercatorProjection
::
MercatorProjection
()
:
MinLatitude
(
-
85.05112878
),
MaxLatitude
(
85.05112878
),
MinLongitude
(
-
177
),
...
...
src/libs/opmapcontrol/src/internals/projections/mercatorprojectionyandex.cpp
View file @
9b657f8e
...
...
@@ -25,7 +25,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "mercatorprojectionyandex.h"
#include <qmath.h>
namespace
projections
{
...
...
@@ -45,7 +45,7 @@ Point MercatorProjectionYandex::FromLatLngToPixel(double lat, double lng, const
double
k
=
0.0818191908426
;
double
z
=
tan
(
MathPiDiv4
+
rLat
/
2
)
/
pow
((
tan
(
MathPiDiv4
+
asin
(
k
*
sin
(
rLat
))
/
2
)),
k
);
double
z1
=
pow
(
2
,
23
-
zoom
);
double
z1
=
pow
(
2
.0
,
23
-
zoom
);
double
DX
=
((
20037508.342789
+
a
*
rLon
)
*
53.5865938
/
z1
);
double
DY
=
((
20037508.342789
-
a
*
log
(
z
))
*
53.5865938
/
z1
);
...
...
src/libs/opmapcontrol/src/internals/projections/platecarreeprojection.cpp
View file @
9b657f8e
...
...
@@ -85,7 +85,7 @@ double PlateCarreeProjection::Flattening() const
}
Size
PlateCarreeProjection
::
GetTileMatrixMaxXY
(
const
int
&
zoom
)
{
int
y
=
(
int
)
pow
(
2
,
zoom
);
int
y
=
(
int
)
pow
(
2
.0
f
,
zoom
);
return
Size
((
2
*
y
)
-
1
,
y
-
1
);
}
...
...
src/libs/opmapcontrol/src/internals/projections/platecarreeprojectionpergo.cpp
View file @
9b657f8e
...
...
@@ -84,7 +84,7 @@ double PlateCarreeProjectionPergo::Flattening() const
}
Size
PlateCarreeProjectionPergo
::
GetTileMatrixMaxXY
(
const
int
&
zoom
)
{
int
y
=
(
int
)
pow
(
2
,
zoom
);
int
y
=
(
int
)
pow
(
2
.0
f
,
zoom
);
return
Size
((
2
*
y
)
-
1
,
y
-
1
);
}
...
...
src/libs/opmapcontrol/src/internals/pureprojection.cpp
View file @
9b657f8e
...
...
@@ -25,6 +25,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "pureprojection.h"
#include <qmath.h>
...
...
@@ -38,7 +39,7 @@ const double PureProjection::HALF_PI = (M_PI * 0.5);
const
double
PureProjection
::
TWO_PI
=
(
M_PI
*
2.0
);
const
double
PureProjection
::
EPSLoN
=
1.0e-10
;
const
double
PureProjection
::
MAX_VAL
=
4
;
const
double
PureProjection
::
MAXLONG
=
2147483647
;
const
double
PureProjection
::
maxLong
=
2147483647
;
const
double
PureProjection
::
DBLLONG
=
4.61168601e18
;
const
double
PureProjection
::
R2D
=
180
/
M_PI
;
const
double
PureProjection
::
D2R
=
M_PI
/
180
;
...
...
@@ -128,17 +129,17 @@ Point PureProjection::FromLatLngToPixel(const PointLatLng &p,const int &zoom)
x
=
x
-
(
Sign
(
x
)
*
TWO_PI
);
else
if
(((
qlonglong
)
qAbs
(
x
/
TWO_PI
))
<
MAXLONG
)
if
(((
qlonglong
)
qAbs
(
x
/
TWO_PI
))
<
maxLong
)
{
x
=
x
-
(((
qlonglong
)
(
x
/
TWO_PI
))
*
TWO_PI
);
}
else
if
(((
qlonglong
)
qAbs
(
x
/
(
MAXLONG
*
TWO_PI
)))
<
MAXLONG
)
if
(((
qlonglong
)
qAbs
(
x
/
(
maxLong
*
TWO_PI
)))
<
maxLong
)
{
x
=
x
-
(((
qlonglong
)
(
x
/
(
MAXLONG
*
TWO_PI
)))
*
(
TWO_PI
*
MAXLONG
));
x
=
x
-
(((
qlonglong
)
(
x
/
(
maxLong
*
TWO_PI
)))
*
(
TWO_PI
*
maxLong
));
}
else
if
(((
qlonglong
)
qAbs
(
x
/
(
DBLLONG
*
TWO_PI
)))
<
MAXLONG
)
if
(((
qlonglong
)
qAbs
(
x
/
(
DBLLONG
*
TWO_PI
)))
<
maxLong
)
{
x
=
x
-
(((
qlonglong
)
(
x
/
(
DBLLONG
*
TWO_PI
)))
*
(
TWO_PI
*
DBLLONG
));
}
...
...
src/libs/opmapcontrol/src/internals/pureprojection.h
View file @
9b657f8e
...
...
@@ -88,7 +88,7 @@ protected:
static
const
double
TWO_PI
;
static
const
double
EPSLoN
;
static
const
double
MAX_VAL
;
static
const
double
MAXLONG
;
static
const
double
maxLong
;
static
const
double
DBLLONG
;
static
const
double
R2D
;
static
const
double
D2R
;
...
...
src/libs/opmapcontrol/src/internals/rectlatlng.h
View file @
9b657f8e
...
...
@@ -203,11 +203,11 @@ public:
}
static
RectLatLng
Intersect
(
RectLatLng
const
&
a
,
RectLatLng
const
&
b
)
{
double
lng
=
std
::
m
ax
(
a
.
Lng
(),
b
.
Lng
());
double
num2
=
std
::
m
in
((
double
)
(
a
.
Lng
()
+
a
.
WidthLng
()),
(
double
)
(
b
.
Lng
()
+
b
.
WidthLng
()));
double
lng
=
qM
ax
(
a
.
Lng
(),
b
.
Lng
());
double
num2
=
qM
in
((
double
)
(
a
.
Lng
()
+
a
.
WidthLng
()),
(
double
)
(
b
.
Lng
()
+
b
.
WidthLng
()));
double
lat
=
std
::
m
ax
(
a
.
Lat
(),
b
.
Lat
());
double
num4
=
std
::
m
in
((
double
)
(
a
.
Lat
()
+
a
.
HeightLat
()),
(
double
)
(
b
.
Lat
()
+
b
.
HeightLat
()));
double
lat
=
qM
ax
(
a
.
Lat
(),
b
.
Lat
());
double
num4
=
qM
in
((
double
)
(
a
.
Lat
()
+
a
.
HeightLat
()),
(
double
)
(
b
.
Lat
()
+
b
.
HeightLat
()));
if
((
num2
>=
lng
)
&&
(
num4
>=
lat
))
{
...
...
@@ -222,10 +222,10 @@ public:
static
RectLatLng
Union
(
RectLatLng
const
&
a
,
RectLatLng
const
&
b
)
{
double
lng
=
std
::
m
in
(
a
.
Lng
(),
b
.
Lng
());
double
num2
=
std
::
m
ax
((
double
)
(
a
.
Lng
()
+
a
.
WidthLng
()),
(
double
)
(
b
.
Lng
()
+
b
.
WidthLng
()));
double
lat
=
std
::
m
in
(
a
.
Lat
(),
b
.
Lat
());
double
num4
=
std
::
m
ax
((
double
)
(
a
.
Lat
()
+
a
.
HeightLat
()),
(
double
)
(
b
.
Lat
()
+
b
.
HeightLat
()));
double
lng
=
qM
in
(
a
.
Lng
(),
b
.
Lng
());
double
num2
=
qM
ax
((
double
)
(
a
.
Lng
()
+
a
.
WidthLng
()),
(
double
)
(
b
.
Lng
()
+
b
.
WidthLng
()));
double
lat
=
qM
in
(
a
.
Lat
(),
b
.
Lat
());
double
num4
=
qM
ax
((
double
)
(
a
.
Lat
()
+
a
.
HeightLat
()),
(
double
)
(
b
.
Lat
()
+
b
.
HeightLat
()));
return
RectLatLng
(
lng
,
lat
,
num2
-
lng
,
num4
-
lat
);
}
void
Offset
(
PointLatLng
const
&
pos
)
...
...
src/libs/opmapcontrol/src/mapwidget/gpsitem.cpp
View file @
9b657f8e
...
...
@@ -210,7 +210,7 @@ namespace mapcontrol
double
GPSItem
::
Distance3D
(
const
internals
::
PointLatLng
&
coord
,
const
int
&
altitude
)
{
return
sqrt
(
pow
(
internals
::
PureProjection
::
DistanceBetweenLatLng
(
this
->
coord
,
coord
)
*
1000
,
2
)
+
pow
(
this
->
altitude
-
altitude
,
2
));
pow
(
static_cast
<
float
>
(
this
->
altitude
-
altitude
)
,
2
));
}
void
GPSItem
::
SetUavPic
(
QString
UAVPic
)
...
...
src/libs/opmapcontrol/src/mapwidget/uavitem.cpp
View file @
9b657f8e
...
...
@@ -211,7 +211,7 @@ namespace mapcontrol
double
UAVItem
::
Distance3D
(
const
internals
::
PointLatLng
&
coord
,
const
int
&
altitude
)
{
return
sqrt
(
pow
(
internals
::
PureProjection
::
DistanceBetweenLatLng
(
this
->
coord
,
coord
)
*
1000
,
2
)
+
pow
(
this
->
altitude
-
altitude
,
2
));
pow
(
static_cast
<
float
>
(
this
->
altitude
-
altitude
)
,
2
));
}
void
UAVItem
::
SetUavPic
(
QString
UAVPic
)
{
...
...
src/libs/utils/coordinateconversions.cpp
View file @
9b657f8e
...
...
@@ -31,6 +31,7 @@
#include <stdint.h>
#include <QDebug>
#include <math.h>
#include <qmath.h>
#define RAD2DEG (180.0/M_PI)
#define DEG2RAD (M_PI/180.0)
...
...
src/libs/utils/qtcolorbutton.cpp
View file @
9b657f8e
...
...
@@ -282,4 +282,4 @@ void QtColorButton::dropEvent(QDropEvent *event)
}
// namespace Utils
#include "moc_qtcolorbutton.cpp"
//
#include "moc_qtcolorbutton.cpp"
src/libs/utils/utils_external.pri
View file @
9b657f8e
...
...
@@ -12,48 +12,49 @@ DEFINES += EXTERNAL_USE
DEFINES += QTCREATOR_UTILS_LIB
# submiteditorwidget.h \
# Input
HEADERS += abstractprocess.h \
basevalidatinglineedit.h \
checkablemessagebox.h \
classnamevalidatinglineedit.h \
codegeneration.h \
consoleprocess.h \
coordinateconversions.h \
detailsbutton.h \
detailswidget.h \
fancylineedit.h \
fancymainwindow.h \
filenamevalidatinglineedit.h \
filesearch.h \
filewizarddialog.h \
filewizardpage.h \
homelocationutil.h \
iwelcomepage.h \
linecolumnlabel.h \
listutils.h \
newclasswidget.h \
parameteraction.h \
pathchooser.h \
pathlisteditor.h \
pathutils.h \
projectintropage.h \
projectnamevalidatinglineedit.h \
qtcassert.h \
qtcolorbutton.h \
reloadpromptutils.h \
savedaction.h \
settingsutils.h \
styledbar.h \
stylehelper.h \
submiteditorwidget.h \
submitfieldwidget.h \
synchronousprocess.h \
treewidgetcolumnstretcher.h \
uncommentselection.h \
utils_global.h \
welcomemodetreewidget.h \
worldmagmodel.h \
HEADERS += utils_global.h \
reloadpromptutils.h \
settingsutils.h \
filesearch.h \
listutils.h \
pathchooser.h \
pathlisteditor.h \
filewizardpage.h \
filewizarddialog.h \
projectintropage.h \
basevalidatinglineedit.h \
filenamevalidatinglineedit.h \
projectnamevalidatinglineedit.h \
codegeneration.h \
newclasswidget.h \
classnamevalidatinglineedit.h \
linecolumnlabel.h \
fancylineedit.h \
qtcolorbutton.h \
savedaction.h \
abstractprocess.h \
consoleprocess.h \
synchronousprocess.h \
submitfieldwidget.h \
uncommentselection.h \
parameteraction.h \
treewidgetcolumnstretcher.h \
checkablemessagebox.h \
qtcassert.h \
styledbar.h \
stylehelper.h \
welcomemodetreewidget.h \
iwelcomepage.h \
fancymainwindow.h \
detailsbutton.h \
detailswidget.h \
coordinateconversions.h \
pathutils.h \
worldmagmodel.h \
homelocationutil.h \
xmlconfig.h
win32 {
...
...
@@ -80,42 +81,43 @@ linux-g++ {
SOURCES += consoleprocess_unix.cpp
}
SOURCES += basevalidatinglineedit.cpp \
checkablemessagebox.cpp \
classnamevalidatinglineedit.cpp \
codegeneration.cpp \
consoleprocess.cpp \
coordinateconversions.cpp \
detailsbutton.cpp \
detailswidget.cpp \
fancylineedit.cpp \
fancymainwindow.cpp \
filenamevalidatinglineedit.cpp \
filesearch.cpp \
filewizarddialog.cpp \
filewizardpage.cpp \
homelocationutil.cpp \
iwelcomepage.cpp \
linecolumnlabel.cpp \
newclasswidget.cpp \
parameteraction.cpp \
pathchooser.cpp \
pathlisteditor.cpp \
pathutils.cpp \
projectintropage.cpp \
projectnamevalidatinglineedit.cpp \
qtcolorbutton.cpp \
reloadpromptutils.cpp \
savedaction.cpp \
settingsutils.cpp \
styledbar.cpp \
stylehelper.cpp \
submiteditorwidget.cpp \
submitfieldwidget.cpp \
synchronousprocess.cpp \
treewidgetcolumnstretcher.cpp \
uncommentselection.cpp \
welcomemodetreewidget.cpp \
worldmagmodel.cpp \
# submiteditorwidget.cpp \
SOURCES += reloadpromptutils.cpp \
settingsutils.cpp \
filesearch.cpp \
pathchooser.cpp \
pathlisteditor.cpp \
filewizardpage.cpp \
filewizarddialog.cpp \
projectintropage.cpp \
basevalidatinglineedit.cpp \
filenamevalidatinglineedit.cpp \
projectnamevalidatinglineedit.cpp \
codegeneration.cpp \
newclasswidget.cpp \
classnamevalidatinglineedit.cpp \
linecolumnlabel.cpp \
fancylineedit.cpp \
qtcolorbutton.cpp \
savedaction.cpp \
synchronousprocess.cpp \
submitfieldwidget.cpp \
consoleprocess.cpp \
uncommentselection.cpp \
parameteraction.cpp \
treewidgetcolumnstretcher.cpp \
checkablemessagebox.cpp \
styledbar.cpp \
stylehelper.cpp \
welcomemodetreewidget.cpp \
iwelcomepage.cpp \
fancymainwindow.cpp \
detailsbutton.cpp \
detailswidget.cpp \
coordinateconversions.cpp \
pathutils.cpp \
worldmagmodel.cpp \
homelocationutil.cpp \
xmlconfig.cpp
RESOURCES += utils.qrc
src/libs/utils/worldmagmodel.cpp
View file @
9b657f8e
...
...
@@ -48,6 +48,7 @@
#include <stdint.h>
#include <QDebug>
#include <math.h>
#include <qmath.h>
#define RAD2DEG(rad) ((rad) * (180.0 / M_PI))
#define DEG2RAD(deg) ((deg) * (M_PI / 180.0))
...
...
src/uas/UAS.cc
View file @
9b657f8e
...
...
@@ -1383,6 +1383,8 @@ QImage UAS::getImage()
imagePacketsArrived
=
0
;
//imageRecBuffer.clear();
return
image
;
#else
return
QImage
();
#endif
}
...
...
src/uas/UASManager.cc
View file @
9b657f8e
...
...
@@ -76,7 +76,8 @@ void UASManager::loadSettings()
bool
UASManager
::
setHomePosition
(
double
lat
,
double
lon
,
double
alt
)
{
// Checking for NaN and infitiny
if
(
lat
==
lat
&&
lon
==
lon
&&
alt
==
alt
&&
!
std
::
isinf
(
lat
)
&&
!
std
::
isinf
(
lon
)
&&
!
std
::
isinf
(
alt
)
// FIXME does not work with MSVC: && !std::isinf(lat) && !std::isinf(lon) && !std::isinf(alt)
if
(
lat
==
lat
&&
lon
==
lon
&&
alt
==
alt
&&
lat
<=
90.0
&&
lat
>=
-
90.0
&&
lon
<=
180.0
&&
lon
>=
-
180.0
)
{
bool
changed
=
false
;
...
...
src/ui/HSIDisplay.cc
View file @
9b657f8e
...
...
@@ -40,11 +40,13 @@ This file is part of the QGROUNDCONTROL project
#include "QGC.h"
#include "Waypoint.h"
#include "UASWaypointManager.h"
#include <qmath.h>
//#include "Waypoint2DIcon.h"
//#include "MAV2DIcon.h"
#include <QDebug>
HSIDisplay
::
HSIDisplay
(
QWidget
*
parent
)
:
HDDisplay
(
NULL
,
"HSI"
,
parent
),
gpsSatellites
(),
...
...
src/ui/SerialConfigurationWindow.cc
View file @
9b657f8e
...
...
@@ -36,7 +36,7 @@ This file is part of the QGROUNDCONTROL project
#include <QSettings>
#include <QFileInfoList>
#ifdef _WIN32
#include <
QextSerialE
numerator.h>
#include <
qextseriale
numerator.h>
#endif
#if defined (__APPLE__) && defined (__MACH__)
#include <stdio.h>
...
...
src/ui/mavlink/QGCMAVLinkTextEdit.cc
View file @
9b657f8e
...
...
@@ -75,10 +75,12 @@ bool QGCMAVLinkTextEdit::syntaxcheck()
QMessageBox
::
information
(
0
,
tr
(
"XML not found!"
),
tr
(
"Null size xml document!"
));
error
=
true
;
}
return
error
;
}
void
QGCMAVLinkTextEdit
::
contextMenuEvent
(
QContextMenuEvent
*
e
)
{
Q_UNUSED
(
e
);
QMenu
*
RContext
=
createOwnStandardContextMenu
();
RContext
->
exec
(
QCursor
::
pos
());
delete
RContext
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment