kopia lustrzana https://github.com/threeme3/usdx
Merge experimental branch.
commit
0b4c3f5cf6
38
QCX-SSB.ino
38
QCX-SSB.ino
|
@ -1461,15 +1461,21 @@ volatile int16_t param_c = 0;
|
|||
#endif
|
||||
|
||||
enum dsp_cap_t { ANALOG, DSP, SDR };
|
||||
#ifdef QCX
|
||||
uint8_t dsp_cap = 0;
|
||||
uint8_t ssb_cap = 0;
|
||||
#else
|
||||
// force SSB and SDR capability
|
||||
const uint8_t ssb_cap = 1;
|
||||
const uint8_t dsp_cap = SDR;
|
||||
#endif
|
||||
|
||||
enum mode_t { LSB, USB, CW, AM, FM };
|
||||
volatile int8_t mode = USB;
|
||||
volatile uint8_t mode = USB;
|
||||
volatile uint16_t numSamples = 0;
|
||||
|
||||
volatile uint8_t tx = 0;
|
||||
volatile bool vox = false;
|
||||
volatile uint8_t vox = 0;
|
||||
|
||||
inline void _vox(uint8_t trigger)
|
||||
{
|
||||
|
@ -1672,7 +1678,7 @@ void dsp_tx_fm()
|
|||
si5351.freq_calc_fast(df); // calculate SI5351 registers based on frequency shift and carrier frequency
|
||||
}
|
||||
|
||||
volatile int8_t cwdec = 0;
|
||||
volatile uint8_t cwdec = 0;
|
||||
|
||||
static int32_t signal;
|
||||
static int16_t avg = 0;
|
||||
|
@ -1864,8 +1870,8 @@ param_c = avg;
|
|||
}
|
||||
|
||||
#define N_FILT 7
|
||||
volatile int8_t filt = 0;
|
||||
int8_t prev_filt[] = { 0 , 4 }; // default filter for modes resp. CW, SSB
|
||||
volatile uint8_t filt = 0;
|
||||
uint8_t prev_filt[] = { 0 , 4 }; // default filter for modes resp. CW, SSB
|
||||
|
||||
/* basicdsp filter simulation:
|
||||
samplerate=7812
|
||||
|
@ -2841,7 +2847,7 @@ volatile int32_t freq = 7074000;
|
|||
// We measure the average amplitude of the signal (see slow_dsp()) but the S-meter should be based on RMS value.
|
||||
// So we multiply by 0.707/0.639 in an attempt to roughly compensate, although that only really works if the input
|
||||
// is a sine wave
|
||||
int8_t smode = 1;
|
||||
uint8_t smode = 1;
|
||||
float dbm_val = -140.0;
|
||||
|
||||
float smeter(float ref = 0) // ref was 5 (= 10*log(8000/2400)) but I don't think that is correct?
|
||||
|
@ -3000,8 +3006,8 @@ void calibrate_iq()
|
|||
#endif
|
||||
#endif //QCX
|
||||
|
||||
int8_t prev_bandval = 2;
|
||||
int8_t bandval = 2;
|
||||
uint8_t prev_bandval = 2;
|
||||
uint8_t bandval = 2;
|
||||
#define N_BANDS 10
|
||||
|
||||
#ifdef KEYER
|
||||
|
@ -3012,9 +3018,9 @@ uint32_t band[N_BANDS] = { /*472000, 1840000,*/ 3573000, 5357000, 7074000, 10136
|
|||
#endif
|
||||
|
||||
enum step_t { STEP_10M, STEP_1M, STEP_500k, STEP_100k, STEP_10k, STEP_1k, STEP_500, STEP_100, STEP_10, STEP_1 };
|
||||
int32_t stepsizes[10] = { 10000000, 1000000, 500000, 100000, 10000, 1000, 500, 100, 10, 1 };
|
||||
volatile int8_t stepsize = STEP_1k;
|
||||
int8_t prev_stepsize[] = { STEP_1k, STEP_500 }; //default stepsize for resp. SSB, CW
|
||||
uint32_t stepsizes[10] = { 10000000, 1000000, 500000, 100000, 10000, 1000, 500, 100, 10, 1 };
|
||||
volatile uint8_t stepsize = STEP_1k;
|
||||
uint8_t prev_stepsize[] = { STEP_1k, STEP_500 }; //default stepsize for resp. SSB, CW
|
||||
|
||||
void process_encoder_tuning_step(int8_t steps)
|
||||
{
|
||||
|
@ -3626,12 +3632,10 @@ void setup()
|
|||
pinMode(DAH, INPUT_PULLUP);
|
||||
ssb_cap = (abs(v2 - v1) > (0.05 * 1024.0 / 5.0)); // SSB capability?
|
||||
|
||||
//ssb_cap = 0; dsp_cap = 0; // force standard QCX capability
|
||||
//ssb_cap = 1; dsp_cap = 0; // force SSB and standard QCX-RX capability
|
||||
//ssb_cap = 1; dsp_cap = 1; // force SSB and DSP capability
|
||||
//ssb_cap = 1; dsp_cap = 2; // force SSB and SDR capability
|
||||
#else
|
||||
ssb_cap = 1; dsp_cap = 2; // force SSB and SDR capability
|
||||
//ssb_cap = 0; dsp_cap = ANALOG; // force standard QCX capability
|
||||
//ssb_cap = 1; dsp_cap = ANALOG; // force SSB and standard QCX-RX capability
|
||||
//ssb_cap = 1; dsp_cap = DSP; // force SSB and DSP capability
|
||||
//ssb_cap = 1; dsp_cap = SDR; // force SSB and SDR capability
|
||||
#endif // QCX
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
Ładowanie…
Reference in New Issue