diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/build.sh | 116 | ||||
-rwxr-xr-x | src/clone_and_build.sh | 59 | ||||
-rwxr-xr-x | src/update_navit.sh | 23 | ||||
-rwxr-xr-x | src/update_third_party.sh | 89 | ||||
-rw-r--r-- | src/vehicle-gateway/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/vehicle-gateway/veh-gateway.cpp | 3 |
6 files changed, 162 insertions, 132 deletions
diff --git a/src/build.sh b/src/build.sh index 4c747cd..e86a501 100755 --- a/src/build.sh +++ b/src/build.sh @@ -1,14 +1,44 @@ #!/bin/bash -debug="OFF" -html="OFF" -clean=0 -capi=0 -navit=0 -gateway="OFF" -theme_option="OFF" -pack_for_gdp=0 -commonapi_tools_option="" +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# \copyright Copyright (C) 2013-2017, PSA Group +# +# \file build.sh +# +# \brief This file is part of the Build System for navigation-application. +# +# \author Philippe Colliot <philippe.colliot@mpsa.com> +# +# \version 1.0 +# +# This Source Code Form is subject to the terms of the +# Mozilla Public License (MPL), v. 2.0. +# If a copy of the MPL was not distributed with this file, +# You can obtain one at http://mozilla.org/MPL/2.0/. +# +# For further information see http://www.genivi.org/. +# +# List of changes: +# +# +# @licence end@ +########################################################################### + +clean=0 #no clean (means no cmake) -> -c option +capi=0 #no common api -> -m option +commonapi_tools_option="-DWITH_PLUGIN_MIGRATION=OFF" +navit=0 #no build of navit -> -n option +poi=0 #no build of poi -> -p option +dlt_option="OFF" #no DLT -> -l option +debug="OFF" #no debug -> -d option +gateway="OFF" #no vehicle gateway -> -g option +theme_option="OFF" #no HMI theme -> -t option +pack_for_gdp=0 #no tar generated +html="OFF" #no html interface (draft) + function check_path_for_capi { @@ -36,7 +66,7 @@ function check_path_for_capi commonapi_tools_option="-DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR"" } -while getopts cdmghnt opt +while getopts cdghlmntw opt do case $opt in c) @@ -45,14 +75,16 @@ do d) debug="ON" ;; - m) - capi=1 - ;; g) gateway="ON" ;; - h) - html="ON" + l) + dlt_option="ON" + ;; + m) + capi=1 + #check commonapi settings + check_path_for_capi ;; n) navit=1 @@ -61,43 +93,39 @@ do theme_option="ON" pack_for_gdp=1 ;; - \?) + w) + html="ON" + ;; + h) echo "Usage:" - echo "$0 [-cdmhnt]" + echo "$0 [-cdghlmntw]" echo "-c: Rebuild with clean" echo "-d: Enable the debug messages" - echo "-h: Enable migration to the html based hmi" echo "-g: Build the vehicle gateway" - echo "-m: Build with commonAPI plugins " + echo "-h: Help" + echo "-l: Build with dlt (only with -c)" + echo "-m: Build with commonAPI plugins (only with -c)" echo "-n: Build navit" echo "-t: Generate the HMI theme" + echo "-w: Enable migration to the html based hmi" exit 1 esac done set -e -if [ "$capi" = 1 ] -then - check_path_for_capi -fi - -if [ "$clean" = 1 ] +#clean +if [ "$clean" = 1 ] && [ -d "./build" ] then - if [ -d "./build" ] + if [ "$navit" = 1 ] then - if [ "$navit" = 1 ] - then - echo 'clean up the build folder and regenerate all the stuff' - find ./build ! -name '*.cbp' -type f -exec rm -f {} + - else - echo 'clean up the build folder and regenerate all the stuff except navit ' - rm -f ./build/CMakeCache.txt - rm -f ./build/cmake_install.cmake - rm -f ./build/Makefile - fi + echo 'clean up the build folder and regenerate all the stuff' + find ./build ! -name '*.cbp' -type f -exec rm -f {} + + else + echo 'clean up the build folder and regenerate all the stuff except navit ' + rm -f ./build/CMakeCache.txt + rm -f ./build/cmake_install.cmake + rm -f ./build/Makefile fi -else - echo 'just build without generation of the hmi' fi mkdir -p build @@ -129,17 +157,7 @@ echo 'build fsa' if [ "$clean" = 1 ] then - if [ "$capi" = 0 ] - then - cmake -DWITH_STYLESHEET=$theme_option -DWITH_VEHICLE_GATEWAY=$gateway -DWITH_HTML_MIGRATION=$html -DWITH_PLUGIN_MIGRATION=OFF -DWITH_DEBUG=$debug ../ - else - cmake -DWITH_STYLESHEET=$theme_option -DWITH_VEHICLE_GATEWAY=$gateway -DWITH_HTML_MIGRATION=$html -DWITH_PLUGIN_MIGRATION=ON -DWITH_DBUS_INTERFACE=OFF $commonapi_tools_option -DWITH_DEBUG=$debug ../ - echo 'fix a bug in the generation of CommonAPI hpp' - sed -i -e 's/(const TimeStampedEnum::/(const ::v4::org::genivi::navigation::navigationcore::NavigationCoreTypes::TimeStampedEnum::/' ./navigation/franca/src-gen/v4/org/genivi/navigation/navigationcore/LocationInput.hpp - sed -i -e 's/(const TimeStampedEnum::/(const ::v4::org::genivi::navigation::navigationcore::NavigationCoreTypes::TimeStampedEnum::/' ./navigation/franca/src-gen/v4/org/genivi/navigation/navigationcore/MapMatchedPosition.hpp - sed -i -e 's/(const TimeStampedEnum::/(const ::v4::org::genivi::navigation::navigationcore::NavigationCoreTypes::TimeStampedEnum::/' ./poi-service/poi-server-capi/src-gen/v4/org/genivi/navigation/navigationcore/LocationInput.hpp - sed -i -e 's/(const TimeStampedEnum::/(const ::v4::org::genivi::navigation::navigationcore::NavigationCoreTypes::TimeStampedEnum::/' ./poi-service/poi-server-capi/src-gen/v4/org/genivi/navigation/navigationcore/MapMatchedPosition.hpp - fi + cmake -DWITH_DLT=$dlt_option $commonapi_tools_option -DWITH_DEBUG=$debug -DWITH_STYLESHEET=$theme_option -DWITH_VEHICLE_GATEWAY=$gateway -DWITH_HTML_MIGRATION=$html ../ echo 'replace a missing font in the configuration file of navit instances' sed -i -e 's/Liberation Sans/TakaoPGothic/' ./navigation/navit/navit/navit_genivi_mapviewer.xml sed -i -e 's/Liberation Sans/TakaoPGothic/' ./navigation/navit/navit/navit_genivi_navigationcore.xml diff --git a/src/clone_and_build.sh b/src/clone_and_build.sh deleted file mode 100755 index ee6d61b..0000000 --- a/src/clone_and_build.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -build_option="" -navigation_version='c72289b6a9b82723f38d991629de8677a260f9fd' -positioning_version='9725fe1f553197042d6445997690d452a73490c0' -navit_version='1e71b5fd4c0bf5ac96e5207c51db7d17057ed798' - -echo "version of navigation is: $navigation_version" -echo "version of positioning is: $positioning_version" -echo "version of navit is: $navit_version" - -echo -n "This script deletes, reloads and builds everything, are you sure ? (y or n) " -read input - -if [ "$input" = 'n' ] -then - exit 1 -fi - -while getopts m opt -do - case $opt in - m) - build_option="-m" - ;; - \?) - echo "Usage:" - echo "$0 [-m]" - echo "-m: build with commonAPI plugins " - exit 1 - esac -done - -if [ -d "./build" ] -then - find ./build ! -name '*.cbp' -type f -exec rm -f {} + -fi -rm -rf navigation -rm -rf automotive-message-broker - -git clone https://github.com/GENIVI/navigation.git ./navigation -cd navigation -git checkout $navigation_version -cd src/navigation -git clone https://github.com/GENIVI/positioning.git ./positioning -cd positioning -git checkout $positioning_version -cd .. -git clone https://github.com/navit-gps/navit.git -cd navit -git checkout $navit_version -patch -p0 -i ../patches/search_list_get_unique.diff -patch -p0 -i ../patches/fsa_issue_padding.diff -cd ../../../../ - -./build.sh -t -c -n $build_option - - - diff --git a/src/update_navit.sh b/src/update_navit.sh deleted file mode 100755 index 7e85cad..0000000 --- a/src/update_navit.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -if [ $# -eq 0 ] - then - echo "Need navit commit version" - exit -fi - -navit_version=$1 - - -rm -rf build/navigation/navit -rm -rf navigation/src/navigation/navit - -cd navigation/src/navigation -git clone https://github.com/navit-gps/navit.git -cd navit -git checkout $navit_version -patch -p0 -i ../patches/search_list_get_unique.diff -patch -p0 -i ../patches/fsa_issue_padding.diff -cd ../../../../ - - diff --git a/src/update_third_party.sh b/src/update_third_party.sh new file mode 100755 index 0000000..8b07be1 --- /dev/null +++ b/src/update_third_party.sh @@ -0,0 +1,89 @@ +#!/bin/bash + +navigation=0 +navit=0 +navigation_version='56837f0237fadedd325940630601061bd7bbd30f' +positioning_version='9725fe1f553197042d6445997690d452a73490c0' +navit_version='1e71b5fd4c0bf5ac96e5207c51db7d17057ed798' + +if [ $# -lt 1 ] ; then + echo "Argument required, please enter -h " + exit 1 +fi + +while getopts a:hn:d opt +do + case $opt in + a) + navigation=1 + navigation_version=$OPTARG + ;; + n) + navit=1 + navit_version=$OPTARG + ;; + d) + navigation=1 + navit=1 + ;; + h) + echo "Usage:" + echo "$0 [-ahnd]" + echo "-a <navigation version>: clean and load this version of navigation " + echo "-h: Help" + echo "-n <navit version>: clean and load this version of navit " + echo "-d clean and load all with default version " + exit 1 + esac +done + +echo "version of navigation is: $navigation_version" +echo "version of positioning is: $positioning_version" +echo "version of navit is: $navit_version" + +echo "This script deletes and reloads third party software" +echo -n "So rebuild will be necessary, are you sure ? (y or n) " +read input + +if [ "$input" != 'y' ] +then + exit 1 +fi + +if [ "$navigation" = 1 ] +then + #it's needed to reload everything + rm -rf navigation + git clone https://github.com/GENIVI/navigation.git ./navigation + cd navigation + git checkout $navigation_version + cd src/navigation + git clone https://github.com/GENIVI/positioning.git ./positioning + cd positioning + git checkout $positioning_version + cd .. + git clone https://github.com/navit-gps/navit.git + cd navit + git checkout $navit_version + patch -p0 -i ../patches/search_list_get_unique.diff + patch -p0 -i ../patches/fsa_issue_padding.diff + cd ../ + +else + if [ "$navit" = 1 ] + then + #reload navit + cd navigation/src/navigation + git clone https://github.com/navit-gps/navit.git + cd navit + git checkout $navit_version + patch -p0 -i ../patches/search_list_get_unique.diff + patch -p0 -i ../patches/fsa_issue_padding.diff + cd ../../../../ + fi +fi + + + + + diff --git a/src/vehicle-gateway/CMakeLists.txt b/src/vehicle-gateway/CMakeLists.txt index cb3824e..fe4629b 100644 --- a/src/vehicle-gateway/CMakeLists.txt +++ b/src/vehicle-gateway/CMakeLists.txt @@ -26,7 +26,9 @@ message(STATUS ${PROJECT_NAME}) add_definitions("-std=gnu++11") -message(STATUS "WITH_DLT = ${WITH_DLT}") +if(WITH_DEBUG) + add_definitions("-DDEBUG_ENABLED=1") +endif() find_package(PkgConfig REQUIRED) diff --git a/src/vehicle-gateway/veh-gateway.cpp b/src/vehicle-gateway/veh-gateway.cpp index 9847fae..9c4674e 100644 --- a/src/vehicle-gateway/veh-gateway.cpp +++ b/src/vehicle-gateway/veh-gateway.cpp @@ -112,6 +112,7 @@ bool get_geolocation(char*& sock_buf,char* buffer) if(strcmp(token,NMEA_DATA_VALID)==0){ retval=true; }else{ + LOG_INFO_MSG(gContext,"NMEA DATA NOT VALID\n"); return retval; } break; @@ -334,6 +335,8 @@ int main(int argc, char* argv[]) sleep(1); } while(isRunning); + LOG_INFO_MSG(gContext,"Shutting down Vehicle gateway..."); + gnss_destroy(); /* restore the old port settings */ |