ref #77 : add MT protocols to ggwave.js + new API for setting freqStart

This commit is contained in:
Georgi Gerganov
2022-09-10 17:57:37 +03:00
parent d2f79fc845
commit d02960259b
7 changed files with 46 additions and 3 deletions

View File

@@ -23,6 +23,9 @@ EMSCRIPTEN_BINDINGS(ggwave) {
.value("GGWAVE_PROTOCOL_DT_NORMAL", GGWAVE_PROTOCOL_DT_NORMAL)
.value("GGWAVE_PROTOCOL_DT_FAST", GGWAVE_PROTOCOL_DT_FAST)
.value("GGWAVE_PROTOCOL_DT_FASTEST", GGWAVE_PROTOCOL_DT_FASTEST)
.value("GGWAVE_PROTOCOL_MT_NORMAL", GGWAVE_PROTOCOL_MT_NORMAL)
.value("GGWAVE_PROTOCOL_MT_FAST", GGWAVE_PROTOCOL_MT_FAST)
.value("GGWAVE_PROTOCOL_MT_FASTEST", GGWAVE_PROTOCOL_MT_FASTEST)
.value("GGWAVE_PROTOCOL_CUSTOM_0", GGWAVE_PROTOCOL_CUSTOM_0)
.value("GGWAVE_PROTOCOL_CUSTOM_1", GGWAVE_PROTOCOL_CUSTOM_1)
@@ -113,4 +116,16 @@ EMSCRIPTEN_BINDINGS(ggwave) {
int state) {
ggwave_txToggleProtocol(protocolId, state);
}));
emscripten::function("rxProtocolSetFreqStart", emscripten::optional_override(
[](ggwave_ProtocolId protocolId,
int freqStart) {
ggwave_rxProtocolSetFreqStart(protocolId, freqStart);
}));
emscripten::function("txProtocolSetFreqStart", emscripten::optional_override(
[](ggwave_ProtocolId protocolId,
int freqStart) {
ggwave_txProtocolSetFreqStart(protocolId, freqStart);
}));
}

File diff suppressed because one or more lines are too long