Issue with duplicate dive sites

Dirk Hohndel dirk at hohndel.org
Tue Sep 8 09:19:26 PDT 2015


On Tue, Sep 08, 2015 at 05:07:51PM +0200, Guido Lerch wrote:
> > Interesting question. I don't see a real use case for normal users to want
> > to do that.
> > So adding this as a UI feature seems weird. You can manually remove them
> > from
> > an XML file - but that's a bit tedious as well (it's easy enough to delete
> > them from
> > the start of the file - but I haven't checked what Subsurface does when it
> > encounters
> > references to dive sites in the dives and then doesn't have those sites...
> > so I think
> > one would have to edit each dive as well... but a little perl or awk
> > script could do
> > that quite easily.
> >
> 
> I a, asking this only to clean up my messed up dive sites. So you are
> saying they sit in my glerch.xml
> file, strange as when I delete all my dives the sites are still there but I
> check how to get rid of them.
> I already had issues locating the xml file ... the UI says glerch.xml but
> finder would not find me a file with
> that name ...

Use the source, Luke... :-)

As you can see in macos.c, system_default_filename(), it's in
snprintf(buffer, len, "%s/Library/Application Support/Subsurface/%s.xml", home, user);
so that means
/Users/glerch/Library/Application Support/Subsurface/glerch.xml

> My used case, and maybe I am unique, is that typing stuff into the UEMIS is
> kind of tedious, hence
> what I usually do is syncing it with MyUemis, add the stuff I want to add
> there (and/or correct stuff like
> a wrong size of a tank) and then sync it back to the Uemis.
> In the future I would love to be able to do this with SubSurface :-) but
> for this I would want to be able to
> select one or more dives I have edited in Subsurface and then only sync
> those back to the UEMIS.
> Makes sense ?

Hehe. Oops.
Ok, so we never had anyone interested in implementing the "write to the
Uemis" part of the protocol. So this is something we have no support for
AT ALL. I'll admit that I don't expect the "MyUemis" website to be around
much longer. The company went bankrupt, got bought by two brothers in
Switzerland who planned to restart it and appear to have fizzled. If you
look at the news section on their website you can feel only sadness...
http://www.uemis.com/en/company/news
The last firmware update was two years ago (and that only added the switch
to prevent the "infinite dive caused by flying with the Uemis" bug and no
other new features). Nothing else in more than three years.

So if you want to develop the necessary code to write data to the Uemis I
would of course welcome that (but frankly, wouldn't use it on my Uemis).
But until that part is implemented, I don't see a lot of use for the
feature we originally talked about.

> > Let me look for an easy way to deal with this. I'm thinking that just
> > deleting
> > them from the beginning of the XML file should be enough. But I want to
> > make sure Subsurface does the right thing there.
> >
> 
> Dont worry, now as  know where to find it I can delete them manually, they
> are all nicely listed :-)
> It's still weird that I could not find it anywhere until I explicitly
> stored it in my user folder.

See above where to find your default file (and of course you can set a new
default location in the preferences).

As for removing the dive sites from the XML file, doing so doesn't crash
Subsurface but it doesn't remove the references to non-existing divesites,
either. I'll look into this a little more this morning, I think that
behavior isn't correct. If a dive site doesn't exist, we shouldn't store a
reference to it.

/D


More information about the subsurface mailing list