Change the sample timestamps to the end of the interval.

This commit is contained in:
Jef Driesen 2010-12-19 10:14:58 +01:00
parent 76a0864702
commit 3afc32b499
3 changed files with 3 additions and 3 deletions

View File

@ -175,6 +175,7 @@ reefnet_sensus_parser_samples_foreach (parser_t *abstract, sample_callback_t cal
parser_sample_value_t sample = {0};
// Time (seconds)
time += interval;
sample.time = time;
if (callback) callback (SAMPLE_TYPE_TIME, sample, userdata);
@ -193,7 +194,6 @@ reefnet_sensus_parser_samples_foreach (parser_t *abstract, sample_callback_t cal
// Current sample is complete.
nsamples++;
time += interval;
// The end of a dive is reached when 17 consecutive
// depth samples of less than 3 feet have been found.

View File

@ -183,6 +183,7 @@ reefnet_sensuspro_parser_samples_foreach (parser_t *abstract, sample_callback_t
parser_sample_value_t sample = {0};
// Time (seconds)
time += interval;
sample.time = time;
if (callback) callback (SAMPLE_TYPE_TIME, sample, userdata);
@ -194,7 +195,6 @@ reefnet_sensuspro_parser_samples_foreach (parser_t *abstract, sample_callback_t
sample.depth = (depth * FSW - parser->atmospheric) / parser->hydrostatic;
if (callback) callback (SAMPLE_TYPE_DEPTH, sample, userdata);
time += interval;
offset += 2;
}
break;

View File

@ -179,6 +179,7 @@ reefnet_sensusultra_parser_samples_foreach (parser_t *abstract, sample_callback_
parser_sample_value_t sample = {0};
// Time (seconds)
time += interval;
sample.time = time;
if (callback) callback (SAMPLE_TYPE_TIME, sample, userdata);
@ -192,7 +193,6 @@ reefnet_sensusultra_parser_samples_foreach (parser_t *abstract, sample_callback_
sample.depth = (depth * BAR / 1000.0 - parser->atmospheric) / parser->hydrostatic;
if (callback) callback (SAMPLE_TYPE_DEPTH, sample, userdata);
time += interval;
offset += 4;
}
break;