MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / stopGpsDevice

Method stopGpsDevice

Tactility/Source/service/gps/GpsService.cpp:111–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111bool 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
130bool GpsService::startReceiving() {
131 LOGGER.info("Start receiving");

Callers

nothing calls this directly

Calls 6

infoMethod · 0.80
getIdMethod · 0.80
unsubscribeGgaMethod · 0.80
unsubscribeRmcMethod · 0.80
errorMethod · 0.80
stopMethod · 0.45

Tested by

no test coverage detected