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>
}
}
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++) {
if (!nlist) {
/* just continue without calculating
* interpolated values */
+ INTERPOLATED_PRESSURE(entry) = cur_pr[entry->cylinderindex];
list = NULL;
continue;
}