<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/smtk-import, branch v4.6.4</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom/smtk-import?h=v4.6.4</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom/smtk-import?h=v4.6.4'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2017-04-21T13:52:13Z</updated>
<entry>
<title>smtk-import: Add curly braces in nested conditionals</title>
<updated>2017-04-21T13:52:13Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2017-04-12T19:59:56Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=441cfb3f056d3a57ca27b67f223129f348fb78fe'/>
<id>urn:sha1:441cfb3f056d3a57ca27b67f223129f348fb78fe</id>
<content type='text'>
Curly braces are necessary in nested conditionals or results may not be
those expected. In this case, the "else" clause applied on second "if",
instead of first one.

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>smtk-import reuse pre-existent code and fix leak</title>
<updated>2017-04-21T13:52:13Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2017-04-12T19:54:47Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=75007aa4ef7b99064678ff92ec9819e76f553cfb'/>
<id>urn:sha1:75007aa4ef7b99064678ff92ec9819e76f553cfb</id>
<content type='text'>
Use update_event_name() for bookmarks merge and free temp string.

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>smtk-import: Abort bookmark parsing if table doesn't open</title>
<updated>2017-04-21T13:52:13Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2017-04-12T19:46:57Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=329a6bc0753260f3d0184448155a8ef6844d9b43'/>
<id>urn:sha1:329a6bc0753260f3d0184448155a8ef6844d9b43</id>
<content type='text'>
Do not just report the failure but abort parsing or we will get a crash

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>smtk-import Avoid duplicities in bookmarks</title>
<updated>2017-04-04T17:54:55Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2017-04-02T21:42:36Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=e4086dc74648c5f5ed7b72f1dc35e16e3bee8041'/>
<id>urn:sha1:e4086dc74648c5f5ed7b72f1dc35e16e3bee8041</id>
<content type='text'>
SmartTrak's bookmarks work in the same fashion Subsurface's do. The user
may set a bookmark while underwater or set it just on the divelog
software.
At this time we are parsing those set in the DC twice, as we get one
from libdivecomputer and another from smarttrak's database.

This patch just checks if we have a bookmark event downloaded by
libdivecomputer which has the same time that the one parsed from the
.slg file. If so, merge the names taking the one from smarttrak.

Text from smarttrak is preferred because the user may have entered some
interesting note there and libdivecomputer's name is just "bookmark".

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>smtk-import Fix wreck data import</title>
<updated>2017-04-04T17:54:55Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2017-04-02T21:30:24Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=4864ea56cbaa694ed237e854de2cfa1407fc18c4'/>
<id>urn:sha1:4864ea56cbaa694ed237e854de2cfa1407fc18c4</id>
<content type='text'>
It was assumed that every data field in a wreck table was filled or
zeroed.  This assumption is actually false, so this patch adds testing
for the existence of strings before working with them.

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>smtk-import fix is_same_cylinder()</title>
<updated>2017-03-18T15:33:31Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2017-03-17T22:10:36Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=e2fe196d82f7fb67c960cebbcd8f7dd0245f33c0'/>
<id>urn:sha1:e2fe196d82f7fb67c960cebbcd8f7dd0245f33c0</id>
<content type='text'>
Add return value to the gasmix condition, and fix the rest of the
conditions.

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>smtk-import - Change cylinder import logic</title>
<updated>2017-03-18T15:33:31Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2017-03-16T16:07:56Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=5c757d5c387f47482556eab6292818b7eba27ce8'/>
<id>urn:sha1:5c757d5c387f47482556eab6292818b7eba27ce8</id>
<content type='text'>
Until now, we did the cylinder import based on its initial pressure (a
tank without pressure is an unused tank). Based in this assumption, we
just dropped those tanks whose initial press was 0, losing user
introduced tank definitions  and getting some duplicities due to one
cylinder being numbered (e.g.) 2 by libdivecomputer and 3 by SmartTrak.

The new workflow is: get every single tank reported by SmartTrak (giving
preference to libdivecomputer parsed data), then clean the cylinder
table reverse order, dropping tanks without description and  init or end
pressures, and checkig them against the previous cylinder to do a merge,
if they look the same, and try to avoid duplicities.

The new logic assumes a heavier workload for the benefit of lower data
loss (e.g. a user may get his/her tanks descriptions despite he/she
hasn't recorded their pressures because forgot the values or had an issue
with the gas transmitter).

Suggested-by: Alessandro Volpi &lt;volpial@gmail.com&gt;
Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>smtk-import - Remove tank number limitation</title>
<updated>2017-03-18T15:33:31Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2017-03-16T16:04:14Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=16d37c254caf99484849bf9e7c8d72da1f3e4faf'/>
<id>urn:sha1:16d37c254caf99484849bf9e7c8d72da1f3e4faf</id>
<content type='text'>
In the past subsurface managed up to 8 tanks, but now it manages up to
20.  SmartTrak manages 10 (3 in older no trimix versions) so there is no
more need to drop the last tanks.

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>smtk-import rework smtk_build_tank_info()</title>
<updated>2017-03-18T15:33:31Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2017-03-16T15:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=20b348579bc206231d81f8c5fd256e656c8409e4'/>
<id>urn:sha1:20b348579bc206231d81f8c5fd256e656c8409e4</id>
<content type='text'>
The cylinder info is built one by one. This way, instead of passing dive
and tank number parameters, just passing a pointer to the tank been
worked seems preferable.

It also introduces lrint() in the function to round the doubles values
obtained from libmdb for tank size and workingpressure.

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>smtk-import - Add helper funcs to manage tank info</title>
<updated>2017-03-18T15:33:31Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2017-03-16T15:41:50Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=36658d87f3d99955ecfcbd8eb6b3d855e8328b34'/>
<id>urn:sha1:36658d87f3d99955ecfcbd8eb6b3d855e8328b34</id>
<content type='text'>
Framed in a full rework of the cylinders info import management, this
funcs will be used in next patches.

Functions merge_cylinder_type(), merge_cylinder_mix() and
merge_cylinder_info(), have been shamelessly copied from dive.c as they
have been removed by 162767aa dated 2017-03-11 just when I was going to
use them.

Macros MERGE_MAX() and MERGE_MIN() have just been copied from dive.c,
but they could be moved to dive.h so they could be used elsewhere if
needed.

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
</feed>
