[PATCH] Identify below floor event type properly.

Miika Turkia miika.turkia at gmail.com
Sat Jul 27 01:20:25 PDT 2013


I cannot test this currently, but then again this is really straight
forward and should work as is. However, the "below floor" event should not
hog up the "unknown" event. The unknown is used for all the events that we
do not have a mapping for. This includes also other dive computers than
Suunto.

miika


On Fri, Jul 26, 2013 at 9:51 PM, Michael Andreen <harv at ruin.nu> wrote:

> This event is on when accumulating deco time. Once you reach the floor
> deco time will start decreasing and the event will stop. Going below the
> floor again will re-activate the event.
>
> Also identify event type 13 in DM4 imports as airtime.
>
> Signed-off-by: Michael Andreen <harv at ruin.nu>
> ---
>  libdivecomputer.c | 2 +-
>  parse-xml.c       | 8 ++++++++
>  2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/libdivecomputer.c b/libdivecomputer.c
> index 9ad5df5..57a64a5 100644
> --- a/libdivecomputer.c
> +++ b/libdivecomputer.c
> @@ -149,7 +149,7 @@ static void handle_event(struct divecomputer *dc,
> struct sample *sample, dc_samp
>                 N_("none"), N_("deco stop"), N_("rbt"), N_("ascent"),
> N_("ceiling"), N_("workload"),
>                 N_("transmitter"), N_("violation"), N_("bookmark"),
> N_("surface"), N_("safety stop"),
>                 N_("gaschange"), N_("safety stop (voluntary)"), N_("safety
> stop (mandatory)"),
> -               N_("deepstop"), N_("ceiling (safety stop)"),
> N_("unknown"), N_("divetime"),
> +               N_("deepstop"), N_("ceiling (safety stop)"), N_("below
> floor"), N_("divetime"),
>                 N_("maxdepth"), N_("OLF"), N_("PO2"), N_("airtime"),
> N_("rgbm"), N_("heading"),
>                 N_("tissue level warning"), N_("gaschange"), N_("non stop
> time")
>         };
> diff --git a/parse-xml.c b/parse-xml.c
> index 916cfeb..5aa2967 100644
> --- a/parse-xml.c
> +++ b/parse-xml.c
> @@ -1632,6 +1632,10 @@ extern int dm4_events(void *handle, int columns,
> char **data, char **column)
>                                 /* 6 Mandatory safety stop ceiling error */
>                                 cur_event.name = strdup("violation");
>                                 break;
> +                       case 7:
> +                               /* 7 Below deco floor */
> +                               cur_event.name = strdup("below floor");
> +                               break;
>                         case 8:
>                                 /* 8 Dive time alarm */
>                                 cur_event.name = strdup("divetime");
> @@ -1650,6 +1654,10 @@ extern int dm4_events(void *handle, int columns,
> char **data, char **column)
>                                 /* 12 High ppO2 */
>                                 cur_event.name = strdup("PO2");
>                                 break;
> +                       case 13:
> +                               /* 13 Air time */
> +                               cur_event.name = strdup("airtime");
> +                               break;
>                         case 18:
>                                 /* 18 Ceiling error */
>                                 cur_event.name = strdup("ceiling");
> --
> 1.8.1.5
>
>
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130727/dd3411c0/attachment.html>


More information about the subsurface mailing list