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
05e7be62
Commit
05e7be62
authored
Jan 02, 2020
by
Gus Grubba
Committed by
Lorenz Meier
Jan 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix chart deletion error
Tweak chart colors
parent
0f66f2f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
7 deletions
+46
-7
MAVLinkInspectorController.cc
src/AnalyzeView/MAVLinkInspectorController.cc
+5
-5
MAVLinkChart.qml
src/QmlControls/MAVLinkChart.qml
+3
-2
DebugWindow.qml
src/ui/preferences/DebugWindow.qml
+38
-0
No files found.
src/AnalyzeView/MAVLinkInspectorController.cc
View file @
05e7be62
...
...
@@ -97,11 +97,11 @@ QGCMAVLinkMessageField::updateValue(QString newValue, qreal v)
int
count
=
_values
.
count
();
//-- Arbitrary limit of 1 minute of data at 50Hz for now
if
(
count
<
(
50
*
60
))
{
QPointF
p
(
QGC
::
ground
TimeMilliseconds
(),
v
);
QPointF
p
(
QGC
::
boot
TimeMilliseconds
(),
v
);
_values
.
append
(
p
);
}
else
{
if
(
_dataIndex
>=
count
)
_dataIndex
=
0
;
_values
[
_dataIndex
].
setX
(
QGC
::
ground
TimeMilliseconds
());
_values
[
_dataIndex
].
setX
(
QGC
::
boot
TimeMilliseconds
());
_values
[
_dataIndex
].
setY
(
v
);
_dataIndex
++
;
}
...
...
@@ -580,7 +580,7 @@ void
MAVLinkChartController
::
updateXRange
()
{
if
(
_rangeXIndex
<
static_cast
<
quint32
>
(
_controller
->
timeScaleSt
().
count
()))
{
qint64
t
=
static_cast
<
qint64
>
(
QGC
::
ground
TimeMilliseconds
());
qint64
t
=
static_cast
<
qint64
>
(
QGC
::
boot
TimeMilliseconds
());
_rangeXMax
=
QDateTime
::
fromMSecsSinceEpoch
(
t
);
_rangeXMin
=
QDateTime
::
fromMSecsSinceEpoch
(
t
-
_controller
->
timeScaleSt
()[
static_cast
<
int
>
(
_rangeXIndex
)]
->
timeScale
);
emit
rangeXMinChanged
();
...
...
@@ -849,12 +849,12 @@ MAVLinkInspectorController::deleteChart(MAVLinkChartController* chart)
if
(
chart
)
{
for
(
int
i
=
0
;
i
<
_charts
.
count
();
i
++
)
{
MAVLinkChartController
*
c
=
qobject_cast
<
MAVLinkChartController
*>
(
_charts
.
get
(
i
));
if
(
c
)
{
if
(
c
&&
c
==
chart
)
{
_charts
.
removeOne
(
c
);
delete
c
;
break
;
}
}
chart
->
deleteLater
();
emit
chartsChanged
();
}
}
...
...
src/QmlControls/MAVLinkChart.qml
View file @
05e7be62
...
...
@@ -21,8 +21,7 @@ ChartView {
margins.top
:
chartHeader
.
height
+
(
ScreenTools
.
defaultFontPixelHeight
*
2
)
property
var
chartController
:
null
property
int
maxSeriesCount
:
seriesColors
.
length
property
var
seriesColors
:
[
"
chartreuse
"
,
"
darkturquoise
"
,
"
chocolate
"
,
"
thistle
"
,
"
silver
"
,
"
blue
"
]
property
var
seriesColors
:
[
"
#00E04B
"
,
"
#DE8500
"
,
"
#F32836
"
,
"
#BFBFBF
"
,
"
#536DFF
"
,
"
#EECC44
"
]
function
addDimension
(
field
)
{
if
(
!
chartController
)
{
...
...
@@ -59,6 +58,7 @@ ChartView {
gridVisible
:
true
labelsFont.family
:
"
Fixed
"
labelsFont.pointSize
:
ScreenTools
.
smallFontPointSize
labelsColor
:
qgcPal
.
text
}
ValueAxis
{
...
...
@@ -69,6 +69,7 @@ ChartView {
lineVisible
:
false
labelsFont.family
:
"
Fixed
"
labelsFont.pointSize
:
ScreenTools
.
smallFontPointSize
labelsColor
:
qgcPal
.
text
}
Row
{
...
...
src/ui/preferences/DebugWindow.qml
View file @
05e7be62
...
...
@@ -277,6 +277,7 @@ Item {
}
Rectangle
{
id
:
square
width
:
100
height
:
100
color
:
qgcPal
.
text
...
...
@@ -289,4 +290,41 @@ Item {
color
:
qgcPal
.
window
}
}
Component.onCompleted
:
{
for
(
var
i
=
10
;
i
<
360
;
i
=
i
+
60
)
{
var
colorValue
=
Qt
.
hsla
(
i
/
360
,
0.85
,
0.5
,
1
);
seriesColors
.
push
(
colorValue
)
colorListModel
.
append
({
"
colorValue
"
:
colorValue
.
toString
()})
}
}
property
var
seriesColors
:
[]
ListModel
{
id
:
colorListModel
}
Column
{
width
:
100
spacing
:
0
anchors.right
:
square
.
left
anchors.bottom
:
parent
.
bottom
anchors.margins
:
10
Repeater
{
model
:
colorListModel
delegate
:
Rectangle
{
width
:
100
height
:
100
/
6
color
:
colorValue
Text
{
text
:
colorValue
color
:
"
#202020
"
font.pointSize
:
_textMeasure
.
font
.
pointSize
*
0.75
anchors.centerIn
:
parent
}
}
}
}
}
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