Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SkywardHub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Avionics
Software Development
SkywardHub
Commits
3e56bb85
Commit
3e56bb85
authored
10 months ago
by
Alberto Nidasio
Browse files
Options
Downloads
Patches
Plain Diff
[OutgoinMessageViewer] Remove "-" in elapsed time
parent
750cac95
No related branches found
No related tags found
Loading
Pipeline
#9709
passed
9 months ago
Stage: lint
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/shared/Modules/OutgoingMessagesViewer/OutgoingMessagesViewerModule.cpp
+8
-5
8 additions, 5 deletions
...s/OutgoingMessagesViewer/OutgoingMessagesViewerModule.cpp
with
8 additions
and
5 deletions
src/shared/Modules/OutgoingMessagesViewer/OutgoingMessagesViewerModule.cpp
+
8
−
5
View file @
3e56bb85
...
...
@@ -37,15 +37,18 @@ OutgoingMessagesViewerModule::OutgoingMessagesViewerModule()
{
handleMsg
(
message
);
});
MessageBroker
::
getInstance
().
subscribe
(
Filter
::
fromString
(
SkywardHubStrings
::
mavlink_received_msg_ACK_topic
),
this
,
[
this
](
const
Message
&
message
,
const
Filter
&
filter
)
this
,
[
this
](
const
Message
&
message
,
const
Filter
&
filter
)
{
handleAck
(
message
);
});
MessageBroker
::
getInstance
().
subscribe
(
Filter
::
fromString
(
SkywardHubStrings
::
mavlink_received_msg_NACK_topic
),
this
,
[
this
](
const
Message
&
message
,
const
Filter
&
filter
)
this
,
[
this
](
const
Message
&
message
,
const
Filter
&
filter
)
{
handleNack
(
message
);
});
MessageBroker
::
getInstance
().
subscribe
(
Filter
::
fromString
(
SkywardHubStrings
::
mavlink_received_msg_WACK_topic
),
this
,
[
this
](
const
Message
&
message
,
const
Filter
&
filter
)
this
,
[
this
](
const
Message
&
message
,
const
Filter
&
filter
)
{
handleWack
(
message
);
});
timer
=
new
QTimer
(
this
);
...
...
@@ -267,7 +270,7 @@ void OutgoingMessagesViewerModule::addMessageToTable(
{
// Prepare the row items
auto
timestampTxt
=
new
QTableWidgetItem
(
msg
.
first
.
toString
(
"hh.mm.ss"
));
auto
elapsedTimeTxt
=
new
QTableWidgetItem
(
"
-
00.00.00"
);
auto
elapsedTimeTxt
=
new
QTableWidgetItem
(
"00.00.00"
);
auto
msgName
=
new
QTableWidgetItem
(
msg
.
second
.
getField
(
"name"
).
toString
());
// Disable editing
...
...
@@ -296,7 +299,7 @@ void OutgoingMessagesViewerModule::updateElapsedTime()
auto
elapsedMinutes
=
(
date
.
secsTo
(
currentTime
)
/
60
)
%
60
;
auto
elapsedHours
=
date
.
secsTo
(
currentTime
)
/
3600
;
auto
elapsedTimeTxt
=
QString
(
"
-
%1:%2:%3"
)
auto
elapsedTimeTxt
=
QString
(
"%1:%2:%3"
)
.
arg
(
elapsedHours
,
2
,
'f'
,
0
,
'0'
)
.
arg
(
elapsedMinutes
,
2
,
'f'
,
0
,
'0'
)
.
arg
(
elapsedSeconds
,
2
,
'f'
,
0
,
'0'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment