Accept enabled list for constellation control
Accept both enabled and disabled constellation lists for IZAT Constellation Control API CRs-Fixed: 2302898 Change-Id: Ia271efef619fc91a1457d1af7aeebcb8a8a0686d
This commit is contained in:
parent
033a0fa1c6
commit
12ab7e152f
2 changed files with 17 additions and 5 deletions
|
@ -1504,17 +1504,29 @@ GnssAdapter::gnssUpdateSvTypeConfigCommand(GnssSvTypeConfig config)
|
||||||
void
|
void
|
||||||
GnssAdapter::gnssSvTypeConfigUpdate(const GnssSvTypeConfig& config)
|
GnssAdapter::gnssSvTypeConfigUpdate(const GnssSvTypeConfig& config)
|
||||||
{
|
{
|
||||||
|
// Gather bits removed from enabled mask
|
||||||
|
GnssSvTypesMask enabledRemoved = mGnssSvTypeConfig.enabledSvTypesMask &
|
||||||
|
(mGnssSvTypeConfig.enabledSvTypesMask ^ config.enabledSvTypesMask);
|
||||||
|
// Send reset if any constellation is removed from the enabled list
|
||||||
|
bool sendReset = (enabledRemoved != 0);
|
||||||
|
// Save new config and update
|
||||||
gnssSetSvTypeConfig(config);
|
gnssSetSvTypeConfig(config);
|
||||||
gnssSvTypeConfigUpdate();
|
gnssSvTypeConfigUpdate(sendReset);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GnssAdapter::gnssSvTypeConfigUpdate()
|
GnssAdapter::gnssSvTypeConfigUpdate(bool sendReset)
|
||||||
{
|
{
|
||||||
LOC_LOGd("constellations blacklisted 0x%" PRIx64 ", enabled 0x%" PRIx64,
|
LOC_LOGd("constellations blacklisted 0x%" PRIx64 ", enabled 0x%" PRIx64 ", sendReset %d",
|
||||||
mGnssSvTypeConfig.blacklistedSvTypesMask, mGnssSvTypeConfig.enabledSvTypesMask);
|
mGnssSvTypeConfig.blacklistedSvTypesMask, mGnssSvTypeConfig.enabledSvTypesMask,
|
||||||
|
sendReset);
|
||||||
|
|
||||||
if (mGnssSvTypeConfig.size == sizeof(mGnssSvTypeConfig)) {
|
if (mGnssSvTypeConfig.size == sizeof(mGnssSvTypeConfig)) {
|
||||||
|
|
||||||
|
if (sendReset) {
|
||||||
|
mLocApi->resetConstellationControl();
|
||||||
|
}
|
||||||
|
|
||||||
GnssSvIdConfig blacklistConfig = {};
|
GnssSvIdConfig blacklistConfig = {};
|
||||||
// Revert to previously blacklisted SVs for each enabled constellation
|
// Revert to previously blacklisted SVs for each enabled constellation
|
||||||
blacklistConfig = mGnssSvIdConfig;
|
blacklistConfig = mGnssSvIdConfig;
|
||||||
|
|
|
@ -279,7 +279,7 @@ public:
|
||||||
void gnssSvIdConfigUpdate(const std::vector<GnssSvIdSource>& blacklistedSvIds);
|
void gnssSvIdConfigUpdate(const std::vector<GnssSvIdSource>& blacklistedSvIds);
|
||||||
void gnssSvIdConfigUpdate();
|
void gnssSvIdConfigUpdate();
|
||||||
void gnssSvTypeConfigUpdate(const GnssSvTypeConfig& config);
|
void gnssSvTypeConfigUpdate(const GnssSvTypeConfig& config);
|
||||||
void gnssSvTypeConfigUpdate();
|
void gnssSvTypeConfigUpdate(bool sendReset = false);
|
||||||
inline void gnssSetSvTypeConfig(const GnssSvTypeConfig& config)
|
inline void gnssSetSvTypeConfig(const GnssSvTypeConfig& config)
|
||||||
{ mGnssSvTypeConfig = config; }
|
{ mGnssSvTypeConfig = config; }
|
||||||
inline void gnssSetSvTypeConfigCallback(GnssSvTypeConfigCallback callback)
|
inline void gnssSetSvTypeConfigCallback(GnssSvTypeConfigCallback callback)
|
||||||
|
|
Loading…
Reference in a new issue