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
b8becd3b
Commit
b8becd3b
authored
May 31, 2013
by
Bryant
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/mavlink/qgroundcontrol
into restyling
parents
a95c62f0
89696feb
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
603 additions
and
307 deletions
+603
-307
UASWaypointManager.cc
src/uas/UASWaypointManager.cc
+1
-1
UASWaypointManager.h
src/uas/UASWaypointManager.h
+1
-1
QGCToolBar.cc
src/ui/QGCToolBar.cc
+1
-0
QGCVehicleConfig.cc
src/ui/QGCVehicleConfig.cc
+23
-24
QGCVehicleConfig.ui
src/ui/QGCVehicleConfig.ui
+568
-280
WaypointList.cc
src/ui/WaypointList.cc
+5
-0
dockwidgettitlebareventfilter.cpp
src/ui/dockwidgettitlebareventfilter.cpp
+0
-1
QGCMapWidget.cc
src/ui/map/QGCMapWidget.cc
+4
-0
No files found.
src/uas/UASWaypointManager.cc
View file @
b8becd3b
...
...
@@ -38,7 +38,7 @@ This file is part of the QGROUNDCONTROL project
#define PROTOCOL_TIMEOUT_MS 2000 ///< maximum time to wait for pending messages until timeout
#define PROTOCOL_DELAY_MS 20 ///< minimum delay between sent messages
#define PROTOCOL_MAX_RETRIES 5 ///< maximum number of send retries (after timeout)
const
float
UASWaypointManager
::
defaultAltitudeHomeOffset
=
30.0
f
;
UASWaypointManager
::
UASWaypointManager
(
UAS
*
_uas
)
:
uas
(
_uas
),
current_retries
(
0
),
...
...
src/uas/UASWaypointManager.h
View file @
b8becd3b
...
...
@@ -180,7 +180,7 @@ private:
quint16
uasid
;
// XXX export to settings
static
const
float
defaultAltitudeHomeOffset
=
30
.
0
f
;
///< Altitude offset in meters from home for new waypoints
static
const
float
defaultAltitudeHomeOffset
;
///< Altitude offset in meters from home for new waypoints
};
#endif // UASWAYPOINTMANAGER_H
src/ui/QGCToolBar.cc
View file @
b8becd3b
...
...
@@ -168,6 +168,7 @@ void QGCToolBar::createUI()
addLink
(
LinkManager
::
instance
()
->
getLinks
().
last
());
// XXX implies that connect button is always active for the last used link
connect
(
LinkManager
::
instance
(),
SIGNAL
(
newLink
(
LinkInterface
*
)),
this
,
SLOT
(
addLink
(
LinkInterface
*
)));
connect
(
LinkManager
::
instance
(),
SIGNAL
(
linkRemoved
(
LinkInterface
*
)),
this
,
SLOT
(
removeLink
(
LinkInterface
*
)));
// Update label if required
if
(
LinkManager
::
instance
()
->
getLinks
().
count
()
<
3
)
{
...
...
src/ui/QGCVehicleConfig.cc
View file @
b8becd3b
...
...
@@ -52,7 +52,7 @@ QGCVehicleConfig::QGCVehicleConfig(QWidget *parent) :
ui
->
rcCalibrationButton
->
setCheckable
(
true
);
connect
(
ui
->
rcCalibrationButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
toggleCalibrationRC
(
bool
)));
connect
(
ui
->
s
tore
Button
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
writeParameters
()));
connect
(
ui
->
s
et
Button
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
writeParameters
()));
connect
(
ui
->
rcModeComboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
setRCModeIndex
(
int
)));
connect
(
ui
->
setTrimButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
setTrimPositions
()));
...
...
@@ -174,6 +174,7 @@ void QGCVehicleConfig::stopCalibrationRC()
void
QGCVehicleConfig
::
loadQgcConfig
(
bool
primary
)
{
Q_UNUSED
(
primary
);
QDir
autopilotdir
(
qApp
->
applicationDirPath
()
+
"/files/"
+
mav
->
getAutopilotTypeName
().
toLower
());
QDir
generaldir
=
QDir
(
autopilotdir
.
absolutePath
()
+
"/general/widgets"
);
QDir
vehicledir
=
QDir
(
autopilotdir
.
absolutePath
()
+
"/"
+
mav
->
getSystemTypeName
().
toLower
()
+
"/widgets"
);
...
...
@@ -321,7 +322,6 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
}
}
// Load calibration
//TODO: Handle this more gracefully, maybe have it scan the directory for multiple calibration entries?
tool
=
new
QGCToolWidget
(
""
,
this
);
...
...
@@ -338,7 +338,6 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
delete
tool
;
}
tool
=
new
QGCToolWidget
(
""
,
this
);
tool
->
addUAS
(
mav
);
if
(
tool
->
loadSettings
(
autopilotdir
.
absolutePath
()
+
"/"
+
mav
->
getSystemTypeName
().
toLower
()
+
"/calibration/calibration.qgw"
,
false
))
...
...
@@ -352,16 +351,12 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
}
else
{
delete
tool
;
}
//description.txt
QFile
sensortipsfile
(
autopilotdir
.
absolutePath
()
+
"/general/calibration/description.txt"
);
sensortipsfile
.
open
(
QIODevice
::
ReadOnly
);
ui
->
sensorTips
->
setHtml
(
sensortipsfile
.
readAll
());
sensortipsfile
.
close
();
}
void
QGCVehicleConfig
::
loadConfig
()
...
...
@@ -679,10 +674,8 @@ void QGCVehicleConfig::loadConfig()
}
xml
.
readNext
();
}
if
(
mav
)
{
mav
->
getParamManager
()
->
setParamInfo
(
paramTooltips
);
}
doneLoadingConfig
=
true
;
mav
->
requestParameters
();
//Config is finished, lets do a parameter request to ensure none are missed if someone else started requesting before we were finished.
}
...
...
@@ -736,18 +729,24 @@ void QGCVehicleConfig::setActiveUAS(UASInterface* active)
mav
->
getParamManager
()
->
setParamInfo
(
paramTooltips
);
}
// mav->requestParameters();
QString
defaultsDir
=
qApp
->
applicationDirPath
()
+
"/files/"
+
mav
->
getAutopilotTypeName
().
toLower
()
+
"/widgets/"
;
qDebug
()
<<
"CALIBRATION!! System Type Name:"
<<
mav
->
getSystemTypeName
();
//Load configuration after 1ms. This allows it to go into the event loop, and prevents application hangups due to the
//amount of time it actually takes to load the configuration windows.
QTimer
::
singleShot
(
1
,
this
,
SLOT
(
loadConfig
()));
updateStatus
(
QString
(
"Reading from system %1"
).
arg
(
mav
->
getUASName
()));
// Since a system is now connected, enable the VehicleConfig UI.
ui
->
tabWidget
->
setEnabled
(
true
);
ui
->
setButton
->
setEnabled
(
true
);
ui
->
refreshButton
->
setEnabled
(
true
);
ui
->
readButton
->
setEnabled
(
true
);
ui
->
writeButton
->
setEnabled
(
true
);
ui
->
loadFileButton
->
setEnabled
(
true
);
ui
->
saveFileButton
->
setEnabled
(
true
);
}
void
QGCVehicleConfig
::
resetCalibrationRC
()
{
for
(
unsigned
int
i
=
0
;
i
<
chanMax
;
++
i
)
...
...
@@ -1065,9 +1064,9 @@ void QGCVehicleConfig::parameterChanged(int uas, int component, QString paramete
if
(
minTpl
.
exactMatch
(
parameterName
))
{
bool
ok
;
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
unsigned
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
//qDebug() << "PARAM:" << parameterName << "index:" << index;
if
(
ok
&&
(
index
>=
0
)
&&
(
index
<
chanMax
)
)
if
(
ok
&&
index
<
chanMax
)
{
rcMin
[
index
]
=
value
.
toInt
();
}
...
...
@@ -1075,8 +1074,8 @@ void QGCVehicleConfig::parameterChanged(int uas, int component, QString paramete
if
(
maxTpl
.
exactMatch
(
parameterName
))
{
bool
ok
;
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
(
index
>=
0
)
&&
(
index
<
chanMax
)
)
unsigned
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
index
<
chanMax
)
{
rcMax
[
index
]
=
value
.
toInt
();
}
...
...
@@ -1084,8 +1083,8 @@ void QGCVehicleConfig::parameterChanged(int uas, int component, QString paramete
if
(
trimTpl
.
exactMatch
(
parameterName
))
{
bool
ok
;
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
(
index
>=
0
)
&&
(
index
<
chanMax
)
)
unsigned
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
index
<
chanMax
)
{
rcTrim
[
index
]
=
value
.
toInt
();
}
...
...
@@ -1093,8 +1092,8 @@ void QGCVehicleConfig::parameterChanged(int uas, int component, QString paramete
if
(
revTpl
.
exactMatch
(
parameterName
))
{
bool
ok
;
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
(
index
>=
0
)
&&
(
index
<
chanMax
)
)
unsigned
int
index
=
parameterName
.
mid
(
2
,
1
).
toInt
(
&
ok
)
-
1
;
if
(
ok
&&
index
<
chanMax
)
{
rcRev
[
index
]
=
(
value
.
toInt
()
==
-
1
)
?
true
:
false
;
updateInvertedCheckboxes
(
index
);
...
...
src/ui/QGCVehicleConfig.ui
View file @
b8becd3b
This diff is collapsed.
Click to expand it.
src/ui/WaypointList.cc
View file @
b8becd3b
...
...
@@ -130,6 +130,11 @@ WaypointList::WaypointList(QWidget *parent, UASWaypointManager* wpm) :
connect
(
WPM
,
SIGNAL
(
waypointViewOnlyListChanged
(
void
)),
this
,
SLOT
(
waypointViewOnlyListChanged
(
void
)));
connect
(
WPM
,
SIGNAL
(
waypointViewOnlyChanged
(
int
,
Waypoint
*
)),
this
,
SLOT
(
updateWaypointViewOnly
(
int
,
Waypoint
*
)));
connect
(
WPM
,
SIGNAL
(
currentWaypointChanged
(
quint16
)),
this
,
SLOT
(
currentWaypointViewOnlyChanged
(
quint16
)));
//Even if there are no waypoints, since this is a new instance and there is an
//existing WPM, then we need to assume things have changed, and act appropriatly.
waypointEditableListChanged
();
waypointViewOnlyListChanged
();
}
// STATUS LABEL
...
...
src/ui/dockwidgettitlebareventfilter.cpp
View file @
b8becd3b
...
...
@@ -6,7 +6,6 @@ DockWidgetTitleBarEventFilter::DockWidgetTitleBarEventFilter(QObject *parent) :
}
bool
DockWidgetTitleBarEventFilter
::
eventFilter
(
QObject
*
object
,
QEvent
*
event
)
{
qDebug
()
<<
event
->
type
();
if
(
event
->
type
()
==
QEvent
::
MouseButtonPress
||
event
->
type
()
==
QEvent
::
MouseButtonRelease
)
{
return
true
;
...
...
src/ui/map/QGCMapWidget.cc
View file @
b8becd3b
...
...
@@ -212,7 +212,11 @@ void QGCMapWidget::loadSettings(bool changePosition)
if
(
trailType
==
mapcontrol
::
UAVTrailType
::
ByDistance
)
{
// XXX
#ifdef Q_OS_WIN
#pragma message ("WARNING: Settings loading for trail type not implemented")
#else
#warning Settings loading for trail type not implemented
#endif
}
else
if
(
trailType
==
mapcontrol
::
UAVTrailType
::
ByTimeElapsed
)
{
...
...
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