| 109 | } |
| 110 | |
| 111 | bool GpsService::stopGpsDevice(GpsDeviceRecord& record) { |
| 112 | LOGGER.info("[device {}] stopping", record.device->getId()); |
| 113 | |
| 114 | auto device = record.device; |
| 115 | |
| 116 | device->unsubscribeGga(record.satelliteSubscriptionId); |
| 117 | device->unsubscribeRmc(record.rmcSubscriptionId); |
| 118 | |
| 119 | record.satelliteSubscriptionId = -1; |
| 120 | record.rmcSubscriptionId = -1; |
| 121 | |
| 122 | if (!device->stop()) { |
| 123 | LOGGER.error("[device {}] stopping failed", record.device->getId()); |
| 124 | return false; |
| 125 | } |
| 126 | |
| 127 | return true; |
| 128 | } |
| 129 | |
| 130 | bool GpsService::startReceiving() { |
| 131 | LOGGER.info("Start receiving"); |
nothing calls this directly
no test coverage detected