Make the compilation of FM support conditional.

This commit is contained in:
Jonathan Naylor
2023-06-29 15:57:13 +01:00
parent 7fa24d7f57
commit 5a12f49a6e
12 changed files with 275 additions and 17 deletions

View File

@@ -19,11 +19,9 @@
#include "FMControl.h"
#include "Utils.h"
#include <string>
#if defined(USE_FM)
#if defined(DUMP_RF_AUDIO)
#include <cstdio>
#endif
#include <string>
#define SWAP_BYTES_16(a) (((a >> 8) & 0x00FFU) | ((a << 8) & 0xFF00U))
@@ -153,13 +151,6 @@ bool CFMControl::writeModem(const unsigned char* data, unsigned int length)
}
}
#if defined(DUMP_RF_AUDIO)
FILE * audiofile = fopen("./audiodump.bin", "ab");
if (audiofile != NULL) {
fwrite(out, sizeof(float), nOut, audiofile);
fclose(audiofile);
}
#endif
return m_network->writeData(out, nOut);
}
@@ -234,3 +225,5 @@ void CFMControl::writeJSON(const char* state)
WriteJSON("FM", json);
}
#endif