mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
This should fix the missing end pressure for broken dive computers
Some dive computers randomly drop samples. That was no problem unless it was the LAST sample. We work around that now Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c5073aa446
commit
2b0f30c3d4
1 changed files with 3 additions and 1 deletions
|
@ -698,7 +698,8 @@ static void plot_cylinder_pressure_text(struct graphics_context *gc, struct plot
|
|||
}
|
||||
}
|
||||
cyl = entry->cylinderindex;
|
||||
last_pressure[cyl] = GET_PRESSURE(entry);
|
||||
if (GET_PRESSURE(entry))
|
||||
last_pressure[cyl] = GET_PRESSURE(entry);
|
||||
last_time[cyl] = entry->sec;
|
||||
|
||||
for (cyl = 0; cyl < MAX_CYLINDERS; cyl++) {
|
||||
|
@ -934,6 +935,7 @@ static void fill_missing_tank_pressures(struct dive *dive, struct plot_info *pi,
|
|||
if (!nlist) {
|
||||
/* just continue without calculating
|
||||
* interpolated values */
|
||||
INTERPOLATED_PRESSURE(entry) = cur_pr[entry->cylinderindex];
|
||||
list = NULL;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue