Subsurface looping at end of download from DC

Tim Wootton tim at tee-jay.demon.co.uk
Mon Oct 14 23:44:50 UTC 2013


On 15/10/13 07:41, Patrick Valsecchi wrote:
> Here is how subsurface gets the surface pressure from the DC:
>     double surface_pressure = 1.0;
>     rc = dc_parser_get_field(parser, DC_FIELD_ATMOSPHERIC, 0,
> &surface_pressure);
>     if (rc != DC_STATUS_SUCCESS && rc != DC_STATUS_UNSUPPORTED) {
>         dev_info(devdata, translate("gettextFromC","Error obtaining
> surface pressure"));
>         dc_parser_destroy(parser);
>         return rc;
>     }
>     dive->dc.surface_pressure.mbar = surface_pressure * 1000.0 + 0.5;
>
> So looks like you need to return the pressure as a double in bar from
> libdivecomputer.
>
ok, I'l fix that and try again when I'm back in front of the DC this
evening.

cheers,

Tim


More information about the subsurface mailing list