[PATCH] Correct bug: setpoint handling of Poseidon CCR dive logs
Willem Ferguson
willemferguson at zoology.up.ac.za
Wed Oct 29 10:57:38 PDT 2014
PATCH: Poseidon CCR setpoint handling
This patch corrects the bug identified by Miika relating to the
handling of
setpoint data for CCR dives. This specific patch takes the
information from
an XML file, stores the appropriate information in the structures
of data,
and ultimately transfers these to be plotted. The data structures
for working
with setpoints were there but the methods for manipulating the
setpoint were
missing. The specific steps that have been changed are:
1) Parse the XML code for setpoint in an XML input file and store it in
structures of data. The XML part of this does not affect Miika's
code
because he reads the CSV data directly into the appropriate data
structures.
But with this patch, the structures of data are correctly
initialised. This
happens in try_to_fill_sample() in parse-xml.c
2) Change duplicate values of setpoint values in structures of data
to zero
in order to conserve dive log size. This happens in
fixup_dive_dc() in
dive.c
3) Transfer the setpoint data from structures of sample to
structures of
plotdata in order to plot the profile. This happens in
populate_plot_entries()
in profile.c
4) Re-insert all the setpoint data that have zeroes by using the
value of
the last setpoint value that was non-zero. This complements step (2)
above in order to get ready for plotting. This happens in
fill_o2_values()
in profile.c
A few tiny other changes were made, mostly to comments in the code.
Signed-off-by: willem ferguson <willemferguson at zoology.up.ac.za>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PATCH-Poseidon-CCR-setpoint-handling.patch
Type: text/x-diff
Size: 5155 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141029/89063c03/attachment.patch>
More information about the subsurface
mailing list