On 07 Jul 2014, at 18:19, Dirk Hohndel <[email protected]> wrote: > On Mon, Jul 07, 2014 at 02:03:37PM +0200, Robert Helling wrote: >> >> this patch corrects the search for dives in the last 48h before a >> planned dive. > > NAK > > tissue_tolerance = surface_pressure = > get_surface_pressure_in_mbar(dive, true) / 1000.0; > - divenr = get_divenr(dive); > + divenr = get_divenr(dive) >= 0 ? get_divenr(dive) : > > You get back -1 if your dive is not part of the dive_table (i.e., it's > most likely the displayed_dive). That does NOT mean that it is later than > the latest dive in your table. So instead you need to search backwards > through the table and find the first dive that comes BEFORE the dive in > question. > > i = divenr; > - while (i && --i) { > + ; > > what's that lonely ';' doing there? > > + while (i >= 0 && --i >= 0) { > > This is just silly. It is equivalent to > > while (i > 0) > > (please tell me a value for i where that is not the case)
OK, this is my second attempt at this (unfortunately again in a rush before the semi-final starts).
0001-Considering-previous-dives-for-tissue-loading.patch
Description: Binary data
Best
Robert
--
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling Elite Master Course Theoretical and Mathematical Physics
Scientific Coordinator
Ludwig Maximilians Universitaet Muenchen, Dept. Physik
print "Just another Phone: +49 89 2180-4523 Theresienstr. 39, rm. B339
stupid .sig\n"; http://www.atdotde.de
_______________________________________________ subsurface mailing list [email protected] http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
