Re: 4.1 beta 1

2014-04-25 Thread Anton Lundin
k > >Bulgarian > >Brazilian Portuguese > >Swedish Now done! > >Norwegian (I think Henrik is working on that one) > >Slovak > >Romanian > >Hebrew > //Anton - Perfect to translate Subsurface while waiting for tests and deployment cycles -

[PATCH 3/3] Qt turns edited locations into null-strings

2014-05-06 Thread Anton Lundin
They aren't null pointers after you touched them, so we can't rely on that to choose if we should use put_string or show_utf8. show_utf8 would not print the tag if it only contains a \0 as body. Fixes #440 Signed-off-by: Anton Lundin --- save-xml.c | 2 +- 1 file changed, 1 inser

[PATCH 1/3] Revert "Save latitude and longitude on XML even if location not set"

2014-05-06 Thread Anton Lundin
This fixes the bug in #440 by accident, and introduces lots of empty attributes and tags in the xml. This reverts commit 6378bfd91ee6c0ad746b072d8a9389e0eba7c614. Signed-off-by: Anton Lundin --- save-xml.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff

[PATCH 2/3] Terminate the string before relying on strlen

2014-05-06 Thread Anton Lundin
Its a c-string we put, so it must be null-terminated. Signed-off-by: Anton Lundin --- save-xml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/save-xml.c b/save-xml.c index 54a0a86..227b952 100644 --- a/save-xml.c +++ b/save-xml.c @@ -191,7 +191,7 @@ static void

[PATCH] Rewrite show_location to use membuffer primitives

2014-05-06 Thread Anton Lundin
This simplifies the logic and doesn't rely on show_utf8 to print empty blocks. Signed-off-by: Anton Lundin --- save-xml.c | 58 ++ 1 file changed, 14 insertions(+), 44 deletions(-) diff --git a/save-xml.c b/save-xml.c index dc

[PATCH] Remove trailing spaces from the produced output

2014-05-06 Thread Anton Lundin
The code found the trailing spaces and just didn't care about it. This also removes the FIXME quoting, because quoting is managed. Signed-off-by: Anton Lundin --- save-xml.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/save-xml.c b/save-xml.c index b582fcf..32

Re: [PATCH 1/3] Revert "Save latitude and longitude on XML even if location not set"

2014-05-06 Thread Anton Lundin
On 06 May, 2014 - Linus Torvalds wrote: > On Tue, May 6, 2014 at 3:27 PM, Anton Lundin wrote: > > This fixes the bug in #440 by accident, and introduces lots of empty > > attributes and tags in the xml. > > + > > + if (!text) > > + return;

[PATCH] Only mark location changed when in edit mode

2014-05-07 Thread Anton Lundin
Otherwise the code loading a dive into the field would mark it as changed. This re-adds this code that got removed in a209dfbfd53 ("Multi dive edit: don't change location texts until user saves the change") Signed-off-by: Anton Lundin --- qt-ui/maintab.cpp | 2 ++ 1 file change

[PATCH] Apply the edit of trip locations

2014-05-07 Thread Anton Lundin
This re-adds this code that got removed in a209dfbfd53 ("Multi dive edit: don't change location texts until user saves the change") Signed-off-by: Anton Lundin --- qt-ui/maintab.cpp | 5 + 1 file changed, 5 insertions(+) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cp

[PATCH] Fix building with NO_MARBLE after prototype change

2014-05-08 Thread Anton Lundin
4243fcb915 ("Dont set coordinates when two or more dives are selected") Changed how the prototypes in GlobeGPS looks. This aligns NO_MARBLE version of GlobeGPS with that. Signed-off-by: Anton Lundin --- qt-ui/globe.cpp | 2 +- qt-ui/globe.h | 2 +- 2 files changed, 2 insert

[PATCH] Remove unnecessary include from dive.c

2014-05-08 Thread Anton Lundin
Signed-off-by: Anton Lundin --- dive.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dive.c b/dive.c index 4bae245..dbd811a 100644 --- a/dive.c +++ b/dive.c @@ -6,7 +6,6 @@ #include #include "gettext.h" #include "dive.h" -#include "planner.h" struc

[PATCH] Use enum name instead of its int value.

2014-05-08 Thread Anton Lundin
SAMPLE_EVENT_GASCHANGE2 is the libdivecomputer name of the event. Compare with that instead of its int value. Signed-off-by: Anton Lundin --- profile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/profile.c b/profile.c index 373ac8e..8289f68 100644 --- a/profile.c

[PATCH] Use the used flag on cylinders in get_dive_gas

2014-05-08 Thread Anton Lundin
Now when we have a used flag on every cylinder that are set in mark_used_tanks we can use it here. Signed-off-by: Anton Lundin --- divelist.c | 39 +++ 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/divelist.c b/divelist.c index f0a66b4

Re: [PATCH] CodingStyle "to" "too" typo

2014-05-10 Thread Anton Lundin
r your first contribution! > > pushed > Spelling i obviously hard for me. Two spelling errors in tree lines. //Anton - Start writing code with set spell? -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

[PATCH] Migrate code to for_each_dive and for_each_dc

2014-05-13 Thread Anton Lundin
--- dive.c | 5 + divecomputer.cpp | 5 ++--- qt-ui/divelistview.cpp | 7 ++- qt-ui/maintab.cpp | 8 save-xml.c | 6 +- statistics.c | 12 +--- uemis-downloader.c | 8 7 files changed, 19 insertions(+)

[PATCH] Use get_o2 instead of local version

2014-05-13 Thread Anton Lundin
Signed-off-by: Anton Lundin --- divelist.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/divelist.c b/divelist.c index b199710..4724e72 100644 --- a/divelist.c +++ b/divelist.c @@ -154,12 +154,9 @@ int total_weight(struct dive *dive) static int active_o2(struct dive

[PATCH] Add math.h because of usage of rint()

2014-05-13 Thread Anton Lundin
Signed-off-by: Anton Lundin --- units.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/units.h b/units.h index 0e168a2..0a9e44b 100644 --- a/units.h +++ b/units.h @@ -1,6 +1,8 @@ #ifndef UNITS_H #define UNITS_H +#include + #ifdef __cplusplus extern "C" { #endif

[PATCH] Fix building with NO_MARBLE, centerOnCurrentDive

2014-05-13 Thread Anton Lundin
2bc76beb65 ("Globe: we always center on the current dive") changed GlobeGPS::centerOn to GlobeGPS::centerOnCurrentDive. This patches the dummy in NO_MARBLE to. Signed-off-by: Anton Lundin --- qt-ui/globe.cpp | 2 +- qt-ui/globe.h | 2 +- 2 files changed, 2 insertions(+), 2 deletion

[PATCH] Move mod calculations to a separate helper

2014-05-13 Thread Anton Lundin
We use mod calculations on multiple places, so make a separate helper from it with proper types. Signed-off-by: Anton Lundin --- dive.h| 4 profile.c | 3 ++- qt-ui/diveplanner.cpp | 5 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dive.h

[PATCH] Fix building with NO_MARBLE prepareForGetDiveCoordinates

2014-05-13 Thread Anton Lundin
fb82da58a2 ("Globe: assume that we are looking at the current_dive") changed the prototype for GlobeGPS::prepareForGetDiveCoordinates. This patches the dummy in NO_MARBLE. Signed-off-by: Anton Lundin --- qt-ui/globe.cpp | 2 +- qt-ui/globe.h | 2 +- 2 files changed, 2 insert

Re: [PATCH] Migrate code to for_each_dive and for_each_dc

2014-05-13 Thread Anton Lundin
Managed to forget to add a sob to this one, but feel free to add one. //Anton On 14 May, 2014 - Anton Lundin wrote: > --- > dive.c | 5 + > divecomputer.cpp | 5 ++--- > qt-ui/divelistview.cpp | 7 ++- > qt-ui/maintab.cpp | 8 ---

Re: [PATCH] Move mod calculations to a separate helper

2014-05-13 Thread Anton Lundin
Older compilers didn't really like this one, so hold this one for now... On 14 May, 2014 - Anton Lundin wrote: > We use mod calculations on multiple places, so make a separate helper > from it with proper types. > > Signed-off-by: Anton Lundin > --- > di

Re: [PATCH] Move mod calculations to a separate helper

2014-05-14 Thread Anton Lundin
On 14 May, 2014 - Robert Helling wrote: > > On 14.05.2014, at 00:32, Anton Lundin wrote: > > > We use mod calculations on multiple places, so make a separate helper > > from it with proper types. > > Good idea. Some people like to use different max ppO2’s during

[PATCH v2] Move mod calculations to a separate helper

2014-05-25 Thread Anton Lundin
ks goes to Tiago and Linus for pointing me in the right direction. Signed-off-by: Anton Lundin --- dive.h| 6 ++ profile.c | 3 ++- qt-ui/diveplanner.cpp | 7 +++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dive.h b/dive.h index 05da287..fe2b

[PATCH] Use gas_mod and fix fpe

2014-05-25 Thread Anton Lundin
When removing o2 from a gas, eg setting it to "", air, this code would raise a nice fpe. Fix that by using gas_mod instead. Signed-off-by: Anton Lundin --- qt-ui/downloadfromdivecomputer.cpp | 5 ++--- qt-ui/downloadfromdivecomputer.h | 2 +- qt-ui/models.cpp |

Re: [PATCH] Use gas_mod and fix fpe

2014-05-25 Thread Anton Lundin
This is crap. Managed to get some other things included in this commit. I'm going to clean this up and re-send. //Anton On 25 May, 2014 - Anton Lundin wrote: > When removing o2 from a gas, eg setting it to "", air, this code would > raise a nice fpe. Fix that by

[PATCH] Rework slot to quiet down Qt5 warning

2014-05-25 Thread Anton Lundin
Qt5 got confused about this slot. This does the same as previously but gets Qt5 happy. Signed-off-by: Anton Lundin --- qt-ui/downloadfromdivecomputer.cpp | 5 ++--- qt-ui/downloadfromdivecomputer.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/qt-ui

[PATCH] Use gas_mod and fix fpe

2014-05-25 Thread Anton Lundin
When removing o2 from a gas, eg setting it to "", air, this code would raise a nice fpe. Fix that by using gas_mod instead. Signed-off-by: Anton Lundin --- qt-ui/models.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp ind

Re: [PATCH] Rework slot to quiet down Qt5 warning

2014-05-25 Thread Anton Lundin
gt; > > /D > > > > On Mon, May 26, 2014 at 12:06:56AM +0200, Anton Lundin wrote: > >> diff --git a/qt-ui/downloadfromdivecomputer.cpp > >> b/qt-ui/downloadfromdivecomputer.cpp > >> index 681b0d2..71f428b 100644 > >> --- a/qt-u

[PATCH] Switch to the new gasmix structure in dump_plan

2014-06-05 Thread Anton Lundin
dump_plan wasn't updated when the switch from he/o2 to gasmix was done in the planner code, this makes it compile again. Signed-off-by: Anton Lundin --- planner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planner.c b/planner.c index 438b84c..242fbac 100644

[PATCH] Fix out of tree building without asciidoc

2014-06-08 Thread Anton Lundin
We tried to copy the .html.git file from the out of tree build dir, not from the source dir. Signed-off-by: Anton Lundin --- Documentation/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 5ef7c38..10e11da 100644

[PATCH] Gas was printed in permille, use gasname instead

2014-06-08 Thread Anton Lundin
After the switch to a central event decoder and just return gasmix from that we printed things in permille, eg. EAN1000 and 180/550 which looks kinda strange. This fixes that by using gasname instead to give the gas a name. Signed-off-by: Anton Lundin --- qt-ui/profile/diveeventitem.cpp | 10

Re: What's missing for 4.2?

2014-06-09 Thread Anton Lundin
e. Eg. During this trip i used up 15000L HE and 6000L O2. //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Re: What's missing for 4.2?

2014-06-09 Thread Anton Lundin
On 09 June, 2014 - Jef Driesen wrote: > On 09-06-14 17:55, Dirk Hohndel wrote: > >On Mon, Jun 09, 2014 at 05:03:16PM +0200, Anton Lundin wrote: > >>* When i downloaded the profiles from my Suunto Vyper that was in gauge > >> mode during the trip, i got a Air cyli

Re: What's missing for 4.2?

2014-06-09 Thread Anton Lundin
On 09 June, 2014 - Dirk Hohndel wrote: > On Mon, Jun 09, 2014 at 05:03:16PM +0200, Anton Lundin wrote: > > Maybe post 4.2 > [...] > > * Summarize gas consumption over multiple dives. After a trip when > > trying to figure out how much HE/O2 I used, it would be great

Re: What's missing for 4.2?

2014-06-10 Thread Anton Lundin
On 10 June, 2014 - Jef Driesen wrote: > On 2014-06-09 21:39, Anton Lundin wrote: > >On 09 June, 2014 - Jef Driesen wrote: > > > >>On 09-06-14 17:55, Dirk Hohndel wrote: > >>>On Mon, Jun 09, 2014 at 05:03:16PM +0200, Anton Lundin wrote: > >>>>*

[PATCH] Don't ignore actual diveable mixes

2014-06-10 Thread Anton Lundin
gases too. Signed-off-by: Anton Lundin --- libdivecomputer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libdivecomputer.c b/libdivecomputer.c index e8a0338..8add6fd 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -116,9 +116,9 @@ static int parse_gasmixes

Re: What's missing for 4.2?

2014-06-10 Thread Anton Lundin
On 10 June, 2014 - Dirk Hohndel wrote: > Let's follow up on this older message... > > On Mon, Jun 09, 2014 at 08:55:50AM -0700, Dirk Hohndel wrote: > > On Mon, Jun 09, 2014 at 05:03:16PM +0200, Anton Lundin wrote: > > > A couple of random notes from my last di

Re: What's missing for 4.2?

2014-06-10 Thread Anton Lundin
On 10 June, 2014 - Anton Lundin wrote: > On 10 June, 2014 - Dirk Hohndel wrote: > > > > > As discussed, part of this was implemented. > > The part that's missing seems a tiny bit too user specific. > > Breaking this down as "volume of air" + &qu

Re: What's missing for 4.2?

2014-06-10 Thread Anton Lundin
On 10 June, 2014 - Dirk Hohndel wrote: > On Tue, Jun 10, 2014 at 11:43:37PM +0200, Anton Lundin wrote: > > Open a dive without Location name or coordinates, ex. dives/test0.xml > > > > Add a location name, hit save. Try to add a coordinate via clicking in > > the mar

Re: [PATCH] Don't ignore actual diveable mixes

2014-06-11 Thread Anton Lundin
On 11 June, 2014 - Jef Driesen wrote: > On 2014-06-10 23:00, Anton Lundin wrote: > > /* Ignore bogus data - libdivecomputer does some crazy stuff */ > >-if (o2 + he <= O2_IN_AIR || o2 >= 1000) > >+if (o2 + h

Re: What's missing for 4.2?

2014-06-11 Thread Anton Lundin
On 10 June, 2014 - Dirk Hohndel wrote: > On Wed, Jun 11, 2014 at 12:30:22AM +0200, Anton Lundin wrote: > > > > Quite ugly thing but it kinda works. You hopefully get the idea. > > > > //Anton > > > > -- > > Anton Lundin+46702-161604 >

Re: What's missing for 4.2?

2014-06-11 Thread Anton Lundin
On 10 June, 2014 - Dirk Hohndel wrote: > On Wed, Jun 11, 2014 at 01:03:11AM +0200, Anton Lundin wrote: > > > > > > Hmm, can you try this patch? It's ugly as #*$&% but should make sure that > > > we get double clicks delivered even if marble "doesn&#

"Quick" versions of TTS calculations

2014-06-11 Thread Anton Lundin
, as long as we stop disabling TTS/NDL when i would like to look at the numbers from my dives. //Anton -- Anton Lundin+46702-161604 diff --git i/profile.c w/profile.c index b40ef62..19bc03e 100644 --- i/profile.c +++ w/profile.c @@ -1070,6 +1070,15 @@ static void calculate_ndl_tts(double t

[PATCH] Fix CNS math, / vs. *

2014-06-12 Thread Anton Lundin
Back in "Fix ATM-vs-bar confusion", e58f54cac, there was a typo that broke CNS calculations. This fixes them again. Signed-off-by: Anton Lundin --- divelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/divelist.c b/divelist.c index decc07a..a075838 10

Re: [ GSoC Progress ] Android Divecomputer Downloader

2014-06-16 Thread Anton Lundin
und trip to java and back to libdivecomputer? I've seen that both prolific and ftdi have released Java-based drivers for Android. //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

[PATCH] Fix building with NO_MARBLE again

2014-06-17 Thread Anton Lundin
Back in 708f19830e2a ("Planner: New plannerSettingsWidget") the Globe widget handling changed, and this updates the NO_MARBLE build option to work after that. Signed-off-by: Anton Lundin --- qt-ui/mainwindow.cpp | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --g

[PATCH] Enable Info box in the planner again.

2014-06-17 Thread Anton Lundin
Its great to be able to see the planned "turn pressure", EADD at different points and so on. Signed-off-by: Anton Lundin --- qt-ui/profile/profilewidget2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilew

[PATCH] CNS doesn't increase when PO3 is below 0.5 atm

2014-06-17 Thread Anton Lundin
When chasing other bug in CNS code i found this. Signed-off-by: Anton Lundin --- divelist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/divelist.c b/divelist.c index a075838..ff49339 100644 --- a/divelist.c +++ b/divelist.c @@ -248,6 +248,9 @@ static int calculate_cns(struct dive

[PATCH] planner: Switch to QSpinBox for SAC

2014-06-20 Thread Anton Lundin
QSpinBox is nice to see how different sac rate would affect our dive plan. "Hey, What would happen if I would be stressed and my sac goes up by 50%?" Signed-off-by: Anton Lundin --- qt-ui/diveplanner.cpp | 20 ++-- qt-ui/diveplanner.h | 8 qt-ui/diveplanne

Re: GSoC: iOS Subsurface companion app (week 5)

2014-06-23 Thread Anton Lundin
lly) or at least > an image with 1024x1024 pixels resolution (largest image that I have found is > only 600x600)? http://git.hohndel.org/?p=subsurface.git;a=blob;f=subsurface-icon.svg I think that would suite your needs? //Anton -- Anton Lundin+46702-161604 ___

[PATCH] Fix NO_PRINTING building again

2014-06-23 Thread Anton Lundin
Back in 6699e3ab ("Add print button to planner") unconditional printing code was added. This puts that same code behind NO_PRINTING macro. Signed-off-by: Anton Lundin --- qt-ui/diveplanner.cpp | 3 +++ qt-ui/mainwindow.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) di

[PATCH] Drop like a stone mode in planner

2014-06-23 Thread Anton Lundin
same state as they where. Signed-off-by: Anton Lundin --- qt-ui/diveplanner.cpp| 29 + qt-ui/diveplanner.h | 2 ++ qt-ui/diveplanner.ui | 7 +++ qt-ui/plannerSettings.ui | 37 + 4 files changed, 75 insertions(+) di

Re: [PATCH] Fix NO_PRINTING building again

2014-06-24 Thread Anton Lundin
On 24 June, 2014 - Dirk Hohndel wrote: > On Mon, Jun 23, 2014 at 03:43:51PM +0200, Anton Lundin wrote: > > Back in 6699e3ab ("Add print button to planner") unconditional printing > > code was added. This puts that same code behind NO_PRINTING macro. > > Thanks f

Re: [PATCH] Template for subsurface android package

2014-06-24 Thread Anton Lundin
oard|keyboardHidden|navigation" > +android:label="@string/app_name" > +android:launchMode="singleTop" > +android:screenOrientation="sensorLandscape" > I'm not sure about locking the beast to landscape. On my Nexus 5 the app is about as useful in portrait to. ... > diff --git a/android/res/xml/device_filter.xml > b/android/res/xml/device_filter.xml > new file mode 100644 > index 000..822680b > --- /dev/null > +++ b/android/res/xml/device_filter.xml > @@ -0,0 +1,16 @@ > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + Another trailing newline here. The rest of it looks good to me. //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

[PATCH] Add missed xml-end tag in AndroidManifest

2014-06-25 Thread Anton Lundin
Signed-off-by: Anton Lundin --- Note to self: Always _always_ build test patches from a clean state. android/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 6d7b24d..4d0105f 100644 --- a/android

Re: [PATCH] Template for subsurface android package

2014-06-25 Thread Anton Lundin
On 25 June, 2014 - Dirk Hohndel wrote: > On Tue, Jun 24, 2014 at 10:41:45PM +0200, Anton Lundin wrote: > > On 24 June, 2014 - Dirk Hohndel wrote: > > > > > Just like I asked Miika - I would prefer to get these with SOB's from your > > > mentor. > > &

[PATCH 2/2] Connect prefs.descrate to drop_stone_mode points

2014-06-25 Thread Anton Lundin
This enables so we can change the decent speed for drop like a stone mode. Signed-off-by: Anton Lundin --- qt-ui/diveplanner.cpp | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index bc61233..1ba00a7 100644 --- a/qt-ui

[PATCH 1/2] Fix typo in connecting ui.descRate to setDescRate

2014-06-25 Thread Anton Lundin
Qt didn't find the right function without the type there. This also gets rid of the warning about that. Signed-off-by: Anton Lundin --- qt-ui/diveplanner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 249b037..bc

Re: status update

2014-06-25 Thread Anton Lundin
add more implicit way points whenever you switch depth between your manually entered way points? (Yea, it makes sense, but it will be a bit more messy to build) I took the simple path and only controlled the first decent way point, because this covers the case i use it for. //Anton -- Anton Lundin

Re: [PATCH] Drop like a stone mode in planner

2014-06-26 Thread Anton Lundin
On 26 June, 2014 - Robert C. Helling wrote: > > On 23 Jun 2014, at 19:21, Anton Lundin wrote: > > Anton, > > > Most of my dives i plan i know it will just be full speed down a line in > > the beginning and thus the planner can figure out that leg of the plan > &

[PATCH] Care about drop_stone_mode in createSimpleDive

2014-06-26 Thread Anton Lundin
't add the first waypoint in createSimpleDive when drop_stone_mode is enabled and lets that add a implicit first waypoint. Signed-off-by: Anton Lundin --- qt-ui/diveplanner.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cp

[PATCH] Close snprintf warning

2014-06-26 Thread Anton Lundin
Gcc yells: warning: format not a string literal and no format arguments This closes that warning. Signed-off-by: Anton Lundin --- planner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planner.c b/planner.c index 13a9a48..fcdfe01 100644 --- a/planner.c +++ b/planner.c

Re: Proxy support in Subsurface

2014-06-28 Thread Anton Lundin
proxyType_changed(int) Either rename the function to something thats not on_bla_bla or rename it so the auto-connect does the right thing. //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Warning from PlannerSettingsWidget

2014-06-28 Thread Anton Lundin
t what have happened here, but someone of our qt-experts might know. //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Re: [Planner] gas consumption calculation broken after 5b5a25d.

2014-06-28 Thread Anton Lundin
commit changes shortcut keys, so I'm reasonably certain that > that is not the culprit. What was the last commit where things worked for > you? > It worked back in 5b5a25d, and its broken in current master. Its like sac is zero. I'm taking a look at

Re: [Planner] gas consumption calculation broken after 5b5a25d.

2014-06-28 Thread Anton Lundin
On 28 June, 2014 - Anton Lundin wrote: > On 27 June, 2014 - Dirk Hohndel wrote: > > > On Fri, Jun 27, 2014 at 09:19:15PM +0200, Joakim Bygdell wrote: > > > After 5b5a25d calculations of gas consumption doesn’t work. > > > > Can you say a bit more? What exact

[PATCH] Surface pressure is in mbar, not bar

2014-06-29 Thread Anton Lundin
Signed-off-by: Anton Lundin --- qt-ui/diveplanner.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-ui/diveplanner.ui b/qt-ui/diveplanner.ui index afed678..ce9b56e 100644 --- a/qt-ui/diveplanner.ui +++ b/qt-ui/diveplanner.ui @@ -148,7 +148,7

[PATCH] Calculate approx gas bill on dives

2014-06-29 Thread Anton Lundin
This uses a bit naive gas computations to figure out how much of different base gases you used up on the dives he statistics is done for. Its quite useful to get a minimum line about how big your gas bill is going to be after a dive trip. Signed-off-by: Anton Lundin --- qt-ui/maintab.cpp | 3

[PATCH] Only calculate deco stops, TTS and NDL every 30s

2014-06-29 Thread Anton Lundin
This introduces a limiter that we only calculate deco stop, TTS and NDL with a minimum of 30s intervall and just reused the values from the previous sample in other cases. I run my OSTC3 at 2s sample intervall so this is a 15x speedup in that case. Signed-off-by: Anton Lundin --- I choose the

[PATCH] Use gas_mod helper instead of local version

2014-06-30 Thread Anton Lundin
Signed-off-by: Anton Lundin --- planner.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/planner.c b/planner.c index fcdfe01..5a8ebec 100644 --- a/planner.c +++ b/planner.c @@ -174,6 +174,7 @@ void fill_default_cylinder(cylinder_t *cyl) { const char *cyl_name

Re: [PATCH] Use gas_mod helper instead of local version

2014-07-01 Thread Anton Lundin
t; Re-wiring it to use the mod/deco-po2-values we have in prefs would be better, but i got just confused when looking at all the different po2-values we keep in the prefs, so i didn't change that right now. //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Re: Bugfixes

2014-07-01 Thread Anton Lundin
l use that in the future. > I just noted that the calendar widget is still there in the planner. //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

[PATCH] Clarify the gaschange icon

2014-07-01 Thread Anton Lundin
This removes the white circle in the backround of the gaschange icon. This makes it stand out a bit less but looks better to me. This also fills in the black part on the cylinder neck. Signed-off-by: Anton Lundin --- icons/gaschange.png | Bin 3344 -> 3215 bytes 1 file changed, 0 inserti

Re: Trying to use Subsurface

2014-07-01 Thread Anton Lundin
mode when you connect the cable it doesn't want to talk sometimes, and if you have it connected to the cable when you plug in the cable, its a 99% failure rate. //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Re: Bugfixes

2014-07-01 Thread Anton Lundin
On 01 July, 2014 - Dirk Hohndel wrote: > On Tue, Jul 01, 2014 at 09:31:56AM +0200, Anton Lundin wrote: > > On 30 June, 2014 - Tomaz Canabrava wrote: > > > > > > I did the calendar widget fixes even tougth I changed the calendar > > > widget because I will use

Re: [PATCHES] Show deco gas usage and print logo

2014-07-01 Thread Anton Lundin
that the OSTC's have. That way you can runtime re-plan if the shit is in the fan. End of side track. //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Re: Date picker: V4.2

2014-07-02 Thread Anton Lundin
e save/abort buttons on the top left, and in the planner they are on the middle left... I have no clear idea here, but i have bin looking for those buttons more than once in the wrong place. //Anton -- Anton Lundin+46702-161604 ___ sub

[RFC PATCH] Use QDialogButtonBox in KMessageWidget

2014-07-02 Thread Anton Lundin
QDialogButtonBox can auto-choose the order of the actions based on the current interfaces guidelines, but in this case its a guessing game. It does a half-decent job off guessing. --- qt-ui/kmessagewidget.cpp | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git

[PATCH] Make planner buttons consistent with Maintab

2014-07-02 Thread Anton Lundin
Move the Save/Abort buttons in the planner to the top left and change them to Save/Cancel to be consistent with where our Save/Cancel buttons are in the Maintab. Signed-off-by: Anton Lundin --- qt-ui/diveplanner.ui | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qt-ui

[PATCH] Clear out old events in create_dive_from_plan

2014-07-03 Thread Anton Lundin
Previous code where accumulating events from each iteration of the planning. This code clears the old ones before adding new ones. Signed-off-by: Anton Lundin --- planner.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/planner.c b/planner.c index 026581d..b0da873 100644 --- a

Re: it compiles, it must be perfect

2014-07-04 Thread Anton Lundin
e > https://www.dropbox.com/s/yg2xv6vvubpek9a/Screenshot%202014-07-04%2009.10.48.png > The mass gaschange thing looks like what i fixed in "Clear out old events in create_dive_from_plan" //Anton -- Anton Lundin+46702-161604 ___ su

[PATCH v2] Clear out old events in create_dive_from_plan

2014-07-04 Thread Anton Lundin
Previous code where accumulating events from each iteration of the planning. This code clears the old ones before adding new ones. Signed-off-by: Anton Lundin --- planner.c | 4 1 file changed, 4 insertions(+) diff --git a/planner.c b/planner.c index 9196e3f..711dfa1 100644 --- a

Re: [PATCH v2] Clear out old events in create_dive_from_plan

2014-07-04 Thread Anton Lundin
On 04 July, 2014 - Dirk Hohndel wrote: > On Fri, Jul 04, 2014 at 08:25:21PM +0200, Anton Lundin wrote: > > Previous code where accumulating events from each iteration of the > > planning. This code clears the old ones before adding new ones. > > I had already pushed a some

[PATCH] Don't try to set a layout on PlannerSettingsWidget

2014-07-07 Thread Anton Lundin
It already got one from its ui-file, and this causes a warning when starting the application. Signed-off-by: Anton Lundin --- qt-ui/mainwindow.ui | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index 206b227

[RFC PATCH] WIP: add a SpinBoxDelegate for DivePlannerPointsModel

2014-07-07 Thread Anton Lundin
This is something to show what we need to do for the DivePlannerPointsModel, to fix entering of negative values there. --- qt-ui/diveplanner.cpp| 6 ++ qt-ui/modeldelegates.cpp | 43 +++ qt-ui/modeldelegates.h | 16 3 files change

Re: [RFC PATCH] WIP: add a SpinBoxDelegate for DivePlannerPointsModel

2014-07-09 Thread Anton Lundin
up and add a Double-version for the setpoint column, but it still feels like there might be a better more "qt-friendly" way of doing this. Thomaz: Any comments? //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing lis

Re: Seabear dive computer integration in subsurface

2014-07-09 Thread Anton Lundin
eeded for seamless > integration. Especially to import other data than only the dive profile, we > will need some more details. But for pure dive profile import, a sample log > should allow me to add basic support. > > miika= > ___ > subsurface mailing list > subsurface@hohndel.org > http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

[PATCH] Initial stab at Seabear CSV imports

2014-07-09 Thread Anton Lundin
This adds a preconfigured import setting for Seabear CSV files. Signed-off-by: Anton Lundin --- qt-ui/divelogimportdialog.cpp | 2 ++ qt-ui/divelogimportdialog.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp

[PATCH] Align CSVUnits with the other QComboBoxes

2014-07-09 Thread Anton Lundin
The CSVUnits QComboBox wasn't in a layout and that made it look a bit weird. This adds a layout around it. Signed-off-by: Anton Lundin --- qt-ui/divelogimportdialog.ui | 44 ++-- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/

[PATCH 1/4] Add support divecomputer based TTS

2014-07-09 Thread Anton Lundin
Since earlier have we had support for our own calculated TTS. This adds support for holding TTS values reported by a dive computer. Signed-off-by: Anton Lundin --- dive.h | 1 + load-git.c | 4 parse-xml.c | 2 ++ profile.c | 2 ++ profile.h | 1 + save-git.c | 4 save

[PATCH 3/4] Add support for importing TTS from CSV files

2014-07-09 Thread Anton Lundin
Signed-off-by: Anton Lundin --- dive.h| 2 +- file.c| 8 ++-- qt-ui/divelogimportdialog.cpp | 14 +- qt-ui/divelogimportdialog.h | 1 + qt-ui/divelogimportdialog.ui | 22 ++ xslt/csv2xml.xslt

[PATCH 2/4] Add support for importing NDL from CSV files

2014-07-09 Thread Anton Lundin
Signed-off-by: Anton Lundin --- dive.h| 2 +- file.c| 10 +++--- qt-ui/divelogimportdialog.cpp | 14 +- qt-ui/divelogimportdialog.h | 1 + qt-ui/divelogimportdialog.ui | 28 +--- xslt/csv2xml.xslt

[PATCH 4/4] Add quirk for Seabear CSV NDL/TTS in minutes

2014-07-09 Thread Anton Lundin
In the Seabear CSV the NDL and TTS fields are in minutes, not seconds as there time field. This is a ugly quirk but it gets the job done. Signed-off-by: Anton Lundin --- qt-ui/divelogimportdialog.cpp | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/qt-ui

[PATCH] Add quirk for Seabear CSV settings

2014-07-09 Thread Anton Lundin
The Seabear software stores its settings as two csv-rows in the same file as its samples. These settings got read as two bogus samples in the beginning of the dive. This kills those off and repairs the temperature damage they done. Signed-off-by: Anton Lundin --- qt-ui/divelogimportdialog.cpp

[PATCH] Move drop_stone_mode setting to prefs

2014-07-09 Thread Anton Lundin
There is no reason to treat drop_stone_mode different from the rest of the planner settings, so move it to our prefs structure. Signed-off-by: Anton Lundin --- pref.h| 1 + qt-ui/diveplanner.cpp | 10 +- qt-ui/diveplanner.h | 1 - subsurfacestartup.c | 3 ++- 4

Re: towards 4.2

2014-07-09 Thread Anton Lundin
lse? > I would like some sort of SpinBoxDelegate-thingie to go in to prevent you from entering negative values (or even better, sane values) in the dive planner points table. I did some draft code for this but i think that should be cleaned up and fixed. Another thing i just noted is that we store

[PATCH] Fix bug in Seabear Quirks

2014-07-09 Thread Anton Lundin
By mistake i used memcpy to "fix" the samples, but the sample list was overlapping so i needed to use memmove. Signed-off-by: Anton Lundin --- qt-ui/divelogimportdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-ui/divelogimportdialog.c

Re: towards 4.2

2014-07-10 Thread Anton Lundin
On 10 July, 2014 - Robert Helling wrote: > > On 09.07.2014, at 23:43, Anton Lundin wrote: > > > Another thing i just noted is that we store none of our planner > > preferences in the persistent preferences system. That might be a > > nice ting to do. > >

Re: Bug with Dive log from Suunto( without attachment)

2014-07-10 Thread Anton Lundin
raverse the string as char's in show_utf8 and call isspace(\xc3) and on windows that returns true? Anyhow, our show_utf8 function that is trying to strip spaces doesn't handle the data as utf8 =( //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

<    1   2   3   >