291 Commits

Author SHA1 Message Date
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
Jef Driesen
f642049fe2 Enable the shared parsing code. 2009-05-04 09:03:18 +00:00
Jef Driesen
6132ae2550 Share the parsing code between the backends.
The memory layout of all Oceanic devices is very similar, which allows
to share the parsing code between the different backends. Differences in
the layout are passed by means of a new layout descriptor structure.
Memory buffers are now allocated dynamically to support devices with
different amounts of memory.
2009-05-04 09:03:04 +00:00
Jef Driesen
754d573e0f Implement the fingerprint function. 2009-05-04 09:02:40 +00:00
Jef Driesen
9089651f17 Fix the symbols file for platforms without IRDA support (Mac OS X).
When the IRDA backend is disabled or not supported by the underlying
platform (such as on Mac OS X), the Uwatec Smart parser is disabled as
well. The symbols file is updated to reflect this.
2009-04-14 21:46:59 +00:00
Jef Driesen
135c903792 Updated the msvc project file. 2009-04-14 21:46:46 +00:00
Jef Driesen
be2a27c58b Remove the handshake function from the public api. 2009-04-14 21:37:39 +00:00
Jef Driesen
572dfa5184 Add a function to retrieve the stored handshake packet. 2009-04-14 21:37:04 +00:00
Jef Driesen
67363ea05c Store the handshake packet in the device handle. 2009-04-14 21:36:44 +00:00
Jef Driesen
aa7599929e Wake-up the device automatically.
The backend is now in full control of the handshake sequence and does
automatically wake-up the device at the appropriate time.
2009-04-14 21:36:28 +00:00
Jef Driesen
b7fcd5442c Use a single function for writing the device parameters. 2009-04-14 21:36:07 +00:00
Jef Driesen
8bfe481e58 Add progress events. 2009-04-10 09:21:38 +00:00
Jef Driesen
6d018ab6ae Add a device info event. 2009-04-10 09:21:28 +00:00
Jef Driesen
95089c1851 Use a single buffer for all profiles. 2009-04-10 09:21:18 +00:00
Jef Driesen
85e0b9dcbf Read the profile ringbuffer backwards. 2009-04-10 09:21:08 +00:00
Jef Driesen
5ce7aeffd9 Rewrite the code to use the stored fingerprint.
Logbook entries are now downloaded one by one, until a previously
downloaded entry is identified. This approach reduces the amount of data
that needs to be transfered in the typical case, where only a few new
dives are available on the device.
2009-04-10 09:20:58 +00:00
Jef Driesen
49301d1b28 Implement the fingerprint function. 2009-04-10 09:20:48 +00:00
Jef Driesen
c1745cc535 Merge the typedef with the struct declaration. 2009-04-06 07:26:16 +00:00
Jef Driesen
6abfa9792d Added the initial implementation for the Mares Puck. 2009-03-30 20:30:32 +00:00
Jef Driesen
20cdb4b188 Resend the command after timeouts and protocol errors. 2009-03-30 19:58:06 +00:00
Jef Driesen
39f3a5b757 Retry the discovery a few times when no devices are found. 2009-03-20 08:48:17 +00:00
Jef Driesen
5cb754b01b Store the clock calibration values in the device handle. 2009-03-11 15:02:49 +00:00
Jef Driesen
801f747345 Fix some small mistakes in the previous commit. 2009-03-11 13:12:21 +00:00
Jef Driesen
ce705f8244 Use the new byte order functions everywhere. 2009-03-11 10:18:28 +00:00
Jef Driesen
99c3d258d4 Added byte order conversion functions (little and big endian). 2009-03-11 10:18:05 +00:00
Jef Driesen
1668e70c79 Use symbolic constants for the profile ringbuffer. 2009-03-11 10:17:55 +00:00
Jef Driesen
00c3330e8d Receive the entire packet before reporting buffer overflows. 2009-03-11 10:17:45 +00:00
Jef Driesen
ebfd5b4b1a Always use the timestamp stored in the device handle. 2009-03-11 08:48:29 +00:00
Jef Driesen
731eaa2ce6 Add fingerprint support for the Mares Nemo. 2009-03-04 12:49:33 +00:00
Jef Driesen
3885e69079 Add fingerprint support for the Suunto Vyper, Spyder and Eon. 2009-02-23 13:04:26 +00:00
Jef Driesen
a2ccc4926d Add fingerprint support for the Suunto Vyper2 and D9. 2009-02-23 13:04:08 +00:00
Jef Driesen
11dc4715a4 Add fingerprint support for the Reefnet Sensus Original, Pro and Ultra. 2009-02-23 13:03:52 +00:00
Jef Driesen
03212f5c6f Add fingerprint support for the Uwatec Aladin, Memomouse and Smart. 2009-02-23 13:03:36 +00:00