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
971cf487
Commit
971cf487
authored
May 11, 2014
by
treymarc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comment out dubious lpf
parent
7d0489da
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
UASView.cc
src/ui/uas/UASView.cc
+15
-14
No files found.
src/ui/uas/UASView.cc
View file @
971cf487
...
...
@@ -634,16 +634,26 @@ void UASView::refresh()
// Thrust
m_ui
->
thrustBar
->
setValue
(
thrust
*
100
);
// Time Elapsed
//QDateTime time = MG::TIME::msecToQDateTime(uas->getUptime());
quint64
filterTime
=
uas
->
getUptime
()
/
1000
;
int
hours
=
static_cast
<
int
>
(
filterTime
/
3600
);
int
min
=
static_cast
<
int
>
((
filterTime
-
3600
*
hours
)
/
60
);
int
sec
=
static_cast
<
int
>
(
filterTime
-
60
*
min
-
3600
*
hours
);
QString
timeText
;
timeText
=
timeText
.
sprintf
(
"%02d:%02d:%02d"
,
hours
,
min
,
sec
);
m_ui
->
timeElapsedLabel
->
setText
(
timeText
);
if
(
this
->
timeRemaining
>
1
&&
this
->
timeRemaining
<
QGC
::
MAX_FLIGHT_TIME
)
{
// Filter output to get a higher stability
filterTime
=
static_cast
<
int
>
(
this
->
timeRemaining
);
filterTime
=
0.8
*
filterTime
+
0.2
*
static_cast
<
int
>
(
this
->
timeRemaining
);
int
hours
=
static_cast
<
int
>
(
filterTime
/
3600
);
int
min
=
static_cast
<
int
>
((
filterTime
-
3600
*
hours
)
/
60
);
int
sec
=
static_cast
<
int
>
(
filterTime
-
60
*
min
-
3600
*
hours
);
//
filterTime = 0.8 * filterTime + 0.2 * static_cast<int>(this->timeRemaining);
hours
=
static_cast
<
int
>
(
filterTime
/
3600
);
min
=
static_cast
<
int
>
((
filterTime
-
3600
*
hours
)
/
60
);
sec
=
static_cast
<
int
>
(
filterTime
-
60
*
min
-
3600
*
hours
);
QString
timeText
;
timeText
=
timeText
.
sprintf
(
"%02d:%02d:%02d"
,
hours
,
min
,
sec
);
m_ui
->
timeRemainingLabel
->
setText
(
timeText
);
}
...
...
@@ -652,16 +662,7 @@ void UASView::refresh()
m_ui
->
timeRemainingLabel
->
setText
(
tr
(
"Calc.."
));
}
// Time Elapsed
//QDateTime time = MG::TIME::msecToQDateTime(uas->getUptime());
quint64
filterTime
=
uas
->
getUptime
()
/
1000
;
int
hours
=
static_cast
<
int
>
(
filterTime
/
3600
);
int
min
=
static_cast
<
int
>
((
filterTime
-
3600
*
hours
)
/
60
);
int
sec
=
static_cast
<
int
>
(
filterTime
-
60
*
min
-
3600
*
hours
);
QString
timeText
;
timeText
=
timeText
.
sprintf
(
"%02d:%02d:%02d"
,
hours
,
min
,
sec
);
m_ui
->
timeElapsedLabel
->
setText
(
timeText
);
}
generalUpdateCount
++
;
...
...
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