Hide gachange events in the first 30 seconds

Back in 4.0 we hide all gaschange events during the first 30 seconds,
not just gaschange events on second 0. Eg, the OSTC3 emits its gaschange
event on the first sample, which can be 2, 10 or 30 seconds into the
dive.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-07-17 08:55:03 +02:00 committed by Dirk Hohndel
parent 6f8dc22e08
commit 3b99b03133

View file

@ -127,7 +127,7 @@ bool DiveEventItem::shouldBeHidden()
*
* Don't bother showing them if they match the first gas already
*/
if (!strcmp(event->name, "gaschange") && !event->time.seconds) {
if (!strcmp(event->name, "gaschange") && event->time.seconds <= 30) {
struct dive *dive = current_dive;
if (dive && get_cylinder_index(dive, event) == 0)
return true;