|
|
|
@ -42,6 +42,7 @@ |
|
|
|
|
* T4.0 For an update of a 128 sample block, doSimple=1, 20 microseconds |
|
|
|
|
* |
|
|
|
|
* Rev Apr2021 Allowed for 2-channel I-Q input. Defaults to 1 Channel. "real." |
|
|
|
|
* Rev 30Jan23 Corrected setSampleRate_Hz(sr) to do so! RSL |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
#ifndef _radioIQMixer_f32_h |
|
|
|
@ -123,10 +124,11 @@ public: |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void setSampleRate_Hz(float32_t fs_Hz) { |
|
|
|
|
sample_rate_Hz = fs_Hz; // Added 30Jan23 RSL
|
|
|
|
|
// Check freq range
|
|
|
|
|
if (freq > sample_rate_Hz/2.0f) freq = sample_rate_Hz/2.f; |
|
|
|
|
// update phase increment for new frequency
|
|
|
|
|
phaseIncrement = 512.0f * freq / fs_Hz; |
|
|
|
|
phaseIncrement = 512.0f * freq / sample_rate_Hz; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void showError(uint16_t e) { // Serial.print errors in update()
|
|
|
|
|