Skip to content
GitLab
Menu
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
f1e99fb7
Commit
f1e99fb7
authored
Nov 06, 2018
by
Achim Morschhauser
Browse files
Freq in driver_obs
parent
71d78094
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/driver_obs.hpp
View file @
f1e99fb7
...
...
@@ -32,6 +32,9 @@ buffer_obs* buffer;
/** The calibration constants of the instrument */
Obs_Calibration
*
cal
;
/** The selected sampling frequency */
double
freq
;
//
// Public Methods
//
...
...
src/driver_obs_obsdaq.cpp
View file @
f1e99fb7
...
...
@@ -749,9 +749,6 @@ int driver_obs_obsdaq::parse_data_ascii(data_obs_vector* data, char* buf) {
***************************************************************************/
int
driver_obs_obsdaq
::
parse_data_bin
(
data_obs_vector
*
data
,
char
*
buf
)
{
// TODO Use for sampling rates higher than 10 Hz (else, suppl. data is
// not returned).
// OBSDAQ uses LittleEndian
/////////////////////////////////////////////////////////////////////////
//
...
...
@@ -771,6 +768,19 @@ int driver_obs_obsdaq::parse_data_bin(data_obs_vector* data, char* buf) {
// Set data to missing
data
->
set_data_MD
();
////////////////////////////////////////////////////////////////////////
// TODO Use for sampling rates higher than 10 Hz (else, suppl. data is
// not returned).
// OBSDAQ uses LittleEndian
////////////////////////////////////////////////////////////////////////
if
(
driver_obs
::
freq
<
10.0
){
std
::
cerr
<<
"ERROR: Binary mode not available for sampling rate "
<<
"of lower than 10 Hz. Current sampling rate is "
<<
freq
<<
" Hz."
<<
std
::
endl
;
return
(
-
1
);
}
////////////////////////////////////////////////////////////////////////
//
// Parse the binary data (Manual 12.5.2).
...
...
@@ -1017,6 +1027,9 @@ int driver_obs_obsdaq::init_run(double freq){
}
}
// Set the frequency
driver_obs
::
freq
=
valid_filter_rates
[
freq_sel
];
// Set range to +10V and set frequency of digital filter
for
(
int
i
=
0
;
i
<
3
;
i
++
){
sprintf
(
cmd
,
"$%1dWS020102%s"
,
i
,
filter_cmds
[
freq_sel
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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