在UOS上编译完成,顺便修改了几处在win下导致的不严谨

This commit is contained in:
2020-09-09 18:06:00 +08:00
parent 3bba1e3000
commit d2df2efaeb
16 changed files with 114 additions and 48 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
include(./CharInputter/CharInputter.pri)
include(./Inputter/Inputter.pri)
include(./Multiselector/Multiselector.pri)
include(./MultiSelector/Multiselector.pri)
include(./Selector/Selector.pri)
include(./Confirm/Confirm.pri)
include(./Scope/Scope.pri)
View File
@@ -1,5 +1,5 @@
#include "Multiselector.h"
#include "ui_multiselector.h"
#include "multiselector.h"
#include "ui_Multiselector.h"
MultiSelector::MultiSelector(QWidget *parent) :
QWidget(parent),
@@ -348,11 +348,19 @@ QVariant ParameterInspector::param_value(mavlink_param_value_t param)
}break;
case MAV_PARAM_TYPE_UINT64:
{
#ifdef unix
//value = ((ulong *)&param.param_value)[0];
#else
value = ((uint64_t *)&param.param_value)[0];
#endif
}break;
case MAV_PARAM_TYPE_INT64:
{
#ifdef unix
//value = ((long *)&param.param_value)[0];
#else
value = ((int64_t *)&param.param_value)[0];
#endif
}break;
case MAV_PARAM_TYPE_REAL32:
{
+1 -1
View File
@@ -1,4 +1,4 @@
#include "Tools_Index0.h"
#include "tools_Index0.h"
#include "ui_tools_Index0.h"
Tools_Index0::Tools_Index0(QWidget *parent) :
+1 -1
View File
@@ -1,4 +1,4 @@
#include "Tools_Index1.h"
#include "tools_Index1.h"
#include "ui_tools_Index1.h"
Tools_Index1::Tools_Index1(QWidget *parent) :
+1 -1
View File
@@ -1,4 +1,4 @@
#include "Tools_Index2.h"
#include "tools_Index2.h"
#include "ui_tools_Index2.h"
Tools_Index2::Tools_Index2(QWidget *parent) :
+1 -1
View File
@@ -1,4 +1,4 @@
#include "Tools_Index3.h"
#include "tools_Index3.h"
#include "ui_tools_Index3.h"
Tools_Index3::Tools_Index3(QWidget *parent) :
+55 -33
View File
@@ -222,13 +222,17 @@ void Cockpit::wheelEvent(QWheelEvent *e)
void Cockpit::setPitch(double Pitch)
{
#ifdef __MINGW32__
#ifdef unix
#else
if(isnan(Pitch))
{
return;
}
#ifdef __MINGW32__
#else
if(isnan(Pitch))
{
return;
}
#endif
#endif
//if(Pitch > 360) Pitch = 360;
@@ -250,13 +254,17 @@ void Cockpit::setPitch(double Pitch)
void Cockpit::setPitchTarget(double Pitch)
{
#ifdef __MINGW32__
#ifdef unix
#else
if(isnan(Pitch))
{
return;
}
#ifdef __MINGW32__
#else
if(isnan(Pitch))
{
return;
}
#endif
#endif
//if(Pitch > 360) Pitch = 360;
@@ -279,14 +287,17 @@ void Cockpit::setPitchTarget(double Pitch)
void Cockpit::setRoll(double Roll)
{
#ifdef __MINGW32__
#ifdef unix
#else
if(isnan(Roll))
{
return;
}
#ifdef __MINGW32__
#else
if(isnan(Roll))
{
return;
}
#endif
#endif
//if(Roll > 360) Roll = 360;
//else if(Roll < -360) Roll = -360;
@@ -307,14 +318,17 @@ void Cockpit::setRoll(double Roll)
void Cockpit::setRollTarget(double Roll)
{
#ifdef __MINGW32__
#ifdef unix
#else
if(isnan(Roll))
{
return;
}
#ifdef __MINGW32__
#else
if(isnan(Roll))
{
return;
}
#endif
#endif
//if(Roll > 360) Roll = 360;
//else if(Roll < -360) Roll = -360;
@@ -336,14 +350,18 @@ void Cockpit::setRollTarget(double Roll)
void Cockpit::setYaw(double Yaw)
{
#ifdef __MINGW32__
#ifdef unix
#else
if(isnan(Yaw))
{
return;
}
#ifdef __MINGW32__
#else
if(isnan(Yaw))
{
return;
}
#endif
#endif
if(Yaw < 0) Yaw += 360;
@@ -359,14 +377,18 @@ void Cockpit::setYaw(double Yaw)
void Cockpit::setYawTarget(double Yaw)
{
#ifdef __MINGW32__
#ifdef unix
#else
if(isnan(Yaw))
{
return;
}
#ifdef __MINGW32__
#else
if(isnan(Yaw))
{
return;
}
#endif
#endif
if(Yaw < 0) Yaw += 360;
else if(Yaw > 360) Yaw -= 360;
-2
View File
@@ -4,11 +4,9 @@ TEMPLATE = subdirs
CONFIG += ordered
#SUBDIRS += Skin
SUBDIRS += opmap
SUBDIRS += Cockpit
SUBDIRS += MavLinkNode
SUBDIRS += dlink
+1 -1
View File
@@ -1,4 +1,4 @@
#include "Replay.h"
#include "replay.h"
Replay::Replay(QObject *parent) : QObject(parent)
+8 -1
View File
@@ -90,7 +90,14 @@ win32|win64 {
system(xcopy $$src_dir $$dst_dir /y /e)
}
unix {
src_dir = $$PWD/*.h
dst_dir = $$PWD/../thirdpart/include/
!exists($$dst_dir): system(mkdir -p $$dst_dir)
system(cp $$src_dir $$dst_dir -arf )
}
+7
View File
@@ -96,5 +96,12 @@ win32|win64 {
system(xcopy $$src_dir $$dst_dir /y /e)
}
unix {
src_dir = $$PWD/*.h
dst_dir = $$PWD/../../thirdpart/include/
!exists($$dst_dir): system(mkdir -p $$dst_dir)
system(cp $$src_dir $$dst_dir -arf )
}
+16
View File
@@ -88,5 +88,21 @@ win32|win64 {
system(xcopy $$src_dir $$dst_dir /y /e)
}
unix {
src_dir = $$PWD/*.h
dst_dir = $$PWD/../../thirdpart/include/
!exists($$dst_dir): system(mkdir -p $$dst_dir)
system(cp $$src_dir $$dst_dir -arf )
src_prodir = $$PWD/projections/*.h
dst_prodir = $$PWD/../../thirdpart/include/projections/
!exists($$dst_prodir): system(mkdir -p $$dst_prodir)
system(cp $$src_prodir $$dst_prodir -arf )
}
+4
View File
@@ -6,6 +6,9 @@
#ifdef _USE_MATH_DEFINES
#ifdef unix
#else
#ifdef __MINGW32__
#else
@@ -24,6 +27,7 @@
#define M_SQRT2 1.41421356237309504880
#define M_SQRT1_2 0.707106781186547524401
#endif /* __MINGW32__ */
#endif
+8 -4
View File
@@ -119,10 +119,14 @@ win32|win64 {
}
#DISTFILES += \
# Triangle.qml \
# test.qml \
# waypointui.qml
unix {
src_dir = $$PWD/*.h
dst_dir = $$PWD/../../thirdpart/include/
!exists($$dst_dir): system(mkdir -p $$dst_dir)
system(cp $$src_dir $$dst_dir -arf )
}