summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2018-08-31 16:48:47 +0200
committerasanoaozora <fifitaneki@hotmail.com>2018-08-31 16:48:47 +0200
commitb7c2c11d1073c3d3c611002c15e24c4d866ef39a (patch)
tree0cd5bba553c4e32514d320239d48ed814f84a3b9
parent9346ef5281125ab7ea81d8e4ec13e9b3ed1b427b (diff)
downloadpoi-service-b7c2c11d1073c3d3c611002c15e24c4d866ef39a.tar.gz
Align with latest version of navit, fix some issues
Built with gcc 7.3.0, tested on Ubuntu 18.04
-rw-r--r--src/navigation/CMakeLists.txt2
-rw-r--r--src/navigation/README.md2
-rwxr-xr-xsrc/navigation/build.sh15
-rw-r--r--src/navigation/navigation-core/enhancedposition-plugin/genivi_positioning_enhancedposition.cxx9
-rw-r--r--src/navigation/patches/avoid-crash-on-guidance-when-delete-and-recreate-route.diff18
-rw-r--r--src/navigation/patches/fsa_issue_padding.diff20
-rwxr-xr-xsrc/navigation/update_third_party.sh2
-rwxr-xr-xsrc/poi-service/poi-manager-server/build.sh14
-rwxr-xr-xtest/poi-service/poi-manager-client/build.sh12
9 files changed, 50 insertions, 44 deletions
diff --git a/src/navigation/CMakeLists.txt b/src/navigation/CMakeLists.txt
index 547f879..fe525b9 100644
--- a/src/navigation/CMakeLists.txt
+++ b/src/navigation/CMakeLists.txt
@@ -97,8 +97,6 @@ if(NOT ${YOCTO_CONFIG})
endif()
set(WITH_FRANCA_DBUS_INTERFACE "ON" CACHE INTERNAL "")
set(WITH_DBUS_INTERFACE "OFF" CACHE INTERNAL "")
- set(COMMONAPI_TOOL_GENERATOR "${COMMONAPI_TOOL_DIR}/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/${OS_VERSION}/commonapi-generator-linux-${OS_VERSION}" CACHE INTERNAL "")
- set(COMMONAPI_DBUS_TOOL_GENERATOR "${COMMONAPI_DBUS_TOOL_DIR}/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/${OS_VERSION}/commonapi-dbus-generator-linux-${OS_VERSION}" CACHE INTERNAL "")
if(hasParent)
set(COMMONAPI_GEN_DIR_POSITIONING "${COMMONAPI_GEN_DIR}" PARENT_SCOPE)
else()
diff --git a/src/navigation/README.md b/src/navigation/README.md
index 1a2f4fe..8e76194 100644
--- a/src/navigation/README.md
+++ b/src/navigation/README.md
@@ -42,7 +42,7 @@ sudo apt-get install python-pip python-dbus python-gobject python-pil
sudo pip install --upgrade pip
To test, launch the navigation middleware by entering:
-../../src/navigation/run -r -p
+../../src/navigation/run -p
and the test batch:
./test-all
diff --git a/src/navigation/build.sh b/src/navigation/build.sh
index f8daf55..c209855 100755
--- a/src/navigation/build.sh
+++ b/src/navigation/build.sh
@@ -40,17 +40,17 @@ speech_option="OFF"
function check_path_for_capi
{
echo 'check path for CommonAPI'
- if [ ! $COMMONAPI_TOOL_DIR ]
+ if [ ! $COMMONAPI_TOOL_GENERATOR ]
then
- echo 'Set the dir of the common api tools'
- echo 'export COMMONAPI_TOOL_DIR=<path>'
+ echo 'Set the link to the common api generator'
+ echo 'export COMMONAPI_TOOL_GENERATOR=<tool>'
exit 1
fi
- if [ ! $COMMONAPI_DBUS_TOOL_DIR ]
+ if [ ! $COMMONAPI_DBUS_TOOL_GENERATOR ]
then
- echo 'Set the dir of the common api dbus tools'
- echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>'
+ echo 'Set the link to the common api dbus generator'
+ echo 'export COMMONAPI_DBUS_TOOL_GENERATOR=<tool>'
exit 1
fi
@@ -60,7 +60,8 @@ function check_path_for_capi
echo 'export DBUS_LIB_PATH=<path>'
exit 1
fi
- commonapi_tools_option="-DWITH_PLUGIN_MIGRATION=ON -DWITH_DBUS_INTERFACE=OFF -DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR
+
+ commonapi_tools_option="-DWITH_PLUGIN_MIGRATION=ON -DWITH_DBUS_INTERFACE=OFF -DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_GENERATOR="$COMMONAPI_DBUS_TOOL_GENERATOR" -DCOMMONAPI_TOOL_GENERATOR="$COMMONAPI_TOOL_GENERATOR
}
while getopts cdlmhnps opt
diff --git a/src/navigation/navigation-core/enhancedposition-plugin/genivi_positioning_enhancedposition.cxx b/src/navigation/navigation-core/enhancedposition-plugin/genivi_positioning_enhancedposition.cxx
index db4de89..e6eece4 100644
--- a/src/navigation/navigation-core/enhancedposition-plugin/genivi_positioning_enhancedposition.cxx
+++ b/src/navigation/navigation-core/enhancedposition-plugin/genivi_positioning_enhancedposition.cxx
@@ -48,6 +48,10 @@
#include "time.h"
+#include "log.h"
+
+DLT_DECLARE_CONTEXT(gCtx);
+
#if (!DEBUG_ENABLED)
#undef dbg
#define dbg(level,...) ;
@@ -274,7 +278,10 @@ vehicle_enhancedposition_new(struct vehicle_methods *meth,
void plugin_init(void)
{
- event_request_system("glib","genivi_navigationcore_enhpos");
+ DLT_REGISTER_APP("ENHPC","ENHPOS CLIENT");
+ DLT_REGISTER_CONTEXT(gCtx,"ENHPC","Global Context");
+
+ event_request_system("glib","genivi_navigationcore_enhpos");
dispatcher.attach(NULL);
DBus::default_dispatcher = &dispatcher;
conn = new DBus::Connection(DBus::Connection::SessionBus());
diff --git a/src/navigation/patches/avoid-crash-on-guidance-when-delete-and-recreate-route.diff b/src/navigation/patches/avoid-crash-on-guidance-when-delete-and-recreate-route.diff
index 90fae7d..d6ee7b7 100644
--- a/src/navigation/patches/avoid-crash-on-guidance-when-delete-and-recreate-route.diff
+++ b/src/navigation/patches/avoid-crash-on-guidance-when-delete-and-recreate-route.diff
@@ -2,12 +2,12 @@ Index: navit/navit/route.c
===================================================================
--- navit/route.c (revision 5827)
+++ navit/route.c (working copy)
-@@ -4103,7 +4103,7 @@ route_remove_attr(struct route *this_, struct attr *attr)
- dbg(lvl_debug,"enter\n");
- switch (attr->type) {
- case attr_callback:
-- callback_list_remove(this_->cbl2, attr->u.callback);
-+// callback_list_remove(this_->cbl2, attr->u.callback);
- return 1;
- case attr_vehicle:
- this_->v=NULL;
+@@ -3926,7 +3926,7 @@ int route_remove_attr(struct route *this_, struct attr *attr) {
+ dbg(lvl_debug,"enter");
+ switch (attr->type) {
+ case attr_callback:
+- callback_list_remove(this_->cbl2, attr->u.callback);
++// callback_list_remove(this_->cbl2, attr->u.callback);
+ return 1;
+ case attr_vehicle:
+ this_->v=NULL;
diff --git a/src/navigation/patches/fsa_issue_padding.diff b/src/navigation/patches/fsa_issue_padding.diff
index a28345b..00f8925 100644
--- a/src/navigation/patches/fsa_issue_padding.diff
+++ b/src/navigation/patches/fsa_issue_padding.diff
@@ -2,18 +2,18 @@ Index: navit/navit/navit.c
===================================================================
--- navit/navit.c (revision 5827)
+++ navit/navit.c (working copy)
-@@ -2392,12 +2392,12 @@ navit_get_cursor_pnt(struct navit *this_, struct point *p, int keep_orientation,
- offset = (max_offset - min_offset) / (max_offset_speed - min_offset_speed) * (nv->speed - min_offset_speed);
- }
+@@ -2229,12 +2229,12 @@ static int navit_get_cursor_pnt(struct navit *this_, struct point *p, int keep_o
+ offset = (max_offset - min_offset) / (max_offset_speed - min_offset_speed) * (nv->speed - min_offset_speed);
+ }
#endif
-
+#if 0
- if (this_->gra) {
- padding = graphics_get_data(this_->gra, "padding");
- } else
- dbg(lvl_warning, "cannot get padding: this->gra is NULL");
+ if (this_->gra) {
+ padding = graphics_get_data(this_->gra, "padding");
+ } else
+ dbg(lvl_warning, "cannot get padding: this->gra is NULL");
-
+#endif
- transform_get_size(this_->trans, &width, &height);
- dbg(lvl_debug, "width=%d height=%d", width, height);
-
+ transform_get_size(this_->trans, &width, &height);
+ dbg(lvl_debug, "width=%d height=%d", width, height);
+
diff --git a/src/navigation/update_third_party.sh b/src/navigation/update_third_party.sh
index 2304a76..10da30b 100755
--- a/src/navigation/update_third_party.sh
+++ b/src/navigation/update_third_party.sh
@@ -1,7 +1,7 @@
#!/bin/bash
positioning_version='d4c46f13019aefb11aebd0fc1210a29a46f0b521'
-navit_version='03f3aa8637fff3e8e09d3bde21b28654454011fd'
+navit_version='d43c04ed6cdb0e8e79fb4128bc3421f9eed1028e'
echo "version of positioning is: $positioning_version"
echo "version of navit is: $navit_version"
diff --git a/src/poi-service/poi-manager-server/build.sh b/src/poi-service/poi-manager-server/build.sh
index 9769fad..8fb1564 100755
--- a/src/poi-service/poi-manager-server/build.sh
+++ b/src/poi-service/poi-manager-server/build.sh
@@ -22,17 +22,17 @@ do
done
set -e
-if [ ! $COMMONAPI_TOOL_DIR ]
+if [ ! $COMMONAPI_TOOL_GENERATOR ]
then
- echo 'Set the dir of the common api tools'
- echo 'export COMMONAPI_TOOL_DIR=<path>'
+ echo 'Set the link to the common api generator'
+ echo 'export COMMONAPI_TOOL_GENERATOR=<tool>'
exit 1
fi
-if [ ! $COMMONAPI_DBUS_TOOL_DIR ]
+if [ ! $COMMONAPI_DBUS_TOOL_GENERATOR ]
then
- echo 'Set the dir of the common api dbus tools'
- echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>'
+ echo 'Set the link to the common api dbus generator'
+ echo 'export COMMONAPI_DBUS_TOOL_GENERATOR=<tool>'
exit 1
fi
@@ -43,7 +43,7 @@ then
exit 1
fi
-commonapi_tools_option="-DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR
+commonapi_tools_option="-DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_GENERATOR="$COMMONAPI_DBUS_TOOL_GENERATOR" -DCOMMONAPI_TOOL_GENERATOR="$COMMONAPI_TOOL_GENERATOR
if [ "$clean" = 1 ]
diff --git a/test/poi-service/poi-manager-client/build.sh b/test/poi-service/poi-manager-client/build.sh
index aea6e4a..bcf6d4e 100755
--- a/test/poi-service/poi-manager-client/build.sh
+++ b/test/poi-service/poi-manager-client/build.sh
@@ -22,17 +22,17 @@ do
done
set -e
-if [ ! $COMMONAPI_TOOL_DIR ]
+if [ ! $COMMONAPI_TOOL_GENERATOR ]
then
- echo 'Set the dir of the common api tools'
- echo 'export COMMONAPI_TOOL_DIR=<path>'
+ echo 'Set the link to the common api generator'
+ echo 'export COMMONAPI_TOOL_GENERATOR=<tool>'
exit 1
fi
-if [ ! $COMMONAPI_DBUS_TOOL_DIR ]
+if [ ! $COMMONAPI_DBUS_TOOL_GENERATOR ]
then
- echo 'Set the dir of the common api dbus tools'
- echo 'export COMMONAPI_DBUS_TOOL_DIR=<path>'
+ echo 'Set the link to the common api dbus generator'
+ echo 'export COMMONAPI_DBUS_TOOL_GENERATOR=<tool>'
exit 1
fi