Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Achim Morschhauser
GeomagLogger
Commits
b9bc7b72
Commit
b9bc7b72
authored
Nov 14, 2018
by
Achim Morschhauser
Browse files
ADC calibrate
#5
save cal
parent
054fb1e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/driver_obs_obsdaq.cpp
View file @
b9bc7b72
...
...
@@ -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
();
/////////////////////////////////////////////////////////////////////////
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment