diff options
author | Nick Desaulniers <ndesaulniers@google.com> | 2019-10-15 15:34:48 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-10-15 15:34:48 -0700 |
commit | 7dac45d65b412e534a1b2838dc5a7ce3b8535a68 (patch) | |
tree | ac6bf7cd632fd343f638d987e3c74db9342c5c24 | |
parent | a598b6d139d29fd47fb17fa2adaf6e363ebf319e (diff) | |
parent | 97e49fa08c0ff8014704288b950c9106e5442047 (diff) | |
download | platform_hardware_interfaces-7dac45d65b412e534a1b2838dc5a7ce3b8535a68.tar.gz platform_hardware_interfaces-7dac45d65b412e534a1b2838dc5a7ce3b8535a68.tar.bz2 platform_hardware_interfaces-7dac45d65b412e534a1b2838dc5a7ce3b8535a68.zip |
Merge "[hardware][interfaces][gnss] fix -Wreorder-init-list" am: d2e8d0b515 am: 1bb718baeb am: 1dbd38952a
am: 97e49fa08c
Change-Id: I4ab51d7692118780e72914084f0268e691afdd20
-rw-r--r-- | gnss/1.0/default/Gnss.cpp | 28 | ||||
-rw-r--r-- | gnss/2.0/default/GnssMeasurement.cpp | 5 |
2 files changed, 17 insertions, 16 deletions
diff --git a/gnss/1.0/default/Gnss.cpp b/gnss/1.0/default/Gnss.cpp index 32c131c83d..7d1cacfcd8 100644 --- a/gnss/1.0/default/Gnss.cpp +++ b/gnss/1.0/default/Gnss.cpp @@ -128,20 +128,20 @@ void Gnss::gnssSvStatusCb(GnssSvStatus* status) { for (size_t i = 0; i < svStatus.numSvs; i++) { auto svInfo = status->gnss_sv_list[i]; IGnssCallback::GnssSvInfo gnssSvInfo = { - .svid = svInfo.svid, - .constellation = static_cast< - android::hardware::gnss::V1_0::GnssConstellationType>( - svInfo.constellation), - .cN0Dbhz = svInfo.c_n0_dbhz, - .elevationDegrees = svInfo.elevation, - .azimuthDegrees = svInfo.azimuth, - // Older chipsets do not provide carrier frequency, hence - // HAS_CARRIER_FREQUENCY flag and the carrierFrequencyHz fields - // are not set. So we are resetting both fields here. - .svFlag = static_cast<uint8_t>( - svInfo.flags &= ~(static_cast<uint8_t>( - IGnssCallback::GnssSvFlags::HAS_CARRIER_FREQUENCY))), - .carrierFrequencyHz = 0}; + .svid = svInfo.svid, + .constellation = static_cast<android::hardware::gnss::V1_0::GnssConstellationType>( + svInfo.constellation), + .cN0Dbhz = svInfo.c_n0_dbhz, + .elevationDegrees = svInfo.elevation, + .azimuthDegrees = svInfo.azimuth, + .carrierFrequencyHz = 0, + // Older chipsets do not provide carrier frequency, hence + // HAS_CARRIER_FREQUENCY flag and the carrierFrequencyHz fields + // are not set. So we are resetting both fields here. + .svFlag = static_cast<uint8_t>( + svInfo.flags &= + ~(static_cast<uint8_t>(IGnssCallback::GnssSvFlags::HAS_CARRIER_FREQUENCY))), + }; svStatus.gnssSvList[i] = gnssSvInfo; } diff --git a/gnss/2.0/default/GnssMeasurement.cpp b/gnss/2.0/default/GnssMeasurement.cpp index 93de89cdfb..1f95ff95dc 100644 --- a/gnss/2.0/default/GnssMeasurement.cpp +++ b/gnss/2.0/default/GnssMeasurement.cpp @@ -119,12 +119,13 @@ GnssData GnssMeasurement::getMockMeasurement() { V2_0::IGnssMeasurementCallback::GnssMeasurement measurement_2_0 = { .v1_1 = measurement_1_1, .codeType = "C", - .constellation = GnssConstellationType::GLONASS, .state = GnssMeasurementState::STATE_CODE_LOCK | GnssMeasurementState::STATE_BIT_SYNC | GnssMeasurementState::STATE_SUBFRAME_SYNC | GnssMeasurementState::STATE_TOW_DECODED | GnssMeasurementState::STATE_GLO_STRING_SYNC | - GnssMeasurementState::STATE_GLO_TOD_DECODED}; + GnssMeasurementState::STATE_GLO_TOD_DECODED, + .constellation = GnssConstellationType::GLONASS, + }; hidl_vec<IGnssMeasurementCallback::GnssMeasurement> measurements(1); measurements[0] = measurement_2_0; |