summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author <philippe colliot>2016-02-05 09:20:52 +0100
committer <philippe colliot>2016-02-05 09:20:52 +0100
commit81a7a892277444261a2f84243876dbadbea90951 (patch)
tree14ba761c1c2de752f06d71b254b4ff61cb58ed01 /src
parent24a4754fa63713205826cbd65e01c9d26d7406da (diff)
downloadpoi-service-81a7a892277444261a2f84243876dbadbea90951.tar.gz
fix bug in poi search
Diffstat (limited to 'src')
-rwxr-xr-xsrc/navigation/rebuild_all.sh10
-rw-r--r--src/poi-service/poi-server/main.cpp22
-rw-r--r--src/poi-service/poi-server/poi-server-class.h6
-rwxr-xr-xsrc/poi-service/rebuild_all.sh6
4 files changed, 22 insertions, 22 deletions
diff --git a/src/navigation/rebuild_all.sh b/src/navigation/rebuild_all.sh
index 3863e19..02b58db 100755
--- a/src/navigation/rebuild_all.sh
+++ b/src/navigation/rebuild_all.sh
@@ -1,13 +1,13 @@
#!/bin/bash
-echo 'delete the build folder'
-rm -rf build
+echo 'clean up the build folder'
+find ./build ! -name '*.cbp' -type f -exec rm -f {} +
-mkdir build
+mkdir -p build
cd build
-mkdir navit
+mkdir -p navit
cd navit
-mkdir navit
+mkdir -p navit
cd navit
echo 'build navit'
cmake -DDISABLE_QT=1 -DSAMPLE_MAP=0 -Dvehicle/null=1 -Dgraphics/qt_qpainter=0 ../../../navit/navit/
diff --git a/src/poi-service/poi-server/main.cpp b/src/poi-service/poi-server/main.cpp
index f4af8aa..daefa81 100644
--- a/src/poi-service/poi-server/main.cpp
+++ b/src/poi-service/poi-server/main.cpp
@@ -90,17 +90,17 @@ void Routing::RouteCalculationCancelled(const handleId_t &routeHandle)
}
-void Routing::RouteCalculationSuccessful(const handleId_t& routeHandle, const std::map< uint16_t, uint16_t >& unfullfilledPreferences)
+void Routing::RouteCalculationSuccessful(const handleId_t& routeHandle, const std::map< int32_t, int32_t >& unfullfilledPreferences)
{
}
-void Routing::RouteCalculationFailed(const handleId_t& routeHandle, const uint16_t& errorCode, const std::map< uint16_t, uint16_t >& unfullfilledPreferences)
+void Routing::RouteCalculationFailed(const handleId_t& routeHandle, const int32_t& errorCode, const std::map< int32_t, int32_t >& unfullfilledPreferences)
{
}
-void Routing::RouteCalculationProgressUpdate(const handleId_t& routeHandle, const uint16_t &status, const uint8_t &percentage)
+void Routing::RouteCalculationProgressUpdate(const handleId_t& routeHandle, const int32_t &status, const uint8_t &percentage)
{
}
@@ -1051,13 +1051,13 @@ void poiSearchServer::SetRouteHandle(const handleId_t& poiSearchHandle, const ha
{
uint32_t index;
int16_t detailLevel;
- std::vector< uint16_t > valuesToReturn;
+ std::vector< int32_t > valuesToReturn;
uint32_t numberOfSegments;
uint32_t offset;
uint32_t totalNumberOfSegments;
- std::vector< std::map< uint16_t, ::DBus::Variant > > routeSegments;
- std::map< uint16_t, ::DBus::Variant > element;
- std::map< uint16_t, ::DBus::Variant >::iterator iter;
+ std::vector< std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > routeSegments;
+ std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > element;
+ std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > >::iterator iter;
route_vector_t routeVector;
if ((m_poiSearchHandle == INVALID_HANDLE) || (poiSearchHandle != m_poiSearchHandle))
@@ -1093,16 +1093,16 @@ void poiSearchServer::SetRouteHandle(const handleId_t& poiSearchHandle, const ha
element = routeSegments.at(index);
iter = element.find(GENIVI_NAVIGATIONCORE_START_LATITUDE);
if (iter != element.end())
- routeVector.startPoint.latitude = element.at(GENIVI_NAVIGATIONCORE_START_LATITUDE);
+ routeVector.startPoint.latitude = element.at(GENIVI_NAVIGATIONCORE_START_LATITUDE)._2;
iter = element.find(GENIVI_NAVIGATIONCORE_START_LONGITUDE);
if (iter != element.end())
- routeVector.startPoint.longitude = element.at(GENIVI_NAVIGATIONCORE_START_LONGITUDE);
+ routeVector.startPoint.longitude = element.at(GENIVI_NAVIGATIONCORE_START_LONGITUDE)._2;
iter = element.find(GENIVI_NAVIGATIONCORE_END_LATITUDE);
if (iter != element.end())
- routeVector.endPoint.latitude = element.at(GENIVI_NAVIGATIONCORE_END_LATITUDE);
+ routeVector.endPoint.latitude = element.at(GENIVI_NAVIGATIONCORE_END_LATITUDE)._2;
iter = element.find(GENIVI_NAVIGATIONCORE_END_LONGITUDE);
if (iter != element.end())
- routeVector.endPoint.longitude = element.at(GENIVI_NAVIGATIONCORE_END_LONGITUDE);
+ routeVector.endPoint.longitude = element.at(GENIVI_NAVIGATIONCORE_END_LONGITUDE)._2;
m_route.push_back(routeVector);
}
}
diff --git a/src/poi-service/poi-server/poi-server-class.h b/src/poi-service/poi-server/poi-server-class.h
index d982484..8e29e0b 100644
--- a/src/poi-service/poi-server/poi-server-class.h
+++ b/src/poi-service/poi-server/poi-server-class.h
@@ -76,11 +76,11 @@ class Routing
void RouteCalculationCancelled(const uint32_t& routeHandle);
- void RouteCalculationSuccessful(const uint32_t& routeHandle, const std::map< uint16_t, uint16_t >& unfullfilledPreferences);
+ void RouteCalculationSuccessful(const uint32_t& routeHandle, const std::map< int32_t, int32_t >& unfullfilledPreferences);
- void RouteCalculationFailed(const uint32_t& routeHandle, const uint16_t& errorCode,const std::map< uint16_t, uint16_t >& unfullfilledPreferences);
+ void RouteCalculationFailed(const uint32_t& routeHandle, const int32_t& errorCode,const std::map< int32_t, int32_t >& unfullfilledPreferences);
- void RouteCalculationProgressUpdate(const uint32_t& routeHandle, const uint16_t& status, const uint8_t& percentage);
+ void RouteCalculationProgressUpdate(const uint32_t& routeHandle, const int32_t& status, const uint8_t& percentage);
void AlternativeRoutesAvailable (const std::vector<uint32_t>& routeHandlesList);
diff --git a/src/poi-service/rebuild_all.sh b/src/poi-service/rebuild_all.sh
index 20f99bd..1d19abb 100755
--- a/src/poi-service/rebuild_all.sh
+++ b/src/poi-service/rebuild_all.sh
@@ -51,10 +51,10 @@ then
commonapi_tools_option="-DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR
fi
-echo 'delete the build folder'
-rm -rf build
+echo 'clean up the build folder'
+find ./build ! -name '*.cbp' -type f -exec rm -f {} +
-mkdir build
+mkdir -p build
cd build
echo 'build poi-server'