Fixed up conditionals in commons.h

This commit is contained in:
Jordan Sherer 2019-05-27 14:19:37 -04:00
parent ce0aceb33c
commit b94f93780f
2 changed files with 20 additions and 14 deletions

View File

@ -5,6 +5,19 @@
#define NTMAX 300 #define NTMAX 300
#define RX_SAMPLE_RATE 12000 #define RX_SAMPLE_RATE 12000
#ifndef TEST_FOX_WAVE_GEN
#define TEST_FOX_WAVE_GEN 0
#endif
#ifndef TEST_FOX_WAVE_GEN_SLOTS
#if TEST_FOX_WAVE_GEN
#define TEST_FOX_WAVE_GEN_SLOTS 2
#else
#define TEST_FOX_WAVE_GEN_SLOTS 1
#endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
#include <cstdbool> #include <cstdbool>
extern "C" { extern "C" {

View File

@ -157,18 +157,6 @@ extern "C" {
void plotsave_(float swide[], int* m_w , int* m_h1, int* irow); void plotsave_(float swide[], int* m_w , int* m_h1, int* irow);
} }
#ifndef TEST_FOX_WAVE_GEN
#define TEST_FOX_WAVE_GEN 0
#endif
#ifndef TEST_FOX_WAVE_GEN_SLOTS
#if TEST_FOX_WAVE_GEN
#define TEST_FOX_WAVE_GEN_SLOTS 2
#else
#define TEST_FOX_WAVE_GEN_SLOTS 1
#endif
#endif
const int NEAR_THRESHOLD_RX = 10; const int NEAR_THRESHOLD_RX = 10;
int volatile itone[NUM_ISCAT_SYMBOLS]; //Audio tones for all Tx symbols int volatile itone[NUM_ISCAT_SYMBOLS]; //Audio tones for all Tx symbols
@ -1645,6 +1633,11 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
clearActivity(); clearActivity();
displayActivity(true); displayActivity(true);
#if TEST_FOX_WAVE_GEN
ui->turboButton->setVisible(true);
ui->turboButton->setEnabled(true);
#endif
m_txTextDirtyDebounce.setSingleShot(true); m_txTextDirtyDebounce.setSingleShot(true);
connect(&m_txTextDirtyDebounce, &QTimer::timeout, this, &MainWindow::refreshTextDisplay); connect(&m_txTextDirtyDebounce, &QTimer::timeout, this, &MainWindow::refreshTextDisplay);
@ -4943,12 +4936,12 @@ void MainWindow::guiUpdate()
foxcom_.nfreq=ui->TxFreqSpinBox->value(); foxcom_.nfreq=ui->TxFreqSpinBox->value();
if(m_config.split_mode()) foxcom_.nfreq = foxcom_.nfreq - m_XIT; //Fox Tx freq if(m_config.split_mode()) foxcom_.nfreq = foxcom_.nfreq - m_XIT; //Fox Tx freq
strncpy(&foxcom_.cmsg[0][0], QString::fromStdString(message).toLatin1(), 12); strncpy(&foxcom_.cmsg[0][0], QString::fromStdString(message).toLatin1(), 12);
foxcom_.i3bit[0] = m_i3bit | Varicode::JS8CallExtended; foxcom_.i3bit[0] = m_i3bit | Varicode::JS8CallFlag;
int i = 1; int i = 1;
while(!m_txFrameQueue.isEmpty() && foxcom_.nslots < TEST_FOX_WAVE_GEN_SLOTS){ while(!m_txFrameQueue.isEmpty() && foxcom_.nslots < TEST_FOX_WAVE_GEN_SLOTS){
auto pair = m_txFrameQueue.dequeue(); auto pair = m_txFrameQueue.dequeue();
strncpy(&foxcom_.cmsg[i][0], pair.first.toLatin1(), 12); strncpy(&foxcom_.cmsg[i][0], pair.first.toLatin1(), 12);
foxcom_.i3bit[i] = pair.second | Varicode::JS8CallExtended; foxcom_.i3bit[i] = pair.second | Varicode::JS8CallFlag;
foxcom_.nslots += 1; foxcom_.nslots += 1;
//m_currentMessage.append(pair.first); //m_currentMessage.append(pair.first);