[PATCH] Limit to 4 the number of cylinders shown in the data frame

Dirk Hohndel dirk at hohndel.org
Thu Dec 27 08:04:50 PST 2012


Salvador Cuñat <salvador.cunat at gmail.com> writes:

> OK, I'll get to work on it.
>
> But I don't understand this comment:
>
> On Wed, Dec 26, 2012 at 01:44:08PM -0800, Dirk Hohndel wrote:
>  
>> >> > +
>> >> > +       /* Print weight system */
>> >> > +       void print_weight_data (int maxwidth, int maxheight, int height){
>> >> > +               int decimals,i;
>> >> > +               double totalweight, totalweightsystem, weightsystemcounter;
>> >> > +               const char *unit_weight;
>> >> > +               char buffer[80];
>> >> > +               PangoLayout *layout;
>> >> >
>> >> > -       maxwidth = w * PANGO_SCALE;
>> >> > -       maxheight = h * PANGO_SCALE * 0.9;
>> >> > +               layout = pango_cairo_create_layout(cr);
>> >> > +               pango_layout_set_height(layout,maxheight);
>> >> > +               pango_layout_set_width(layout, maxwidth);
>> >> > +               pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
>> >> > +               set_font(layout, font, FONT_SMALL - 3, PANGO_ALIGN_CENTER);
>> >> >
>> >> > -       /* We need to know how many cylinders we used*/
>> >> > -       for (z = 0; z < MAX_CYLINDERS; z++ ){
>> >> > -               if (dive->cylinder[z].start.mbar == 0) {
>> >> > -                       break;
>> 
>> Oops - this looks like a little too much copy and paste… aren't we dealing with weight systems here?
>>
> The patch is moving down the lines of the main func. and inserting the
> new lines for the auxiliar print_weight_data one. I think it's a diff
> feature. Perhaps would be clearer to change the name of show_dive_tanks to
> show_other_data or something else.

Yeah, that was my mistake when reading the diff.

> The next one is clear, but I don't agree.
>> 
>> I honestly don't know how many people care about OTUs. I added that a while ago to the available information but so far found very few people who consider it useful. So I'm not sure I would devote space to this.
>>
> I would keep it, at least, until we have something more useful to print
> (the OTUs may be important in liveaboard trips in which you are making 4
> or 5 dives per day with high O2 Nitrox/Triox and, consecuently, long exposures).
> We could print the deco plan, but don't know if the dc's are passing it,
> and we wouldn't have room for the more complexes.

That's fine with me. It was just a suggestion based on feedback that I
had received by tec divers about the usefulness of listing OTUs even in
the divelist.

/D


More information about the subsurface mailing list