mirror of
https://github.com/nqrduck/LimeDriver.git
synced 2024-11-22 01:52:24 +00:00
Added init of modulation parameters
This commit is contained in:
parent
a158dc193e
commit
929a6a8d0d
1 changed files with 41 additions and 32 deletions
|
@ -354,40 +354,49 @@ LimeConfig_t initializeLimeConfig(int Npulses) {
|
||||||
LimeCfg.TX_QcorrDC = 50; // DC corr to TX mixer at IF
|
LimeCfg.TX_QcorrDC = 50; // DC corr to TX mixer at IF
|
||||||
|
|
||||||
// Allocate the arrays with pulse parametes
|
// Allocate the arrays with pulse parametes
|
||||||
LimeCfg.p_dur = new double[LimeCfg.Npulses]; // pulse duration (secs)
|
LimeCfg.p_dur = new double[LimeCfg.Npulses]; // pulse duration (secs)
|
||||||
LimeCfg.p_offs = new int[LimeCfg.Npulses]; // pulse time offset
|
LimeCfg.p_offs = new int[LimeCfg.Npulses]; // pulse time offset
|
||||||
LimeCfg.p_amp = new double[LimeCfg.Npulses]; // pulse digital IF amplitude
|
LimeCfg.p_amp = new double[LimeCfg.Npulses]; // pulse digital IF amplitude
|
||||||
LimeCfg.p_frq =
|
LimeCfg.p_frq = new double[LimeCfg.Npulses]; // pulse digital IF frequency (unit: Hz)
|
||||||
new double[LimeCfg.Npulses]; // pulse digital IF frequency (unit: Hz)
|
LimeCfg.p_pha = new double[LimeCfg.Npulses]; // pulse digital IF phase
|
||||||
LimeCfg.p_pha = new double[LimeCfg.Npulses]; // pulse digital IF phase
|
LimeCfg.p_phacyc_N = new int[LimeCfg.Npulses]; // number of pulse phases (cycled within 2*pi, must be at least 1)
|
||||||
LimeCfg.p_phacyc_N =
|
LimeCfg.p_phacyc_lev = new int[LimeCfg.Npulses]; // stacking level of phase cycle (for eventual coupling)
|
||||||
new int[LimeCfg.Npulses]; // number of pulse phases (cycled within 2*pi,
|
LimeCfg.p_c0_en = new int[LimeCfg.Npulses]; // pulse-wise enable of marker c0
|
||||||
// must be at least 1)
|
LimeCfg.p_c1_en = new int[LimeCfg.Npulses]; // pulse-wise enable of marker c1
|
||||||
LimeCfg.p_phacyc_lev =
|
LimeCfg.p_c2_en = new int[LimeCfg.Npulses]; // pulse-wise enable of marker c2
|
||||||
new int[LimeCfg.Npulses]; // stacking level of phase cycle (for eventual
|
LimeCfg.p_c3_en = new int[LimeCfg.Npulses]; // pulse-wise enable of marker c3
|
||||||
// coupling)
|
LimeCfg.am_frq = new double[LimeCfg.Npulses]; // pulse AM frequency
|
||||||
LimeCfg.p_c0_en = new int[LimeCfg.Npulses]; // pulse-wise enable of marker c0
|
LimeCfg.am_pha = new double[LimeCfg.Npulses]; // pulse AM phase
|
||||||
LimeCfg.p_c1_en = new int[LimeCfg.Npulses]; // pulse-wise enable of marker c1
|
LimeCfg.am_depth = new double[LimeCfg.Npulses]; // pulse AM depth
|
||||||
LimeCfg.p_c2_en = new int[LimeCfg.Npulses]; // pulse-wise enable of marker c2
|
LimeCfg.am_mode = new int[LimeCfg.Npulses]; // pulse AM mode (0: sinus, 1: triangle, 2: square)
|
||||||
LimeCfg.p_c3_en = new int[LimeCfg.Npulses]; // pulse-wise enable of marker c3
|
LimeCfg.fm_frq = new double[LimeCfg.Npulses]; // pulse FM frequency
|
||||||
|
LimeCfg.fm_pha = new double[LimeCfg.Npulses]; // pulse FM phase
|
||||||
|
LimeCfg.fm_width = new double[LimeCfg.Npulses]; // pulse FM width
|
||||||
|
LimeCfg.fm_mode = new int[LimeCfg.Npulses]; // pulse FM mode (0: sinus, 1: triangle, 2: square)
|
||||||
|
|
||||||
// and set standard values
|
// and set standard values
|
||||||
for (int ii = 0; ii < LimeCfg.Npulses; ii++) {
|
for (int ii = 0; ii < LimeCfg.Npulses; ii++) {
|
||||||
|
|
||||||
LimeCfg.p_dur[ii] = 2e-6;
|
LimeCfg.p_dur[ii] = 2e-6;
|
||||||
LimeCfg.p_offs[ii] =
|
LimeCfg.p_offs[ii] = (4080*3)/(LimeCfg.Npulses+1); // distribute them evenly within the buffer...
|
||||||
(4080 * 3) /
|
LimeCfg.p_amp[ii] = 1.0;
|
||||||
(LimeCfg.Npulses + 1); // distribute them evenly within the buffer...
|
LimeCfg.p_frq[ii] = 4.0/LimeCfg.p_dur[0];
|
||||||
LimeCfg.p_amp[ii] = 1.0;
|
LimeCfg.p_pha[ii] = 0.0;
|
||||||
LimeCfg.p_frq[ii] = 4.0 / LimeCfg.p_dur[0];
|
LimeCfg.p_phacyc_N[ii] = 1;
|
||||||
LimeCfg.p_pha[ii] = 0.0;
|
LimeCfg.p_phacyc_lev[ii]= 0;
|
||||||
LimeCfg.p_phacyc_N[ii] = 1;
|
LimeCfg.p_c0_en[ii] = 1;
|
||||||
LimeCfg.p_phacyc_lev[ii] = 0;
|
LimeCfg.p_c1_en[ii] = 1;
|
||||||
LimeCfg.p_c0_en[ii] = 1;
|
LimeCfg.p_c2_en[ii] = 1;
|
||||||
LimeCfg.p_c1_en[ii] = 1;
|
LimeCfg.p_c3_en[ii] = 1;
|
||||||
LimeCfg.p_c2_en[ii] = 1;
|
LimeCfg.am_frq[ii] = 0;
|
||||||
LimeCfg.p_c3_en[ii] = 1;
|
LimeCfg.am_pha[ii] = 0;
|
||||||
}
|
LimeCfg.am_depth[ii] = 0;
|
||||||
|
LimeCfg.am_mode[ii] = 0;
|
||||||
|
LimeCfg.fm_frq[ii] = 0;
|
||||||
|
LimeCfg.fm_pha[ii] = 0;
|
||||||
|
LimeCfg.fm_width[ii] = 0;
|
||||||
|
LimeCfg.fm_mode[ii] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Timing of TTL controls: [enabled? , pre, offs, post]
|
// Timing of TTL controls: [enabled? , pre, offs, post]
|
||||||
int c0_tim[4] = {0, 70, 56, -5};
|
int c0_tim[4] = {0, 70, 56, -5};
|
||||||
|
|
Loading…
Reference in a new issue