This isn't right if you switch back to the same cylinder multiple times,
but for the first time it kind of works - just take the beginning
cylinder pressure if we have one.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
entry->same_cylinder = sample->cylinderindex == cylinderindex;
cylinderindex = sample->cylinderindex;
entry->pressure = sample->cylinderpressure.mbar;
+ if (!entry->same_cylinder && !entry->pressure)
+ entry->pressure = dive->cylinder[cylinderindex].start.mbar;
entry->temperature = sample->temperature.mkelvin;
if (depth || lastdepth)