Dear Anton,

I was watching at the deco model names in your patch. GF in my opinion
is wrong it should be ZHL16 (See:
https://en.wikipedia.org/wiki/B%C3%BChlmann_decompression_algorithm).
It's ok to have the deco info model describing gradient factors
(associated with ZHL16) though.

ivan


On 10/14/2015 08:34 AM, Anton Lundin wrote:
> This adds two strings describing the deco model information of the dive.
> 
> Signed-off-by: Anton Lundin <[email protected]>
> ---
> 
> Anton sends a patch, and its not even for Subsurface?!?
> 
>  src/shearwater_predator_parser.c | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/src/shearwater_predator_parser.c 
> b/src/shearwater_predator_parser.c
> index 5c38e67..cc9edf6 100644
> --- a/src/shearwater_predator_parser.c
> +++ b/src/shearwater_predator_parser.c
> @@ -352,6 +352,38 @@ shearwater_predator_parser_get_field (dc_parser_t 
> *abstract, dc_field_type_t typ
>                               string->desc = "FW Version";
>                               snprintf(buf, BUFLEN, "%2x", data[19]);
>                               break;
> +                     case 3: /* Deco model */
> +                             string->desc = "Deco model";
> +                             switch (data[67]) {
> +                             case 0:
> +                                     strncpy(buf, "GF", BUFLEN);
> +                                     break;
> +                             case 1:
> +                                     strncpy(buf, "VPM-B", BUFLEN);
> +                                     break;
> +                             case 2:
> +                                     strncpy(buf, "VPM-B/GFS", BUFLEN);
> +                                     break;
> +                             default:
> +                                     return DC_STATUS_DATAFORMAT;
> +                             }
> +                             break;
> +                     case 4: /* Deco model info */
> +                             string->desc = "Deco model info";
> +                             switch (data[67]) {
> +                             case 0:
> +                                     snprintf(buf, BUFLEN, "GF %u/%u", 
> data[4], data[5]);
> +                                     break;
> +                             case 1:
> +                                     snprintf(buf, BUFLEN, "VPM-B +%u", 
> data[68]);
> +                                     break;
> +                             case 2:
> +                                     snprintf(buf, BUFLEN, "VPM-B/GFS +%u 
> %%%u", data[68], data[85]);
> +                                     break;
> +                             default:
> +                                     return DC_STATUS_DATAFORMAT;
> +                             }
> +                             break;
>                       default:
>                               return DC_STATUS_UNSUPPORTED;
>                       }
> 
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to