95 Commits

Author SHA1 Message Date
Jef Driesen
ccaa93a164 Merge branch 'release-0.2'
Integrate the bugfixes from the stable branch.
2012-12-22 21:07:25 +01:00
Jef Driesen
f65f808b6c Add support for the Aeris A300 AI. 2012-12-12 20:05:00 +01:00
Jef Driesen
985323eefb Move the version function to the device specific api.
The version function requires device specific knowledge to use it (at
least the required buffer size), it is already called internally when
necessary, and only a few backends support it. Thus there is no good
reason to keep it in the high-level public api.
2012-12-05 16:07:32 +01:00
Jef Driesen
550e37d0b5 Remove the page, packet and memory size macros from the public api.
These macros are used internally and don't need to be exposed. In some
cases, the actual values are not even constant, but dependant on the
model and/or the firmware version.
2012-12-05 16:07:32 +01:00
Jef Driesen
328e929d4b Add support for a second Aeris Epic variant. 2012-11-17 14:33:54 +01:00
Jef Driesen
2f8ec75c7c Merge branch 'release-0.1'
Integrate the bugfixes from the stable branch.
2012-09-21 21:24:04 +02:00
Jef Driesen
1b7eaaa831 Add support for the Oceanic OCS. 2012-09-11 20:26:20 +02:00
Jef Driesen
cd31ff9dff Properly store the context pointer internally.
I forgot to update the device and parser initialization functions to
store the context pointer into the objects. As a result, the internal
context pointers were always NULL.
2012-08-28 08:44:47 +02:00
Jef Driesen
38c7b022cd Integrate the context object in the serial code. 2012-08-27 23:08:38 +02:00
Jef Driesen
53e9d72a40 Integrate the context object in the library.
The public api is changed to require a context object for all
operations. Because other library objects store the context pointer
internally, only the constructor functions need an explicit context
object as a parameter.
2012-08-27 23:08:38 +02:00
Jef Driesen
3df5cb09d7 Require a serial handle for the sleep function. 2012-08-27 23:02:44 +02:00
Jef Driesen
2095a2d10e Merge branch 'release-0.1'
Integrate the bugfixes from the stable branch.
2012-08-27 22:58:52 +02:00
Jef Driesen
6242978fc0 Add support for the Aeris Manta.
The last memory page is marked as unreadable, and the profile ringbuffer
end is set to 0xFE00.
2012-08-15 07:18:12 +02:00
Jef Driesen
c821d40144 Introduce a namespace prefix for the high-level public api.
Adding the "dc_" namespace prefix (which is of course an abbreviation
for libdivecomputer) should avoid conflicts with other libraries. For
the time being, only the high-level device and parser layers are
changed.
2012-06-21 21:42:37 +02:00
Jef Driesen
163d383332 Use a common backend type for the device and parser layers. 2012-06-21 21:42:37 +02:00
Jef Driesen
9136a52835 Use common status codes for the device and parser layers. 2012-06-21 21:42:34 +02:00
Jef Driesen
e65025b501 Separate private and public headers.
The public header files are moved to a new subdirectory, to separate
the definition of the public interface from the actual implementation.
Using an identical directory layout as the final installation has the
advantage that the example code can be build outside the project tree
without any modifications to the #include statements.
2012-06-21 21:39:24 +02:00
Jef Driesen
ec6795cbf3 Fix the Oceanic Veo 1.0 layout descriptor. 2012-04-24 19:31:39 +02:00
Jef Driesen
94b4ee368a Add partial support for the Oceanic Veo 1.0
The Veo 1.0 has very limited memory and doesn't have a logbook and
profile ringbuffer. Hence downloading dives isn't really supported, but
even this limited amount of data might be useful for someone.
2012-04-23 22:04:23 +02:00
Jef Driesen
0a6e0d93a8 Add support for the Aeris F10. 2012-04-23 21:37:02 +02:00
Jef Driesen
5ae0e37d1f Remove the hardcoded logbook entry size. 2012-04-23 21:37:02 +02:00
Jef Driesen
5126ef389a Add support for the Oceanic Atom 3.1 2012-04-15 09:45:31 +02:00
Jef Driesen
45c0750631 Adjust the profile ringbuffer to exclude the last 512 bytes. 2012-03-22 22:22:59 +01:00
Jef Driesen
4afa8ad1ef Mark the last memory page on an Oceanic Veo 3.0 as unreadable. 2012-03-15 21:44:25 +01:00
Jef Driesen
605cb37c23 Add support for the Oceanic OC1 Pioneer. 2012-02-24 20:36:28 +01:00
Jef Driesen
87397a4ea1 Add support for the Oceanic VT4.1 2012-01-14 06:37:26 +01:00
Denny Page
c4f62d9410 Remove the init command from the initialization sequence.
The init command appears to behave more like a hard reset. If the
command is sent during the communication, the device immediately closes
the connection and no further communication is possible without
disconnecting and reconnecting the device.

Sending the command at the start of the communication seems to require a
long delay before sending the next command. However the communication
works equally well without sending this command. For some devices it
even improves the success rate of the initialization sequence, and thus
there is no reason to keep it.
2011-11-22 21:51:50 +01:00
Denny Page
22686d6fe9 Add a delay between sending the init and version command.
Some devices are having problems during the initialization sequence. The
extra delay appears to improve the success rate for the affected
devices. There is obviously a small performance penalty, but being able
to establish a reliable connection with all devices is more important.
2011-11-04 22:25:55 +01:00
Jef Driesen
bb32b13b09 Don't use asserts for parameter validation. 2011-10-23 08:12:34 +02:00
Jef Driesen
2a26da3737 Add support for the Oceanic Atom 3.0 and VT 4.0. 2011-08-22 23:27:43 +02:00
Jef Driesen
ce9459039c Add support for the Aeris Atmos AI (metal buttons). 2011-04-16 08:53:58 +02:00
Jef Driesen
b288e82960 Adjust the profile ringbuffer to exclude the last 512 bytes.
For the devices in the list below, the last 512 bytes of the memory area
are not part of the profile ringbuffer. The real purpose of these bytes
is currently unknown.

Oceanic Atom 2.0 (firmware 3I or greater)
Oceanic Geo 2.0
Oceanic OC1
Oceanic ProPlus 2.1
Oceanic Veo 2.0
Oceanic Veo 3.0
Sherwood Insight
Sherwood Wisdom2
Tusa Element II
Tusa Zen
Tusa Zen Air

Some but not all of these devices also have an unreadable last page,
making the autodetection code even more complex.
2011-04-15 20:06:27 +02:00
Jef Driesen
63f3f6de06 Add support for the Sherwood Insight. 2011-02-24 20:59:52 +01:00
Jef Driesen
910521fe80 Add support for the Oceanic Atom 1.0. 2011-01-06 21:04:55 +01:00
Jef Driesen
d7f5813f57 Delay the resending of a command after an error.
Especially the version commands seems to be sensitive to errors. Once
the initialization phase is over, a delay is usually not necessary, but
it should cause a noticable slowdown either because errors are supposed
to be rare.
2010-11-04 21:52:32 +01:00
Jef Driesen
f8e8bd3b54 Discard the additional bytes inside the init function. 2010-11-04 21:52:14 +01:00
Jef Driesen
57ae6b2c13 Eliminate some duplicated code. 2010-11-04 20:49:14 +01:00
Jef Driesen
608df2c4c1 Fixed a typo in the autodetection of the Oceanic OC1. 2010-11-01 20:21:11 +01:00
Jef Driesen
887d744e6d Use a more consistent typedef in the serial and irda backends. 2010-10-04 23:08:39 +02:00
Jef Driesen
55c4212dae Add support for the Tusa Zen Air. 2010-10-04 21:33:08 +02:00
Jef Driesen
2abc371abb Mark the last memory page on an Geo 2 and Pro Plus 2.1 as unreadable. 2010-09-30 20:58:34 +02:00
Jef Driesen
79dfa4becb Mark the last memory page on an Aeris Epic as unreadable. 2010-08-06 13:30:42 +02:00
Jef Driesen
a722d50f03 Mark the last memory page on a Sherwood Wisdom 2 as unreadable. 2010-07-28 08:36:49 +02:00
Jef Driesen
f4d3747e94 Mark the last memory page on an Oceanic Atom 2 as unreadable.
When trying to read the last memory page from an Oceanic Atom 2, the
device does not respond. Strangely, other compatible devices are not
affected by this problem.
2010-06-23 15:01:51 +02:00
Jef Driesen
4e5c9ad8a3 Remove all debugging code. 2010-05-06 06:21:59 +00:00
Jef Driesen
61f9603131 Autodetect the Oceanic OC1 layout at runtime. 2010-04-27 11:33:41 +00:00
Jef Driesen
e87385850b Use independent settings for the global and logbook pointer modes. 2010-04-27 11:33:29 +00:00
Jef Driesen
b9f7d4e425 Improve the ACK/NAK error recovery to fix more errors. 2010-03-18 09:40:29 +00:00
Jef Driesen
f8ff2852bf Fix the init sequence for Geo 2 devices.
The Geo 2 appears to respond with a single NAK byte instead of three.
The issue is fixed by expecting only a single byte, and flushing the
serial line to discard all other bytes (if there are any).
2010-03-06 11:48:22 +00:00
Jef Driesen
f6d35fa2c2 Add cancellation support.
To be able to cancel an operation, an application should register a
callback function that returns a non-zero value whenever the active
operaton should be cancelled. A backend can invoke this callback function
to query the application for a pending cancellation request.
2010-02-15 13:16:26 +00:00