84 Commits

Author SHA1 Message Date
Jef Driesen
866e636e8c Move the logging code to the examples.
With the application defined logging function, the actual logging is not
performed by the library anymore, and the code belongs in the
applications.
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
4296f974d0 Don't include unnecessary header files.
Due to the use of the convenience functions, the device specific header
files are no longer necessary, and can be replaced with the high-level
header files.
2012-08-27 23:02:44 +02:00
Jef Driesen
4bc477baa2 Update the examples to use the new convenience functions. 2012-06-21 21:42:37 +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
52d8f08281 Enable the model hint to speedup the autodetection. 2012-05-23 21:45:46 +02:00
Jef Driesen
781f0db71f Add support for the Heinrichs Weikamp Frog. 2012-04-28 11:18:16 +02:00
Jef Driesen
fa348c0d04 Rename the example application too. 2011-12-31 09:09:40 +01:00
Jef Driesen
48f6b1eec7 Add a command line parameter to specify the model code. 2011-12-31 07:52:07 +01:00
Jef Driesen
3d78282cde Rename the backend from darwinair to darwin.
The name change makes it more obvious the backend supports both the
Darwin and the Darwin Air, and it's a shorter name too.
2011-12-31 07:51:52 +01:00
Jef Driesen
ca56b5932a Add support for the Mares Darwin.
The Darwin and Darwin Air share a very similar layout, but with a few
differences here and there. Unfortunately, there seems to be no way to
autodetect the exact model during the download. Therefore, an extra
model parameter is added to select the appropriate model manually.
2011-12-31 07:47:43 +01:00
Jef Driesen
b22df8d26c Add the example application for the Dacor Darwin Air. 2011-11-11 16:59:52 +01:00
Jef Driesen
5ef0398c42 Add support for the Dacor Darwin Air. 2011-11-11 11:13:03 +01:00
Jef Driesen
f526cdd3d9 Add support for the Mares Icon HD Net Ready. 2011-09-24 13:49:18 +02:00
Jef Driesen
a10fc9d85e Move duplicated code into a common file. 2011-06-19 14:59:15 +02:00
Jef Driesen
4b887341f3 Add support for the Atomics Cobalt. 2011-03-12 10:31:32 +01:00
Jef Driesen
0d0c654b27 Use the new field api in the example application. 2011-01-13 23:41:55 +01:00
Jef Driesen
1ea4879066 Choose the samplerate based on the model number. 2011-01-13 22:12:45 +01:00
Jef Driesen
2fca7914b6 Implement the foreach and fingerprint support for the Zeagle N2iTiON3. 2010-08-28 22:53:55 +02:00
Jef Driesen
c060f268be Add support for the Zeagle N2iTiON3. 2010-08-28 22:53:48 +02:00
Jef Driesen
87226652df Fix the year offset for some models. 2010-08-09 17:05:01 +02:00
Jef Driesen
aca36ad344 Add a parser for the Mares Icon HD. 2010-06-29 11:42:00 +02:00
Jef Driesen
620775af25 Add support for the Mares Icon HD. 2010-04-12 10:19:38 +02:00
Jef Driesen
b92deee33c Support automatic fingerprint management using a cache directory. 2010-05-03 18:26:41 +00:00
Jef Driesen
6641dda617 Add a parser for the Cressi Edy. 2010-05-03 18:02:43 +00:00
Jef Driesen
fb9976d24f Add a parser for the Heinrichs Weikamp OSTC. 2010-04-19 13:53:38 +00:00
Jef Driesen
0faf2bf815 Use the correct printf format for 64 bit integers. 2010-04-02 13:04:53 +00:00
Jef Driesen
1e7a1b8194 Use the correct freedive mode for each model. 2010-02-26 14:41:25 +00:00
Jef Driesen
1983e2c008 Parse the dive data and output an xml file. 2010-02-16 14:57:52 +00:00
Jef Driesen
ba1bd5d688 Use the userdata parameter to pass the device data back to the caller. 2010-02-16 14:57:37 +00:00
Jef Driesen
ff55a4a82d Use the userdata parameter to pass the dive data to the callback. 2010-02-16 14:57:26 +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
Jef Driesen
82a315ddc5 Add an option to provide fingerprint data. 2010-02-04 10:47:13 +00:00
Jef Driesen
4b590ba5e2 Pass the fingerprint data to the callback function. 2010-02-04 10:46:42 +00:00
Jef Driesen
fab15b19a7 Add a clock synchronization event. 2010-02-01 21:20:30 +00:00
Jef Driesen
ceeee5b2fa Removed the handshake and version functions.
The handshake function is now called internally (even if it doesn't seem
to be required at all), and the version function can be called through
the public api. The format of the version data is changed too.
2010-01-30 21:27:43 +00:00
Jef Driesen
5fa943d685 Added the initial implementation for the Cressi Edy. 2009-11-17 11:02:26 +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
7e6a57bd1c Added the initial implementation for the Heinrichs Weikamp OSTC. 2009-11-12 08:18:16 +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
a4247b7505 Define the WARNING macro only once. 2009-08-06 14:15:52 +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
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
6abfa9792d Added the initial implementation for the Mares Puck. 2009-03-30 20:30:32 +00:00