mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-05 07:24:47 -04:00
Demodulator can now tune offset!
Demodulator will up-convert / down-convert by mixing VCO with incoming IQ to shift frequency -- No longer limited to center freq. can listen anywhere on the waterfall.
This commit is contained in:
@@ -199,7 +199,7 @@ void WaterfallCanvas::mouseMoved(wxMouseEvent& event) {
|
||||
}
|
||||
|
||||
DemodulatorThreadCommand command;
|
||||
command.cmd = DemodulatorThreadCommand::SDR_THREAD_CMD_SETBANDWIDTH;
|
||||
command.cmd = DemodulatorThreadCommand::SDR_THREAD_CMD_SET_BANDWIDTH;
|
||||
demodBW = demodBW - bwDiff;
|
||||
if (demodBW < 1000) {
|
||||
demodBW = 1000;
|
||||
@@ -245,11 +245,17 @@ void WaterfallCanvas::mouseReleased(wxMouseEvent& event) {
|
||||
|
||||
float pos = mTracker.getMouseX();
|
||||
|
||||
int freq = wxGetApp().getFrequency();
|
||||
int center_freq = wxGetApp().getFrequency();
|
||||
|
||||
freq += (pos - 0.5) * SRATE;
|
||||
DemodulatorInstance *demod = wxGetApp().getDemodTest();
|
||||
|
||||
wxGetApp().setFrequency(freq);
|
||||
int freq = center_freq - (int)(0.5 * (float)SRATE) + (int)((float)pos * (float)SRATE);
|
||||
|
||||
DemodulatorThreadCommand command;
|
||||
command.cmd = DemodulatorThreadCommand::SDR_THREAD_CMD_SET_FREQUENCY;
|
||||
command.int_value = freq;
|
||||
|
||||
demod->getCommandQueue()->push(command);
|
||||
|
||||
((wxFrame*) parent)->GetStatusBar()->SetStatusText(
|
||||
wxString::Format(wxT("Set center frequency: %s"),
|
||||
|
||||
Reference in New Issue
Block a user