Merge "Merge tag 'AU_LINUX_ANDROID_KK.04.04.02.010.465' into HEAD"
This commit is contained in:
commit
8f83363373
2 changed files with 7 additions and 4 deletions
|
@ -603,7 +603,7 @@ const GpsGeofencingInterface* get_geofence_interface(void)
|
||||||
}
|
}
|
||||||
dlerror(); /* Clear any existing error */
|
dlerror(); /* Clear any existing error */
|
||||||
get_gps_geofence_interface = (get_gps_geofence_interface_function)dlsym(handle, "gps_geofence_get_interface");
|
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);
|
LOC_LOGE ("%s, dlsym for get_gps_geofence_interface failed, error = %s\n", __func__, error);
|
||||||
goto exit;
|
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)
|
unsigned char generate_nmea)
|
||||||
{
|
{
|
||||||
ENTRY_LOG();
|
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 sentence[NMEA_SENTENCE_MAX_LENGTH] = {0};
|
||||||
char* pMarker = sentence;
|
char* pMarker = sentence;
|
||||||
int lengthRemaining = sizeof(sentence);
|
int lengthRemaining = sizeof(sentence);
|
||||||
int length = 0;
|
int length = 0;
|
||||||
|
|
||||||
time_t utcTime(location.gpsLocation.timestamp/1000);
|
|
||||||
tm * pTm = gmtime(&utcTime);
|
|
||||||
int utcYear = pTm->tm_year % 100; // 2 digit year
|
int utcYear = pTm->tm_year % 100; // 2 digit year
|
||||||
int utcMonth = pTm->tm_mon + 1; // tm_mon starts at zero
|
int utcMonth = pTm->tm_mon + 1; // tm_mon starts at zero
|
||||||
int utcDay = pTm->tm_mday;
|
int utcDay = pTm->tm_mday;
|
||||||
|
|
Loading…
Reference in a new issue