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
7d0489da
Commit
7d0489da
authored
May 10, 2014
by
treymarc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correction : display duration in hours,minutes,sec
parent
c4848a1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
UASView.cc
src/ui/uas/UASView.cc
+6
-6
No files found.
src/ui/uas/UASView.cc
View file @
7d0489da
...
...
@@ -639,9 +639,9 @@ void UASView::refresh()
// 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
sec
=
static_cast
<
int
>
(
filterTime
-
static_cast
<
int
>
(
filterTime
/
60.0
f
)
*
6
0
);
int
min
=
static_cast
<
int
>
(
filterTime
/
60
);
int
hours
=
static_cast
<
int
>
(
filterTime
-
min
*
60
-
sec
);
int
hours
=
static_cast
<
int
>
(
filterTime
/
360
0
);
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
);
...
...
@@ -656,9 +656,9 @@ void UASView::refresh()
//QDateTime time = MG::TIME::msecToQDateTime(uas->getUptime());
quint64
filterTime
=
uas
->
getUptime
()
/
1000
;
int
sec
=
static_cast
<
int
>
(
filterTime
-
static_cast
<
int
>
(
filterTime
/
60
)
*
6
0
);
int
min
=
static_cast
<
int
>
(
filterTime
/
60
);
int
hours
=
static_cast
<
int
>
(
filterTime
-
min
*
60
-
sec
);
int
hours
=
static_cast
<
int
>
(
filterTime
/
360
0
);
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
);
...
...
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