diff --git a/Apps/Cycling/Software/Libs/Sources/Service.cpp b/Apps/Cycling/Software/Libs/Sources/Service.cpp index 2c7e1bc2..5a9f7b6d 100644 --- a/Apps/Cycling/Software/Libs/Sources/Service.cpp +++ b/Apps/Cycling/Software/Libs/Sources/Service.cpp @@ -333,6 +333,12 @@ void Service::onStopGUI() { mGuiStarted = false; + // GPS early-acquire is tied to GUI (see connectGps in onStartGUI). Release it when + // the GUI stops + if (mSensorGpsLocation.isConnected()) { + mSensorGpsLocation.disconnect(); + } + mSensorWristMotion.disconnect(); } diff --git a/Apps/Hiking/Software/Libs/Sources/Service.cpp b/Apps/Hiking/Software/Libs/Sources/Service.cpp index 3a5c4f13..9b37d4d5 100644 --- a/Apps/Hiking/Software/Libs/Sources/Service.cpp +++ b/Apps/Hiking/Software/Libs/Sources/Service.cpp @@ -356,6 +356,12 @@ void Service::onStopGUI() { mGuiStarted = false; + // GPS early-acquire is tied to GUI (see connectGps in onStartGUI). Release it when + // the GUI stops + if (mSensorGpsLocation.isConnected()) { + mSensorGpsLocation.disconnect(); + } + mSensorWristMotion.disconnect(); } diff --git a/Apps/Running/Software/Libs/Sources/Service.cpp b/Apps/Running/Software/Libs/Sources/Service.cpp index 49d18054..ac0f5af0 100644 --- a/Apps/Running/Software/Libs/Sources/Service.cpp +++ b/Apps/Running/Software/Libs/Sources/Service.cpp @@ -384,6 +384,12 @@ void Service::onStopGUI() { mGuiStarted = false; + // GPS early-acquire is tied to GUI (see connectGps in onStartGUI). Release it when + // the GUI stops + if (mSensorGpsLocation.isConnected()) { + mSensorGpsLocation.disconnect(); + } + mSensorWristMotion.disconnect(); }