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
0b4c4b5c
Commit
0b4c4b5c
authored
Jan 10, 2012
by
LM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverted to 32bit for OS X to re-enable Google Earth, fixed persistence of command button
parent
14acce6c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
26 deletions
+97
-26
qgroundcontrol.pri
qgroundcontrol.pri
+5
-5
HUD.cc
src/ui/HUD.cc
+9
-4
WaypointList.cc
src/ui/WaypointList.cc
+2
-6
QGCCommandButton.cc
src/ui/designer/QGCCommandButton.cc
+39
-10
QGCCommandButton.ui
src/ui/designer/QGCCommandButton.ui
+39
-0
UASControlWidget.cc
src/ui/uas/UASControlWidget.cc
+3
-1
No files found.
qgroundcontrol.pri
View file @
0b4c4b5c
...
...
@@ -42,8 +42,8 @@ macx|macx-g++42|macx-g++: {
# COMPILER_VERSION = $$system(gcc -v)
#message(Using compiler $$COMPILER_VERSION)
CONFIG += x86
_64
cocoa phonon
CONFIG -= x86
CONFIG += x86 cocoa phonon
CONFIG -= x86
_64
#HARDWARE_PLATFORM = $$system(uname -a)
#contains( $$HARDWARE_PLATFORM, "9.6.0" ) || contains( $$HARDWARE_PLATFORM, "9.7.0" ) || contains( $$HARDWARE_PLATFORM, "9.8.0" ) || contains( $$HARDWARE_PLATFORM, "9.9.0" ) {
...
...
@@ -94,7 +94,7 @@ macx|macx-g++42|macx-g++: {
QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
# Copy libraries
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/qgroundcontrol.app/Contents/libs
QMAKE_POST_LINK += && cp -rf $$BASEDIR/lib/mac
64
/lib/* $$TARGETDIR/qgroundcontrol.app/Contents/libs
QMAKE_POST_LINK += && cp -rf $$BASEDIR/lib/mac
32
/lib/* $$TARGETDIR/qgroundcontrol.app/Contents/libs
# Fix library paths inside executable
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
...
...
@@ -164,11 +164,11 @@ macx|macx-g++42|macx-g++: {
# Include OpenSceneGraph libraries
INCLUDEPATH += -framework GLUT \
-framework Cocoa \
$$BASEDIR/lib/mac
64
/include
$$BASEDIR/lib/mac
32
/include
LIBS += -framework GLUT \
-framework Cocoa \
-L$$BASEDIR/lib/mac
64
/lib \
-L$$BASEDIR/lib/mac
32
/lib \
-lOpenThreads \
-losg \
-losgViewer \
...
...
src/ui/HUD.cc
View file @
0b4c4b5c
...
...
@@ -1394,18 +1394,23 @@ void HUD::setPixels(int imgid, const unsigned char* imageData, int length, int s
Q_UNUSED
(
imgid
);
// qDebug() << "at" << __FILE__ << __LINE__ << ": Received startindex" << startIndex << "and length" << length << "(" << startIndex+length << "of" << rawExpectedBytes << "bytes)";
if
(
imageStarted
)
{
if
(
imageStarted
)
{
//if (rawLastIndex != startIndex) qDebug() << "PACKET LOSS!";
if
(
startIndex
+
length
>
rawExpectedBytes
)
{
if
(
startIndex
+
length
>
rawExpectedBytes
)
{
qDebug
()
<<
"HUD: OVERFLOW! startIndex:"
<<
startIndex
<<
"length:"
<<
length
<<
"image raw size"
<<
((
receivedWidth
*
receivedHeight
*
receivedChannels
*
receivedDepth
)
/
8
)
-
1
;
}
else
{
}
else
{
memcpy
(
rawImage
+
startIndex
,
imageData
,
length
);
rawLastIndex
=
startIndex
+
length
;
// Check if we just reached the end of the image
if
(
startIndex
+
length
==
rawExpectedBytes
)
{
if
(
startIndex
+
length
==
rawExpectedBytes
)
{
//qDebug() << "HUD: END OF IMAGE REACHED!";
finishImage
();
rawLastIndex
=
0
;
...
...
src/ui/WaypointList.cc
View file @
0b4c4b5c
...
...
@@ -99,12 +99,11 @@ WaypointList::WaypointList(QWidget *parent, UASInterface* uas) :
// SET UAS AFTER ALL SIGNALS/SLOTS ARE CONNECTED
if
(
uas
)
{
qDebug
()
<<
"setUAS"
;
WPM
=
uas
->
getWaypointManager
();
setUAS
(
uas
);
}
else
{
qDebug
()
<<
"setUAS failed"
;
// Hide buttons, which don't make sense without valid UAS
m_ui
->
positionAddButton
->
hide
();
m_ui
->
transmitButton
->
hide
();
...
...
@@ -116,8 +115,6 @@ WaypointList::WaypointList(QWidget *parent, UASInterface* uas) :
WPM
=
new
UASWaypointManager
(
NULL
);
}
setUAS
(
uas
);
// STATUS LABEL
updateStatusLabel
(
""
);
...
...
@@ -154,8 +151,7 @@ void WaypointList::updateAttitude(UASInterface* uas, double roll, double pitch,
void
WaypointList
::
setUAS
(
UASInterface
*
uas
)
{
//if (this->uas == NULL && uas != NULL)
if
(
this
->
uas
==
NULL
)
if
(
this
->
uas
==
NULL
&&
uas
!=
NULL
)
{
this
->
uas
=
uas
;
...
...
src/ui/designer/QGCCommandButton.cc
View file @
0b4c4b5c
...
...
@@ -118,6 +118,9 @@ void QGCCommandButton::startEditMode()
ui
->
editParam2SpinBox
->
show
();
ui
->
editParam3SpinBox
->
show
();
ui
->
editParam4SpinBox
->
show
();
ui
->
editParam5SpinBox
->
show
();
ui
->
editParam6SpinBox
->
show
();
ui
->
editParam7SpinBox
->
show
();
ui
->
editLine1
->
show
();
ui
->
editLine2
->
show
();
//setStyleSheet("QGroupBox { border: 1px solid #66666B; border-radius: 3px; padding: 10px 0px 0px 0px; background: #111122; }");
...
...
@@ -135,11 +138,15 @@ void QGCCommandButton::endEditMode()
ui
->
editParamsVisibleCheckBox
->
hide
();
ui
->
editLine1
->
hide
();
ui
->
editLine2
->
hide
();
if
(
!
ui
->
editParamsVisibleCheckBox
->
isChecked
())
{
if
(
!
ui
->
editParamsVisibleCheckBox
->
isChecked
())
{
ui
->
editParam1SpinBox
->
hide
();
ui
->
editParam2SpinBox
->
hide
();
ui
->
editParam3SpinBox
->
hide
();
ui
->
editParam4SpinBox
->
hide
();
ui
->
editParam5SpinBox
->
hide
();
ui
->
editParam6SpinBox
->
hide
();
ui
->
editParam7SpinBox
->
hide
();
}
ui
->
commandButton
->
show
();
...
...
@@ -155,23 +162,39 @@ void QGCCommandButton::writeSettings(QSettings& settings)
{
qDebug
()
<<
"COMMAND BUTTON WRITING SETTINGS"
;
settings
.
setValue
(
"TYPE"
,
"COMMANDBUTTON"
);
settings
.
setValue
(
"QGC_
ACTION
_BUTTON_DESCRIPTION"
,
ui
->
nameLabel
->
text
());
settings
.
setValue
(
"QGC_
ACTION
_BUTTON_BUTTONTEXT"
,
ui
->
commandButton
->
text
());
settings
.
setValue
(
"QGC_
ACTION_BUTTON_ACTION
ID"
,
ui
->
editCommandComboBox
->
itemData
(
ui
->
editCommandComboBox
->
currentIndex
()).
toInt
());
settings
.
setValue
(
"QGC_
COMMAND
_BUTTON_DESCRIPTION"
,
ui
->
nameLabel
->
text
());
settings
.
setValue
(
"QGC_
COMMAND
_BUTTON_BUTTONTEXT"
,
ui
->
commandButton
->
text
());
settings
.
setValue
(
"QGC_
COMMAND_BUTTON_COMMAND
ID"
,
ui
->
editCommandComboBox
->
itemData
(
ui
->
editCommandComboBox
->
currentIndex
()).
toInt
());
settings
.
setValue
(
"QGC_COMMAND_BUTTON_PARAMS_VISIBLE"
,
ui
->
editParamsVisibleCheckBox
->
isChecked
());
settings
.
setValue
(
"QGC_COMMAND_BUTTON_PARAM1"
,
ui
->
editParam1SpinBox
->
value
());
settings
.
setValue
(
"QGC_COMMAND_BUTTON_PARAM2"
,
ui
->
editParam2SpinBox
->
value
());
settings
.
setValue
(
"QGC_COMMAND_BUTTON_PARAM3"
,
ui
->
editParam3SpinBox
->
value
());
settings
.
setValue
(
"QGC_COMMAND_BUTTON_PARAM4"
,
ui
->
editParam4SpinBox
->
value
());
settings
.
setValue
(
"QGC_COMMAND_BUTTON_PARAM5"
,
ui
->
editParam5SpinBox
->
value
());
settings
.
setValue
(
"QGC_COMMAND_BUTTON_PARAM6"
,
ui
->
editParam6SpinBox
->
value
());
settings
.
setValue
(
"QGC_COMMAND_BUTTON_PARAM7"
,
ui
->
editParam7SpinBox
->
value
());
settings
.
sync
();
}
void
QGCCommandButton
::
readSettings
(
const
QSettings
&
settings
)
{
ui
->
editNameLabel
->
setText
(
settings
.
value
(
"QGC_ACTION_BUTTON_DESCRIPTION"
,
"ERROR LOADING BUTTON"
).
toString
());
ui
->
editButtonName
->
setText
(
settings
.
value
(
"QGC_ACTION_BUTTON_BUTTONTEXT"
,
"UNKNOWN"
).
toString
());
ui
->
editCommandComboBox
->
setCurrentIndex
(
settings
.
value
(
"QGC_ACTION_BUTTON_ACTIONID"
,
0
).
toInt
());
ui
->
editNameLabel
->
setText
(
settings
.
value
(
"QGC_COMMAND_BUTTON_DESCRIPTION"
,
"ERROR LOADING BUTTON"
).
toString
());
ui
->
editButtonName
->
setText
(
settings
.
value
(
"QGC_COMMAND_BUTTON_BUTTONTEXT"
,
"UNKNOWN"
).
toString
());
ui
->
editCommandComboBox
->
setCurrentIndex
(
settings
.
value
(
"QGC_COMMAND_BUTTON_COMMANDID"
,
0
).
toInt
());
ui
->
nameLabel
->
setText
(
settings
.
value
(
"QGC_COMMAND_BUTTON_DESCRIPTION"
,
"ERROR LOADING BUTTON"
).
toString
());
ui
->
commandButton
->
setText
(
settings
.
value
(
"QGC_COMMAND_BUTTON_BUTTONTEXT"
,
"UNKNOWN"
).
toString
());
int
commandId
=
settings
.
value
(
"QGC_COMMAND_BUTTON_COMMANDID"
,
0
).
toInt
();
ui
->
nameLabel
->
setText
(
settings
.
value
(
"QGC_ACTION_BUTTON_DESCRIPTION"
,
"ERROR LOADING BUTTON"
).
toString
());
ui
->
commandButton
->
setText
(
settings
.
value
(
"QGC_ACTION_BUTTON_BUTTONTEXT"
,
"UNKNOWN"
).
toString
());
ui
->
editParam1SpinBox
->
setValue
(
settings
.
value
(
"QGC_COMMAND_BUTTON_PARAM1"
,
0.0
).
toDouble
());
ui
->
editParam2SpinBox
->
setValue
(
settings
.
value
(
"QGC_COMMAND_BUTTON_PARAM2"
,
0.0
).
toDouble
());
ui
->
editParam3SpinBox
->
setValue
(
settings
.
value
(
"QGC_COMMAND_BUTTON_PARAM3"
,
0.0
).
toDouble
());
ui
->
editParam4SpinBox
->
setValue
(
settings
.
value
(
"QGC_COMMAND_BUTTON_PARAM4"
,
0.0
).
toDouble
());
ui
->
editParam5SpinBox
->
setValue
(
settings
.
value
(
"QGC_COMMAND_BUTTON_PARAM5"
,
0.0
).
toDouble
());
ui
->
editParam6SpinBox
->
setValue
(
settings
.
value
(
"QGC_COMMAND_BUTTON_PARAM6"
,
0.0
).
toDouble
());
ui
->
editParam7SpinBox
->
setValue
(
settings
.
value
(
"QGC_COMMAND_BUTTON_PARAM7"
,
0.0
).
toDouble
());
int
commandId
=
settings
.
value
(
"QGC_ACTION_BUTTON_ACTIONID"
,
0
).
toInt
();
ui
->
editCommandComboBox
->
setCurrentIndex
(
0
);
// Find combobox entry for this data
...
...
@@ -190,6 +213,9 @@ void QGCCommandButton::readSettings(const QSettings& settings)
ui
->
editParam2SpinBox
->
show
();
ui
->
editParam3SpinBox
->
show
();
ui
->
editParam4SpinBox
->
show
();
ui
->
editParam5SpinBox
->
show
();
ui
->
editParam6SpinBox
->
show
();
ui
->
editParam7SpinBox
->
show
();
}
else
{
...
...
@@ -197,6 +223,9 @@ void QGCCommandButton::readSettings(const QSettings& settings)
ui
->
editParam2SpinBox
->
hide
();
ui
->
editParam3SpinBox
->
hide
();
ui
->
editParam4SpinBox
->
hide
();
ui
->
editParam5SpinBox
->
hide
();
ui
->
editParam6SpinBox
->
hide
();
ui
->
editParam7SpinBox
->
hide
();
}
qDebug
()
<<
"DONE READING SETTINGS"
;
}
src/ui/designer/QGCCommandButton.ui
View file @
0b4c4b5c
...
...
@@ -164,6 +164,45 @@
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"editParam5SpinBox"
>
<property
name=
"prefix"
>
<string>
P5:
</string>
</property>
<property
name=
"minimum"
>
<double>
-2147483647.000000000000000
</double>
</property>
<property
name=
"maximum"
>
<double>
2147483647.000000000000000
</double>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"editParam6SpinBox"
>
<property
name=
"prefix"
>
<string>
P6:
</string>
</property>
<property
name=
"minimum"
>
<double>
-2147483647.000000000000000
</double>
</property>
<property
name=
"maximum"
>
<double>
2147483647.000000000000000
</double>
</property>
</widget>
</item>
<item>
<widget
class=
"QDoubleSpinBox"
name=
"editParam7SpinBox"
>
<property
name=
"prefix"
>
<string>
P7:
</string>
</property>
<property
name=
"minimum"
>
<double>
-2147483647.000000000000000
</double>
</property>
<property
name=
"maximum"
>
<double>
2147483647.000000000000000
</double>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"4"
column=
"0"
colspan=
"3"
>
...
...
src/ui/uas/UASControlWidget.cc
View file @
0b4c4b5c
...
...
@@ -171,7 +171,9 @@ void UASControlWidget::transmitMode()
if
(
mav
)
{
mav
->
setMode
(
uasMode
);
ui
.
lastActionLabel
->
setText
(
QString
(
"Sent new mode cmd to %1"
).
arg
(
mav
->
getUASName
()));
QString
mode
=
ui
.
modeComboBox
->
currentText
();
ui
.
lastActionLabel
->
setText
(
QString
(
"Sent new mode %1 to %2"
).
arg
(
mode
).
arg
(
mav
->
getUASName
()));
}
}
...
...
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