summaryrefslogtreecommitdiff
path: root/gnss/location_gnss.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gnss/location_gnss.cpp')
-rw-r--r--gnss/location_gnss.cpp57
1 files changed, 56 insertions, 1 deletions
diff --git a/gnss/location_gnss.cpp b/gnss/location_gnss.cpp
index 5380f05..97e99e4 100644
--- a/gnss/location_gnss.cpp
+++ b/gnss/location_gnss.cpp
@@ -80,6 +80,13 @@ static void blockCPI(double latitude, double longitude, float accuracy,
int blockDurationMsec, double latLonDiffThreshold);
static void updateBatteryStatus(bool charging);
static void updateSystemPowerState(PowerStateType systemPowerState);
+static uint32_t setConstrainedTunc (bool enable, float tuncConstraint,
+ uint32_t energyBudget);
+static uint32_t setPositionAssistedClockEstimator(bool enable);
+static uint32_t gnssUpdateSvConfig(const GnssSvTypeConfig& svTypeConfig,
+ const GnssSvIdConfig& svIdConfig);
+static uint32_t gnssResetSvConfig();
+static uint32_t configLeverArm(const LeverArmConfigInfo& configInfo);
static const GnssInterface gGnssInterface = {
sizeof(GnssInterface),
@@ -119,7 +126,12 @@ static const GnssInterface gGnssInterface = {
getPowerStateChanges,
injectLocationExt,
updateBatteryStatus,
- updateSystemPowerState
+ updateSystemPowerState,
+ setConstrainedTunc,
+ setPositionAssistedClockEstimator,
+ gnssUpdateSvConfig,
+ gnssResetSvConfig,
+ configLeverArm,
};
#ifndef DEBUG_X86
@@ -398,3 +410,46 @@ static void updateSystemPowerState(PowerStateType systemPowerState) {
gGnssAdapter->updateSystemPowerStateCommand(systemPowerState);
}
}
+
+static uint32_t setConstrainedTunc (bool enable, float tuncConstraint, uint32_t energyBudget) {
+ if (NULL != gGnssAdapter) {
+ return gGnssAdapter->setConstrainedTuncCommand(enable, tuncConstraint, energyBudget);
+ } else {
+ return 0;
+ }
+}
+
+static uint32_t setPositionAssistedClockEstimator(bool enable) {
+ if (NULL != gGnssAdapter) {
+ return gGnssAdapter->setPositionAssistedClockEstimatorCommand(enable);
+ } else {
+ return 0;
+ }
+}
+
+static uint32_t gnssUpdateSvConfig(
+ const GnssSvTypeConfig& svTypeConfig,
+ const GnssSvIdConfig& svIdConfig) {
+ if (NULL != gGnssAdapter) {
+ return gGnssAdapter->gnssUpdateSvConfigCommand(
+ svTypeConfig, svIdConfig);
+ } else {
+ return 0;
+ }
+}
+
+static uint32_t gnssResetSvConfig() {
+ if (NULL != gGnssAdapter) {
+ return gGnssAdapter->gnssResetSvConfigCommand();
+ } else {
+ return 0;
+ }
+}
+
+static uint32_t configLeverArm(const LeverArmConfigInfo& configInfo){
+ if (NULL != gGnssAdapter) {
+ return gGnssAdapter->configLeverArmCommand(configInfo);
+ } else {
+ return 0;
+ }
+}