mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-05 15:20:40 +00:00
Merge "Fixed the hasCarrierFrequency flag in GnssStatus(part 2)" into oc-dev
This commit is contained in:
@@ -129,16 +129,19 @@ void Gnss::gnssSvStatusCb(GnssSvStatus* status) {
|
|||||||
auto svInfo = status->gnss_sv_list[i];
|
auto svInfo = status->gnss_sv_list[i];
|
||||||
IGnssCallback::GnssSvInfo gnssSvInfo = {
|
IGnssCallback::GnssSvInfo gnssSvInfo = {
|
||||||
.svid = svInfo.svid,
|
.svid = svInfo.svid,
|
||||||
.constellation = static_cast<android::hardware::gnss::V1_0::GnssConstellationType>(
|
.constellation = static_cast<
|
||||||
svInfo.constellation),
|
android::hardware::gnss::V1_0::GnssConstellationType>(
|
||||||
|
svInfo.constellation),
|
||||||
.cN0Dbhz = svInfo.c_n0_dbhz,
|
.cN0Dbhz = svInfo.c_n0_dbhz,
|
||||||
.elevationDegrees = svInfo.elevation,
|
.elevationDegrees = svInfo.elevation,
|
||||||
.azimuthDegrees = svInfo.azimuth,
|
.azimuthDegrees = svInfo.azimuth,
|
||||||
.svFlag = svInfo.flags,
|
// Older chipsets do not provide carrier frequency, hence
|
||||||
// Older chipsets do not provide carrier frequency, hence HAS_CARRIER_FREQUENCY flag
|
// HAS_CARRIER_FREQUENCY flag and the carrierFrequencyHz fields
|
||||||
// is not set and the carrierFrequencyHz field is set to zero
|
// are not set. So we are resetting both fields here.
|
||||||
.carrierFrequencyHz = 0
|
.svFlag = static_cast<uint8_t>(
|
||||||
};
|
svInfo.flags &= ~(static_cast<uint8_t>(
|
||||||
|
IGnssCallback::GnssSvFlags::HAS_CARRIER_FREQUENCY))),
|
||||||
|
.carrierFrequencyHz = 0};
|
||||||
svStatus.gnssSvList[i] = gnssSvInfo;
|
svStatus.gnssSvList[i] = gnssSvInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user