calls with transport mode
This commit is contained in:
parent
c31c38a5d6
commit
c5f158ec43
2 changed files with 16 additions and 10 deletions
|
@ -498,7 +498,8 @@ public final class OsmTrack {
|
||||||
node = node.origin;
|
node = node.origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
VoiceHintProcessor vproc = new VoiceHintProcessor(rc.turnInstructionCatchingRange, rc.turnInstructionRoundabouts);
|
int transportMode = voiceHints.transportMode();
|
||||||
|
VoiceHintProcessor vproc = new VoiceHintProcessor(rc.turnInstructionCatchingRange, rc.turnInstructionRoundabouts, transportMode);
|
||||||
List<VoiceHint> results = vproc.process(inputs);
|
List<VoiceHint> results = vproc.process(inputs);
|
||||||
|
|
||||||
double minDistance = getMinDistance();
|
double minDistance = getMinDistance();
|
||||||
|
@ -511,13 +512,12 @@ public final class OsmTrack {
|
||||||
|
|
||||||
int getMinDistance() {
|
int getMinDistance() {
|
||||||
if (voiceHints != null) {
|
if (voiceHints != null) {
|
||||||
switch (voiceHints.getTransportMode()) {
|
switch (voiceHints.transportMode()) {
|
||||||
case "car":
|
case VoiceHintList.TRANS_MODE_CAR:
|
||||||
return 20;
|
return 20;
|
||||||
case "bike":
|
case VoiceHintList.TRANS_MODE_FOOT:
|
||||||
return 5;
|
|
||||||
case "foot":
|
|
||||||
return 3;
|
return 3;
|
||||||
|
case VoiceHintList.TRANS_MODE_BIKE:
|
||||||
default:
|
default:
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,10 +31,16 @@ public class VoiceHintList {
|
||||||
public String getTransportMode() {
|
public String getTransportMode() {
|
||||||
String ret;
|
String ret;
|
||||||
switch (transportMode) {
|
switch (transportMode) {
|
||||||
case TRANS_MODE_FOOT: ret = "foot"; break;
|
case TRANS_MODE_FOOT:
|
||||||
case TRANS_MODE_CAR : ret = "car"; break;
|
ret = "foot";
|
||||||
|
break;
|
||||||
|
case TRANS_MODE_CAR:
|
||||||
|
ret = "car";
|
||||||
|
break;
|
||||||
case TRANS_MODE_BIKE:
|
case TRANS_MODE_BIKE:
|
||||||
default: ret = "bike";
|
default:
|
||||||
|
ret = "bike";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue