Merge pull request #594 from rkflx/PR/only-revert-voicehint-reindexing
Revert voice hint reindexing
This commit is contained in:
commit
22cf0bba68
2 changed files with 43 additions and 8 deletions
|
@ -1000,7 +1000,7 @@ public final class OsmTrack {
|
||||||
for (VoiceHint hint : voiceHints.list) {
|
for (VoiceHint hint : voiceHints.list) {
|
||||||
sb.append(" [");
|
sb.append(" [");
|
||||||
sb.append(hint.indexInTrack);
|
sb.append(hint.indexInTrack);
|
||||||
sb.append(',').append(hint.getCommand());
|
sb.append(',').append(hint.getJsonCommandIndex());
|
||||||
sb.append(',').append(hint.getExitNumber());
|
sb.append(',').append(hint.getExitNumber());
|
||||||
sb.append(',').append(hint.distanceToNext);
|
sb.append(',').append(hint.distanceToNext);
|
||||||
sb.append(',').append((int) hint.angle);
|
sb.append(',').append((int) hint.angle);
|
||||||
|
|
|
@ -20,11 +20,11 @@ public class VoiceHint {
|
||||||
static final int KL = 8; // keep left
|
static final int KL = 8; // keep left
|
||||||
static final int KR = 9; // keep right
|
static final int KR = 9; // keep right
|
||||||
static final int TLU = 10; // U-turn
|
static final int TLU = 10; // U-turn
|
||||||
static final int TU = 11; // 180 degree u-turn
|
static final int TRU = 11; // Right U-turn
|
||||||
static final int TRU = 12; // Right U-turn
|
static final int OFFR = 12; // Off route
|
||||||
static final int OFFR = 13; // Off route
|
static final int RNDB = 13; // Roundabout
|
||||||
static final int RNDB = 14; // Roundabout
|
static final int RNLB = 14; // Roundabout left
|
||||||
static final int RNLB = 15; // Roundabout left
|
static final int TU = 15; // 180 degree u-turn
|
||||||
static final int BL = 16; // Beeline routing
|
static final int BL = 16; // Beeline routing
|
||||||
|
|
||||||
int ilon;
|
int ilon;
|
||||||
|
@ -61,8 +61,43 @@ public class VoiceHint {
|
||||||
badWays.add(badWay);
|
badWays.add(badWay);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCommand() {
|
public int getJsonCommandIndex() {
|
||||||
return cmd;
|
switch (cmd) {
|
||||||
|
case TLU:
|
||||||
|
return 10;
|
||||||
|
case TU:
|
||||||
|
return 15;
|
||||||
|
case TSHL:
|
||||||
|
return 4;
|
||||||
|
case TL:
|
||||||
|
return 2;
|
||||||
|
case TSLL:
|
||||||
|
return 3;
|
||||||
|
case KL:
|
||||||
|
return 8;
|
||||||
|
case C:
|
||||||
|
return 1;
|
||||||
|
case KR:
|
||||||
|
return 9;
|
||||||
|
case TSLR:
|
||||||
|
return 6;
|
||||||
|
case TR:
|
||||||
|
return 5;
|
||||||
|
case TSHR:
|
||||||
|
return 7;
|
||||||
|
case TRU:
|
||||||
|
return 11;
|
||||||
|
case RNDB:
|
||||||
|
return 13;
|
||||||
|
case RNLB:
|
||||||
|
return 14;
|
||||||
|
case BL:
|
||||||
|
return 16;
|
||||||
|
case OFFR:
|
||||||
|
return 12;
|
||||||
|
default:
|
||||||
|
throw new IllegalArgumentException("unknown command: " + cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getExitNumber() {
|
public int getExitNumber() {
|
||||||
|
|
Loading…
Reference in a new issue