323 Commits

Author SHA1 Message Date
Jef Driesen
fb947c6906 Fix the serial number for Veo compatible devices. 2009-12-28 10:30:18 +00:00
Jef Driesen
97652c6c62 Make the bcd2dec() function available to all backends. 2009-12-08 14:51:32 +00:00
Jef Driesen
1d69b8c021 Fix the spyder fingerprint offset. 2009-12-08 11:24:52 +00:00
Jef Driesen
0edeed162a Skip dives without a footer marker.
Due to the internal memory buffering scheme of the Sensus Ultra, the
last page might contain a partial dive. Skipping this dive is more
apropriate than returning an error.
2009-12-08 08:43:59 +00:00
Jef Driesen
7f983e29fe Rewrite the incremental parser function. 2009-12-03 12:43:29 +00:00
Jef Driesen
421f4ed1d6 Add functions to search for markers in an array. 2009-12-03 12:43:19 +00:00
Jef Driesen
12d0a73abf Rewrite the code to use buffer objects internally. 2009-12-03 12:43:09 +00:00
Jef Driesen
e4108a3b33 Fixed an off-by-one error. 2009-12-02 13:55:50 +00:00
Jef Driesen
5fa943d685 Added the initial implementation for the Cressi Edy. 2009-11-17 11:02:26 +00:00
Jef Driesen
094b70aa03 Use the memory buffer class for downloading individual dives. 2009-11-16 08:17:30 +00:00
Jef Driesen
e883843fca Use pointers to the layout structure for simplicity. 2009-11-16 08:17:20 +00:00
Jef Driesen
54daa9b580 Remove the debugging code. 2009-11-16 08:17:09 +00:00
Jef Driesen
13768188a8 Reduce the amount of data copying. 2009-11-16 08:14:29 +00:00
Jef Driesen
21832851af Add a function to slice the buffer. 2009-11-16 08:14:19 +00:00
Jef Driesen
12754e05f4 Initialize allocated memory to zero when resizing. 2009-11-16 08:10:53 +00:00
Jef Driesen
8eb3e53b44 Add options to download only the memory dump or the dives. 2009-11-16 08:09:57 +00:00
Jef Driesen
71d8da4f04 Remove some unnecessary functions. 2009-11-12 16:30:13 +00:00
Jef Driesen
7e6a57bd1c Added the initial implementation for the Heinrichs Weikamp OSTC. 2009-11-12 08:18:16 +00:00
Jef Driesen
a87398b7c6 Implement progress events for the device_dump() function.
A helper function is added to simplify implementing the devic_dump()
function on top of the device_read() function, and enable progress
events automatically.
2009-11-12 08:04:34 +00:00
Jef Driesen
e2c6bdf880 Add a single download application for all backends. 2009-11-10 11:38:24 +00:00
Jef Driesen
a49d2c7b36 Changed the device_dump() function to use the new memory buffer class.
Using a resizable memory buffer allows to allocate the right amount of
memory inside the backend, avoiding having to know the required buffer
size in advance.
2009-11-10 11:36:10 +00:00
Jef Driesen
69727bf855 Update the msvc project file. 2009-11-10 11:35:39 +00:00
Jef Driesen
a3264bc471 Implement a more efficient buffer growing strategy. 2009-11-10 11:35:29 +00:00
Jef Driesen
74272f4d77 Avoid undefined behaviour with NULL pointers.
We accept NULL pointers if the size is zero, but the C standard
library functions memcpy and memmove requires valid pointers, even if
the size is zero.
2009-11-10 11:35:19 +00:00
Jef Driesen
d3028dc2d7 Add a new memory buffer class. 2009-11-10 11:35:09 +00:00
Jef Driesen
36f9fd614e Write all messages to stderr.
Messages written to stdout are undesirable when the output of an
application needs to be passed through a pipe.
2009-11-05 12:36:28 +00:00
Jef Driesen
b59532fffb Fixed some compiler warnings related to unused variables. 2009-11-02 13:14:42 +00:00
Jef Driesen
8d808e99bb Enable automake silent build rules by default.
Support for silent build rules requires at least automake 1.11.
Disable by either passing --disable-silent-rules to configure or
passing V=1 to make.
2009-11-01 17:27:24 +00:00
Jef Driesen
9baaa18664 Fixed a small mistake. 2009-10-20 17:02:30 +00:00
Jef Driesen
58f6b0e190 Remove the gap between the logbook and profile ringbuffers. 2009-10-20 13:43:21 +00:00
Jef Driesen
407ff06fb9 Improve the empty ringbuffer detection.
The logbook ringbuffer is now considered empty if any of the pointers is
outside the valid ringbuffer area. Compared to checking only against a
special empty value, this approach makes the code more robust against
invalid pointers.
2009-10-20 13:43:07 +00:00
Jef Driesen
bf0dd700c1 Add a parser for the Oceanic Atom 2. 2009-10-15 09:14:33 +00:00
Jef Driesen
50174fa55b Update the msvc project file. 2009-10-11 13:53:41 +00:00
Jef Driesen
cc1a99b9c7 Add a common base class for the Mares backends.
The memory layout of the Mares Puck and Nemo devices is very similar, 
which allows to share the parsing code between the backends.
    
The Mares Puck protocol allows for a more efficient implementation, by 
reading only the data that we really need. But as an intermediate 
solution, reusing the Nemo code is good enough.
2009-10-11 13:51:26 +00:00
Jef Driesen
a4247b7505 Define the WARNING macro only once. 2009-08-06 14:15:52 +00:00
Jef Driesen
872f5a594d Add a common base class.
The transfer protocol of the Suunto Vyper 2 and D9 devices is very
similar, which allows to share most of the transfer code between the
backends.
2009-08-06 09:52:50 +00:00
Jef Driesen
a9d0784a9a Changed the initialization sequence to allow multiple transfers.
The DTR line is used to initialize or reset the communication. Toggling
this line before each transfer, rather than doing it once at startup,
allows to perform multiple transfers in the same session.
2009-07-23 07:12:22 +00:00
Jef Driesen
16191c0f51 Use the new array_isequal() function instead of a local function. 2009-06-19 08:51:34 +00:00
Jef Driesen
043be07af4 Improve the detection of an empty logbook ringbuffer.
Some devices do not appear to set the ringbuffer pointers to their
normal empty values (e.g. pointing outside the ringbuffer memory). In
that case, there appears to be a single entry. But since that entry
contains uninitialized memory (e.g. all 0xFF bytes), we are able to
detect this special situation.
2009-06-19 08:43:42 +00:00
Jef Driesen
a65e9d56c5 Fixed a bug in the write command.
The packet size should include both the number of parameter bytes and
the number of data bytes. The packet verification code is modified to be
able to deal with this change too.
2009-06-12 19:13:43 +00:00
Jef Driesen
23f81c6319 Prefer the dump function in the examples. 2009-06-04 08:59:55 +00:00
Jef Driesen
ff26c2db70 Calibrate the device during initialization.
Although calibration is optional, it's highly recommended because it
reduces the transfer time considerably. The calibrate function is
removed from the public api.
2009-05-27 10:24:04 +00:00
Jef Driesen
24f0f66efd Automatically switch the device into download mode. 2009-05-27 10:23:27 +00:00
Jef Driesen
da684c1fcf Do not send the quit command during initialization. 2009-05-27 10:23:02 +00:00
Jef Driesen
5a1658d30e Use the symbolic constants for ACK/NAK bytes. 2009-05-27 10:22:29 +00:00
Jef Driesen
f477defbf8 Increase the total memory size to 64KB. 2009-05-15 10:13:03 +00:00
Jef Driesen
863890aa23 Add the end-of-profile pointer to the layout descriptor structure. 2009-05-12 19:58:01 +00:00
Jef Driesen
1e39b84075 Add a common base class and a layout descriptor structure.
The memory layout of the Suunto Eon and Vyper devices is very similar,
which allows to share the parsing code between the backends. Differences
in the layout are passed by means of a new layout descriptor structure
and a common base class is introduced to share the fingerprint data.
Memory buffers are now allocated dynamically to support devices with
different amounts of memory.
2009-05-12 19:57:46 +00:00
Jef Driesen
4c37c9c85f Add support for the Suunto Vyper Air and Cobra 3 to the parser. 2009-05-11 13:20:58 +00:00
Jef Driesen
f0b3253296 Add a common base class.
Introducing a common base class allows to share more code between the
backends. Sharing the fingerprint data eliminates the need to pass it
with a function parameter.
2009-05-05 13:20:11 +00:00