From 35e2aac51e4f73a6393f0ed26bd50ac8ed723f08 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Mon, 5 Dec 2016 12:35:05 -0800 Subject: [PATCH] Use bitfield in GPS HAL. Test: compiles Change-Id: I200a1cecddffb57596b9958564d2bf6be982cbdc --- gnss/1.0/IGnssCallback.hal | 2 +- gnss/1.0/default/Gnss.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gnss/1.0/IGnssCallback.hal b/gnss/1.0/IGnssCallback.hal index 041f949959..97a28e2a05 100644 --- a/gnss/1.0/IGnssCallback.hal +++ b/gnss/1.0/IGnssCallback.hal @@ -111,7 +111,7 @@ interface IGnssCallback { /* * Contains additional data about the given SV. */ - GnssSvFlags svFlag; + bitfield svFlag; }; /* diff --git a/gnss/1.0/default/Gnss.cpp b/gnss/1.0/default/Gnss.cpp index 37810be6d4..66be37eb3b 100644 --- a/gnss/1.0/default/Gnss.cpp +++ b/gnss/1.0/default/Gnss.cpp @@ -121,7 +121,7 @@ void Gnss::gnssSvStatusCb(GnssSvStatus* status) { .cN0Dbhz = svInfo.c_n0_dbhz, .elevationDegrees = svInfo.elevation, .azimuthDegrees = svInfo.azimuth, - .svFlag = static_cast(svInfo.flags) + .svFlag = svInfo.flags }; svStatus.gnssSvList[i] = gnssSvInfo; } @@ -205,7 +205,8 @@ void Gnss::gpsSvStatusCb(GpsSvStatus* svInfo) { info.cN0Dbhz = svInfo->sv_list[i].snr; info.elevationDegrees = svInfo->sv_list[i].elevation; info.azimuthDegrees = svInfo->sv_list[i].azimuth; - info.svFlag = IGnssCallback::GnssSvFlags::NONE; + // TODO: b/31702236 + info.svFlag = static_cast(IGnssCallback::GnssSvFlags::NONE); /* * Only GPS info is valid for these fields, as these masks are just 32