| 180 | } |
| 181 | |
| 182 | void GpsService::stopReceiving() { |
| 183 | LOGGER.info("Stop receiving"); |
| 184 | |
| 185 | setState(State::OffPending); |
| 186 | |
| 187 | auto lock = mutex.asScopedLock(); |
| 188 | lock.lock(); |
| 189 | |
| 190 | for (auto& record: deviceRecords) { |
| 191 | stopGpsDevice(record); |
| 192 | } |
| 193 | |
| 194 | rmcTime = 0; |
| 195 | ggaTime = 0; |
| 196 | |
| 197 | setState(State::Off); |
| 198 | } |
| 199 | |
| 200 | void GpsService::onGgaSentence(hal::Device::Id deviceId, const minmea_sentence_gga& gga) { |
| 201 | LOGGER.debug("[device {}] LAT {} LON {}, satellites: {}", deviceId, minmea_tocoord(&gga.latitude), minmea_tocoord(&gga.longitude), gga.satellites_tracked); |
no test coverage detected