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
3c2750f0
Commit
3c2750f0
authored
Sep 26, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Performance improvements to widgets, added coordinate frame to 3D widget
parent
d8ef1095
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
37 deletions
+42
-37
HSIDisplay.cc
src/ui/HSIDisplay.cc
+1
-1
LinechartPlot.h
src/ui/linechart/LinechartPlot.h
+2
-2
LinechartWidget.cc
src/ui/linechart/LinechartWidget.cc
+14
-14
Q3DWidget.cc
src/ui/map3D/Q3DWidget.cc
+0
-12
QMap3DWidget.cc
src/ui/map3D/QMap3DWidget.cc
+20
-4
UASView.cc
src/ui/uas/UASView.cc
+4
-3
UASView.h
src/ui/uas/UASView.h
+1
-1
No files found.
src/ui/HSIDisplay.cc
View file @
3c2750f0
...
...
@@ -100,7 +100,7 @@ HSIDisplay::HSIDisplay(QWidget *parent) :
topMargin
(
3.0
f
)
{
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)),
this
,
SLOT
(
setActiveUAS
(
UASInterface
*
)));
refreshTimer
->
setInterval
(
6
0
);
refreshTimer
->
setInterval
(
12
0
);
// this->setScene(new QGraphicsScene(-metricWidth/2.0f, -metricWidth/2.0f, metricWidth, metricWidth, this));
...
...
src/ui/linechart/LinechartPlot.h
View file @
3c2750f0
...
...
@@ -213,8 +213,8 @@ public:
static
const
int
SCALE_BEST_FIT
=
1
;
static
const
int
SCALE_LOGARITHMIC
=
2
;
static
const
int
DEFAULT_REFRESH_RATE
=
4
0
;
///< The default refresh rate is 25 Hz / every 100 ms
static
const
int
DEFAULT_PLOT_INTERVAL
=
1000
*
1
5
;
///< The default plot interval is 15 seconds
static
const
int
DEFAULT_REFRESH_RATE
=
5
0
;
///< The default refresh rate is 25 Hz / every 100 ms
static
const
int
DEFAULT_PLOT_INTERVAL
=
1000
*
1
2
;
///< The default plot interval is 15 seconds
static
const
int
DEFAULT_SCALE_INTERVAL
=
1000
*
5
;
public
slots
:
...
...
src/ui/linechart/LinechartWidget.cc
View file @
3c2750f0
...
...
@@ -90,7 +90,7 @@ updateTimer(new QTimer())
connect
(
this
,
SIGNAL
(
plotWindowPositionUpdated
(
int
)),
scrollbar
,
SLOT
(
setValue
(
int
)));
connect
(
scrollbar
,
SIGNAL
(
sliderMoved
(
int
)),
this
,
SLOT
(
setPlotWindowPosition
(
int
)));
updateTimer
->
setInterval
(
1
00
);
updateTimer
->
setInterval
(
3
00
);
connect
(
updateTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
refresh
()));
updateTimer
->
start
();
}
...
...
@@ -247,13 +247,13 @@ void LinechartWidget::refresh()
str
.
sprintf
(
"%+.2f"
,
activePlot
->
getMean
(
j
.
key
()));
j
.
value
()
->
setText
(
str
);
}
QMap
<
QString
,
QLabel
*>::
iterator
k
;
for
(
k
=
curveMedians
->
begin
();
k
!=
curveMedians
->
end
();
++
k
)
{
// Median
str
.
sprintf
(
"%+.2f"
,
activePlot
->
getMedian
(
k
.
key
()));
k
.
value
()
->
setText
(
str
);
}
//
QMap<QString, QLabel*>::iterator k;
//
for (k = curveMedians->begin(); k != curveMedians->end(); ++k)
//
{
//
// Median
//
str.sprintf("%+.2f", activePlot->getMedian(k.key()));
//
k.value()->setText(str);
//
}
}
...
...
@@ -397,11 +397,11 @@ QWidget* LinechartWidget::createCurveItem(QString curve)
curveMeans
->
insert
(
curve
,
mean
);
horizontalLayout
->
addWidget
(
mean
);
// Median
median
=
new
QLabel
(
form
);
value
->
setNum
(
0.00
);
curveMedians
->
insert
(
curve
,
median
);
horizontalLayout
->
addWidget
(
median
);
//
// Median
//
median = new QLabel(form);
//
value->setNum(0.00);
//
curveMedians->insert(curve, median);
//
horizontalLayout->addWidget(median);
/* Color picker
QColor color = QColorDialog::getColor(Qt::green, this);
...
...
@@ -418,7 +418,7 @@ QWidget* LinechartWidget::createCurveItem(QString curve)
horizontalLayout
->
setStretchFactor
(
label
,
80
);
horizontalLayout
->
setStretchFactor
(
value
,
50
);
horizontalLayout
->
setStretchFactor
(
mean
,
50
);
horizontalLayout
->
setStretchFactor
(
median
,
50
);
//
horizontalLayout->setStretchFactor(median, 50);
// Connect actions
QObject
::
connect
(
checkBox
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
takeButtonClick
(
bool
)));
...
...
src/ui/map3D/Q3DWidget.cc
View file @
3c2750f0
...
...
@@ -481,18 +481,6 @@ Q3DWidget::initializeGL(void)
glEnable
(
GL_LIGHT0
);
glDisable
(
GL_LIGHTING
);
glEnable
(
GL_NORMALIZE
);
// TODO: Added these, please check
glEnable
(
GL_MULTISAMPLE
);
glEnable
(
GL_BLEND
);
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
glEnable
(
GL_POINT_SMOOTH
);
glEnable
(
GL_LINE_SMOOTH
);
glHint
(
GL_POINT_SMOOTH_HINT
,
GL_NICEST
);
glHint
(
GL_LINE_SMOOTH_HINT
,
GL_NICEST
);
}
void
...
...
src/ui/map3D/QMap3DWidget.cc
View file @
3c2750f0
...
...
@@ -286,17 +286,33 @@ QMap3DWidget::drawPlatform(float roll, float pitch, float yaw)
{
glPushMatrix
();
glRotatef
(
yaw
,
0.0
f
,
0.0
f
,
1.0
f
);
glRotatef
(
pitch
,
0.0
f
,
1.0
f
,
0.0
f
);
glRotatef
(
roll
,
1.0
f
,
0.0
f
,
0.0
f
);
glRotatef
(
(
yaw
*
180.0
f
)
/
M_PI
,
0.0
f
,
0.0
f
,
1.0
f
);
glRotatef
(
(
pitch
*
180.0
f
)
/
M_PI
,
0.0
f
,
1.0
f
,
0.0
f
);
glRotatef
(
(
roll
*
180.0
f
)
/
M_PI
,
1.0
f
,
0.0
f
,
0.0
f
);
glLineWidth
(
3.0
f
);
glColor3f
(
0.0
f
,
1.0
f
,
0.0
f
);
// X AXIS
glColor3f
(
1.0
f
,
0.0
f
,
0.0
f
);
glBegin
(
GL_LINES
);
glVertex3f
(
0.0
f
,
0.0
f
,
0.0
f
);
glVertex3f
(
0.3
f
,
0.0
f
,
0.0
f
);
glEnd
();
// Y AXIS
glColor3f
(
0.0
f
,
1.0
f
,
0.0
f
);
glBegin
(
GL_LINES
);
glVertex3f
(
0.0
f
,
0.0
f
,
0.0
f
);
glVertex3f
(
0.0
f
,
0.15
f
,
0.0
f
);
glEnd
();
// Z AXIS
glColor3f
(
0.0
f
,
0.0
f
,
1.0
f
);
glBegin
(
GL_LINES
);
glVertex3f
(
0.0
f
,
0.0
f
,
0.0
f
);
glVertex3f
(
0.0
f
,
0.0
f
,
0.15
f
);
glEnd
();
cheetahModel
->
draw
();
glPopMatrix
();
...
...
src/ui/uas/UASView.cc
View file @
3c2750f0
...
...
@@ -331,7 +331,8 @@ void UASView::updateLoad(UASInterface* uas, double load)
void
UASView
::
refresh
()
{
//setUpdatesEnabled(false);
setUpdatesEnabled
(
true
);
//setUpdatesEnabled(true);
//repaint();
static
quint64
lastupdate
=
0
;
qDebug
()
<<
"UASVIEW update diff: "
<<
MG
::
TIME
::
getGroundTimeNow
()
-
lastupdate
;
...
...
@@ -438,8 +439,8 @@ void UASView::refresh()
m_ui
->
heartbeatIcon
->
setStyleSheet
(
colorstyle
);
m_ui
->
heartbeatIcon
->
setAutoFillBackground
(
true
);
//setUpdatesEnabled(true);
repaint
();
setUpdatesEnabled
(
false
);
//
setUpdatesEnabled(false);
}
void
UASView
::
changeEvent
(
QEvent
*
e
)
...
...
src/ui/uas/UASView.h
View file @
3c2750f0
...
...
@@ -99,7 +99,7 @@ protected:
float
lon
;
float
alt
;
float
groundDistance
;
static
const
int
updateInterval
=
18
0
;
static
const
int
updateInterval
=
30
0
;
void
mouseDoubleClickEvent
(
QMouseEvent
*
event
);
...
...
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