MCPcopy Create free account
hub / github.com/OpenEarable/open-earable / config_callback

Method config_callback

src/OpenEarable.h:142–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140OpenEarable open_earable;
141
142void OpenEarable::config_callback(SensorConfigurationPacket *config) {
143 if (config->sensorId == PDM_MIC) Recorder::config_callback(config);
144 else if (config->sensorId == BARO_TEMP) task_manager.begin(config->sampleRate, -1);
145 else if (config->sensorId == ACC_GYRO_MAG) task_manager.begin(-1, config->sampleRate);
146 else {
147 if (i2s_player.is_running()) {
148 i2s_player.stop();
149 delay(1);
150 i2s_player.start();
151 }
152 }
153 //else task_manager.begin();
154}
155
156#endif //EDGE_ML_EARABLE_EDGEML_EARABLE_H

Callers

nothing calls this directly

Calls 4

is_runningMethod · 0.80
beginMethod · 0.45
stopMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected