mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:09:42 +00:00
Merge "[hardware][interfaces][gnss] fix -Wreorder-init-list"
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user