Commit b9bc7b72 authored by Achim Morschhauser's avatar Achim Morschhauser
Browse files

ADC calibrate #5 save cal

parent 054fb1e5
......@@ -1098,6 +1098,7 @@ int driver_obs_obsdaq::init_run(double freq){
//
/////////////////////////////////////////////////////////////////////////
int auto_cal=0;
// Iterate over all three channels
for (int i=0; i<3; i++){
......@@ -1119,8 +1120,7 @@ int driver_obs_obsdaq::init_run(double freq){
(config, adc_offset, adc_scale)<0){
// Automatic Calibration
auto_calibrate(i,1);
// Save calibration constants
driver_obs::cal->save_adc_calibrate();
auto_cal=1;
} else {
// Set the pre-determined calibration constant
sprintf(cmd,"$%1dWO%s",i,adc_offset.c_str());
......@@ -1132,6 +1132,9 @@ int driver_obs_obsdaq::init_run(double freq){
//printf("============ GOT: %06X %06X\n",adc_offset,adc_scale);
}
// Save calibration constants
if (auto_cal) driver_obs::cal->save_adc_calibrate();
/////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment