1252 Commits

Author SHA1 Message Date
Dirk Hohndel
480e54ace7 Fix OSTC3 merge errors
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 17:37:25 -07:00
Dirk Hohndel
ecebda3b19 Fix Shearwater breakage caused by bad merging
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-18 05:55:12 -07:00
Miika Turkia
6c6752d87e Add dummy serial number usage to dctool
After adding support for serial number on dc parsers on
libdivecomputer's Subsurface branch, we need to add the serial parameter
to parser calls as well. Just using 0...

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-16 08:32:14 -07:00
Dirk Hohndel
8356e22e61 Merge branch 'master' into Subsurface-branch v4.5.5 2016-04-09 08:29:44 -07:00
Jef Driesen
018c27d7b3 Add support for the Aqualung i450T. 2016-03-31 13:26:34 +02:00
Dirk Hohndel
515dc17914 Fix merge error that causes double free when downloading from EON Steel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-30 19:51:25 -05:00
Jef Driesen
f3fb2391f9 Add support for the Cressi Newton.
The Cressi Newton appears to be compatible with the Leonardo and Giotto.
2016-03-29 16:34:59 +02:00
Jef Driesen
469717a2a1 Add support for imperial units in the xml output.
Libdivecomputer always uses metric units internally. But when reverse
engineering a device that stores everything using imperial units, it's
very convenient to be able to switch the output to imperial units too.
2016-03-29 16:34:27 +02:00
Jef Driesen
8ab3fb0542 Always close the xml tags.
The dive and sample xml tags were not closed properly if an error
occurred during parsing.
2016-03-27 22:02:52 +02:00
Jef Driesen
cb0584adc1 Get the gas mixes from the sample data.
The Shearwater devices support adding, removing or editing gas mixes
during the dive. The pre-defined gas mixes available in the opening and
closing block are only a snapshot of the configuration at the start and
at the end of the dive. Thus by editing the gas mixes during the dive
it's possible to switch to a gas mix that is not present in the opening
(or even the closing block). The parser doesn't support that.

To avoid this problem, we now collect the available gas mixes from the
sample data. As a side effect we only return those gas mixes that are
effectively used during the dive.
2016-03-23 14:47:09 -07:00
Jef Driesen
f37b4b06db Cache the dive mode internally.
This simply moves the code to the get the dive mode from its own
function into the existing caching function.
2016-03-23 14:47:09 -07:00
Jef Driesen
aa2f670224 Add support for the Shearwater Perdix. 2016-03-23 14:47:09 -07:00
John Van Ostrand
af30fbb3f8 Add support for the Cochran Commander and EMC. 2016-03-23 14:47:09 -07:00
Dirk Hohndel
b13d8da426 Don't build examples by default
They are broken in this branch.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 14:47:09 -07:00
Jef Driesen
7f6348b066 Add support for the Uwatec Aladin Sport.
The Aladin Sport appears to be compatible with the Aladin 2G.
2016-03-23 14:47:09 -07:00
Jef Driesen
95d69ea30d Add support for the Suunto Zoop/Vyper Novo.
The Zoop Novo and Vyper Novo are compatible with respectively the D4i
and D6i.
2016-03-23 14:47:09 -07:00
Jef Driesen
cc12560b29 The new D6i data format support 3 gas mixes. 2016-03-23 14:47:09 -07:00
Jef Driesen
784844d8dd Add support for the new D4i and D6i data format.
One of the newer D4i and D6i firmware versions (for example v1.5.9),
introduces a new variant of the data format. The new dive header is 8
bytes larger. The correct variant can be detected by means of the
logbook id tag at the start of the header.
2016-03-23 14:47:09 -07:00
Jef Driesen
2fc31b72e7 Add support for the HW OSTC 4.
Except for the firmware update and a few other minor differences, the
new OSTC4 is backwards compatible with the OSTC3.
2016-03-23 14:47:08 -07:00
Jef Driesen
2e0db552ad Read and cache the hardware descriptor.
By reading the hardware descriptor immediately after entering download
or service mode, we can identify the specific model and adapt to minor
differences in the communication protocol.
2016-03-23 14:26:45 -07:00
Jef Driesen
6bb60bba31 Pass an array to the checksum function. 2016-03-23 14:25:14 -07:00
Jef Driesen
c8b166dadb Get the gas mixes from the sample data.
The Shearwater devices support adding, removing or editing gas mixes
during the dive. The pre-defined gas mixes available in the opening and
closing block are only a snapshot of the configuration at the start and
at the end of the dive. Thus by editing the gas mixes during the dive
it's possible to switch to a gas mix that is not present in the opening
(or even the closing block). The parser doesn't support that.

To avoid this problem, we now collect the available gas mixes from the
sample data. As a side effect we only return those gas mixes that are
effectively used during the dive.
2016-03-23 10:50:21 +01:00
Jef Driesen
c964fa5ad9 Cache the dive mode internally.
This simply moves the code to the get the dive mode from its own
function into the existing caching function.
2016-03-23 10:50:21 +01:00
Jef Driesen
0bb3f7ebd1 Add support for the Shearwater Perdix. 2016-03-23 10:48:59 +01:00
John Van Ostrand
9a4e2b75a5 Add support for the Cochran Commander and EMC. 2016-03-22 20:09:45 +01:00
Jef Driesen
280f1871f0 Add support for the Uwatec Aladin Sport.
The Aladin Sport appears to be compatible with the Aladin 2G.
2016-03-17 08:22:39 +01:00
Jef Driesen
50ba063a46 Add support for the Suunto Zoop/Vyper Novo.
The Zoop Novo and Vyper Novo are compatible with respectively the D4i
and D6i.
2016-03-11 10:36:05 +01:00
Jef Driesen
63dcee9eaa The new D6i data format support 3 gas mixes. 2016-03-11 10:35:46 +01:00
Jef Driesen
2e64d47dff Add support for the new D4i and D6i data format.
One of the newer D4i and D6i firmware versions (for example v1.5.9),
introduces a new variant of the data format. The new dive header is 8
bytes larger. The correct variant can be detected by means of the
logbook id tag at the start of the header.
2016-03-09 14:14:10 +01:00
Jef Driesen
42e234a0f9 Merge branch 'ostc4' 2016-03-07 13:10:48 +01:00
Dirk Hohndel
28f8cf6e19 Add configure option to disable checking for libusb and hidapi
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-06 10:05:45 -08:00
Jef Driesen
dbd604abb0 Add support for the HW OSTC 4.
Except for the firmware update and a few other minor differences, the
new OSTC4 is backwards compatible with the OSTC3.
2016-03-01 21:26:43 +01:00
Jef Driesen
f0c442751d Read and cache the hardware descriptor.
By reading the hardware descriptor immediately after entering download
or service mode, we can identify the specific model and adapt to minor
differences in the communication protocol.
2016-03-01 21:26:43 +01:00
Jef Driesen
6ce83347f0 Pass an array to the checksum function. 2016-03-01 21:26:43 +01:00
Dirk Hohndel
55a44a73bb One more merge fix
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
v4.5.4
2016-02-28 06:34:57 +01:00
Dirk Hohndel
7c33c633fb Merge branch 'master' into Subsurface-branch
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-27 22:17:36 +01:00
Jef Driesen
90cf480c25 Fix the OSTC3 missing initial gas mix detection.
For the OSTC3 compatible devices, a missing initial gas mix (e.g. no gas
marked as the first gas) leaves the initial gas mix index at its default
value of zero. This is different from the OSTC2 compatible devices,
where a missing initial gas is stored as the value 0xFF.

By initializing the index with the value 0xFF, the existing detection
works for both variants.
2016-02-26 08:25:55 +01:00
Jef Driesen
5629bdd87a Merge branch 'dctool' 2016-02-26 08:25:05 +01:00
Jef Driesen
83e54d84a2 Add support for the parse command. 2016-02-26 08:24:11 +01:00
Jef Driesen
e8b9e88171 Integrate the new output formats.
The existing output code is removed and replaced with the new XML and
RAW output formats. The desired output format can be selected with a new
command-line option. The XML format remains the default output format.
2016-02-26 08:24:11 +01:00
Jef Driesen
5d9ddafc41 Add support for the raw output format.
The RAW output format exports each dive to a raw (binary) file. To
output multiple files, the filename is interpreted as a template and
should contain one or more placeholders.
2016-02-26 08:23:55 +01:00
Jef Driesen
e35f0a3ff4 Add support for the xml output format.
The XML output format exports all dives to a single xml file.
2016-02-26 08:23:45 +01:00
Jef Driesen
195702046c Add a new abstract output interface.
The new output interface provides the necessary infrastructure to add
support for multiple output formats. Due to the abstract interface, each
new format will require only minimal changes in the application itself.
2016-02-26 07:55:40 +01:00
Janice
4765f7bc50 Fix year decoding for Sherwood Amphos Air 2016-02-19 19:47:29 +01:00
Jef Driesen
aafdbe8baa Fix the date for the Oceanic Datamask. 2016-02-16 20:38:03 +01:00
Jef Driesen
d2e150319b Fix the decoding of negative temperatures.
Due to a firmware bug, negative temperatures are stored incorrectly and
a workaround is necessary to recover the correct value.
2016-02-04 20:44:30 +01:00
Jef Driesen
67a3697a4d Disable the getopt argument permutation on BSD systems.
On BSD based operating systems (which includes Mac OS X), the getopt()
function is posix compliant and thus the option processing stops when
the first non-option is found. But the getopt_long() function permutes
the argument vector, just like the GNU implementation.

Using a leading '+' character in the option string disables the
permutation again.
2016-01-30 23:00:17 +01:00
Jef Driesen
5add68b2d5 Use the optreset variable on BSD systems.
On BSD based operating systems the optreset variable should be used to
reset the internal getopt state. Setting optind to zero is a GNU
extension.
2016-01-30 23:00:17 +01:00
Jef Driesen
ade8619ea6 Don't assume malloc sets errno to ENOMEM.
Although many implementations (including glibc) set errno on failure,
this is not required by the C standard.
2016-01-26 20:32:22 +01:00
Jef Driesen
4228899f59 Reduce the conditional compilation for Windows.
With a few compatibility macros and helper variables, the amount of
conditional compilation can be greatly reduced.
2016-01-26 20:32:22 +01:00