From f9d86bd4dea17250d9b0267936fb99d35a4ad1fd Mon Sep 17 00:00:00 2001 From: jupfi Date: Thu, 8 Feb 2024 20:25:31 +0100 Subject: [PATCH] Added init of more modulation parameters --- src/limedriver.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/limedriver.cpp b/src/limedriver.cpp index ad099ad..187bfb7 100644 --- a/src/limedriver.cpp +++ b/src/limedriver.cpp @@ -447,6 +447,8 @@ LimeConfig_t initializeLimeConfig(int Npulses) { // allocate other variables that depend on Npulses LimeCfg.p_dur_smp = new int[LimeCfg.Npulses]{}; LimeCfg.p_frq_smp = new double[LimeCfg.Npulses]{}; + LimeCfg.am_frq_smp = new double[LimeCfg.Npulses]; + LimeCfg.fm_frq_smp = new double[LimeCfg.Npulses]; return LimeCfg; } @@ -671,10 +673,12 @@ int run_experiment(LimeConfig_t LimeCfg, std::vector &HDFattrV std::copy(HDFattrVector.begin(), HDFattrVector.end(), HDFattr); // convert input in seconds/Hz to samples - for (int ii = 0; ii < LimeCfg.Npulses; ii++) { - LimeCfg.p_dur_smp[ii] = round(LimeCfg.p_dur[ii] * LimeCfg.srate); - LimeCfg.p_frq_smp[ii] = LimeCfg.p_frq[ii] / LimeCfg.srate; - } + for (int ii = 0; ii < LimeCfg.Npulses; ii++) { + LimeCfg.p_dur_smp[ii] = round(LimeCfg.p_dur[ii] * LimeCfg.srate); + LimeCfg.p_frq_smp[ii] = LimeCfg.p_frq[ii] / LimeCfg.srate; + LimeCfg.am_frq_smp[ii] = LimeCfg.am_frq[ii] / LimeCfg.srate; + LimeCfg.fm_frq_smp[ii] = LimeCfg.fm_frq[ii] / LimeCfg.srate; + } // check directory first if (makePath(LimeCfg.save_path) == 0) {