Zero beating to CW offset is the right thing to do -- fix has been sent of to Flex HQ for inclusion in the next (post 1.3.14) release.

If anyone wants to drop in the fix to play with the changed routine (in console.cs) is:
------------- start code
private void btnZeroBeat_Click(object sender, System.EventArgs e)
                {
                        int peak_hz = FindPeakFreqInPassband();
                        if ( peak_hz == -1 )
                        {
                                return; // find peak croaked - bail
                        }
                        // Debug.WriteLine("peak: " + peak_hz);
                        int delta_hz = 0;
// if we're in CW mode, zero beat to CWPitch, provided it is in the passband if ( current_dsp_mode == DSPMode.CWL || current_dsp_mode == DSPMode.CWU )
                        {
                                int local_pitch = CWPitch;
                                if ( current_dsp_mode == DSPMode.CWL )
                                {
                                        local_pitch = - local_pitch;
                                }
                                // is cwoffset in passband?
if ( local_pitch >= udFilterLow.Value && local_pitch <= udFilterHigh.Value )
                                {
                                        delta_hz = local_pitch - peak_hz;
                                }
                                // Debug.WriteLine("delta(cw): " + delta_hz);
                        }

// if we get here and delta_hz is still 0, we're either not in CW mode or the current CW // pitch is not within the passband. Put strongest peak @ center of passband
                        if ( delta_hz == 0 )
                        {
int center_hz = (int)(((udFilterHigh.Value - udFilterLow.Value)/2) + udFilterLow.Value);
                                delta_hz = center_hz - peak_hz;
                        }
//                      Debug.WriteLine("peak: " + peak_hz);
//                      Debug.WriteLine("center: " + center_hz);
//                      Debug.WriteLine("delta: " + delta_hz + "\n");

                        VFOAFreq -= (double)delta_hz/1e6;
                }

------------- end code

Thanks for pointing out the error in my thinking.

Bill (kd5tfd)

At 08:13 PM 7/2/2005, Dale Boresz wrote:
The CW zero-beat function works great and is much appreciated!

However, I suspect the intent was for the zero-beat to occur at the 'CW Pitch' frequency that is selected in Setup > DSP [CW Pitch]. My zero-beat occurs at 600 Hz, regardless of the selected CW Pitch.

73, Dale WA8SRA



Reply via email to