Add settings section to XML file format and store dive computer IDs

We only store the model/deviceid/nickname for those dive computers that
are mentioned in the XML file. This should make the XML files nicely
selfcontained.

This also changes the code to consistently use model & deviceid to
identify a dive computer. The deviceid is NOT guaranteed to be collision
free between different libdivecomputer backends...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2012-12-26 13:47:54 -08:00
parent 1bd6f72d31
commit e726c9d65c
5 changed files with 139 additions and 39 deletions

View file

@ -1879,7 +1879,7 @@ void plot(struct graphics_context *gc, struct dive *dive, scale_mode_t scale)
cairo_stroke(gc->cr);
/* Put the dive computer name in the lower left corner */
nickname = get_dc_nickname(dc->deviceid);
nickname = get_dc_nickname(dc->model, dc->deviceid);
if (!nickname || *nickname == '\0')
nickname = dc->model;
if (nickname) {