c-api : add toggleRxProtocol() (#60)

This function allows to enable/disable Rx protocols during the decoding
process. This is useful when the Tx/Rx protocol is known in advance.
This commit is contained in:
Georgi Gerganov
2021-11-22 21:29:26 +02:00
committed by GitHub
parent 7b39e51440
commit bbacdbcc96
7 changed files with 96 additions and 4 deletions

View File

@@ -88,4 +88,11 @@ EMSCRIPTEN_BINDINGS(ggwave) {
[]() {
ggwave_setLogFile(stderr);
}));
emscripten::function("toggleRxProtocol", emscripten::optional_override(
[](ggwave_Instance instance,
ggwave_TxProtocolId rxProtocolId,
int state) {
ggwave_toggleRxProtocol(instance, rxProtocolId, state);
}));
}