aboutsummaryrefslogtreecommitdiffstats
path: root/libdivecomputer.h
AgeCommit message (Collapse)Author
2012-07-10Update for libdivecomputer pkg-config include file changesGravatar Linus Torvalds
Subsurface doesn't compile on OS X any more, because libdivecomputer changed the way the header inclusion works: the include path from pkg-config no longer includes the final "libdivecomputer" component, and instead of doing #include <header.h> for libdivecomputer headers, we're now supposed to do #include <libdivecomputer/header.h> instead. Which is cleaner anyway. The reason this only bit us on OS X is that I never trusted pkg-config that much for non-system libraries on Linux (maybe it works, maybe it doesn't, I've seen it go both ways), so on Linux we just used our own version of the include path, and thus weren't affected by the libdivecomputer config change. Clean up the includes while at it - we no longer need (or want) the device-specific header files, since we just use the generic functions. Reported-by: Grischa Toedt <toedt@embl.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-06-22Update to new sane libdivecomputer interfacesGravatar Linus Torvalds
This does mean that you have to build subsurface against a new version of libdivecomputer, and that version is likely going to have various slightly incompatible changes. But the new interfaces allow for easily adding new supported dive computers without subsurface having to be updated for each new vendor and model, so some slight pain is definitely worth it this time. I'm not even going to try to have some backwards-compatible version here, the libdivecomputer interface changes are so extensive. Native enumeration of devices is just the smallest part of it: the constants and types that libdivecomputer uses now have much nicer names that all start with DC_ or dc_, so you don't get the kinds of name clashes we had with "gasmix_t" etc. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-02Show dive import error messages in the import dialogGravatar Linus Torvalds
.. not in the main window. And leave the import dialog open, so that you can either try doing it again, or cancel. This makes it much easier to re-try a failed dive import, and actually makes the failure more obvious too. Todo: - make the "Ok" button change to "Retry" when an error happens - try to see if we can catch the actual status update messages from libdivecomputer and show them too in the import dialog. Right now they are printed out to stderr by the library. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-26Stop libdivecomputer import when we start seeing old divesGravatar Linus Torvalds
I don't know about other dive computers, but the Suunto Vyper Air is slow as hell to import all the dives from. And libdivecomputer seems to be importing dives "most recent first", so this just makes it stop importing dives when it finds a dive that we've already seen. Caveat: libdivecomputer has this fancy notion of "dive fingerprints", and claims that's the way to do things. That seems to be overly complicated, and not worth the bother. If you worry about the import finishing early due to already having some dives with the same date in your dive list, just import starting from an empty state, and thus get a pure "dive computer only" state with no early out. Then you can just load the old dives afterwards, and depend on subsurface merging any duplicates. But for normal operation, when you just want to import a couple of new dives from your dive computer, the "exit import early when you see a duplicate" is the right thing to do. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-22Fix progress bar during libdivecomputer importsGravatar Linus Torvalds
As reported by Mauro Dreissig, the progress bar doesn't work and causes a SIGSEGV due to a missing allocation. The code broke when Dirk separated out the GUI from the core code, and I hadn't tried divecomputer downloads since. Reported-by: Mauro Dreissig <mukadr@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-20Separate out the UI from the program logicGravatar Dirk Hohndel
The following are UI toolkit specific: gtk-gui.c - overall layout, main window of the UI divelist.c - list of dives subsurface maintains equipment.c - equipment / tank information for each dive info.c - detailed dive info print.c - printing The rest is independent of the UI: main.c i - program frame dive.c i - creates and maintaines the internal dive list structure libdivecomputer.c uemis.c parse-xml.c save-xml.c - interface with dive computers and the XML files profile.c - creates the data for the profile and draws it using cairo This commit should contain NO functional changes, just moving code around and a couple of minor abstractions. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>