#define STEP_MAG_DB 5.0 // magnitude axis step
#define BETA 0.95 // constant for time averaging spectrum data
#define MIN_F_HZ 0 // min freq on Waterfall and Spectrum
-#define MAX_F_HZ 4000 // max freq on Waterfall and Spectrum
+#define MAX_F_HZ 3000 // max freq on Waterfall and Spectrum
#define STEP_F_HZ 500 // major (e.g. text legend) freq step on Waterfall and Spectrum graticule
#define STEP_MINOR_F_HZ 100 // minor (ticks) freq step on Waterfall and Spectrum graticule
#define WATERFALL_SECS_Y 30 // number of seconds respresented by y axis of waterfall
wxGetApp().m_playFileToMicInPath = pConfig->Read("/File/playFileToMicInPath", wxT(""));
wxGetApp().m_recFileFromRadioPath = pConfig->Read("/File/recFileFromRadioPath", wxT(""));
wxGetApp().m_recFileFromRadioSecs = pConfig->Read("/File/recFileFromRadioSecs", 30);
- wxGetApp().m_playFileFromRadioPath = pConfig->Read("/File/playFileToFromRadioPath", wxT(""));
+ wxGetApp().m_playFileFromRadioPath = pConfig->Read("/File/playFileFromRadioPath", wxT(""));
bool slow = false; // prevents compile error when using default bool
wxGetApp().m_snrSlow = pConfig->Read("/Audio/snrSlow", slow);
data_flag_index = codec2_get_spare_bit_index(c2);
assert(data_flag_index != -1); // not supported for all rates
- if (0/*codec_bits[data_flag_index]*/) {
+ if (codec_bits[data_flag_index]) {
//printf("data_flag_index: %d\n", data_flag_index);
//printf("rx data bits: ");
//for(i=0; i<BITS_PER_CODEC_FRAME; i++)
pen.SetWidth(1);
dc.SetPen(pen);
- index_to_px = (float)m_rGrid.GetWidth()/FDMDV_NSPEC;
+ index_to_px = ((float)FDMDV_MAX_F_HZ/(float)MAX_F_HZ)*(float)m_rGrid.GetWidth()/FDMDV_NSPEC;
mag_dB_to_py = (float)m_rGrid.GetHeight()/(MAX_MAG_DB-MIN_MAG_DB);
+ int last_index = ((float)MAX_F_HZ/(float)FDMDV_MAX_F_HZ)*FDMDV_NSPEC;
prev_x = PLOT_BORDER + XLEFT_OFFSET;
prev_y = PLOT_BORDER;
- for(index = 0; index < FDMDV_NSPEC; index++)
+ for(index = 0; index < last_index; index++)
{
x = index*index_to_px;
mag = g_avmag[index];
//printf("max_mag: %f m_max_mag: %f\n", max_mag, m_max_mag);
//intensity_per_dB = (float)256 /(MAX_MAG_DB - MIN_MAG_DB);
intensity_per_dB = (float)256 /(m_max_mag - m_min_mag);
- spec_index_per_px = (float)FDMDV_NSPEC / (float) m_rGrid.GetWidth();
+ spec_index_per_px = ((float)MAX_F_HZ/(float)FDMDV_MAX_F_HZ)*(float)FDMDV_NSPEC / (float) m_rGrid.GetWidth();
/*
printf("h %d w %d px_per_sec %d dy %d dy_blocks %d spec_index_per_px: %f\n",