]>
git.tdb.fi Git - ext/subsurface.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Linus Torvalds [Wed, 31 Aug 2011 21:23:35 +0000 (14:23 -0700)]
plot a fancier 'filled' depth profile
Now I'm just dicking around with cairo.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 21:15:50 +0000 (14:15 -0700)]
Plot dive profile slightly more intelligently.
This actually creates a bounding box and some scale markers.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 19:09:19 +0000 (12:09 -0700)]
Add fake 'info' frame contents
It should have depth, time, place etc information, but right now it only
has a fake depth that doesn't even get updated. Just to show the idea
of the table usage.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 18:52:16 +0000 (11:52 -0700)]
Use a gtk table instead of hbox
We'll want to add various dive statistics, so... Without them, it all
looks pretty much the same, though.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 18:10:17 +0000 (11:10 -0700)]
Add 'repaint_dive()' prototype, and fix dependencies
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 18:07:31 +0000 (11:07 -0700)]
Teach the thing to actually track the currently selected dive
.. and repaint the profile when the selection changes.
Now, if it just wasn't so ugly, it might even be useful. Except it
obviously needs to also show all the other dive information. And allow
the user to fill in details. And save the end results.
So no, it's not useful.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 17:46:28 +0000 (10:46 -0700)]
Re-do the tree selection code with a selection callback
Learnign gtk by looking at cairo examples? It's one way.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 17:45:29 +0000 (10:45 -0700)]
Don't newline-terminate the dive name
That resulted in ugly lists, and it was wrong to begin with.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 17:27:58 +0000 (10:27 -0700)]
Split up divelist scroll window generation into its own file
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 17:22:08 +0000 (10:22 -0700)]
Get rid of now unused 'show_dive()' function
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 17:20:46 +0000 (10:20 -0700)]
Split up profile frame generation into its own file.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 15:47:13 +0000 (08:47 -0700)]
Draw some kind of profile for the (first) dive
This is all kinds of broken: it doesn't actually follow the selected
dive, and the profile isn't scaled properly etc. But it shows something
new, and not just text.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 15:45:43 +0000 (08:45 -0700)]
Fix depth parsing
The "decimal: it's meters, integer: it's feet" logic doesn't work. It's
just always meters, because the xml ends up sometimes having whole meters.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 04:18:47 +0000 (21:18 -0700)]
Make the dive list scrollable (and put it in a vbox)
This means you can actually see them all, and walk through them.
It doesn't make any of this *useful*, but whatever.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 03:56:01 +0000 (20:56 -0700)]
Show the dives as a gtk list/tree widget
Ok, so I'm not very good at this. I'll need to enclose the dang thing
in a scrollable window, and then make that scrollable thing just part of
the whole window.
But hey, it's pixels on the screen. Pixels that show the names of the
dives we've parsed. At least as many as will fit on screen at one time ;)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 03:54:43 +0000 (20:54 -0700)]
Generate a default name for a dive, if it doesn't have one already
The name is a string containint date, time, depth and length. So it's
useful even with nothing else going on.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 02:48:00 +0000 (19:48 -0700)]
Create a gtk window
It doesn't *do* anything, but some day it will.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 01:42:57 +0000 (18:42 -0700)]
Add .gitignore file for current state
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 01:40:25 +0000 (18:40 -0700)]
Start moving some of the non-parsing stuff out of 'parse.c'
Create a 'main.c' with the main routine and argument "parsing" etc.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 01:23:59 +0000 (18:23 -0700)]
Split up dive data structure declarations into 'dive.h'
The dive parser should eventually be just a part of the program, not the
whole thing. So start preparing for that.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 00:51:35 +0000 (17:51 -0700)]
Clean up dive reporting
Show date, max depth, and time by default. The stuff that matters and
should always exist.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 00:45:03 +0000 (17:45 -0700)]
Add some more parsing functions
.. and fix the 'duration' parsing: it can be either in seconds, or in
mm:ss format. Floating point doesn't make any sense.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 31 Aug 2011 00:18:33 +0000 (17:18 -0700)]
Don't report dives as they are parsed: sort them at the end and report them then
This makes it much easier to see the duplicates, but more importantly,
we do need to actually save the dives off to do any real work with them.
Also, require a verbosity level of 1 (-v) to show all the samples.
While (-vv) shows unparsed entries.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 23:59:03 +0000 (16:59 -0700)]
Add 'datetime' parsing for libdivecomputer xml files
I think this gets me dates on all my dives. So now I could start
sorting them and removing duplicates.
But before I try to remove dups, I guess I should compare the
libdivecomputer ones against the suunto ones. Because I bet they have
various "interesting" issues like using Bar vs Atm etc.
"But XML is portable". Crazy people.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 23:58:07 +0000 (16:58 -0700)]
Fix up temperature conversion
Oops. No, the water temperature wasn't really 500 degC.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 23:42:05 +0000 (16:42 -0700)]
Start actually reporting the numbers we parsed
.. which also showed that the sampletime thing had gotten a bit too much
copy-paste from the temperature parsing ;)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 23:28:59 +0000 (16:28 -0700)]
Add 'verbose' flag
Now that we actually parse some of the dives, don't spam stdout with the
list of stuff we can't parse by default.
Add a 'verbose' flag, which enables that output when set.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 23:23:47 +0000 (16:23 -0700)]
Start parsing numeric fields
Depth, pressure, and sample times.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 22:22:48 +0000 (15:22 -0700)]
Start parsing dive dates
.. only the suunto XML format, though.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 21:38:39 +0000 (14:38 -0700)]
Move the "text" nodename hackery out of 'nodename()'
It's better to do it in the caller. Debug users may well want the full
node name.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 21:36:34 +0000 (14:36 -0700)]
Fix stupid mis-initialization of current sample
.. nice compiler warning hidden by the crazy gcc pointer sign warnings
that nobody wants to see (yes, we really do want to do 'strlen()' even
on unsigned strings, don't complain, crazy bitch compiler).
So this also makes our CFLAGS set -Wno-pointer-sign.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 20:58:19 +0000 (13:58 -0700)]
Start showing unparsed entries
(ie all of them)
This also shows the type of entry, which makes it clear that I've
screwed up the sample matching. Oh well.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 20:48:05 +0000 (13:48 -0700)]
Fill in dummy parse target code
.. but don't actually parse anything yet. But hey - now it tells you
how many samples it (hasn't) parsed.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 04:32:27 +0000 (21:32 -0700)]
Move the parser closer to being usable
Ok, so we have the dive split and the sample splits, so now we could
really just start filling in data.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 30 Aug 2011 00:51:54 +0000 (17:51 -0700)]
Turn the XML into something almost parseable.
Of course, now the problem is that the different XML files have
different node names, but at least we've turned it into a half-way sane
format, and have a nice callback place per value.
Soon we could use that to actually fill in useful information.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 29 Aug 2011 00:24:53 +0000 (17:24 -0700)]
Make the multi-dive files valid XML
They had multiple "root" entries (all called 'dive'), which makes baby
Jesus cry.
So just enclose them all in one root entry (called 'dives') that
magically turns it all into parseable xml.
Yeah, that really helps make the world a better place.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 28 Aug 2011 23:58:26 +0000 (16:58 -0700)]
Add crazy (bad) xml parser thing
It only works for the Suunto "one xml file per dive" format, not for the
libdivecomputer one that just puts many dives in one file.
Maybe there is some way for libxml2 to handle concatenated xml files
(start again on errors), but I don't know it yet.
I need to get stinking drunk before I look at more xml mess.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 28 Aug 2011 23:18:53 +0000 (16:18 -0700)]
Start archiving the stupid XML files
(and add a reminder of how they came to be)
Gaah. XML is *stupid*. It's not easy to parse for humans or for
computers, and some of these XML files are just disgusting. But maybe
they can be turned into something usable with libxml.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>