mirror of
https://github.com/nqrduck/LimeDriver.git
synced 2024-11-21 17:42:25 +00:00
Added stuff from argument parsing to the run experiment function
This commit is contained in:
parent
af1793d2af
commit
9dcde4d65b
1 changed files with 5 additions and 6 deletions
|
@ -604,12 +604,6 @@ int parseArguments(int argc, char **argv, LimeConfig_t &LimeCfg, std::vector<Con
|
|||
return 1;
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
@ -667,6 +661,11 @@ int run_experiment(LimeConfig_t LimeCfg, std::vector<Config2HDFattr_t> &HDFattrV
|
|||
Config2HDFattr_t HDFattr[no_of_attr];
|
||||
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;
|
||||
}
|
||||
|
||||
// check directory first
|
||||
if (makePath(LimeCfg.save_path) == 0) {
|
||||
|
|
Loading…
Reference in a new issue