[PATCH] Limit to 4 the number of cylinders shown in the data frame
Linus Torvalds
torvalds at linux-foundation.org
Wed Jan 2 13:22:19 PST 2013
On Wed, Jan 2, 2013 at 1:14 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> If the user has air integration, then start.mbar will be 0.
>
> We have a function cylinder_nodata(cylinder_t *cyl) in equipment.c that
> you should call instead.
That's not the only case where it incorrectly uses start.mbar.
print_tanks() itself also does
cyl_press= get_pressure_units(dive->cylinder[n].start.mbar, &unit_press);
and it should do something like
unsigned int start = dive->cylinder[n].start.mbar ? :
dive->cylinder[n].sample_start.mbar;
instead (same for ending pressure too, of course).
In fact, we should probably add some nice helper function for getting
the pressures. We have that code in both divelist.c and statistics.c..
Linus
More information about the subsurface
mailing list