From b7c2c11d1073c3d3c611002c15e24c4d866ef39a Mon Sep 17 00:00:00 2001 From: asanoaozora Date: Fri, 31 Aug 2018 16:48:47 +0200 Subject: Align with latest version of navit, fix some issues Built with gcc 7.3.0, tested on Ubuntu 18.04 --- src/navigation/CMakeLists.txt | 2 -- src/navigation/README.md | 2 +- src/navigation/build.sh | 15 ++++++++------- .../genivi_positioning_enhancedposition.cxx | 9 ++++++++- ...h-on-guidance-when-delete-and-recreate-route.diff | 18 +++++++++--------- src/navigation/patches/fsa_issue_padding.diff | 20 ++++++++++---------- src/navigation/update_third_party.sh | 2 +- src/poi-service/poi-manager-server/build.sh | 14 +++++++------- test/poi-service/poi-manager-client/build.sh | 12 ++++++------ 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=' + echo 'Set the link to the common api generator' + echo 'export COMMONAPI_TOOL_GENERATOR=' 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=' + echo 'Set the link to the common api dbus generator' + echo 'export COMMONAPI_DBUS_TOOL_GENERATOR=' exit 1 fi @@ -60,7 +60,8 @@ function check_path_for_capi echo 'export DBUS_LIB_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=' + echo 'Set the link to the common api generator' + echo 'export COMMONAPI_TOOL_GENERATOR=' 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=' + echo 'Set the link to the common api dbus generator' + echo 'export COMMONAPI_DBUS_TOOL_GENERATOR=' 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=' + echo 'Set the link to the common api generator' + echo 'export COMMONAPI_TOOL_GENERATOR=' 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=' + echo 'Set the link to the common api dbus generator' + echo 'export COMMONAPI_DBUS_TOOL_GENERATOR=' exit 1 fi -- cgit v1.2.1