CCR code: Change to sample structure

1) All the variables in the sample structures are strongly typed
2) Two additional types were declared in units.h:
     o2pressure_t
     bearing_t
3) The following variables were added:
     diluentpressure
     o2setpoint
     o2sensor[3]
4) Changes to a number of files were made to chanf
     sample->po2 to sample->po2.mbar
     bearing to bearring.degrees

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Willem Ferguson 2014-06-03 19:21:41 +02:00 committed by Dirk Hohndel
parent 1fec6453a2
commit eaf6d56487
11 changed files with 64 additions and 51 deletions

View file

@ -1327,7 +1327,7 @@ static void sample_start(void)
cur_sample->stoptime.seconds = laststoptime;
cur_sample->stopdepth.mm = laststopdepth;
cur_sample->cns = lastcns;
cur_sample->po2 = lastpo2;
cur_sample->po2.mbar = lastpo2;
cur_sample->sensor = lastsensor;
}
@ -1342,7 +1342,7 @@ static void sample_end(void)
laststoptime = cur_sample->stoptime.seconds;
laststopdepth = cur_sample->stopdepth.mm;
lastcns = cur_sample->cns;
lastpo2 = cur_sample->po2;
lastpo2 = cur_sample->po2.mbar;
cur_sample = NULL;
}
@ -1929,7 +1929,7 @@ extern int shearwater_profile_sample(void *handle, int columns, char **data, cha
if (data[2])
cur_sample->temperature.mkelvin = metric ? C_to_mkelvin(atof(data[2])) : F_to_mkelvin(atof(data[2]));
if (data[3])
cur_sample->po2 = atof(data[3]) * 1000;
cur_sample->po2.mbar = atof(data[3]) * 1000;
if (data[4])
cur_sample->ndl.seconds = atoi(data[4]) * 60;
if (data[5])