[Patch]Repair repetitive diving in planner
Robert C. Helling
helling at atdotde.de
Tue Jul 8 12:46:00 PDT 2014
On 07 Jul 2014, at 18:19, Dirk Hohndel <dirk at hohndel.org> 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).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Considering-previous-dives-for-tissue-loading.patch
Type: application/octet-stream
Size: 1448 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140708/a488b102/attachment.obj>
-------------- next part --------------
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
More information about the subsurface
mailing list