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

Method notify

Tactility/Source/hal/gps/Satellites.cpp:95–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void SatelliteStorage::notify(const minmea_sat_info& data) {
96 auto lock = mutex.asScopedLock();
97 lock.lock();
98
99 auto* record = findWithFallback(data.nr);
100 if (record != nullptr) {
101 record->inUse = true;
102 record->lastUpdated = kernel::getTicks();
103 record->data = data;
104 if (LOGGER.isLoggingDebug()) {
105 LOGGER.debug("Updated satellite {}: elevation {}, azimuth {}, snr {}", record->data.nr, record->data.elevation, record->data.elevation, record->data.snr);
106 }
107 }
108}
109
110void SatelliteStorage::getRecords(const std::function<void(const minmea_sat_info&)>& onRecord) const {
111 auto lock = mutex.asScopedLock();

Callers

nothing calls this directly

Calls 5

getTicksFunction · 0.85
asScopedLockMethod · 0.80
isLoggingDebugMethod · 0.80
debugMethod · 0.80
lockMethod · 0.45

Tested by

no test coverage detected