On Tue, Nov 18, 2014 at 08:19:43AM +0200, Willem Ferguson wrote: > >The first one is what you wrote in the email, the second one is the commit > >message that you gave when committing the patch. Why do you do that twice > >instead of just sending the commit? > > In future I will just send the commit.
Thanks > >BTW: I wanted to comment on this one before. This is SO UGLY. > >if you have braces on one side of the else, have them on both sides. > > This is not my code Interesting. Let's look at git blame to find out who I need to yell at :-) Miika! That's just terrible... > >>diff --git a/profile.c b/profile.c > >>index 63023b5..8e43c21 100644 > >>--- a/profile.c > >>+++ b/profile.c > >>@@ -905,7 +905,7 @@ static void calculate_gas_information_new(struct dive > >>*dive, struct plot_info *p > >> amb_pressure = depth_to_mbar(entry->depth, dive) / 1000.0; > >>- fill_pressures(&entry->pressures, amb_pressure, > >>&dive->cylinder[cylinderindex].gasmix, entry->pressures.o2, > >>dive->dc.dctype, entry->sac); > >>+ fill_pressures(&entry->pressures, amb_pressure, > >>&dive->cylinder[cylinderindex].gasmix, entry->o2pressure, dive->dc.dctype, > >>entry->sac); > >> fn2 = (int) (1000.0 * entry->pressures.n2 / amb_pressure); > >> fhe = (int) (1000.0 * entry->pressures.he / amb_pressure); > >hmm, so what IS the difference between entry->pressures.o2 and > >enry->o2pressure? > entry->o2pressure holds the consensus PO2 after considering the data from > the different oxygen sensors. OK > It is the variable that is used for plotting > in the dive profile. entry->o2pressure is calculated before pressures.o2. And what, may I ask, is pressures.o2? > The call above to fill_pressures() is the one that actually computes > pressures.o2. I assume one should not use pressures.o2 as a parameter in a > call to a function that calculates pressures.o2?? Valid point. > The XML import/export is not perfect yet. The export removes the cylinder > start and end values supplied by the DC because cylinder->sample_start and > cylinder->sample_end are zeroed somewhere beforehand, so they are not > written. The import also has some problems with cylinder pressures and > figuring out start/end pressures. My suggestion is let's get the XML side > working reliably, then it is a simple matter to transfer to the git back > end. Does this make sense? Sure. We're running out of time for 4.3, though > I am actively working at improving the XML import/export. Excellent. > So I assume this patch is not acceptable? Would you like me to re-draft the > patch in line with you comments? No, I wanted to see your comments to understand what's going on. I still want to understand what pressures.o2 does... I'll take the patch and hope that you'll send patches on top of it to get CCR closer to ready for Beta 2 /D _______________________________________________ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface