mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-03-17 07:56:00 +08:00
ggwave : add mono-tone protocols
This commit is contained in:
@@ -52,11 +52,12 @@ void loop() {
|
||||
p.sampleRate = frequency;
|
||||
p.sampleFormatInp = GGWAVE_SAMPLE_FORMAT_I16;
|
||||
p.samplesPerFrame = 128;
|
||||
p.payloadLength = 16;
|
||||
p.payloadLength = 4;
|
||||
p.operatingMode = GGWAVE_OPERATING_MODE_RX;
|
||||
|
||||
GGWave ggwave(p);
|
||||
ggwave.setRxProtocols({
|
||||
//{ GGWAVE_TX_PROTOCOL_MT_FASTEST, ggwave.getTxProtocol(GGWAVE_TX_PROTOCOL_MT_FASTEST) },
|
||||
{ GGWAVE_TX_PROTOCOL_DT_FASTEST, ggwave.getTxProtocol(GGWAVE_TX_PROTOCOL_DT_FASTEST) },
|
||||
});
|
||||
Serial.println("Instance initialized");
|
||||
|
||||
@@ -41,7 +41,7 @@ int main(int argc, char** argv) {
|
||||
printf(" -t%d : %s\n", protocol.first, protocol.second.name);
|
||||
}
|
||||
|
||||
if (txProtocolId < 0 || txProtocolId > (int) ggWave->getTxProtocols().size()) {
|
||||
if (txProtocolId < 0) {
|
||||
fprintf(stderr, "Unknown Tx protocol %d\n", txProtocolId);
|
||||
return -3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user