Permalink
Switch branches/tags
Nothing to show
Commits on Mar 22, 2012
  1. user-manual: fix a few annoying typos

    Signed-off-by: Miklos Vajna <vmiklos@vmiklos.hu>
    committed Mar 22, 2012
Commits on Mar 16, 2012
  1. Show statistics of selected dives

    If at least 2 dives are selected, show statistics of these dives on
    Overall Stats. Otherwise, show the statistics of all dives. Temperature
    is also added to the shown statistics.
    
    Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
    
    Minor change to avoid adding statistics.h (moved the global variable and
    external function declaration to display-gtk.h).
    Another minor change to the text displayed for the "Stats" notebook page.
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    mturkia committed with dirkhh Mar 14, 2012
Commits on Jan 28, 2012
  1. Cochran: fix up dive data descrambling

    This seems to do the dive data descrambling right for both files I have
    access to.  Except it uses a hardcoded (different) offset for the two.
    I have yet to figure out how to automatically detect the offset itself
    properly, so you have to compile for the right file.
    
    I'll figure it out, but I'm committing this as a reasonable point in the
    process.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Jan 28, 2012
  2. Fix up Cochran dive header decoding offset

    It turns out the odd "different CAN files have different header offsets"
    came from the fact that the decode block was different lengths, and I
    had not picked the correct place to start - and instead had found two
    different places that were at different offsets due to the decode block
    length differences.
    
    This fixes that up, and it looks like the dive header is correctly
    descrambled (but what the data *means* is unclear, although there is now
    an ASCII date and time visible, so at least one part of it is pretty
    obvious).
    
    The actual dive data unscrambling is still different for the two
    test-files I have to play with, I do not know why.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Jan 28, 2012
Commits on Jan 27, 2012
  1. cochran: do a partial header de-scramble

    This descrambles at least parts of the header data.  Some of it has the
    same pattern of data 4kB apart, it may be that there is a dive hiding in
    there too (ie what I currently call a "header" may in fact be a header
    _plus_ a dive).
    
    But the 4kB thing may well be an artifact of the crazy scrambling code
    itself.  Who knows what kind of chunking the Cochran Analyst
    "encryption" uses.
    
    As with the dive data, there seems to be some offset differences between
    different CAN files.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Jan 27, 2012
  2. cochran: do the full de-scramble for one case

    So this descrambles all the dives in *one* of my cochran test files.  I
    still don't know what the dive data *means*, but it's not a random
    jumble of bytes any more: there are very clear patterns.
    
    However, the magic offsets that work for that particular CAN file are
    not generic, because they don't work for another.  So there is some
    magic dynamic decoding that I don't know about.  There is probably more
    decode information in the initial decode block, over and beyond just the
    scrambling bytes.
    
    (The scrambling array is 234 bytes starting at 0x40001, but the first
    actual *dive* data starts at 0x45e03, so there's tons of unknown stuff
    in the file even outside the dives themselves)
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Jan 27, 2012
  3. Make cochran debug output a bit easier to use directly

    Just do the hex-dump in the program, and print all the results to
    standard output.  Avoid the need to do 'od' by hand etc to see what
    happens when you play with the decoder.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Jan 27, 2012
  4. Add some initial cochran CAN file parsing

    It's broken, and currently only writes out a debug output file per dive.
    I'm not sure I'll ever really be able to decode the mess that is the
    Cochran ANalyst stuff, but I have a few test files, along with separate
    depth info from a couple of the dives in question, so in case this ever
    works I can at least validate it to some degree.
    
    The file format is definitely very intentionally obscured, though.
    Annoying.  It's not like the Cochran software is actually all that good
    (it's really quite a horribly nasty Windows-only app, I'm told).
    
    Cochran Analyst is very much not the reason why people would buy those
    computers.  So Cochran making their computers harder to use with other
    software is just stupid.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Jan 27, 2012
  5. Import: always open and read the file before checking the filename ex…

    …tension
    
    Most of the parsers will want the content in memory, so keep them
    simple.  The fact that the Suunto parser uses "libzip" that has to
    re-open the file is annoying and causes us to re-open the file etc.
    
    But it's the odd man out, so don't design the "open_by_filename()"
    function around it.  Pretty much everybody else will want to avoid
    having to cook up their own IO routines.
    
    Also, when reading the file, NUL-terminate the buffer.  This allows us
    to just treat text files as large strings if we want to, and doesn't
    matter for binary files (we still pass in the length explicitly).
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Jan 27, 2012
  6. Fix typo ('suundo' instead of 'suunto')

    I apparently was so congested that it affected my typing too when I
    wrote that, and then copy-paste meant that the use and declaration
    matched despite the misspelling.
    
    Reported-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Jan 27, 2012
  7. Add "native" Suunto SDE zip file reading

    You need to have libzip-devel installed, and pkg-config needs to know about it
    for the build to pick up on it.
    
    On at least Fedora, a simple "yum install libzip-devel" will make things
    work, although you may need to force a rebuild of subsurface too (the
    "file.o" file in particular - the Makefile doesn't track system
    dependencies).
    
    Then, you can just do
    
       subsurface my-dives.SDE
    
    to read the data directly from the SDE file.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Jan 27, 2012
Commits on Jan 26, 2012
  1. Split up file reading from 'parse-xml.c' into 'file.c'

    We're going to eventually import non-xml files too, so let's begin
    splitting the logic up.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Jan 26, 2012
Commits on Jan 18, 2012
  1. Merge branch 'info-split' of git://git.hohndel.org/subsurface

    * 'info-split' of git://git.hohndel.org/subsurface:
      Add statistics for longest, shortest, and shallowest dive
      Create separate single dive and total stats pages
      Separate out single dive statistics and total statistics
    torvalds committed Jan 18, 2012
Commits on Jan 16, 2012
  1. Link with libm for 'pow()'

    Solves suddenly revealed linking error:
    
      divelist.c:400: error: undefined reference to 'pow'
    
    Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cristian Ionescu-Idbohrn committed with torvalds Jan 15, 2012
Commits on Jan 15, 2012
  1. Add statistics for longest, shortest, and shallowest dive

    I don't really like calling the shallowest dive "min depth", but all other
    texts that I could come up with that were reasonably short weren't any
    better...
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 15, 2012
  2. Create separate single dive and total stats pages

    No additional statistics added, yet.
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 15, 2012
  3. Separate out single dive statistics and total statistics

    Right now this just changes the infrastructure - nothing outside of
    statistics.c is modified. This is simply in preparation to split out the
    single dive info and the total dive statistics in the future (as we are
    creating more info and more stats and they will overflow the screen area
    available - so this will turn into two notebook tabs).
    
    This commit does not change any functionality.
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 15, 2012
Commits on Jan 5, 2012
  1. Avoiding some potentially confusing name space clashes

    We have local variables or function arguments with the same names as
    function static variables (or in one case, function arguments).
    
    While all the current code was correct, it could potentially cause
    confusion when chasing bugs or reviewing patches. This should make things
    clearer.
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 5, 2012
  2. More removal of unused arguments

    Just trying to clean up the code a bit.
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 5, 2012
  3. Oddly, finishing a sample doesn't require a sample

    So let's not pass it around
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 5, 2012
Commits on Jan 3, 2012
  1. More Mac improvements

    The startup shell script workaround isn't needed anymore. The preferences
    hotkey didn't work. Remove left-over menu separators.
    
    Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
    henrik242 committed Jan 3, 2012
  2. Even more Mac-i-ness

    Move the About and Preferences menu item to the App menu.
    Switch the accelerator key to be Meta (i.e., Command) instead of Control
    
    This required a bit of restructuring of the code, but it's all for a good
    cause.
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 3, 2012
  3. Adding the right header file for R_OK on Windows

    Dang, I should have compile tested this on Windows before the last
    commit.
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 3, 2012
  4. Only set the window icon if the icon file exists

    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 3, 2012
  5. Correctly free the GSList in file_open

    Passing a value that is known to be NULL to g_slist_free seems like the
    wrong approach...
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 3, 2012
Commits on Jan 2, 2012
  1. Use the right function to get resource path on Mac

    Much better than hacking together my own...
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 2, 2012
  2. Use a more standard approach to save preferences on MacOSX

    CFPreferences* seems to be the proper way to handle preferences on MacOSX.
    This approach also eliminates a problem where the hard coded preferences
    path couldn't be read.
    
    Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
    [ fixed small coding style issues ]
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    henrik242 committed with dirkhh Jan 2, 2012
  3. More AsciiDoc updates

    Add missing internal links
    
    Work on better visual representation of structured data
    
    Start creating quoted text (instead of styled text)
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 2, 2012
  4. Update asciidoc headers and deal with internal links

    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 2, 2012
Commits on Jan 1, 2012
  1. First try at converting user-manual to AsciiDoc

    You can do "make doc" in the main directory to create the html version,
    and if you want to play around with it, do "make show" in the
    Documentation subdirectory to start firefox on the end result.
    
    It's by no means perfect, but it gives somewhat reasonable results, and
    this is enough initial work for people to play around with, I think.
    
    NOTE! You need "asciidoc" installed to do this: it's a python program,
    so it should be pretty easy even on non-Linux platforms.  And on Linux,
    most distributions package it, so you just have to do something like
    
    	yum install asciidoc
    
    to get it (replace with apt-get/zypper/whatever).
    
    Asciidoc can generate other output too (man-pages, LaTeX, etc), maybe
    people want to play with that part too.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Jan 1, 2012
  2. Merge branch 'mac' of git://git.hohndel.org/subsurface

    * 'mac' of git://git.hohndel.org/subsurface:
      Turn subsurface into a real Mac application
    torvalds committed Jan 1, 2012
  3. Turn subsurface into a real Mac application

    To do this a few things needed to move into the os specific files, but the
    overall change is fairly small and the difference on the Mac is amazing.
    
    Subsurface now becomes a Mac app with Mac toolbar and useful default
    fonts.
    
    Changed the CFBundleIdentifier to be the reverse DNS of the subsurface
    site (sadly, 'torvalds' is not yet a TLD).
    
    Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
    dirkhh committed Jan 1, 2012
Commits on Dec 31, 2011
  1. Define O2 permille for air in one spot

    Having the O2 permille defined once is more readable.
    
    Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
    henrik242 committed Dec 31, 2011
  2. Display OTU for dives using air

    Zero o2 means 20.9% o2, which can be confusing...
    
    Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
    henrik242 committed Dec 31, 2011
Commits on Dec 30, 2011
  1. Move the gasmix cleanups from XML parsing to the generic dive fixup s…

    …tage
    
    Right now we do certain cylinder info operations only when importing
    from an XML file, which is wrong.  In particular, we do the "is the
    gasmix air" or "what is the standard cylinder name" only at XML read
    time, which means that if you import a dive directly from the dive
    computer, it won't have the air sanitization or the proper default
    cylinder names.
    
    Of course, most dive computers don't actually save enough cylinder
    information for us to do the cylinder name lookup anyway, but some do.
    And all Nitrox-capable dive computers do have that O2 percentage that
    needs cleanup too.
    
    Reported-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Dec 30, 2011