Merge pull request #806 from afischerdev/lib-workaround
Lib small workaround
This commit is contained in:
commit
fcc0d5ce60
3 changed files with 21 additions and 6 deletions
|
|
@ -580,7 +580,11 @@ public class VoiceHint {
|
|||
} else if (lowerBadWayAngle >= -100.f && higherBadWayAngle < 45.f) {
|
||||
cmd = KL;
|
||||
} else {
|
||||
cmd = C;
|
||||
if (lowerBadWayAngle > -35.f && higherBadWayAngle > 55.f) {
|
||||
cmd = KR;
|
||||
} else {
|
||||
cmd = C;
|
||||
}
|
||||
}
|
||||
} else if (cmdAngle < 5.f) {
|
||||
if (lowerBadWayAngle > -30.f) {
|
||||
|
|
@ -597,7 +601,11 @@ public class VoiceHint {
|
|||
} else if (lowerBadWayAngle > -45.f && higherBadWayAngle <= 100.f) {
|
||||
cmd = KR;
|
||||
} else {
|
||||
cmd = C;
|
||||
if (lowerBadWayAngle < -55.f && higherBadWayAngle < 35.f) {
|
||||
cmd = KL;
|
||||
} else {
|
||||
cmd = C;
|
||||
}
|
||||
}
|
||||
} else if (cmdAngle < 45.f) {
|
||||
cmd = TSLR;
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ public final class VoiceHintProcessor {
|
|||
input.angle = roundAboutTurnAngle;
|
||||
input.goodWay.turnangle = roundAboutTurnAngle;
|
||||
input.distanceToNext = distance;
|
||||
input.turnAngleConsumed = true;
|
||||
//input.roundaboutExit = startTurn < 0 ? roundaboutExit : -roundaboutExit;
|
||||
input.roundaboutExit = roundAboutTurnAngle < 0 ? roundaboutExit : -roundaboutExit;
|
||||
float tmpangle = 0;
|
||||
|
|
@ -314,7 +315,13 @@ public final class VoiceHintProcessor {
|
|||
input.cmd == VoiceHint.KR ||
|
||||
input.cmd == VoiceHint.KL)
|
||||
&& !input.goodWay.isLinktType()) {
|
||||
if (input.goodWay.getPrio() < input.maxBadPrio && (inputLastSaved != null && inputLastSaved.distanceToNext > catchingRange)) {
|
||||
if (
|
||||
((Math.abs(input.lowerBadWayAngle) < 35.f ||
|
||||
input.higherBadWayAngle < 35.f)
|
||||
|| input.goodWay.getPrio() < input.maxBadPrio)
|
||||
&& (inputLastSaved != null && inputLastSaved.distanceToNext > minRange)
|
||||
&& (input.distanceToNext > minRange)
|
||||
) {
|
||||
results.add(input);
|
||||
} else {
|
||||
if (inputLast != null) { // when drop add distance to last
|
||||
|
|
|
|||
|
|
@ -782,7 +782,7 @@ public abstract class BExpressionContext implements IByteArrayUnifier {
|
|||
|
||||
public void parseFile(File file, String readOnlyContext, Map<String, String> keyValues) {
|
||||
if (!file.exists()) {
|
||||
throw new IllegalArgumentException("profile " + file + " does not exist");
|
||||
throw new IllegalArgumentException("profile " + file.getName() + " does not exist");
|
||||
}
|
||||
try {
|
||||
if (readOnlyContext != null) {
|
||||
|
|
@ -813,12 +813,12 @@ public abstract class BExpressionContext implements IByteArrayUnifier {
|
|||
variableData[i] = readOnlyData[i];
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new IllegalArgumentException("ParseException " + file + " at line " + linenr + ": " + e.getMessage());
|
||||
throw new IllegalArgumentException("ParseException " + file.getName() + " at line " + linenr + ": " + e.getMessage());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (expressionList.size() == 0) {
|
||||
throw new IllegalArgumentException(file.getAbsolutePath()
|
||||
throw new IllegalArgumentException(file.getName()
|
||||
+ " does not contain expressions for context " + context + " (old version?)");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue