diff options
Diffstat (limited to 'gnss/location_gnss.cpp')
-rw-r--r-- | gnss/location_gnss.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gnss/location_gnss.cpp b/gnss/location_gnss.cpp index 76839b6..5380f05 100644 --- a/gnss/location_gnss.cpp +++ b/gnss/location_gnss.cpp @@ -79,6 +79,7 @@ static void odcpiInject(const Location& location); static void blockCPI(double latitude, double longitude, float accuracy, int blockDurationMsec, double latLonDiffThreshold); static void updateBatteryStatus(bool charging); +static void updateSystemPowerState(PowerStateType systemPowerState); static const GnssInterface gGnssInterface = { sizeof(GnssInterface), @@ -117,7 +118,8 @@ static const GnssInterface gGnssInterface = { nfwInit, getPowerStateChanges, injectLocationExt, - updateBatteryStatus + updateBatteryStatus, + updateSystemPowerState }; #ifndef DEBUG_X86 @@ -390,3 +392,9 @@ static void updateBatteryStatus(bool charging) { gGnssAdapter->getSystemStatus()->updatePowerConnectState(charging); } } + +static void updateSystemPowerState(PowerStateType systemPowerState) { + if (NULL != gGnssAdapter) { + gGnssAdapter->updateSystemPowerStateCommand(systemPowerState); + } +} |