mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
msm8226-common: Update GPS hal
This commit is contained in:
parent
6dda87fb6c
commit
e80c501630
4 changed files with 7 additions and 124 deletions
|
@ -1,76 +0,0 @@
|
|||
AM_CFLAGS = \
|
||||
-I../../utils \
|
||||
-I../../platform_lib_abstractions \
|
||||
-fno-short-enums \
|
||||
-DFEATURE_GNSS_BIT_API
|
||||
|
||||
libloc_adapter_so_la_SOURCES = loc_eng_log.cpp LocEngAdapter.cpp
|
||||
|
||||
if USE_GLIB
|
||||
libloc_adapter_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
||||
libloc_adapter_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||
libloc_adapter_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||
else
|
||||
libloc_adapter_so_la_CFLAGS = $(AM_CFLAGS)
|
||||
libloc_adapter_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
|
||||
libloc_adapter_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||
endif
|
||||
libloc_adapter_so_la_LIBADD = -lstdc++ -lcutils ../../utils/libgps_utils_so.la
|
||||
|
||||
|
||||
libloc_eng_so_la_SOURCES = \
|
||||
loc_eng.cpp \
|
||||
loc_eng_agps.cpp \
|
||||
loc_eng_xtra.cpp \
|
||||
loc_eng_ni.cpp \
|
||||
loc_eng_log.cpp \
|
||||
loc_eng_dmn_conn.cpp \
|
||||
loc_eng_dmn_conn_handler.cpp \
|
||||
loc_eng_dmn_conn_thread_helper.c \
|
||||
loc_eng_dmn_conn_glue_msg.c \
|
||||
loc_eng_dmn_conn_glue_pipe.c
|
||||
|
||||
|
||||
if USE_GLIB
|
||||
libloc_eng_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
||||
libloc_eng_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||
libloc_eng_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||
else
|
||||
libloc_eng_so_la_CFLAGS = $(AM_CFLAGS)
|
||||
libloc_eng_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
|
||||
libloc_eng_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||
endif
|
||||
|
||||
libloc_eng_so_la_LIBADD = -lstdc++ -lcutils -ldl ../../utils/libgps_utils_so.la libloc_adapter_so.la
|
||||
|
||||
|
||||
libgps_default_so_la_SOURCES = \
|
||||
loc.cpp \
|
||||
gps.c
|
||||
|
||||
if USE_GLIB
|
||||
libgps_default_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
||||
libgps_default_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||
libgps_default_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||
else
|
||||
libgps_default_so_la_CFLAGS = $(AM_CFLAGS)
|
||||
libgps_default_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
|
||||
libgps_default_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||
endif
|
||||
|
||||
libgps_default_so_la_LIBADD = -lstdc++ -lcutils ../../utils/libgps_utils_so.la -ldl libloc_eng_so.la
|
||||
|
||||
library_include_HEADERS = \
|
||||
LocEngAdapter.h \
|
||||
loc.h \
|
||||
loc_eng.h \
|
||||
loc_eng_xtra.h \
|
||||
loc_eng_ni.h \
|
||||
loc_eng_agps.h \
|
||||
loc_eng_msg.h \
|
||||
loc_eng_log.h
|
||||
|
||||
library_includedir = $(pkgincludedir)/libloc_api_50001
|
||||
|
||||
#Create and Install libraries
|
||||
lib_LTLIBRARIES = libloc_adapter_so.la libloc_eng_so.la libgps_default_so.la
|
|
@ -521,7 +521,7 @@ const GpsGeofencingInterface* get_geofence_interface(void)
|
|||
}
|
||||
dlerror(); /* Clear any existing error */
|
||||
get_gps_geofence_interface = (get_gps_geofence_interface_function)dlsym(handle, "gps_geofence_get_interface");
|
||||
if ((error = dlerror()) != NULL) {
|
||||
if ((error = dlerror()) != NULL && NULL != get_gps_geofence_interface) {
|
||||
LOC_LOGE ("%s, dlsym for get_gps_geofence_interface failed, error = %s\n", __func__, error);
|
||||
goto exit;
|
||||
}
|
||||
|
|
|
@ -119,14 +119,17 @@ void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p,
|
|||
unsigned char generate_nmea)
|
||||
{
|
||||
ENTRY_LOG();
|
||||
time_t utcTime(location.gpsLocation.timestamp/1000);
|
||||
tm * pTm = gmtime(&utcTime);
|
||||
if (NULL == pTm) {
|
||||
LOC_LOGE("gmtime failed");
|
||||
return;
|
||||
}
|
||||
|
||||
char sentence[NMEA_SENTENCE_MAX_LENGTH] = {0};
|
||||
char* pMarker = sentence;
|
||||
int lengthRemaining = sizeof(sentence);
|
||||
int length = 0;
|
||||
|
||||
time_t utcTime(location.gpsLocation.timestamp/1000);
|
||||
tm * pTm = gmtime(&utcTime);
|
||||
int utcYear = pTm->tm_year % 100; // 2 digit year
|
||||
int utcMonth = pTm->tm_mon + 1; // tm_mon starts at zero
|
||||
int utcDay = pTm->tm_mday;
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
AM_CFLAGS = -Wundef \
|
||||
-MD \
|
||||
-Wno-trigraphs \
|
||||
-g -O0 \
|
||||
-fno-inline \
|
||||
-fno-short-enums \
|
||||
-fpic \
|
||||
-I../platform_lib_abstractions
|
||||
|
||||
libgps_utils_so_la_h_sources = log_util.h \
|
||||
msg_q.h \
|
||||
linked_list.h \
|
||||
loc_cfg.h \
|
||||
loc_log.h \
|
||||
../platform_lib_abstractions/platform_lib_includes.h \
|
||||
../platform_lib_abstractions/platform_lib_time.h \
|
||||
../platform_lib_abstractions/platform_lib_macros.h
|
||||
|
||||
libgps_utils_so_la_c_sources = linked_list.c \
|
||||
msg_q.c \
|
||||
loc_cfg.cpp \
|
||||
loc_log.cpp \
|
||||
../platform_lib_abstractions/elapsed_millis_since_boot.cpp
|
||||
|
||||
library_includedir = $(pkgincludedir)/utils
|
||||
|
||||
library_include_HEADERS = $(libgps_utils_so_la_h_sources)
|
||||
|
||||
libgps_utils_so_la_SOURCES = $(libgps_utils_so_la_c_sources)
|
||||
|
||||
if USE_GLIB
|
||||
libgps_utils_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
||||
libgps_utils_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||
libgps_utils_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||
else
|
||||
libgps_utils_so_la_CFLAGS = $(AM_CFLAGS)
|
||||
libgps_utils_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
|
||||
libgps_utils_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||
endif
|
||||
|
||||
libgps_utils_so_la_LIBADD = -lstdc++ -lcutils
|
||||
|
||||
#Create and Install libraries
|
||||
lib_LTLIBRARIES = libgps_utils_so.la
|
Loading…
Reference in a new issue