public MemoryRecord(string _group, double _rxfreq, string _name, DSPMode _dsp_mode, bool _scan, string _tune_step, FMTXMode _repeater_mode, double _fm_tx_offset_mhz, bool _ctcss_on, double _ctcss_freq, int _power, int _deviation, bool _split, double _txfreq, Filter _filter, int _filterlow, int _filterhigh, string _comments, AGCMode _agc_mode, int _agc_thresh) { group = _group; rx_freq = _rxfreq; name = _name; dsp_mode = _dsp_mode; scan = _scan; tune_step = _tune_step; repeater_mode = _repeater_mode; rptr_offset = _fm_tx_offset_mhz; ctcss_on = _ctcss_on; ctcss_freq = _ctcss_freq; power = _power; deviation = _deviation; split = _split; tx_freq = _txfreq; rx_filter = _filter; rx_filter_low = _filterlow; rx_filter_high = _filterhigh; comments = _comments; agc_mode = _agc_mode; agct = _agc_thresh; }
public static void SetRXAGC(AGCMode setit) { SetRXAGC_DLL(setit); SetRXListen(1); SetRXAGC_DLL(setit); SetRXListen(0); }
private void InitAGCModes() { for (AGCMode agc = AGCMode.FIRST + 1; agc < AGCMode.LAST; agc++) { string s = agc.ToString().ToLower(); s = s.Substring(0, 1).ToUpper() + s.Substring(1, s.Length - 1); comboAGC.Items.Add(s); } }
/* * public MemoryRecord(string _group, double _rxfreq, string _name, DSPMode _dsp_mode, bool _scan, * string _tune_step, FMTXMode _repeater_mode, double _fm_tx_offset_mhz, bool _ctcss_on, double _ctcss_freq, * int _power, int _deviation, bool _split, double _txfreq, Filter _filter, int _filterlow, int _filterhigh, * string _comments, AGCMode _agc_mode, int _agc_thresh) * { * group = _group; * rx_freq = _rxfreq; * name = _name; * dsp_mode = _dsp_mode; * scan = _scan; * tune_step = _tune_step; * repeater_mode = _repeater_mode; * rptr_offset = _fm_tx_offset_mhz; * ctcss_on = _ctcss_on; * ctcss_freq = _ctcss_freq; * power = _power; * deviation = _deviation; * split = _split; * tx_freq = _txfreq; * rx_filter = _filter; * rx_filter_low = _filterlow; * rx_filter_high = _filterhigh; * comments = _comments; * agc_mode = _agc_mode; * agct = _agc_thresh; * } */ //===================================================================================================================== // ke9ns add start/stop date and time and determine if repeating and if you want to record audio public MemoryRecord(string _group, double _rxfreq, string _name, DSPMode _dsp_mode, bool _scan, string _tune_step, FMTXMode _repeater_mode, double _fm_tx_offset_mhz, bool _ctcss_on, double _ctcss_freq, int _power, int _deviation, bool _split, double _txfreq, Filter _filter, int _filterlow, int _filterhigh, string _comments, AGCMode _agc_mode, int _agc_thresh, DateTime _StartDate, bool _ScheduleOn, int _Duration, bool _Repeating, bool _Recording, bool _Repeatingm, int _Extra) // string _StartTime, { group = _group; rx_freq = _rxfreq; name = _name; dsp_mode = _dsp_mode; scan = _scan; tune_step = _tune_step; repeater_mode = _repeater_mode; rptr_offset = _fm_tx_offset_mhz; ctcss_on = _ctcss_on; ctcss_freq = _ctcss_freq; power = _power; deviation = _deviation; split = _split; tx_freq = _txfreq; rx_filter = _filter; rx_filter_low = _filterlow; rx_filter_high = _filterhigh; comments = _comments; agc_mode = _agc_mode; agct = _agc_thresh; startdate = _StartDate; // ke9ns add for scheduled freq change and optional recording scheduleon = _ScheduleOn; // ke9ns add for scheduled freq change and optional recording duration = _Duration; // ke9ns add for scheduled freq change and optional recording repeating = _Repeating; // ke9ns add for scheduled freq change and optional recording recording = _Recording; // ke9ns add for scheduled freq change and optional recording repeatingm = _Repeatingm; // ke9ns add for scheduled freq change and optional recording extra = _Extra; // ke9ns add for scheduled freq change and optional recording /* * * startdate = StartDate; // ke9ns add for scheduled freq change and optional recording * scheduleon = ScheduleOn; // ke9ns add for scheduled freq change and optional recording * duration = Duration;// ke9ns add for scheduled freq change and optional recording * repeating = Repeating;// ke9ns add for scheduled freq change and optional recording * recording = Recording;// ke9ns add for scheduled freq change and optional recording * repeatingm = Repeatingm;// ke9ns add for scheduled freq change and optional recording * extra = Extra;// ke9ns add for scheduled freq change and optional recording */ } // memoryrecord
[DllImport("DttSP.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SetRXAGC")]/// public static extern void SetRXAGC(uint thread, uint subrx, AGCMode setit);
public static extern void SetRXAAGCMode(int channel, AGCMode mode);
public Memory(Console c) { InitializeComponent(); console = c; // Setup arrays modes = new ArrayList(); for (DSPMode m = DSPMode.FIRST + 1; m < DSPMode.LAST; m++) { modes.Add(new DataBind((int)m, m.ToString())); } // modes.Add(new DataBind(0, "LSB")); // modes.Add(new DataBind(1, "USB")); // modes.Add(new DataBind(2, "DSB")); // modes.Add(new DataBind(3, "CWL")); // modes.Add(new DataBind(4, "CWU")); // modes.Add(new DataBind(5, "FMN")); // modes.Add(new DataBind(6, "AM")); // modes.Add(new DataBind(7, "SAM")); // modes.Add(new DataBind(8, "SPEC")); // modes.Add(new DataBind(9, "DRM")); filters = new ArrayList(); filters.Add(new DataBind(0, "Filter1")); filters.Add(new DataBind(1, "Filter2")); filters.Add(new DataBind(2, "Filter3")); filters.Add(new DataBind(3, "Filter4")); filters.Add(new DataBind(4, "Filter5")); filters.Add(new DataBind(5, "Filter6")); filters.Add(new DataBind(6, "Filter7")); filters.Add(new DataBind(7, "Filter8")); filters.Add(new DataBind(8, "Filter9")); filters.Add(new DataBind(9, "Filter10")); filters.Add(new DataBind(10, "Var1")); filters.Add(new DataBind(11, "Var2")); filters.Add(new DataBind(12, "None")); agc_modes = new ArrayList(); for (AGCMode agc = AGCMode.FIRST + 1; agc < AGCMode.LAST; agc++) { string s = agc.ToString().ToLower(); s = s.Substring(0, 1).ToUpper() + s.Substring(1, s.Length - 1); agc_modes.Add(new DataBind((int)agc, s)); } step_sizes = new ArrayList(); step_sizes.Add(new DataBind(0, "1Hz")); step_sizes.Add(new DataBind(1, "10Hz")); step_sizes.Add(new DataBind(2, "50Hz")); step_sizes.Add(new DataBind(3, "100Hz")); step_sizes.Add(new DataBind(4, "250Hz")); step_sizes.Add(new DataBind(5, "500Hz")); step_sizes.Add(new DataBind(6, "1kHz")); step_sizes.Add(new DataBind(7, "5kHz")); step_sizes.Add(new DataBind(8, "10kHz")); step_sizes.Add(new DataBind(9, "100kHz")); step_sizes.Add(new DataBind(10, "1MHz")); step_sizes.Add(new DataBind(11, "10MHz")); // Init DataGrid components InitDataGrid(); // Use database memory table ds = DB.dsMemory; dataGrid1.DataSource = ds.Tables["Memory"]; ds.Tables["Memory"].Columns["GroupID"].DefaultValue = 0; ds.Tables["Memory"].Columns["Frequency"].DefaultValue = 7.0; ds.Tables["Memory"].Columns["ModeID"].DefaultValue = 0; ds.Tables["Memory"].Columns["FilterID"].DefaultValue = 0; ds.Tables["Memory"].Columns["Callsign"].DefaultValue = " "; ds.Tables["Memory"].Columns["Comments"].DefaultValue = " "; //ds.Tables["Memory"].Columns["Scan"].DefaultValue = 1; ds.Tables["Memory"].Columns["Squelch"].DefaultValue = 0; ds.Tables["Memory"].Columns["StepSizeID"].DefaultValue = 0; ds.Tables["Memory"].Columns["AGCID"].DefaultValue = 2; ds.Tables["Memory"].Columns["Gain"].DefaultValue = 0; ds.Tables["Memory"].Columns["FilterLow"].DefaultValue = 0; ds.Tables["Memory"].Columns["FilterHigh"].DefaultValue = 0; ds.Tables["Memory"].Columns["CreateDate"].DefaultValue = DateTime.Now; // Bind combobox datasources columnGroupID.ComboBox.DataSource = ds.Tables["GroupList"]; columnGroupID.ComboBox.DisplayMember = "GroupName"; columnGroupID.ComboBox.ValueMember = "GroupID"; columnMode.ComboBox.DataSource = modes; columnMode.ComboBox.DisplayMember = "Text"; columnMode.ComboBox.ValueMember = "Index"; columnFilter.ComboBox.DataSource = filters; columnFilter.ComboBox.DisplayMember = "Text"; columnFilter.ComboBox.ValueMember = "Index"; columnAGC.ComboBox.DataSource = agc_modes; columnAGC.ComboBox.DisplayMember = "Text"; columnAGC.ComboBox.ValueMember = "Index"; columnStepSize.ComboBox.DataSource = step_sizes; columnStepSize.ComboBox.DisplayMember = "Text"; columnStepSize.ComboBox.ValueMember = "Index"; chkEdit_CheckedChanged(this, EventArgs.Empty); ds.Tables["Memory"].DefaultView.Sort = "Frequency"; dataGrid1.CurrentRowIndex = 0; ds.Tables["Memory"].DefaultView.AllowNew = false; }
public void SetAGC(AGCMode newmode) { try { agc_mode = newmode; SetRXAGC(0, 0, newmode); SetRXAGC(0, 1, newmode); SetRXAGC(0, 2, newmode); SetRXAGC(0, 3, newmode); } catch (Exception ex) { Debug.Write(ex.ToString()); } }
public static extern void SetRXAGC(uint thread, uint subrx, AGCMode setit);
public static extern void SetRXAGC_DLL(AGCMode setit);
private void comboAGCMainRX_SelectedIndexChanged(object sender, EventArgs e) { try { if (comboAGCMainRX.SelectedIndex < 0) return; { DttSP.SetRXAGC(0, 0, (AGCMode)comboAGCMainRX.SelectedIndex); } if ((AGCMode)comboAGCMainRX.SelectedIndex == AGCMode.CUSTOM) SetupForm.CustomRXAGCEnabled = true; else SetupForm.CustomRXAGCEnabled = false; current_agc_mode = (AGCMode)comboAGCMainRX.SelectedIndex; if (comboAGCMainRX.Focused) btnHidden.Focus(); } catch (Exception ex) { Debug.Write(ex.ToString()); } }