Merge "Fix to use explicit sized structures"
This commit is contained in:
commit
3bbb89aee1
3 changed files with 26 additions and 21 deletions
|
@ -1630,7 +1630,7 @@ GnssAdapter::gnssSvTypeConfigUpdate(const GnssSvTypeConfig& config)
|
|||
void
|
||||
GnssAdapter::gnssSvTypeConfigUpdate(bool sendReset)
|
||||
{
|
||||
LOC_LOGd("size %zu constellations blacklisted 0x%" PRIx64 ", enabled 0x%" PRIx64
|
||||
LOC_LOGd("size %" PRIu32" constellations blacklisted 0x%" PRIx64 ", enabled 0x%" PRIx64
|
||||
", sendReset %d",
|
||||
mGnssSvTypeConfig.size, mGnssSvTypeConfig.blacklistedSvTypesMask,
|
||||
mGnssSvTypeConfig.enabledSvTypesMask, sendReset);
|
||||
|
|
|
@ -35,7 +35,12 @@
|
|||
#include <string.h>
|
||||
#include <loc_gps.h>
|
||||
#include <LocationAPI.h>
|
||||
#include <time.h>
|
||||
|
||||
struct timespec32_t {
|
||||
uint32_t tv_sec; /* seconds */
|
||||
uint32_t tv_nsec; /* and nanoseconds */
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
@ -132,7 +137,7 @@ typedef enum {
|
|||
|
||||
typedef struct {
|
||||
/** set to sizeof(UlpLocation) */
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
LocGpsLocation gpsLocation;
|
||||
/* Provider indicator for HYBRID or GPS */
|
||||
uint16_t position_source;
|
||||
|
@ -142,7 +147,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
/** set to sizeof(UlpNmea) */
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
char nmea_str[ULP_MAX_NMEA_STRING_SIZE];
|
||||
unsigned int len;
|
||||
} UlpNmea;
|
||||
|
@ -208,7 +213,7 @@ typedef struct {
|
|||
/** GPS extended callback structure. */
|
||||
typedef struct {
|
||||
/** set to sizeof(LocGpsCallbacks) */
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
loc_gps_set_capabilities set_capabilities_cb;
|
||||
loc_gps_acquire_wakelock acquire_wakelock_cb;
|
||||
loc_gps_release_wakelock release_wakelock_cb;
|
||||
|
@ -232,7 +237,7 @@ typedef struct {
|
|||
/** Represents the status of AGPS. */
|
||||
typedef struct {
|
||||
/** set to sizeof(AGpsExtStatus) */
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
|
||||
AGpsExtType type;
|
||||
LocAGpsStatusValue status;
|
||||
|
@ -458,7 +463,7 @@ typedef enum {
|
|||
}LocReliability;
|
||||
|
||||
typedef struct {
|
||||
struct timespec apTimeStamp;
|
||||
struct timespec32_t apTimeStamp;
|
||||
/*boottime received from pps-ktimer*/
|
||||
float apTimeStampUncertaintyMs;
|
||||
/* timestamp uncertainty in milli seconds */
|
||||
|
@ -685,7 +690,7 @@ typedef struct {
|
|||
/** Represents gps location extended. */
|
||||
typedef struct {
|
||||
/** set to sizeof(GpsLocationExtended) */
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
/** Contains GpsLocationExtendedFlags bits. */
|
||||
uint64_t flags;
|
||||
/** Contains the Altitude wrt mean sea level */
|
||||
|
@ -1058,7 +1063,7 @@ typedef enum
|
|||
|
||||
typedef struct
|
||||
{
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
float clockDrift;
|
||||
/**< Receiver clock Drift \n
|
||||
- Units: meter per sec \n
|
||||
|
@ -1072,7 +1077,7 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
uint8_t leapSec;
|
||||
/**< GPS time leap second delta to UTC time \n
|
||||
- Units: sec \n
|
||||
|
@ -1093,7 +1098,7 @@ typedef enum
|
|||
|
||||
typedef struct
|
||||
{
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
uint32_t validMask;
|
||||
/* Validity mask as per Gnss_LocInterSystemBiasValidMaskType */
|
||||
|
||||
|
@ -1110,7 +1115,7 @@ typedef struct
|
|||
|
||||
typedef struct {
|
||||
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
|
||||
uint8_t systemRtc_valid;
|
||||
/**< Validity indicator for System RTC */
|
||||
|
@ -1156,7 +1161,7 @@ typedef enum
|
|||
|
||||
typedef struct
|
||||
{
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
uint32_t svMs;
|
||||
/**< Satellite time milisecond.\n
|
||||
For GPS, BDS, GAL range of 0 thru (604800000-1) \n
|
||||
|
@ -1216,7 +1221,7 @@ typedef enum
|
|||
|
||||
typedef struct
|
||||
{
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
Gnss_LocSvSystemEnumType gnssSystem;
|
||||
// 0 signal type mask indicates invalid value
|
||||
GnssSignalTypeMask gnssSignalTypeMask;
|
||||
|
@ -1389,7 +1394,7 @@ typedef uint64_t GpsSvMeasHeaderFlags;
|
|||
|
||||
typedef struct
|
||||
{
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
// see defines in GNSS_SV_MEAS_HEADER_HAS_XXX_XXX
|
||||
uint64_t flags;
|
||||
|
||||
|
@ -1433,7 +1438,7 @@ typedef struct
|
|||
} GnssSvMeasurementHeader;
|
||||
|
||||
typedef struct {
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
bool isNhz;
|
||||
GnssSvMeasurementHeader svMeasSetHeader;
|
||||
uint32_t svMeasCount;
|
||||
|
@ -1473,7 +1478,7 @@ typedef enum
|
|||
|
||||
typedef struct
|
||||
{
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
uint16_t gnssSvId;
|
||||
/* GPS: 1-32, GLO: 65-96, 0: Invalid,
|
||||
SBAS: 120-151, BDS:201-237,GAL:301 to 336
|
||||
|
@ -2034,7 +2039,7 @@ typedef enum {
|
|||
|
||||
typedef struct
|
||||
{
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
Gnss_SrnTech srnTechType; /* SRN Technology type in request */
|
||||
bool srnRequest; /* scan - start(true) or stop(false) */
|
||||
bool e911Mode; /* If in E911 emergency */
|
||||
|
@ -2054,7 +2059,7 @@ typedef enum {
|
|||
/* This SV Type config is injected directly to GNSS Adapter
|
||||
* bypassing Location API */
|
||||
typedef struct {
|
||||
size_t size; // set to sizeof(GnssSvTypeConfig)
|
||||
uint32_t size; // set to sizeof(GnssSvTypeConfig)
|
||||
// Enabled Constellations
|
||||
GnssSvTypesMask enabledSvTypesMask;
|
||||
// Disabled Constellations
|
||||
|
@ -2141,7 +2146,7 @@ enum OdcpiRequestType {
|
|||
ODCPI_REQUEST_TYPE_STOP
|
||||
};
|
||||
struct OdcpiRequestInfo {
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
OdcpiRequestType type;
|
||||
uint32_t tbfMillis;
|
||||
bool isEmergencyMode;
|
||||
|
|
|
@ -548,7 +548,7 @@ typedef uint8_t LocGnssConstellationType;
|
|||
/** Represents a location. */
|
||||
typedef struct {
|
||||
/** set to sizeof(LocGpsLocation) */
|
||||
size_t size;
|
||||
uint32_t size;
|
||||
/** Contains LocGpsLocationFlags bits. */
|
||||
uint16_t flags;
|
||||
/** The spoof mask */
|
||||
|
|
Loading…
Reference in a new issue