- if (!cyl->start.mbar)
- cyl->start.mbar = pressure;
- /*
- * If we already have an end pressure, without
- * ever having seen a sample for this cylinder,
- * that means that somebody set the end pressure
- * by hand
- */
- mask = 1ul << index;
- if (cyl->end.mbar) {
- if (!(flags & mask))
- return flags;
- }
- flags |= mask;
-
- /* we need to handle the user entering beginning and end tank pressures
- * - maybe even IF we have samples. But for now if we have air pressure
- * data in the samples, we use that instead of the minimum
- * if (!cyl->end.mbar || pressure < cyl->end.mbar)
- */
- cyl->end.mbar = pressure;
- return flags;
+ if (!cyl->sample_start.mbar)
+ cyl->sample_start.mbar = pressure;
+ cyl->sample_end.mbar = pressure;