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

Method onHide

Tactility/Source/app/i2cscanner/I2cScanner.cpp:150–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150void I2cScannerApp::onHide(AppContext& app) {
151 bool isRunning = false;
152 if (mutex.lock(250 / portTICK_PERIOD_MS)) {
153 auto* timer = scanTimer.get();
154 if (timer != nullptr) {
155 isRunning = timer->isRunning();
156 }
157 mutex.unlock();
158 } else {
159 return;
160 }
161
162 if (isRunning) {
163 stopScanning();
164 }
165}
166
167// endregion Lifecycle
168

Callers

nothing calls this directly

Calls 4

lockMethod · 0.45
getMethod · 0.45
isRunningMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected