Merge pull request #5 from osmandapp/master

update
This commit is contained in:
Yuriy Ridkous 2016-03-28 17:04:59 +03:00
commit aca4b95f13
146 changed files with 709 additions and 363 deletions

View file

@ -648,11 +648,13 @@ public class RouteResultPreparation {
boolean leftTurn = TurnType.isLeftTurn(mainTurnType);
int ind = leftTurn? 0 : lanesArray.length - 1;
final int tt = TurnType.getPrimaryTurn(lanesArray[ind]);
final int st = TurnType.getSecondaryTurn(lanesArray[ind]);
if (leftTurn) {
if (!TurnType.isLeftTurn(tt)) {
// This was just to make sure that there's no bad data.
TurnType.setPrimaryTurnAndReset(lanesArray, ind, TurnType.TL);
TurnType.setSecondaryTurn(lanesArray, ind, tt);
TurnType.setTertiaryTurn(lanesArray, ind, st);
lanesArray[ind] |= 1;
}
} else {
@ -660,6 +662,7 @@ public class RouteResultPreparation {
// This was just to make sure that there's no bad data.
TurnType.setPrimaryTurnAndReset(lanesArray, ind, TurnType.TR);
TurnType.setSecondaryTurn(lanesArray, ind, tt);
TurnType.setTertiaryTurn(lanesArray, ind, st);
lanesArray[ind] |= 1;
}
}
@ -1031,10 +1034,9 @@ public class RouteResultPreparation {
(TurnType.isRightTurn(calcTurnType) && TurnType.isRightTurn(turn)) ||
(TurnType.isLeftTurn(calcTurnType) && TurnType.isLeftTurn(turn))
) {
TurnType.setPrimaryTurnAndReset(lanes, i, turn);
TurnType.setSecondaryTurn(lanes, i, primary);
TurnType.setPrimaryTurnShiftOthers(lanes, i, turn);
} else {
TurnType.setSecondaryTurn(lanes, i, turn);
TurnType.setSecondaryTurnShiftOthers(lanes, i, turn);
}
break; // Move on to the next lane
}
@ -1055,12 +1057,18 @@ public class RouteResultPreparation {
if (TurnType.getSecondaryTurn(oLanes[i]) != 0) {
possibleTurns.add(TurnType.getSecondaryTurn(oLanes[i]));
}
if (TurnType.getTertiaryTurn(oLanes[i]) != 0) {
possibleTurns.add(TurnType.getTertiaryTurn(oLanes[i]));
}
} else {
TIntArrayList laneTurns = new TIntArrayList();
laneTurns.add(TurnType.getPrimaryTurn(oLanes[i]));
if (TurnType.getSecondaryTurn(oLanes[i]) != 0) {
laneTurns.add(TurnType.getSecondaryTurn(oLanes[i]));
}
if (TurnType.getTertiaryTurn(oLanes[i]) != 0) {
laneTurns.add(TurnType.getTertiaryTurn(oLanes[i]));
}
possibleTurns.retainAll(laneTurns);
if (possibleTurns.isEmpty()) {
// No common turns, so can't determine anything.
@ -1076,6 +1084,9 @@ public class RouteResultPreparation {
if (TurnType.getSecondaryTurn(oLanes[i]) != 0) {
possibleTurns.remove((Integer) TurnType.getSecondaryTurn(oLanes[i]));
}
if (TurnType.getTertiaryTurn(oLanes[i]) != 0) {
possibleTurns.remove((Integer) TurnType.getTertiaryTurn(oLanes[i]));
}
}
}

View file

@ -158,6 +158,7 @@ public class TurnType {
// 0 bit - 0/1 - to use or not
// 1-5 bits - additional turn info
// 6-10 bits - secondary turn
// 11-15 bits - tertiary turn
public void setLanes(int[] lanes) {
this.lanes = lanes;
}
@ -182,6 +183,32 @@ public class TurnType {
// Get the primary turn modifier for the lane
return (laneValue >> 5);
}
public static void setPrimaryTurnShiftOthers(int[] lanes, int lane, int turnType) {
int pt = getPrimaryTurn(lanes[lane]);
int st = getSecondaryTurn(lanes[lane]);
//int tt = getTertiaryTurn(lanes[lane]);
setPrimaryTurnAndReset(lanes, lane, turnType);
setSecondaryTurn(lanes, lane, pt);
setTertiaryTurn(lanes, lane, st);
}
public static void setSecondaryTurnShiftOthers(int[] lanes, int lane, int turnType) {
int st = getSecondaryTurn(lanes[lane]);
//int tt = getTertiaryTurn(lanes[lane]);
setSecondaryTurn(lanes, lane, turnType);
setTertiaryTurn(lanes, lane, st);
}
public static void setTertiaryTurn(int[] lanes, int lane, int turnType) {
lanes[lane] &= ~(15 << 10);
lanes[lane] |= (turnType << 10);
}
public static int getTertiaryTurn(int laneValue) {
// Get the primary turn modifier for the lane
return (laneValue >> 10);
}
public int[] getLanes() {
@ -241,11 +268,11 @@ public class TurnType {
}
public static boolean isLeftTurn(int type) {
return type == TL || type == TSHL || type == TSLL || type == TRU;
return type == TL || type == TSHL || type == TSLL || type == TU || type == KL;
}
public static boolean isRightTurn(int type) {
return type == TR || type == TSHR || type == TSLR || type == TU;
return type == TR || type == TSHR || type == TSLR || type == TRU || type == KR;
}
public static boolean isSlightTurn(int type) {

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources>
<string name="app_name">OsmAnd~</string>
<string name="app_version">2.3.0</string>
<string name="app_version">2.4.0</string>
<!--
Note: For our dev build apk's, the above "app_version" is provided (via osmand/build.xml) as the base version prefix to our build number in the format:
X.X.X#YYYYZ , where

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Some files were not shown because too many files have changed in this diff Show more