introducing engineMode for future use

This commit is contained in:
afischerdev 2023-05-09 12:26:54 +02:00
parent 0c32770cfd
commit 3dffea1753
5 changed files with 48 additions and 3 deletions

View file

@ -34,6 +34,7 @@ interface IBRouterService {
// "timode" = turnInstructionMode [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-old-style] default 0
// "heading" = angle (optional to give a route a start direction)
// "direction" = angle (optional, used like "heading" on a recalculation request by Locus as start direction)
// "engineMode" = 0 (optional, no more modes defined at the moment)
// return null if all ok and no path given, the track if ok and path given, an error message if it was wrong
// the resultas string when 'pathToFileResult' is null, this should be default when Android Q or later

View file

@ -141,13 +141,17 @@ public class BRouterWorker {
}
}
int engineMode = 0;
if (params.containsKey("engineMode")) {
engineMode = params.getInt("engineMode", 0);
}
try {
writeTimeoutData(rc);
} catch (Exception e) {
}
RoutingEngine cr = new RoutingEngine(null, null, segmentDir, waypoints, rc);
RoutingEngine cr = new RoutingEngine(engineMode, null, null, segmentDir, waypoints, rc);
cr.quite = true;
cr.doRun(maxRunningTime);