mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Fix ordering issue in fixup
We have this oddity in "fixup_dive()" that we fix up the dive water temperates and durations by looking over all the dive computer data. But we actually call that *before* we've fixed-up the dive computer data. So the water temperature is there in the samples, but hasn't made it to the generic dive computer water temperature yet, so then it doesn't make it into the dive structure either. Until the *second* time, when we have load the (partially fixed-up) data. Acked-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6b27fb9be5
commit
16f52cf23d
1 changed files with 3 additions and 3 deletions
6
dive.c
6
dive.c
|
@ -706,6 +706,9 @@ struct dive *fixup_dive(struct dive *dive)
|
||||||
sanitize_cylinder_info(dive);
|
sanitize_cylinder_info(dive);
|
||||||
dive->maxcns = dive->cns;
|
dive->maxcns = dive->cns;
|
||||||
|
|
||||||
|
for_each_dc(dive, dc)
|
||||||
|
fixup_dive_dc(dive, dc);
|
||||||
|
|
||||||
fixup_water_salinity(dive);
|
fixup_water_salinity(dive);
|
||||||
fixup_surface_pressure(dive);
|
fixup_surface_pressure(dive);
|
||||||
fixup_meandepth(dive);
|
fixup_meandepth(dive);
|
||||||
|
@ -713,9 +716,6 @@ struct dive *fixup_dive(struct dive *dive)
|
||||||
fixup_watertemp(dive);
|
fixup_watertemp(dive);
|
||||||
fixup_airtemp(dive);
|
fixup_airtemp(dive);
|
||||||
|
|
||||||
for_each_dc(dive, dc)
|
|
||||||
fixup_dive_dc(dive, dc);
|
|
||||||
|
|
||||||
for (i = 0; i < MAX_CYLINDERS; i++) {
|
for (i = 0; i < MAX_CYLINDERS; i++) {
|
||||||
cylinder_t *cyl = dive->cylinder + i;
|
cylinder_t *cyl = dive->cylinder + i;
|
||||||
add_cylinder_description(&cyl->type);
|
add_cylinder_description(&cyl->type);
|
||||||
|
|
Loading…
Add table
Reference in a new issue