Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Education
Marble
Commits
c78e47ed
Commit
c78e47ed
authored
Jul 09, 2016
by
Sanjiban Bairagya
Committed by
Sanjiban Bairagya
Jul 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge instructions ("Turn right, then turn left")
when they are close after each other
parent
2a47a74e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/lib/marble/routing/VoiceNavigationModel.cpp
src/lib/marble/routing/VoiceNavigationModel.cpp
+6
-6
No files found.
src/lib/marble/routing/VoiceNavigationModel.cpp
View file @
c78e47ed
...
...
@@ -213,17 +213,17 @@ void VoiceNavigationModelPrivate::updateInstruction( RouteSegment segment, qreal
m_queue
.
clear
();
m_queue
<<
turnTypeAudio
;
m_announcementText
=
announcementText
(
turnType
,
distance
);
qreal
nextSegmentDistance
=
segment
.
nextRouteSegment
().
distance
();
Maneuver
::
Direction
nextSegmentDirection
=
segment
.
nextRouteSegment
().
nextRouteSegment
().
maneuver
().
direction
();
if
(
m_announcementText
!=
QString
(
""
)
&&
distance
<
75
&&
nextSegmentDistance
!=
0
&&
nextSegmentDistance
<
75
){
QString
nextSegmentAnnouncementText
=
announcementText
(
nextSegmentDirection
,
nextSegmentDistance
);
m_announcementText
+=
nextSegmentAnnouncementText
!=
QString
(
""
)
?
QString
(
", then "
)
+
nextSegmentAnnouncementText
:
QString
(
""
);
}
if
(
segment
.
maneuver
().
instructionText
()
!=
m_secondLastSegment
.
maneuver
().
instructionText
()){
emit
m_parent
->
instructionChanged
();
}
m_secondLastSegment
=
m_lastSegment
;
m_lastSegment
=
segment
;
// if ( !distanceAudio.isEmpty() ) {
// m_output->enqueue( audioFile( "After" ) );
// m_output->enqueue( distanceAudio );
// m_output->enqueue( audioFile( "Meters" ) );
// }
}
void
VoiceNavigationModelPrivate
::
updateInstruction
(
const
QString
&
name
)
...
...
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