[Patches] Planner preferences and deco stops at 10ft increments

Rick Walsh rickmwalsh at gmail.com
Sat Jul 4 15:39:15 PDT 2015


Thanks Dirk,

On 4 July 2015 at 23:42, Dirk Hohndel <dirk at hohndel.org> wrote:

> We have macros to make this easier: M_OR_FT(3, 10) gives you the correct
> value for 3m if the user has things set up for meters and 10ft if the user
> is in imperial mode. This may not work for the "simply copy the table"
> approach that you have taken, but I figure I'd point this out in case it
> could be useful elsewhere.
>
>
My setting of the last depth stop depth when 'last stop at 20ft' is
selected demonstrates why that macro is useful.  I was accidentally setting
it to 6080 mm, rather than 6096 mm, which meant that there was a
mini-ascent in the calculated profile.  The attached patch uses the M_OR_FT
macro, fixing this issue.

We could use the same macro to loop through the entire decostoplevels
array, but that would be less efficient than what is done currently.  If
you're happy with the memcpy method, I think we should use that.  And in
case you're wondering, I didn't make the same mistake setting the
decostoplevels_imperial array.

I have also reattached the read-planner-preferences patch to save mixing
patches from different emails, but it is unchanged from before.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150705/570f66db/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-Read-planner-preferences-when-we-use-them.patch
Type: text/x-patch
Size: 5167 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150705/570f66db/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0015-Planner-deco-stops-are-at-10ft-increments-when-measu.patch
Type: text/x-patch
Size: 2949 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150705/570f66db/attachment-0001.bin>


More information about the subsurface mailing list