Reduce TBF limit in GPS HAL
Currently Location HAL forces TBF of 1 second or larger even though ALM permits lower values. GPS HAL shall have smaller limits as Modem code actually controls minimum TBF value Change-Id: I4a2bbd51da34e441f148275ec3c2c4fa9ece7599 CRs-Fixed: 951152
This commit is contained in:
parent
1e19c369f9
commit
46f999155d
2 changed files with 38 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -29,11 +29,16 @@
|
|||
#ifndef GPS_EXTENDED_H
|
||||
#define GPS_EXTENDED_H
|
||||
|
||||
#include <gps_extended_c.h>
|
||||
/**
|
||||
* @file
|
||||
* @brief C++ declarations for GPS types
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <gps_extended_c.h>
|
||||
#if defined(USE_GLIB) || defined(OFF_TARGET)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
@ -51,7 +56,8 @@ struct LocPosMode
|
|||
uint32_t gap, uint32_t accu, uint32_t time,
|
||||
const char* cred, const char* prov) :
|
||||
mode(m), recurrence(recr),
|
||||
min_interval(gap < MIN_POSSIBLE_FIX_INTERVAL ? MIN_POSSIBLE_FIX_INTERVAL : gap),
|
||||
min_interval(gap < GPS_MIN_POSSIBLE_FIX_INTERVAL_MS ?
|
||||
GPS_MIN_POSSIBLE_FIX_INTERVAL_MS : gap),
|
||||
preferred_accuracy(accu), preferred_time(time) {
|
||||
memset(credentials, 0, sizeof(credentials));
|
||||
memset(provider, 0, sizeof(provider));
|
||||
|
@ -66,7 +72,7 @@ struct LocPosMode
|
|||
inline LocPosMode() :
|
||||
mode(LOC_POSITION_MODE_MS_BASED),
|
||||
recurrence(GPS_POSITION_RECURRENCE_PERIODIC),
|
||||
min_interval(MIN_POSSIBLE_FIX_INTERVAL),
|
||||
min_interval(GPS_DEFAULT_FIX_INTERVAL_MS),
|
||||
preferred_accuracy(50), preferred_time(120000) {
|
||||
memset(credentials, 0, sizeof(credentials));
|
||||
memset(provider, 0, sizeof(provider));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
|
@ -29,14 +29,19 @@
|
|||
#ifndef GPS_EXTENDED_C_H
|
||||
#define GPS_EXTENDED_C_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdbool.h>
|
||||
#include <hardware/gps.h>
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @brief C++ declarations for GPS types
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/** Location has valid source information. */
|
||||
#define LOCATION_HAS_SOURCE_INFO 0x0020
|
||||
/** GpsLocation has valid "is indoor?" flag */
|
||||
|
@ -177,7 +182,24 @@ typedef enum loc_position_mode_type {
|
|||
|
||||
} LocPositionMode;
|
||||
|
||||
#define MIN_POSSIBLE_FIX_INTERVAL 1000 /* msec */
|
||||
/**
|
||||
* @brief Minimum allowed value for fix interval.
|
||||
*
|
||||
* This value is a sanity limit in GPS framework. The hardware has own internal
|
||||
* limits that may not match this value
|
||||
*
|
||||
* @sa GPS_DEFAULT_FIX_INTERVAL_MS
|
||||
*/
|
||||
|
||||
#define GPS_MIN_POSSIBLE_FIX_INTERVAL_MS 100
|
||||
/**
|
||||
* @brief Default value for fix interval.
|
||||
*
|
||||
* This value is used by default whenever appropriate.
|
||||
*
|
||||
* @sa GPS_MIN_POSSIBLE_FIX_INTERVAL_MS
|
||||
*/
|
||||
#define GPS_DEFAULT_FIX_INTERVAL_MS 1000
|
||||
|
||||
/** GpsLocationExtended has valid latitude and longitude. */
|
||||
#define GPS_LOCATION_EXTENDED_HAS_LAT_LONG (1U<<0)
|
||||
|
|
Loading…
Reference in a new issue