fix up sample sensor indexes before fixing up cylinder pressures

The cylinder pressure fixup depends on the sample sensors indexes having
been fixed.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2022-09-12 16:07:57 -04:00
parent 77a5ca4234
commit 3446dd5125

View file

@ -1240,12 +1240,12 @@ static void fixup_dive_dc(struct dive *dive, struct divecomputer *dc)
/* Fix up gas switch events */
fixup_dc_gasswitch(dive, dc);
/* Fix up cylinder pressures based on DC info */
fixup_dive_pressures(dive, dc);
/* Fix up cylinder ids in pressure sensors */
fixup_dc_sample_sensors(dc, dive->cylinders.nr);
/* Fix up cylinder pressures based on DC info */
fixup_dive_pressures(dive, dc);
fixup_dc_events(dc);
/* Fixup CCR / PSCR dives with o2sensor values, but without no_o2sensors */