diff --git a/core/dive.c b/core/dive.c index a4a47ab90..571f244df 100644 --- a/core/dive.c +++ b/core/dive.c @@ -1246,6 +1246,10 @@ static void fixup_dive_dc(struct dive *dive, struct divecomputer *dc) /* Fixup CCR / PSCR dives with o2sensor values, but without no_o2sensors */ fixup_no_o2sensors(dc); + + /* If there are no samples, generate a fake profile based on depth and time */ + if (!dc->samples) + fake_dc(dc); } struct dive *fixup_dive(struct dive *dive) diff --git a/dives/test40-42.xml b/dives/test40-42.xml index f7dc034e4..727aa5475 100644 --- a/dives/test40-42.xml +++ b/dives/test40-42.xml @@ -6,32 +6,56 @@ - + Dirk wet, 5mm - + + + + + + + - + Linus wet, shorty, 3mm - + + + + + + + Tomaz none - + + + + + + + - + Don dry, Whites Fusion - + + + + + + +