summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkoan <jkoan@users.noreply.github.com>2020-11-17 14:44:19 +0100
committerGitHub <noreply@github.com>2020-11-17 14:44:19 +0100
commite5734fcc79abc1d4b18daad232fbe136737ff894 (patch)
treefcfdc085ae89c48cf27940c5745cbff4f63509ae
parentfe3dc4d70200dc7fef951b3fd7e9456e8293ca5c (diff)
parent310570bacdd06319f6a38246902aedd986ecc8ce (diff)
downloadnavit-vehicle_geoclue.tar.gz
Merge branch 'trunk' into vehicle_geocluevehicle_geoclue
-rwxr-xr-xCMakeLists.txt2
-rw-r--r--gradle/wrapper/gradle-wrapper.properties1
-rw-r--r--navit/android/AndroidManifest.xml2
-rw-r--r--navit/android/res/drawable-hdpi/ic_launcher_background.pngbin0 -> 613 bytes
-rw-r--r--navit/android/res/drawable-hdpi/ic_launcher_foreground.pngbin0 -> 3358 bytes
-rw-r--r--navit/android/res/drawable-ldpi/ic_launcher_background.pngbin0 -> 377 bytes
-rw-r--r--navit/android/res/drawable-ldpi/ic_launcher_foreground.pngbin0 -> 1558 bytes
-rw-r--r--navit/android/res/drawable-mdpi/ic_launcher_background.pngbin0 -> 443 bytes
-rw-r--r--navit/android/res/drawable-mdpi/ic_launcher_foreground.pngbin0 -> 1976 bytes
-rw-r--r--navit/android/res/drawable-xhdpi/ic_launcher_background.pngbin0 -> 771 bytes
-rw-r--r--navit/android/res/drawable-xhdpi/ic_launcher_foreground.pngbin0 -> 4582 bytes
-rw-r--r--navit/android/res/drawable-xxhdpi/ic_launcher_background.pngbin0 -> 1242 bytes
-rw-r--r--navit/android/res/drawable-xxhdpi/ic_launcher_foreground.pngbin0 -> 7210 bytes
-rw-r--r--navit/android/res/mipmap-anydpi-v26/ic_launcher.xml5
-rw-r--r--navit/android/res/mipmap-hdpi/ic_launcher.pngbin0 -> 4562 bytes
-rw-r--r--navit/android/res/mipmap-ldpi/ic_launcher.pngbin0 -> 2092 bytes
-rw-r--r--navit/android/res/mipmap-mdpi/ic_launcher.pngbin0 -> 2868 bytes
-rw-r--r--navit/android/res/mipmap-xhdpi/ic_launcher.pngbin0 -> 6201 bytes
-rw-r--r--navit/android/res/mipmap-xxhdpi/ic_launcher.pngbin0 -> 9396 bytes
-rw-r--r--navit/android/src/org/navitproject/navit/Navit.java9
-rw-r--r--navit/command.c2
-rw-r--r--navit/icons/ic_launcher_background.svg140
-rw-r--r--navit/icons/ic_launcher_foreground.svg140
-rw-r--r--navit/map/binfile/binfile.c2
-rw-r--r--navit/osd/core/osd_core.c57
-rw-r--r--navit/plugin/j1850/j1850.c2
26 files changed, 333 insertions, 29 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e86d9cbb0..fcf82f978 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.2)
set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.navitproject.navit")
set(MACOSX_BUNDLE_BUNDLE_NAME "Navit")
message(STATUS "Building with CMake V${CMAKE_VERSION}")
-project(navit C)
+project(navit C CXX)
# Workaround for CMake issue 8345 / 9220, see http://trac.navit-project.org/ticket/1041
if(DEFINED CMAKE_CXX_COMPILER AND CMAKE_CXX_COMPILER MATCHES "^$")
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 25f587d12..7292aa85e 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,3 +3,4 @@ distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-all.zip
+distributionSha256Sum=33214524e686838c88a88e14e8b30e2323589cc9698186bc8e0594758b132b31
diff --git a/navit/android/AndroidManifest.xml b/navit/android/AndroidManifest.xml
index 004ccb707..b9e646097 100644
--- a/navit/android/AndroidManifest.xml
+++ b/navit/android/AndroidManifest.xml
@@ -17,7 +17,7 @@
android:usesCleartextTraffic="true"
android:allowBackup="true"
android:fullBackupContent="@xml/navit_backup_rules"
- android:icon="@drawable/icon"
+ android:icon="@mipmap/ic_launcher"
android:name=".NavitAppConfig">
<activity android:name="Navit"
android:label="@string/app_name"
diff --git a/navit/android/res/drawable-hdpi/ic_launcher_background.png b/navit/android/res/drawable-hdpi/ic_launcher_background.png
new file mode 100644
index 000000000..4d8e2e760
--- /dev/null
+++ b/navit/android/res/drawable-hdpi/ic_launcher_background.png
Binary files differ
diff --git a/navit/android/res/drawable-hdpi/ic_launcher_foreground.png b/navit/android/res/drawable-hdpi/ic_launcher_foreground.png
new file mode 100644
index 000000000..316279d11
--- /dev/null
+++ b/navit/android/res/drawable-hdpi/ic_launcher_foreground.png
Binary files differ
diff --git a/navit/android/res/drawable-ldpi/ic_launcher_background.png b/navit/android/res/drawable-ldpi/ic_launcher_background.png
new file mode 100644
index 000000000..8999f7aa1
--- /dev/null
+++ b/navit/android/res/drawable-ldpi/ic_launcher_background.png
Binary files differ
diff --git a/navit/android/res/drawable-ldpi/ic_launcher_foreground.png b/navit/android/res/drawable-ldpi/ic_launcher_foreground.png
new file mode 100644
index 000000000..e06e327bb
--- /dev/null
+++ b/navit/android/res/drawable-ldpi/ic_launcher_foreground.png
Binary files differ
diff --git a/navit/android/res/drawable-mdpi/ic_launcher_background.png b/navit/android/res/drawable-mdpi/ic_launcher_background.png
new file mode 100644
index 000000000..f2e553f55
--- /dev/null
+++ b/navit/android/res/drawable-mdpi/ic_launcher_background.png
Binary files differ
diff --git a/navit/android/res/drawable-mdpi/ic_launcher_foreground.png b/navit/android/res/drawable-mdpi/ic_launcher_foreground.png
new file mode 100644
index 000000000..0196097fb
--- /dev/null
+++ b/navit/android/res/drawable-mdpi/ic_launcher_foreground.png
Binary files differ
diff --git a/navit/android/res/drawable-xhdpi/ic_launcher_background.png b/navit/android/res/drawable-xhdpi/ic_launcher_background.png
new file mode 100644
index 000000000..58c6beb60
--- /dev/null
+++ b/navit/android/res/drawable-xhdpi/ic_launcher_background.png
Binary files differ
diff --git a/navit/android/res/drawable-xhdpi/ic_launcher_foreground.png b/navit/android/res/drawable-xhdpi/ic_launcher_foreground.png
new file mode 100644
index 000000000..70148579d
--- /dev/null
+++ b/navit/android/res/drawable-xhdpi/ic_launcher_foreground.png
Binary files differ
diff --git a/navit/android/res/drawable-xxhdpi/ic_launcher_background.png b/navit/android/res/drawable-xxhdpi/ic_launcher_background.png
new file mode 100644
index 000000000..df2ea36fb
--- /dev/null
+++ b/navit/android/res/drawable-xxhdpi/ic_launcher_background.png
Binary files differ
diff --git a/navit/android/res/drawable-xxhdpi/ic_launcher_foreground.png b/navit/android/res/drawable-xxhdpi/ic_launcher_foreground.png
new file mode 100644
index 000000000..ce3ccbc22
--- /dev/null
+++ b/navit/android/res/drawable-xxhdpi/ic_launcher_foreground.png
Binary files differ
diff --git a/navit/android/res/mipmap-anydpi-v26/ic_launcher.xml b/navit/android/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 000000000..6b78462d6
--- /dev/null
+++ b/navit/android/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@drawable/ic_launcher_background" />
+ <foreground android:drawable="@drawable/ic_launcher_foreground" />
+</adaptive-icon>
diff --git a/navit/android/res/mipmap-hdpi/ic_launcher.png b/navit/android/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 000000000..ce18b5780
--- /dev/null
+++ b/navit/android/res/mipmap-hdpi/ic_launcher.png
Binary files differ
diff --git a/navit/android/res/mipmap-ldpi/ic_launcher.png b/navit/android/res/mipmap-ldpi/ic_launcher.png
new file mode 100644
index 000000000..183e2f829
--- /dev/null
+++ b/navit/android/res/mipmap-ldpi/ic_launcher.png
Binary files differ
diff --git a/navit/android/res/mipmap-mdpi/ic_launcher.png b/navit/android/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 000000000..1bde1888e
--- /dev/null
+++ b/navit/android/res/mipmap-mdpi/ic_launcher.png
Binary files differ
diff --git a/navit/android/res/mipmap-xhdpi/ic_launcher.png b/navit/android/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 000000000..041c61c03
--- /dev/null
+++ b/navit/android/res/mipmap-xhdpi/ic_launcher.png
Binary files differ
diff --git a/navit/android/res/mipmap-xxhdpi/ic_launcher.png b/navit/android/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 000000000..ad89bd0b5
--- /dev/null
+++ b/navit/android/res/mipmap-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/navit/android/src/org/navitproject/navit/Navit.java b/navit/android/src/org/navitproject/navit/Navit.java
index bacc15213..a9cad9be5 100644
--- a/navit/android/src/org/navitproject/navit/Navit.java
+++ b/navit/android/src/org/navitproject/navit/Navit.java
@@ -248,10 +248,15 @@ public class Navit extends Activity {
private void verifyPermissions() {
if (ContextCompat.checkSelfPermission(this,
- Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
+ Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
+ return;
+ } else if (ContextCompat.checkSelfPermission(this,
+ Manifest.permission.ACCESS_BACKGROUND_LOCATION) == PackageManager.PERMISSION_GRANTED) {
+ return;
+ } else {
Log.d(TAG,"ask for permission(s)");
ActivityCompat.requestPermissions(this, new String[] {
- Manifest.permission.ACCESS_FINE_LOCATION}, MY_PERMISSIONS_REQ_FINE_LOC);
+ Manifest.permission.ACCESS_BACKGROUND_LOCATION}, MY_PERMISSIONS_REQ_FINE_LOC);
}
}
diff --git a/navit/command.c b/navit/command.c
index cc498b1a7..f2c6c0bb0 100644
--- a/navit/command.c
+++ b/navit/command.c
@@ -158,7 +158,7 @@ static void result_free(struct result *res) {
attr_free_content(&res->attr);
res->allocated=0;
} else {
- res->attr.type=type_none;
+ res->attr.type=attr_none;
res->attr.u.data=NULL;
}
}
diff --git a/navit/icons/ic_launcher_background.svg b/navit/icons/ic_launcher_background.svg
new file mode 100644
index 000000000..ab3fe6bd9
--- /dev/null
+++ b/navit/icons/ic_launcher_background.svg
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="108"
+ height="108"
+ viewBox="0 0 28.574999 28.575001"
+ version="1.1"
+ id="svg8"
+ inkscape:version="0.92.3 (2405546, 2018-03-11)"
+ sodipodi:docname="ic_launcher_background.svg">
+ <defs
+ id="defs2">
+ <linearGradient
+ id="linearGradient3728">
+ <stop
+ offset="0"
+ stop-color="#ffda00"
+ id="stop3730" />
+ <stop
+ offset="1"
+ stop-color="#f57f0c"
+ id="stop3732" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3728"
+ id="linearGradient1447"
+ x1="2.6458333"
+ y1="285.35831"
+ x2="31.220835"
+ y2="285.35831"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-2.6458333,-2.6458215)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.6111111"
+ inkscape:cx="53.904385"
+ inkscape:cy="55.960396"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:snap-page="true"
+ inkscape:window-width="1600"
+ inkscape:window-height="816"
+ inkscape:window-x="0"
+ inkscape:window-y="28"
+ inkscape:window-maximized="1"
+ inkscape:snap-others="true"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-nodes="true"
+ inkscape:bbox-paths="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-nodes="true"
+ inkscape:snap-to-guides="false"
+ inkscape:snap-object-midpoints="false"
+ inkscape:snap-center="false"
+ inkscape:snap-bbox-edge-midpoints="false"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:object-paths="true"
+ inkscape:snap-grids="true"
+ inkscape:pagecheckerboard="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid815"
+ empspacing="8"
+ originx="4.7625"
+ originy="4.7625" />
+ <sodipodi:guide
+ position="4.7625,0"
+ orientation="1,0"
+ id="guide817"
+ inkscape:locked="false"
+ inkscape:label=""
+ inkscape:color="rgb(0,0,255)" />
+ <sodipodi:guide
+ position="23.8125,0"
+ orientation="1,0"
+ id="guide819"
+ inkscape:locked="false"
+ inkscape:label=""
+ inkscape:color="rgb(0,0,255)" />
+ <sodipodi:guide
+ position="0,4.7625"
+ orientation="0,1"
+ id="guide821"
+ inkscape:locked="false"
+ inkscape:label=""
+ inkscape:color="rgb(0,0,255)" />
+ <sodipodi:guide
+ position="0,23.8125"
+ orientation="0,1"
+ id="guide823"
+ inkscape:locked="false"
+ inkscape:label=""
+ inkscape:color="rgb(0,0,255)" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata5">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-268.42498)">
+ <rect
+ style="opacity:1;fill:url(#linearGradient1447);fill-opacity:1;stroke:none;stroke-width:0.79374999;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect1439"
+ width="28.575001"
+ height="28.575001"
+ x="-4.4408921e-16"
+ y="268.42499" />
+ </g>
+</svg>
diff --git a/navit/icons/ic_launcher_foreground.svg b/navit/icons/ic_launcher_foreground.svg
new file mode 100644
index 000000000..ef4b12452
--- /dev/null
+++ b/navit/icons/ic_launcher_foreground.svg
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="108"
+ height="108"
+ viewBox="0 0 28.574999 28.575001"
+ version="1.1"
+ id="svg8"
+ inkscape:version="0.92.3 (2405546, 2018-03-11)"
+ sodipodi:docname="ic_launcher_foreground.svg">
+ <defs
+ id="defs2">
+ <linearGradient
+ id="linearGradient3728">
+ <stop
+ offset="0"
+ stop-color="#ffda00"
+ id="stop3730" />
+ <stop
+ offset="1"
+ stop-color="#f57f0c"
+ id="stop3732" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#f5820b"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.6111111"
+ inkscape:cx="53.706082"
+ inkscape:cy="54"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:snap-page="true"
+ inkscape:window-width="1600"
+ inkscape:window-height="816"
+ inkscape:window-x="0"
+ inkscape:window-y="28"
+ inkscape:window-maximized="1"
+ inkscape:snap-others="true"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-nodes="true"
+ inkscape:bbox-paths="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-nodes="true"
+ inkscape:snap-to-guides="false"
+ inkscape:snap-object-midpoints="false"
+ inkscape:snap-center="false"
+ inkscape:snap-bbox-edge-midpoints="false"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:object-paths="true"
+ inkscape:snap-grids="true"
+ inkscape:pagecheckerboard="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid815"
+ empspacing="8"
+ originx="4.7625"
+ originy="4.7625" />
+ <sodipodi:guide
+ position="4.7625,0"
+ orientation="1,0"
+ id="guide817"
+ inkscape:locked="false"
+ inkscape:label=""
+ inkscape:color="rgb(0,0,255)" />
+ <sodipodi:guide
+ position="23.8125,0"
+ orientation="1,0"
+ id="guide819"
+ inkscape:locked="false"
+ inkscape:label=""
+ inkscape:color="rgb(0,0,255)" />
+ <sodipodi:guide
+ position="0,4.7625"
+ orientation="0,1"
+ id="guide821"
+ inkscape:locked="false"
+ inkscape:label=""
+ inkscape:color="rgb(0,0,255)" />
+ <sodipodi:guide
+ position="0,23.8125"
+ orientation="0,1"
+ id="guide823"
+ inkscape:locked="false"
+ inkscape:label=""
+ inkscape:color="rgb(0,0,255)" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata5">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-268.42498)">
+ <g
+ id="g1398"
+ transform="matrix(2.8117887,0,0,2.8159822,-37.178409,-521.06388)">
+ <path
+ id="circle1355-6-5-0"
+ transform="matrix(0.26458333,0,0,0.26458333,0,268.42498)"
+ d="m 69.146484,59.111328 a 5.14193,5.1423346 0 0 0 -1.498046,0.228516 l 2.550781,4.851562 1,2.251953 h 0.0625 c -0.05216,-0.542362 -0.11448,-1.14695 -0.1875,-1.814453 -0.06274,-0.667464 -0.09375,-1.303289 -0.09375,-1.908203 v -3.263672 a 5.14193,5.1423346 0 0 0 -1.833985,-0.345703 z m -3.978515,1.591797 a 5.3333329,5.3333329 0 0 0 -0.316407,0.394531 5.3333329,5.3333329 0 0 1 0.316407,-0.394531 z m 8.050781,0.113281 a 5.3333329,5.3333329 0 0 1 0.3125,0.408203 5.3333329,5.3333329 0 0 0 -0.3125,-0.408203 z m -8.042969,0.173828 a 5.14193,5.1423346 0 0 0 -1.171875,3.263672 5.14193,5.1423346 0 0 0 1.171875,3.263672 z m 7.994141,0.06445 v 6.392578 a 5.14193,5.1423346 0 0 0 1.117187,-3.19336 5.14193,5.1423346 0 0 0 -1.117187,-3.199218 z m -8.333984,0.06445 a 5.3333329,5.3333329 0 0 0 -0.267579,0.408203 5.3333329,5.3333329 0 0 1 0.267579,-0.408203 z M 73.550781,61.25 a 5.3333329,5.3333329 0 0 1 0.25586,0.417969 A 5.3333329,5.3333329 0 0 0 73.550781,61.25 Z m 0.275391,0.457031 a 5.3333329,5.3333329 0 0 1 0.210937,0.431641 5.3333329,5.3333329 0 0 0 -0.210937,-0.431641 z m -6.742188,0.310547 c 0.05212,0.563225 0.109324,1.167814 0.171875,1.814453 0.07279,0.646602 0.109375,1.27204 0.109375,1.876953 v 3.361328 a 5.14193,5.1423346 0 0 0 1.78125,0.326172 5.14193,5.1423346 0 0 0 1.56836,-0.251953 l -2.566406,-4.904297 -1.001954,-2.222656 z"
+ style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.94348323;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:export-ydpi="960"
+ inkscape:export-xdpi="960"
+ sodipodi:nodetypes="cccccccscccccscccccccccccsccccccccccccccsccccccccccccscccccccccccccccccsccccccccscccccccccsccccccccccczccscccz"
+ inkscape:connector-curvature="0"
+ id="path1363-0-6-9"
+ d="m 18.34523,287.68027 -2.57e-4,-0.66573 0.07525,-0.005 c 0.375528,-0.0276 0.726784,-0.18852 0.994434,-0.4554 0.260497,-0.25973 0.417842,-0.58833 0.456602,-0.95356 0.0037,-0.0348 0.0067,-0.0761 0.0067,-0.0918 l 5.1e-5,-0.0287 h 0.65715 c 0.361431,0 0.656288,8.3e-4 0.655236,0.002 -0.0011,10e-4 -0.194008,0.0849 -0.428791,0.18642 -0.234784,0.10144 -0.428648,0.18619 -0.430808,0.1882 -0.0021,0.002 -0.01386,0.0426 -0.02597,0.0901 -0.03745,0.14692 -0.08195,0.26835 -0.14609,0.39869 -0.0474,0.0963 -0.07774,0.1487 -0.140884,0.24321 -0.282438,0.42274 -0.701364,0.71895 -1.204124,0.85141 l -0.02004,0.005 -0.224126,0.45066 -0.224126,0.45067 -2.57e-4,-0.66574 z m -0.250416,0.25886 c -0.09088,-0.20985 -0.166025,-0.38362 -0.16698,-0.38615 -0.0011,-0.003 0.0045,-0.003 0.01521,-10e-4 0.04834,0.009 0.156934,0.0212 0.233246,0.0262 l 0.08607,0.005 v 0.3687 c 0,0.20277 -5.17e-4,0.36867 -0.0012,0.36865 -6.3e-4,0 -0.07551,-0.17173 -0.16639,-0.38159 z m 0.112458,-0.43859 c -0.11655,-0.004 -0.27774,-0.0282 -0.401633,-0.0587 -0.333863,-0.0823 -0.63497,-0.24406 -0.898795,-0.48282 -0.175306,-0.15865 -0.339228,-0.37555 -0.447808,-0.59254 -0.133823,-0.26743 -0.199822,-0.52005 -0.218845,-0.83765 l -0.003,-0.0494 h 0.245304 0.245304 l 0.0029,0.0575 c 0.0034,0.0684 0.01734,0.16786 0.0336,0.24088 0.129105,0.5801 0.570667,1.03662 1.147803,1.18669 0.09279,0.0241 0.254517,0.0481 0.324817,0.0481 h 0.02538 v 0.24557 0.24555 l -0.01035,-9e-4 c -0.0057,-5e-4 -0.02582,-10e-4 -0.04476,-0.002 z m -2.412215,-1.81873 -0.403811,-0.20161 0.383723,-3.5e-4 0.383722,-3.5e-4 0.0031,0.0631 c 0.005,0.10048 0.029,0.28931 0.04233,0.33278 0.0014,0.004 7.2e-4,0.009 -0.0014,0.009 -0.0021,0 -0.185585,-0.0907 -0.407681,-0.20161 z m 0.04685,-0.51192 0.455249,-0.22639 0.0051,-0.0201 c 0.117283,-0.45427 0.388557,-0.85879 0.764306,-1.13967 0.155461,-0.11623 0.337039,-0.21519 0.520976,-0.28396 0.04225,-0.0158 0.160578,-0.0529 0.201337,-0.0632 l 0.02003,-0.005 0.226506,-0.45526 0.226505,-0.45525 1.84e-4,0.67059 1.84e-4,0.67058 -0.06082,0.003 c -0.276758,0.0136 -0.570135,0.11722 -0.806642,0.28493 -0.108357,0.0768 -0.240169,0.20048 -0.318481,0.29874 -0.147166,0.18466 -0.247983,0.38835 -0.303341,0.61287 -0.02413,0.0978 -0.04381,0.23516 -0.04381,0.30564 v 0.0293 l -0.671302,-3e-4 -0.671303,-2.9e-4 z m 4.036163,0.19931 c 0,-0.0152 -0.0032,-0.058 -0.007,-0.095 -0.04715,-0.44897 -0.283842,-0.8539 -0.654554,-1.11979 -0.160125,-0.11485 -0.343297,-0.19907 -0.537117,-0.24692 -0.103467,-0.0256 -0.229085,-0.0437 -0.302703,-0.0437 h -0.03165 v -0.24607 -0.24608 l 0.05622,0.003 c 0.27046,0.0152 0.508594,0.0717 0.745454,0.17701 0.304646,0.13549 0.57804,0.34918 0.78533,0.61381 0.04845,0.0619 0.13372,0.18952 0.170899,0.25588 0.131985,0.23557 0.21819,0.49848 0.249839,0.76196 0.0054,0.0455 0.01634,0.18419 0.01647,0.21 0,0.002 -0.110489,0.003 -0.245554,0.003 h -0.245569 z m 0.565587,-0.0588 c -0.006,-0.0927 -0.01828,-0.19418 -0.03303,-0.27131 -0.005,-0.0263 -0.0086,-0.0482 -0.0081,-0.0486 5.99e-4,-4e-4 0.184922,0.0907 0.409607,0.2025 l 0.408519,0.20323 -0.385749,3e-4 -0.385749,3e-4 -0.0055,-0.0864 z m -1.753592,-1.98152 c -0.08387,-0.017 -0.240907,-0.0342 -0.31181,-0.0343 l -0.03328,-4e-5 v -0.38633 c 0,-0.21249 7.39e-4,-0.38547 0.0016,-0.38443 0.009,0.0107 0.404808,0.81653 0.400792,0.81613 -0.003,-2.9e-4 -0.02877,-0.005 -0.05734,-0.011 z"
+ style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.0045901;stroke-opacity:1" />
+ </g>
+ </g>
+</svg>
diff --git a/navit/map/binfile/binfile.c b/navit/map/binfile/binfile.c
index 6108154b6..ab65dcaf5 100644
--- a/navit/map/binfile/binfile.c
+++ b/navit/map/binfile/binfile.c
@@ -565,7 +565,7 @@ static int binfile_attr_get(void *priv_data, enum attr_type attr_type, struct at
size_rem-=subsize+1;
i++;
}
- mr->attrs[i].type=type_none;
+ mr->attrs[i].type=attr_none;
mr->attrs[i].u.data=NULL;
attr->u.attrs=mr->attrs;
} else {
diff --git a/navit/osd/core/osd_core.c b/navit/osd/core/osd_core.c
index cfbb0655c..40ea4350d 100644
--- a/navit/osd/core/osd_core.c
+++ b/navit/osd/core/osd_core.c
@@ -8,13 +8,13 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
+ * Boston, MA 02110-1301, USA.
*/
#include "config.h"
@@ -450,7 +450,7 @@ static void osd_route_guard_init(struct osd_priv_common *opc, struct navit *nav)
while ((map=mapset_next(msh, 1))) {
struct attr attr;
if(map_get_attr(map, attr_name, &attr, NULL)) {
- if( ! strcmp(this->map_name, attr.u.str) ) {
+ if(!strcmp(this->map_name, attr.u.str) ) {
mr=map_rect_new(map, NULL);
if (mr) {
while ((item=map_rect_get_item(mr))) {
@@ -740,7 +740,7 @@ static void draw_aligned_osd_text(char *buffer, int align, struct osd_item *osd_
}
while (*last) {
- if (! g_ascii_isspace(*last)) {
+ if (!g_ascii_isspace(*last)) {
lines++;
break;
}
@@ -830,7 +830,7 @@ static void osd_odometer_draw(struct osd_priv_common *opc, struct navit *nav, st
int secs;
int imperial=0;
- char buffer [256+1]="";
+ char buffer[256+1]="";
char buffer2[256+1]="";
if(nav) {
@@ -903,7 +903,7 @@ static void osd_odometer_draw(struct osd_priv_common *opc, struct navit *nav, st
time_buffer = g_strdup_printf("%02d:%02d:%02d",hours,mins,secs);
}
- buffer [0] = 0;
+ buffer[0] = 0;
buffer2[0] = 0;
if(this->text) {
str_replace(buffer,this->text,"${avg_spd}",spd_buffer);
@@ -2473,11 +2473,11 @@ static void osd_speed_cam_draw(struct osd_priv_common *opc, struct navit *navit,
}
if(this_->text) {
- char buffer [256]="";
+ char buffer[256]="";
char buffer2[256]="";
char dir_str[16];
char spd_str[16];
- buffer [0] = 0;
+ buffer[0] = 0;
buffer2[0] = 0;
osd_fill_with_bgcolor(&opc->osd_item);
@@ -2692,7 +2692,7 @@ static void osd_speed_warner_draw(struct osd_priv_common *opc, struct navit *nav
img = this->img_active;
}
} else {
- osd_color = this-> grey;
+ osd_color = this->grey;
img = this->img_off;
this->announce_state = eNoWarn;
}
@@ -2898,6 +2898,19 @@ static char *osd_text_format_attr(struct attr *attr, char *format, int imperial)
case attr_position_speed:
return format_speed(*attr->u.numd,"",format,imperial);
case attr_position_height:
+ /**
+ * johnk 8/13/2020
+ * if format is "feet" then return feet
+ * else
+ * if format is "imperial"
+ * return meters or feet as controlled by "imperial"
+ * return meters
+ */
+ if (format &&
+ (!strcmp(format, "feet") || (!strcmp(format, "imperial") && imperial == 1))) {
+ return (format_float_0(*attr->u.numd * FEET_PER_METER) );
+ }
+ return (format_float_0(*attr->u.numd) );
case attr_position_direction:
return format_float_0(*attr->u.numd);
case attr_position_magnetic_direction:
@@ -2966,7 +2979,7 @@ static char *osd_text_format_attr(struct attr *attr, char *format, int imperial)
if (!strcmp(format,"value") || !strcmp(format,"unit")) {
char *ret,*tmp=format_distance(attr->u.num," ",imperial);
char *pos=strchr(tmp,' ');
- if (! pos)
+ if (!pos)
return tmp;
*pos++='\0';
if (!strcmp(format,"value"))
@@ -2982,7 +2995,7 @@ static char *osd_text_format_attr(struct attr *attr, char *format, int imperial)
} else {
if (strstr(format, "local;") == format) {
textt = iso8601_to_secs(attr->u.str);
- memcpy ((void *) &tm, (void *) localtime(&textt), sizeof(tm));
+ memcpy((void *) &tm, (void *) localtime(&textt), sizeof(tm));
strftime(buffer, sizeof(buffer), (char *)(format + 6), &tm);
} else if ((sscanf(format, "%*c%2d:%2d;", &(text_tm.tm_hour), &(text_tm.tm_min)) == 2) && (strchr("+-", format[0]))) {
if (strchr("-", format[0])) {
@@ -2990,7 +3003,7 @@ static char *osd_text_format_attr(struct attr *attr, char *format, int imperial)
} else {
textt = iso8601_to_secs(attr->u.str) + text_tm.tm_hour * 3600 + text_tm.tm_min * 60;
}
- memcpy ((void *) &tm, (void *) gmtime(&textt), sizeof(tm));
+ memcpy((void *) &tm, (void *) gmtime(&textt), sizeof(tm));
strftime(buffer, sizeof(buffer), &format[strcspn(format, ";") + 1], &tm);
} else {
sscanf(attr->u.str, "%4d-%2d-%2dT%2d:%2d:%2d", &(tm.tm_year), &(tm.tm_mon), &(tm.tm_mday), &(tm.tm_hour), &(tm.tm_min),
@@ -3214,7 +3227,7 @@ static void osd_text_draw(struct osd_priv_common *opc, struct navit *navit, stru
}
while (*last) {
- if (! g_ascii_isspace(*last)) {
+ if (!g_ascii_isspace(*last)) {
lines++;
break;
}
@@ -3336,7 +3349,7 @@ static void osd_text_prepare(struct osd_priv_common *opc, struct navit *nav) {
}
end=strstr(start,"}");
- if (! end)
+ if (!end)
break;
*end++='\0';
@@ -3525,7 +3538,7 @@ static void osd_gps_status_draw(struct osd_priv_common *opc, struct navit *navit
if (gr_image) {
p.x = (opc->osd_item.w - gr_image->width) / 2;
p.y = (opc->osd_item.h - gr_image->height) / 2;
- graphics_draw_image(opc->osd_item.gr, opc->osd_item. graphic_fg, &p, gr_image);
+ graphics_draw_image(opc->osd_item.gr, opc->osd_item.graphic_fg, &p, gr_image);
graphics_image_free(opc->osd_item.gr, gr_image);
}
g_free(image);
@@ -3611,7 +3624,7 @@ static void osd_volume_draw(struct osd_priv_common *opc, struct navit *navit, st
if (gr_image) {
p.x = (opc->osd_item.w - gr_image->width) / 2;
p.y = (opc->osd_item.h - gr_image->height) / 2;
- graphics_draw_image(opc->osd_item.gr, opc->osd_item. graphic_fg, &p, gr_image);
+ graphics_draw_image(opc->osd_item.gr, opc->osd_item.graphic_fg, &p, gr_image);
graphics_image_free(opc->osd_item.gr, gr_image);
}
g_free(image);
@@ -3643,7 +3656,7 @@ static void osd_volume_init(struct osd_priv_common *opc, struct navit *nav) {
struct volume *this = (struct volume *)opc->data;
osd_set_std_graphic(nav, &opc->osd_item, (struct osd_priv *)opc);
- navit_add_callback(nav, this->click_cb = callback_new_attr_1(callback_cast (osd_volume_click), attr_button, opc));
+ navit_add_callback(nav, this->click_cb = callback_new_attr_1(callback_cast(osd_volume_click), attr_button, opc));
osd_volume_draw(opc, nav, NULL);
}
@@ -3827,7 +3840,7 @@ static struct osd_priv *osd_scale_new(struct navit *nav, struct osd_methods *met
osd_set_std_attr(attrs, &opc->osd_item, TRANSPARENT_BG | ITEM_HAS_TEXT);
- navit_add_callback(nav, this->navit_init_cb = callback_new_attr_1(callback_cast (osd_scale_init), attr_graphics_ready,
+ navit_add_callback(nav, this->navit_init_cb = callback_new_attr_1(callback_cast(osd_scale_init), attr_graphics_ready,
opc));
return (struct osd_priv *) opc;
@@ -3891,17 +3904,17 @@ static void osd_auxmap_init(struct osd_priv_common *opc, struct navit *nav) {
struct color red= {0xffff,0x0,0x0,0xffff};
this->nav=nav;
- if (! navit_get_attr(nav, attr_graphics, &attr, NULL))
+ if (!navit_get_attr(nav, attr_graphics, &attr, NULL))
return;
gra=attr.u.graphics;
graphics_add_callback(gra, callback_new_attr_1(callback_cast(osd_auxmap_draw), attr_postdraw, opc));
- if (! navit_get_attr(nav, attr_transformation, &attr, NULL))
+ if (!navit_get_attr(nav, attr_transformation, &attr, NULL))
return;
this->ntrans=attr.u.transformation;
- if (! navit_get_attr(nav, attr_displaylist, &attr, NULL))
+ if (!navit_get_attr(nav, attr_displaylist, &attr, NULL) )
return;
this->displaylist=attr.u.displaylist;
- if (! navit_get_attr(nav, attr_layout, &attr, NULL))
+ if (!navit_get_attr(nav, attr_layout, &attr, NULL))
return;
this->layout=attr.u.layout;
osd_set_std_graphic(nav, &opc->osd_item, NULL);
diff --git a/navit/plugin/j1850/j1850.c b/navit/plugin/j1850/j1850.c
index 69a9b8fa5..bdef8a4fa 100644
--- a/navit/plugin/j1850/j1850.c
+++ b/navit/plugin/j1850/j1850.c
@@ -316,7 +316,7 @@ static void osd_j1850_init(struct j1850 *this, struct navit *nav) {
graphics_gc_set_linewidth(this->white, this->width);
- graphics_gc_set_linewidth(this->osd_item.graphic_fg_white, this->width);
+ graphics_gc_set_linewidth(this->osd_item.graphic_fg, this->width);
event_add_timeout(500, 1, callback_new_1(callback_cast(osd_j1850_draw), this));