Merge branch 'cleanup'

This commit is contained in:
Jef Driesen 2017-04-24 13:06:49 +02:00
commit 39a7920083
117 changed files with 799 additions and 1043 deletions

View File

@ -35,20 +35,6 @@
#include <libdivecomputer/descriptor.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/suunto.h>
#include <libdivecomputer/reefnet.h>
#include <libdivecomputer/uwatec.h>
#include <libdivecomputer/oceanic.h>
#include <libdivecomputer/mares.h>
#include <libdivecomputer/hw.h>
#include <libdivecomputer/cressi.h>
#include <libdivecomputer/zeagle.h>
#include <libdivecomputer/atomics.h>
#include <libdivecomputer/shearwater.h>
#include <libdivecomputer/diverite.h>
#include <libdivecomputer/citizen.h>
#include <libdivecomputer/divesystem.h>
#include "dctool.h"
#include "output.h"
#include "common.h"

View File

@ -10,50 +10,16 @@ libdivecomputer_HEADERS = \
parser.h \
datetime.h \
units.h \
suunto.h \
suunto_solution.h \
suunto_eon.h \
suunto_eonsteel.h \
suunto_vyper.h \
suunto_vyper2.h \
suunto_d9.h \
reefnet.h \
reefnet_sensus.h \
reefnet_sensuspro.h \
reefnet_sensusultra.h \
uwatec.h \
uwatec_aladin.h \
uwatec_memomouse.h \
uwatec_smart.h \
uwatec_meridian.h \
oceanic.h \
oceanic_atom2.h \
oceanic_veo250.h \
oceanic_vtpro.h \
mares.h \
mares_nemo.h \
mares_puck.h \
mares_darwin.h \
mares_iconhd.h \
hw.h \
hw_ostc.h \
hw_frog.h \
hw_ostc3.h \
cressi.h \
cressi_edy.h \
cressi_leonardo.h \
zeagle.h \
zeagle_n2ition3.h \
atomics.h \
atomics_cobalt.h \
shearwater.h \
shearwater_petrel.h \
shearwater_predator.h \
diverite.h \
diverite_nitekq.h \
citizen.h \
citizen_aqualand.h \
divesystem.h \
divesystem_idive.h \
cochran.h \
cochran_commander.h
atomics_cobalt.h

View File

@ -19,10 +19,10 @@
* MA 02110-1301 USA
*/
#ifndef ATOMICS_COBALT_H
#define ATOMICS_COBALT_H
#ifndef DC_ATOMICS_COBALT_H
#define DC_ATOMICS_COBALT_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
@ -30,22 +30,16 @@
extern "C" {
#endif /* __cplusplus */
dc_status_t
atomics_cobalt_device_open (dc_device_t **device, dc_context_t *context);
dc_status_t
atomics_cobalt_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
atomics_cobalt_device_set_simulation (dc_device_t *device, unsigned int simulation);
dc_status_t
atomics_cobalt_parser_create (dc_parser_t **parser, dc_context_t *context);
dc_status_t
atomics_cobalt_parser_set_calibration (dc_parser_t *parser, double atmospheric, double hydrostatic);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ATOMICS_COBALT_H */
#endif /* DC_ATOMICS_COBALT_H */

View File

@ -1,27 +0,0 @@
/*
* libdivecomputer
*
* Copyright (C) 2014 Jef Driesen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef CITIZEN_H
#define CITIZEN_H
#include "citizen_aqualand.h"
#endif /* CITIZEN_H */

View File

@ -1,27 +0,0 @@
/*
* libdivecomputer
*
* Copyright (C) 2014 John Van Ostrand
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef COCHRAN_H
#define COCHRAN_H
#include "cochran_commander.h"
#endif /* COCHRAN_H */

View File

@ -1,28 +0,0 @@
/*
* libdivecomputer
*
* Copyright (C) 2009 Jef Driesen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef CRESSI_H
#define CRESSI_H
#include "cressi_edy.h"
#include "cressi_leonardo.h"
#endif /* CRESSI_H */

View File

@ -1,27 +0,0 @@
/*
* libdivecomputer
*
* Copyright (C) 2014 Jef Driesen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef DIVESYSTEM_H
#define DIVESYSTEM_H
#include "divesystem_idive.h"
#endif /* DIVESYSTEM_H */

View File

@ -19,13 +19,12 @@
* MA 02110-1301 USA
*/
#ifndef HW_FROG_H
#define HW_FROG_H
#ifndef DC_HW_FROG_H
#define DC_HW_FROG_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
#include "buffer.h"
#include "datetime.h"
#ifdef __cplusplus
extern "C" {
@ -34,9 +33,6 @@ extern "C" {
#define HW_FROG_DISPLAY_SIZE 15
#define HW_FROG_CUSTOMTEXT_SIZE 13
dc_status_t
hw_frog_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
hw_frog_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
@ -52,4 +48,4 @@ hw_frog_device_customtext (dc_device_t *device, const char *text);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* HW_FROG_H */
#endif /* DC_HW_FROG_H */

View File

@ -19,12 +19,12 @@
* MA 02110-1301 USA
*/
#ifndef HW_OSTC_H
#define HW_OSTC_H
#ifndef DC_HW_OSTC_H
#define DC_HW_OSTC_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
#include "datetime.h"
#include "buffer.h"
#ifdef __cplusplus
@ -40,9 +40,6 @@ typedef enum hw_ostc_format_t {
HW_OSTC_FORMAT_RGB24
} hw_ostc_format_t;
dc_status_t
hw_ostc_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
hw_ostc_device_md2hash (dc_device_t *device, unsigned char data[], unsigned int size);
@ -61,16 +58,10 @@ hw_ostc_device_reset (dc_device_t *device);
dc_status_t
hw_ostc_device_screenshot (dc_device_t *device, dc_buffer_t *buffer, hw_ostc_format_t format);
dc_status_t
hw_ostc_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
hw_ostc_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int hwos);
dc_status_t
hw_ostc_device_fwupdate (dc_device_t *abstract, const char *filename);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* HW_OSTC_H */
#endif /* DC_HW_OSTC_H */

View File

@ -19,13 +19,12 @@
* MA 02110-1301 USA
*/
#ifndef HW_OSTC3_H
#define HW_OSTC3_H
#ifndef DC_HW_OSTC3_H
#define DC_HW_OSTC3_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
#include "buffer.h"
#include "datetime.h"
#ifdef __cplusplus
extern "C" {
@ -34,9 +33,6 @@ extern "C" {
#define HW_OSTC3_DISPLAY_SIZE 16
#define HW_OSTC3_CUSTOMTEXT_SIZE 60
dc_status_t
hw_ostc3_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
hw_ostc3_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
@ -64,10 +60,7 @@ hw_ostc3_device_config_reset (dc_device_t *abstract);
dc_status_t
hw_ostc3_device_fwupdate (dc_device_t *abstract, const char *filename);
dc_status_t
hw_ostc3_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* HW_OSTC3_H */
#endif /* DC_HW_OSTC3_H */

View File

@ -19,33 +19,23 @@
* MA 02110-1301 USA
*/
#ifndef OCEANIC_ATOM2_H
#define OCEANIC_ATOM2_H
#ifndef DC_OCEANIC_ATOM2_H
#define DC_OCEANIC_ATOM2_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
oceanic_atom2_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
oceanic_atom2_device_open2 (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
dc_status_t
oceanic_atom2_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
oceanic_atom2_device_keepalive (dc_device_t *device);
dc_status_t
oceanic_atom2_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* OCEANIC_ATOM2_H */
#endif /* DC_OCEANIC_ATOM2_H */

View File

@ -19,30 +19,23 @@
* MA 02110-1301 USA
*/
#ifndef OCEANIC_VEO250_H
#define OCEANIC_VEO250_H
#ifndef DC_OCEANIC_VEO250_H
#define DC_OCEANIC_VEO250_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
oceanic_veo250_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
oceanic_veo250_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
oceanic_veo250_device_keepalive (dc_device_t *device);
dc_status_t
oceanic_veo250_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* OCEANIC_VEO250_H */
#endif /* DC_OCEANIC_VEO250_H */

View File

@ -19,36 +19,23 @@
* MA 02110-1301 USA
*/
#ifndef OCEANIC_VTPRO_H
#define OCEANIC_VTPRO_H
#ifndef DC_OCEANIC_VTPRO_H
#define DC_OCEANIC_VTPRO_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
oceanic_vtpro_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
oceanic_vtpro_device_open2 (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
dc_status_t
oceanic_vtpro_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
oceanic_vtpro_device_keepalive (dc_device_t *device);
dc_status_t
oceanic_vtpro_parser_create (dc_parser_t **parser, dc_context_t *context);
dc_status_t
oceanic_vtpro_parser_create2 (dc_parser_t **parser, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* OCEANIC_VTPRO_H */
#endif /* DC_OCEANIC_VTPRO_H */

View File

@ -19,10 +19,10 @@
* MA 02110-1301 USA
*/
#ifndef REEFNET_SENSUS_H
#define REEFNET_SENSUS_H
#ifndef DC_REEFNET_SENSUS_H
#define DC_REEFNET_SENSUS_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
@ -32,22 +32,13 @@ extern "C" {
#define REEFNET_SENSUS_HANDSHAKE_SIZE 10
dc_status_t
reefnet_sensus_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
reefnet_sensus_device_get_handshake (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
reefnet_sensus_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
reefnet_sensus_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
dc_status_t
reefnet_sensus_parser_set_calibration (dc_parser_t *parser, double atmospheric, double hydrostatic);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* REEFNET_SENSUS_H */
#endif /* DC_REEFNET_SENSUS_H */

View File

@ -19,10 +19,10 @@
* MA 02110-1301 USA
*/
#ifndef REEFNET_SENSUSPRO_H
#define REEFNET_SENSUSPRO_H
#ifndef DC_REEFNET_SENSUSPRO_H
#define DC_REEFNET_SENSUSPRO_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
@ -32,25 +32,16 @@ extern "C" {
#define REEFNET_SENSUSPRO_HANDSHAKE_SIZE 10
dc_status_t
reefnet_sensuspro_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
reefnet_sensuspro_device_get_handshake (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
reefnet_sensuspro_device_write_interval (dc_device_t *device, unsigned char interval);
dc_status_t
reefnet_sensuspro_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
reefnet_sensuspro_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
dc_status_t
reefnet_sensuspro_parser_set_calibration (dc_parser_t *parser, double atmospheric, double hydrostatic);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* REEFNET_SENSUSPRO_H */
#endif /* DC_REEFNET_SENSUSPRO_H */

View File

@ -19,10 +19,10 @@
* MA 02110-1301 USA
*/
#ifndef REEFNET_SENSUSULTRA_H
#define REEFNET_SENSUSULTRA_H
#ifndef DC_REEFNET_SENSUSULTRA_H
#define DC_REEFNET_SENSUSULTRA_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
@ -41,9 +41,6 @@ typedef enum reefnet_sensusultra_parameter_t {
REEFNET_SENSUSULTRA_PARAMETER_AVERAGING
} reefnet_sensusultra_parameter_t;
dc_status_t
reefnet_sensusultra_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
reefnet_sensusultra_device_get_handshake (dc_device_t *device, unsigned char data[], unsigned int size);
@ -59,16 +56,10 @@ reefnet_sensusultra_device_write_parameter (dc_device_t *device, reefnet_sensusu
dc_status_t
reefnet_sensusultra_device_sense (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
reefnet_sensusultra_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
reefnet_sensusultra_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
dc_status_t
reefnet_sensusultra_parser_set_calibration (dc_parser_t *parser, double atmospheric, double hydrostatic);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* REEFNET_SENSUSULTRA_H */
#endif /* DC_REEFNET_SENSUSULTRA_H */

View File

@ -19,12 +19,11 @@
* MA 02110-1301 USA
*/
#ifndef SUUNTO_D9_H
#define SUUNTO_D9_H
#ifndef DC_SUUNTO_D9_H
#define DC_SUUNTO_D9_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
#ifdef __cplusplus
extern "C" {
@ -32,19 +31,13 @@ extern "C" {
#define SUUNTO_D9_VERSION_SIZE 0x04
dc_status_t
suunto_d9_device_open (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
dc_status_t
suunto_d9_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
suunto_d9_device_reset_maxdepth (dc_device_t *device);
dc_status_t
suunto_d9_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SUUNTO_D9_H */
#endif /* DC_SUUNTO_D9_H */

View File

@ -19,12 +19,11 @@
* MA 02110-1301 USA
*/
#ifndef SUUNTO_EON_H
#define SUUNTO_EON_H
#ifndef DC_SUUNTO_EON_H
#define DC_SUUNTO_EON_H
#include "context.h"
#include "common.h"
#include "device.h"
#include "parser.h"
#ifdef __cplusplus
extern "C" {
@ -32,22 +31,13 @@ extern "C" {
#define SUUNTO_EON_NAME_SIZE 20
dc_status_t
suunto_eon_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
suunto_eon_device_write_name (dc_device_t *device, unsigned char data[], unsigned int size);
dc_status_t
suunto_eon_device_write_interval (dc_device_t *device, unsigned char interval);
dc_status_t
suunto_eon_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
suunto_eon_parser_create (dc_parser_t **parser, dc_context_t *context, int spyder);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SUUNTO_EON_H */
#endif /* DC_SUUNTO_EON_H */

View File

@ -19,21 +19,18 @@
* MA 02110-1301 USA
*/
#ifndef SUUNTO_VYPER2_H
#define SUUNTO_VYPER2_H
#ifndef DC_SUUNTO_VYPER2_H
#define DC_SUUNTO_VYPER2_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include "context.h"
#include "common.h"
#include "device.h"
#define SUUNTO_VYPER2_VERSION_SIZE 0x04
dc_status_t
suunto_vyper2_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
suunto_vyper2_device_version (dc_device_t *device, unsigned char data[], unsigned int size);
@ -43,4 +40,4 @@ suunto_vyper2_device_reset_maxdepth (dc_device_t *device);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SUUNTO_VYPER2_H */
#endif /* DC_SUUNTO_VYPER2_H */

View File

@ -1,30 +0,0 @@
/*
* libdivecomputer
*
* Copyright (C) 2008 Jef Driesen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef UWATEC_H
#define UWATEC_H
#include "uwatec_aladin.h"
#include "uwatec_memomouse.h"
#include "uwatec_smart.h"
#include "uwatec_meridian.h"
#endif /* UWATEC_H */

View File

@ -1,27 +0,0 @@
/*
* libdivecomputer
*
* Copyright (C) 2010 Jef Driesen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef ZEAGLE_H
#define ZEAGLE_H
#include "zeagle_n2ition3.h"
#endif /* CRESSI_H */

View File

@ -517,7 +517,7 @@
>
</File>
<File
RelativePath="..\include\libdivecomputer\atomics.h"
RelativePath="..\src\atomics_cobalt.h"
>
</File>
<File
@ -533,19 +533,11 @@
>
</File>
<File
RelativePath="..\include\libdivecomputer\citizen.h"
RelativePath="..\src\citizen_aqualand.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\citizen_aqualand.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\cochran.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\cochran_commander.h"
RelativePath="..\src\cochran_commander.h"
>
</File>
<File
@ -561,15 +553,11 @@
>
</File>
<File
RelativePath="..\include\libdivecomputer\cressi.h"
RelativePath="..\src\cressi_edy.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\cressi_edy.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\cressi_leonardo.h"
RelativePath="..\src\cressi_leonardo.h"
>
</File>
<File
@ -589,33 +577,33 @@
>
</File>
<File
RelativePath="..\include\libdivecomputer\diverite.h"
RelativePath="..\src\diverite_nitekq.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\diverite_nitekq.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\divesystem.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\divesystem_idive.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\hw.h"
RelativePath="..\src\divesystem_idive.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\hw_frog.h"
>
</File>
<File
RelativePath="..\src\hw_frog.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\hw_ostc.h"
>
</File>
<File
RelativePath="..\src\hw_ostc.h"
>
</File>
<File
RelativePath="..\src\hw_ostc3.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\hw_ostc3.h"
>
@ -629,11 +617,11 @@
>
</File>
<File
RelativePath="..\include\libdivecomputer\iterator.h"
RelativePath="..\src\iterator-private.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\mares.h"
RelativePath="..\include\libdivecomputer\iterator.h"
>
</File>
<File
@ -641,23 +629,23 @@
>
</File>
<File
RelativePath="..\include\libdivecomputer\mares_darwin.h"
RelativePath="..\src\mares_darwin.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\mares_iconhd.h"
RelativePath="..\src\mares_iconhd.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\mares_nemo.h"
RelativePath="..\src\mares_nemo.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\mares_puck.h"
RelativePath="..\src\mares_puck.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\oceanic.h"
RelativePath="..\src\oceanic_atom2.h"
>
</File>
<File
@ -668,10 +656,18 @@
RelativePath="..\src\oceanic_common.h"
>
</File>
<File
RelativePath="..\src\oceanic_veo250.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\oceanic_veo250.h"
>
</File>
<File
RelativePath="..\src\oceanic_vtpro.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\oceanic_vtpro.h"
>
@ -689,13 +685,17 @@
>
</File>
<File
RelativePath="..\include\libdivecomputer\reefnet.h"
RelativePath="..\src\reefnet_sensus.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\reefnet_sensus.h"
>
</File>
<File
RelativePath="..\src\reefnet_sensuspro.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\reefnet_sensuspro.h"
>
@ -704,6 +704,14 @@
RelativePath="..\include\libdivecomputer\reefnet_sensusultra.h"
>
</File>
<File
RelativePath="..\src\reefnet_sensusultra.h"
>
</File>
<File
RelativePath="..\src\revision.h"
>
</File>
<File
RelativePath="..\src\ringbuffer.h"
>
@ -712,24 +720,16 @@
RelativePath="..\src\serial.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\shearwater.h"
>
</File>
<File
RelativePath="..\src\shearwater_common.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\shearwater_petrel.h"
RelativePath="..\src\shearwater_petrel.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\shearwater_predator.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\suunto.h"
RelativePath="..\src\shearwater_predator.h"
>
</File>
<File
@ -744,22 +744,38 @@
RelativePath="..\include\libdivecomputer\suunto_d9.h"
>
</File>
<File
RelativePath="..\src\suunto_d9.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\suunto_eon.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\suunto_solution.h"
RelativePath="..\src\suunto_eon.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\suunto_vyper.h"
RelativePath="..\src\suunto_eonsteel.h"
>
</File>
<File
RelativePath="..\src\suunto_solution.h"
>
</File>
<File
RelativePath="..\src\suunto_vyper.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\suunto_vyper2.h"
>
</File>
<File
RelativePath="..\src\suunto_vyper2.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\units.h"
>
@ -769,23 +785,19 @@
>
</File>
<File
RelativePath="..\include\libdivecomputer\uwatec.h"
RelativePath="..\src\uwatec_aladin.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\uwatec_aladin.h"
RelativePath="..\src\uwatec_memomouse.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\uwatec_memomouse.h"
RelativePath="..\src\uwatec_meridian.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\uwatec_meridian.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\uwatec_smart.h"
RelativePath="..\src\uwatec_smart.h"
>
</File>
<File
@ -793,11 +805,7 @@
>
</File>
<File
RelativePath="..\include\libdivecomputer\zeagle.h"
>
</File>
<File
RelativePath="..\include\libdivecomputer\zeagle_n2ition3.h"
RelativePath="..\src\zeagle_n2ition3.h"
>
</File>
</Filter>

View File

@ -24,50 +24,49 @@ libdivecomputer_la_SOURCES = \
datetime.c \
suunto_common.h suunto_common.c \
suunto_common2.h suunto_common2.c \
suunto_solution.c suunto_solution_parser.c \
suunto_eon.c suunto_eon_parser.c \
suunto_vyper.c suunto_vyper_parser.c \
suunto_vyper2.c \
suunto_d9.c suunto_d9_parser.c \
suunto_eonsteel.c suunto_eonsteel_parser.c \
reefnet_sensus.c reefnet_sensus_parser.c \
reefnet_sensuspro.c reefnet_sensuspro_parser.c \
reefnet_sensusultra.c reefnet_sensusultra_parser.c \
uwatec_aladin.c \
uwatec_memomouse.c uwatec_memomouse_parser.c \
uwatec_smart.c uwatec_smart_parser.c \
uwatec_meridian.c \
suunto_solution.h suunto_solution.c suunto_solution_parser.c \
suunto_eon.h suunto_eon.c suunto_eon_parser.c \
suunto_vyper.h suunto_vyper.c suunto_vyper_parser.c \
suunto_vyper2.h suunto_vyper2.c \
suunto_d9.h suunto_d9.c suunto_d9_parser.c \
suunto_eonsteel.h suunto_eonsteel.c suunto_eonsteel_parser.c \
reefnet_sensus.h reefnet_sensus.c reefnet_sensus_parser.c \
reefnet_sensuspro.h reefnet_sensuspro.c reefnet_sensuspro_parser.c \
reefnet_sensusultra.h reefnet_sensusultra.c reefnet_sensusultra_parser.c \
uwatec_aladin.h uwatec_aladin.c \
uwatec_memomouse.h uwatec_memomouse.c uwatec_memomouse_parser.c \
uwatec_smart.h uwatec_smart.c uwatec_smart_parser.c \
uwatec_meridian.h uwatec_meridian.c \
oceanic_common.h oceanic_common.c \
oceanic_atom2.c oceanic_atom2_parser.c \
oceanic_veo250.c oceanic_veo250_parser.c \
oceanic_vtpro.c oceanic_vtpro_parser.c \
oceanic_atom2.h oceanic_atom2.c oceanic_atom2_parser.c \
oceanic_veo250.h oceanic_veo250.c oceanic_veo250_parser.c \
oceanic_vtpro.h oceanic_vtpro.c oceanic_vtpro_parser.c \
mares_common.h mares_common.c \
mares_nemo.c mares_nemo_parser.c \
mares_puck.c \
mares_darwin.c mares_darwin_parser.c \
mares_iconhd.c mares_iconhd_parser.c \
mares_nemo.h mares_nemo.c mares_nemo_parser.c \
mares_puck.h mares_puck.c \
mares_darwin.h mares_darwin.c mares_darwin_parser.c \
mares_iconhd.h mares_iconhd.c mares_iconhd_parser.c \
ihex.h ihex.c \
hw_ostc.c hw_ostc_parser.c \
hw_frog.c \
hw_ostc.h hw_ostc.c hw_ostc_parser.c \
hw_frog.h hw_frog.c \
hw_ostc3.h hw_ostc3.c \
aes.h aes.c \
hw_ostc3.c \
cressi_edy.c cressi_edy_parser.c \
cressi_leonardo.c cressi_leonardo_parser.c \
zeagle_n2ition3.c \
atomics_cobalt.c atomics_cobalt_parser.c \
cressi_edy.h cressi_edy.c cressi_edy_parser.c \
cressi_leonardo.h cressi_leonardo.c cressi_leonardo_parser.c \
zeagle_n2ition3.h zeagle_n2ition3.c \
atomics_cobalt.h atomics_cobalt.c atomics_cobalt_parser.c \
shearwater_common.h shearwater_common.c \
shearwater_predator.c shearwater_predator_parser.c \
shearwater_petrel.c \
diverite_nitekq.c diverite_nitekq_parser.c \
citizen_aqualand.c citizen_aqualand_parser.c \
divesystem_idive.c divesystem_idive_parser.c \
shearwater_predator.h shearwater_predator.c shearwater_predator_parser.c \
shearwater_petrel.h shearwater_petrel.c \
diverite_nitekq.h diverite_nitekq.c diverite_nitekq_parser.c \
citizen_aqualand.h citizen_aqualand.c citizen_aqualand_parser.c \
divesystem_idive.h divesystem_idive.c divesystem_idive_parser.c \
ringbuffer.h ringbuffer.c \
rbstream.h rbstream.c \
checksum.h checksum.c \
array.h array.c \
buffer.c \
cochran_commander.c \
cochran_commander_parser.c
cochran_commander.h cochran_commander.c cochran_commander_parser.c
if OS_WIN32
libdivecomputer_la_SOURCES += serial.h serial_win32.c

View File

@ -33,8 +33,7 @@
#include <libusb-1.0/libusb.h>
#endif
#include <libdivecomputer/atomics_cobalt.h>
#include "atomics_cobalt.h"
#include "context-private.h"
#include "device-private.h"
#include "checksum.h"

View File

@ -19,9 +19,25 @@
* MA 02110-1301 USA
*/
#ifndef ATOMICS_H
#define ATOMICS_H
#ifndef ATOMICS_COBALT_H
#define ATOMICS_COBALT_H
#include "atomics_cobalt.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/atomics_cobalt.h>
#endif /* ATOMICS_H */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
atomics_cobalt_device_open (dc_device_t **device, dc_context_t *context);
dc_status_t
atomics_cobalt_parser_create (dc_parser_t **parser, dc_context_t *context);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ATOMICS_COBALT_H */

View File

@ -21,9 +21,9 @@
#include <stdlib.h>
#include <libdivecomputer/atomics_cobalt.h>
#include <libdivecomputer/units.h>
#include "atomics_cobalt.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -22,8 +22,7 @@
#include <string.h> // memcmp, memcpy
#include <stdlib.h> // malloc, free
#include <libdivecomputer/citizen_aqualand.h>
#include "citizen_aqualand.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"

View File

@ -22,9 +22,9 @@
#ifndef CITIZEN_AQUALAND_H
#define CITIZEN_AQUALAND_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {

View File

@ -21,9 +21,9 @@
#include <stdlib.h>
#include <libdivecomputer/citizen_aqualand.h>
#include <libdivecomputer/units.h>
#include "citizen_aqualand.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -23,8 +23,7 @@
#include <stdlib.h> // malloc, free
#include <assert.h> // assert
#include <libdivecomputer/cochran.h>
#include "cochran_commander.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"

View File

@ -22,9 +22,9 @@
#ifndef COCHRAN_COMMANDER_H
#define COCHRAN_COMMANDER_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {

View File

@ -23,8 +23,8 @@
#include <math.h>
#include <libdivecomputer/units.h>
#include <libdivecomputer/cochran.h>
#include "cochran_commander.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -23,8 +23,7 @@
#include <stdlib.h> // malloc, free
#include <assert.h> // assert
#include <libdivecomputer/cressi_edy.h>
#include "cressi_edy.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"

View File

@ -22,9 +22,9 @@
#ifndef CRESSI_EDY_H
#define CRESSI_EDY_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {

View File

@ -21,8 +21,7 @@
#include <stdlib.h>
#include <libdivecomputer/cressi_edy.h>
#include "cressi_edy.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -23,8 +23,7 @@
#include <stdlib.h> // malloc, free
#include <assert.h> // assert
#include <libdivecomputer/cressi_leonardo.h>
#include "cressi_leonardo.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
@ -71,6 +70,9 @@ static const dc_device_vtable_t cressi_leonardo_device_vtable = {
cressi_leonardo_device_close /* close */
};
static dc_status_t
cressi_leonardo_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
static void
cressi_leonardo_make_ascii (const unsigned char raw[], unsigned int rsize, unsigned char ascii[], unsigned int asize)
{
@ -434,7 +436,7 @@ cressi_leonardo_device_foreach (dc_device_t *abstract, dc_dive_callback_t callba
return rc;
}
dc_status_t
static dc_status_t
cressi_leonardo_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
cressi_leonardo_device_t *device = (cressi_leonardo_device_t *) abstract;

View File

@ -22,9 +22,9 @@
#ifndef CRESSI_LEONARDO_H
#define CRESSI_LEONARDO_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {
@ -34,13 +34,7 @@ dc_status_t
cressi_leonardo_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
cressi_leonardo_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
cressi_leonardo_parser_create (dc_parser_t **parser, dc_context_t *context);
dc_status_t
cressi_leonardo_parser_create2 (dc_parser_t **parser, dc_context_t *context, unsigned int model);
cressi_leonardo_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}

View File

@ -21,8 +21,7 @@
#include <stdlib.h>
#include <libdivecomputer/cressi_leonardo.h>
#include "cressi_leonardo.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
@ -57,7 +56,7 @@ static const dc_parser_vtable_t cressi_leonardo_parser_vtable = {
dc_status_t
cressi_leonardo_parser_create2 (dc_parser_t **out, dc_context_t *context, unsigned int model)
cressi_leonardo_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int model)
{
cressi_leonardo_parser_t *parser = NULL;
@ -79,13 +78,6 @@ cressi_leonardo_parser_create2 (dc_parser_t **out, dc_context_t *context, unsign
}
dc_status_t
cressi_leonardo_parser_create (dc_parser_t **parser, dc_context_t *context)
{
return cressi_leonardo_parser_create2 (parser, context, 0);
}
static dc_status_t
cressi_leonardo_parser_set_data (dc_parser_t *abstract, const unsigned char *data, unsigned int size)
{

View File

@ -23,20 +23,39 @@
#include <stdlib.h>
#include <string.h>
#include <libdivecomputer/suunto.h>
#include <libdivecomputer/reefnet.h>
#include <libdivecomputer/uwatec.h>
#include <libdivecomputer/oceanic.h>
#include <libdivecomputer/mares.h>
#include <libdivecomputer/hw.h>
#include <libdivecomputer/cressi.h>
#include <libdivecomputer/zeagle.h>
#include <libdivecomputer/atomics.h>
#include <libdivecomputer/shearwater.h>
#include <libdivecomputer/diverite.h>
#include <libdivecomputer/citizen.h>
#include <libdivecomputer/divesystem.h>
#include <libdivecomputer/cochran.h>
#include "suunto_d9.h"
#include "suunto_eon.h"
#include "suunto_eonsteel.h"
#include "suunto_solution.h"
#include "suunto_vyper2.h"
#include "suunto_vyper.h"
#include "reefnet_sensus.h"
#include "reefnet_sensuspro.h"
#include "reefnet_sensusultra.h"
#include "uwatec_aladin.h"
#include "uwatec_memomouse.h"
#include "uwatec_meridian.h"
#include "uwatec_smart.h"
#include "oceanic_atom2.h"
#include "oceanic_veo250.h"
#include "oceanic_vtpro.h"
#include "mares_darwin.h"
#include "mares_iconhd.h"
#include "mares_nemo.h"
#include "mares_puck.h"
#include "hw_frog.h"
#include "hw_ostc.h"
#include "hw_ostc3.h"
#include "cressi_edy.h"
#include "cressi_leonardo.h"
#include "zeagle_n2ition3.h"
#include "atomics_cobalt.h"
#include "shearwater_petrel.h"
#include "shearwater_predator.h"
#include "diverite_nitekq.h"
#include "citizen_aqualand.h"
#include "divesystem_idive.h"
#include "cochran_commander.h"
#include "device-private.h"
#include "context-private.h"
@ -105,7 +124,7 @@ dc_device_open (dc_device_t **out, dc_context_t *context, dc_descriptor_t *descr
rc = suunto_d9_device_open (&device, context, name, dc_descriptor_get_model (descriptor));
break;
case DC_FAMILY_SUUNTO_EONSTEEL:
rc = suunto_eonsteel_device_open (&device, context, name, dc_descriptor_get_model (descriptor));
rc = suunto_eonsteel_device_open (&device, context);
break;
case DC_FAMILY_UWATEC_ALADIN:
rc = uwatec_aladin_device_open (&device, context, name);
@ -129,13 +148,13 @@ dc_device_open (dc_device_t **out, dc_context_t *context, dc_descriptor_t *descr
rc = reefnet_sensusultra_device_open (&device, context, name);
break;
case DC_FAMILY_OCEANIC_VTPRO:
rc = oceanic_vtpro_device_open2 (&device, context, name, dc_descriptor_get_model (descriptor));
rc = oceanic_vtpro_device_open (&device, context, name, dc_descriptor_get_model (descriptor));
break;
case DC_FAMILY_OCEANIC_VEO250:
rc = oceanic_veo250_device_open (&device, context, name);
break;
case DC_FAMILY_OCEANIC_ATOM2:
rc = oceanic_atom2_device_open2 (&device, context, name, dc_descriptor_get_model (descriptor));
rc = oceanic_atom2_device_open (&device, context, name, dc_descriptor_get_model (descriptor));
break;
case DC_FAMILY_MARES_NEMO:
rc = mares_nemo_device_open (&device, context, name);
@ -147,7 +166,7 @@ dc_device_open (dc_device_t **out, dc_context_t *context, dc_descriptor_t *descr
rc = mares_darwin_device_open (&device, context, name, dc_descriptor_get_model (descriptor));
break;
case DC_FAMILY_MARES_ICONHD:
rc = mares_iconhd_device_open (&device, context, name, dc_descriptor_get_model (descriptor));
rc = mares_iconhd_device_open (&device, context, name);
break;
case DC_FAMILY_HW_OSTC:
rc = hw_ostc_device_open (&device, context, name);
@ -183,7 +202,7 @@ dc_device_open (dc_device_t **out, dc_context_t *context, dc_descriptor_t *descr
rc = citizen_aqualand_device_open (&device, context, name);
break;
case DC_FAMILY_DIVESYSTEM_IDIVE:
rc = divesystem_idive_device_open2 (&device, context, name, dc_descriptor_get_model (descriptor));
rc = divesystem_idive_device_open (&device, context, name, dc_descriptor_get_model (descriptor));
break;
case DC_FAMILY_COCHRAN_COMMANDER:
rc = cochran_commander_device_open (&device, context, name);

View File

@ -23,8 +23,7 @@
#include <string.h>
#include <assert.h>
#include <libdivecomputer/diverite_nitekq.h>
#include "diverite_nitekq.h"
#include "context-private.h"
#include "device-private.h"
#include "checksum.h"
@ -73,6 +72,8 @@ static const dc_device_vtable_t diverite_nitekq_device_vtable = {
diverite_nitekq_device_close /* close */
};
static dc_status_t
diverite_nitekq_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
static dc_status_t
diverite_nitekq_send (diverite_nitekq_device_t *device, unsigned char cmd)
@ -353,7 +354,7 @@ diverite_nitekq_device_foreach (dc_device_t *abstract, dc_dive_callback_t callba
}
dc_status_t
static dc_status_t
diverite_nitekq_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
diverite_nitekq_device_t *device = (diverite_nitekq_device_t *) abstract;

View File

@ -22,9 +22,9 @@
#ifndef DIVERITE_NITEKQ_H
#define DIVERITE_NITEKQ_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {
@ -33,9 +33,6 @@ extern "C" {
dc_status_t
diverite_nitekq_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
diverite_nitekq_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
diverite_nitekq_parser_create (dc_parser_t **parser, dc_context_t *context);

View File

@ -22,8 +22,8 @@
#include <stdlib.h>
#include <libdivecomputer/units.h>
#include <libdivecomputer/diverite_nitekq.h>
#include "diverite_nitekq.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -22,8 +22,7 @@
#include <string.h> // memcmp, memcpy
#include <stdlib.h> // malloc, free
#include <libdivecomputer/divesystem_idive.h>
#include "divesystem_idive.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
@ -97,14 +96,7 @@ static const divesystem_idive_commands_t ix3m = {
};
dc_status_t
divesystem_idive_device_open (dc_device_t **out, dc_context_t *context, const char *name)
{
return divesystem_idive_device_open2 (out, context, name, 0);
}
dc_status_t
divesystem_idive_device_open2 (dc_device_t **out, dc_context_t *context, const char *name, unsigned int model)
divesystem_idive_device_open (dc_device_t **out, dc_context_t *context, const char *name, unsigned int model)
{
dc_status_t status = DC_STATUS_SUCCESS;
divesystem_idive_device_t *device = NULL;

View File

@ -22,25 +22,19 @@
#ifndef DIVESYSTEM_IDIVE_H
#define DIVESYSTEM_IDIVE_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
divesystem_idive_device_open (dc_device_t **device, dc_context_t *context, const char *name);
divesystem_idive_device_open (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
dc_status_t
divesystem_idive_device_open2 (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
dc_status_t
divesystem_idive_parser_create (dc_parser_t **parser, dc_context_t *context);
dc_status_t
divesystem_idive_parser_create2 (dc_parser_t **parser, dc_context_t *context, unsigned int model);
divesystem_idive_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}

View File

@ -21,8 +21,7 @@
#include <stdlib.h>
#include <libdivecomputer/divesystem_idive.h>
#include "divesystem_idive.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"
@ -83,14 +82,7 @@ static const dc_parser_vtable_t divesystem_idive_parser_vtable = {
dc_status_t
divesystem_idive_parser_create (dc_parser_t **out, dc_context_t *context)
{
return divesystem_idive_parser_create2 (out, context, 0);
}
dc_status_t
divesystem_idive_parser_create2 (dc_parser_t **out, dc_context_t *context, unsigned int model)
divesystem_idive_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int model)
{
divesystem_idive_parser_t *parser = NULL;

View File

@ -22,8 +22,7 @@
#include <string.h> // memcmp, memcpy
#include <stdlib.h> // malloc, free
#include <libdivecomputer/hw_frog.h>
#include "hw_frog.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"

View File

@ -19,10 +19,22 @@
* MA 02110-1301 USA
*/
#ifndef SHEARWATER_H
#define SHEARWATER_H
#ifndef HW_FROG_H
#define HW_FROG_H
#include "shearwater_predator.h"
#include "shearwater_petrel.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/hw_frog.h>
#endif /* SHEARWATER_H */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
hw_frog_device_open (dc_device_t **device, dc_context_t *context, const char *name);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* HW_FROG_H */

View File

@ -22,8 +22,7 @@
#include <string.h> // memcmp, memcpy
#include <stdlib.h> // malloc, free
#include <libdivecomputer/hw_ostc.h>
#include "hw_ostc.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
@ -84,6 +83,8 @@ static const dc_device_vtable_t hw_ostc_device_vtable = {
hw_ostc_device_close /* close */
};
static dc_status_t
hw_ostc_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
static dc_status_t
hw_ostc_send (hw_ostc_device_t *device, unsigned char cmd, unsigned int echo)
@ -633,7 +634,7 @@ hw_ostc_device_screenshot (dc_device_t *abstract, dc_buffer_t *buffer, hw_ostc_f
}
dc_status_t
static dc_status_t
hw_ostc_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
hw_ostc_device_t *device = (hw_ostc_device_t *) abstract;

View File

@ -19,11 +19,25 @@
* MA 02110-1301 USA
*/
#ifndef HW_H
#define HW_H
#ifndef HW_OSTC_H
#define HW_OSTC_H
#include "hw_ostc.h"
#include "hw_frog.h"
#include "hw_ostc3.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/hw_ostc.h>
#endif /* HW_H */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
hw_ostc_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
hw_ostc_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int hwos);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* HW_OSTC_H */

View File

@ -24,8 +24,7 @@
#include <stdlib.h> // malloc, free
#include <stdio.h> // FILE, fopen
#include <libdivecomputer/hw_ostc3.h>
#include "hw_ostc3.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"

View File

@ -19,9 +19,25 @@
* MA 02110-1301 USA
*/
#ifndef DIVERITE_H
#define DIVERITE_H
#ifndef HW_OSTC3_H
#define HW_OSTC3_H
#include "diverite_nitekq.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/hw_ostc3.h>
#endif /* DIVERITE_H */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
hw_ostc3_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
hw_ostc3_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* HW_OSTC3_H */

View File

@ -21,10 +21,10 @@
#include <stdlib.h>
#include <libdivecomputer/hw_ostc.h>
#include <libdivecomputer/hw_ostc3.h>
#include "libdivecomputer/units.h"
#include "hw_ostc.h"
#include "hw_ostc3.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -42,40 +42,10 @@ dc_parser_get_field
dc_parser_samples_foreach
dc_parser_destroy
reefnet_sensus_parser_create
reefnet_sensus_parser_set_calibration
reefnet_sensuspro_parser_create
reefnet_sensuspro_parser_set_calibration
reefnet_sensusultra_parser_create
reefnet_sensusultra_parser_set_calibration
uwatec_memomouse_parser_create
uwatec_smart_parser_create
suunto_vyper_parser_create
suunto_solution_parser_create
suunto_eon_parser_create
suunto_d9_parser_create
suunto_eonsteel_parser_create
mares_nemo_parser_create
mares_darwin_parser_create
mares_iconhd_parser_create
oceanic_vtpro_parser_create
oceanic_vtpro_parser_create2
oceanic_veo250_parser_create
oceanic_atom2_parser_create
hw_ostc_parser_create
hw_ostc3_parser_create
cressi_edy_parser_create
cressi_leonardo_parser_create
cressi_leonardo_parser_create2
atomics_cobalt_parser_create
atomics_cobalt_parser_set_calibration
shearwater_predator_parser_create
shearwater_petrel_parser_create
diverite_nitekq_parser_create
citizen_aqualand_parser_create
divesystem_idive_parser_create
divesystem_idive_parser_create2
cochran_commander_parser_create
dc_device_open
dc_device_close
@ -88,79 +58,37 @@ dc_device_set_events
dc_device_set_fingerprint
dc_device_write
cressi_edy_device_open
cressi_leonardo_device_open
mares_nemo_device_open
mares_nemo_extract_dives
mares_puck_device_open
mares_puck_extract_dives
mares_darwin_device_open
mares_darwin_extract_dives
mares_iconhd_device_open
oceanic_atom2_device_open
oceanic_atom2_device_open2
oceanic_atom2_device_version
oceanic_atom2_device_keepalive
oceanic_veo250_device_open
oceanic_veo250_device_version
oceanic_veo250_device_keepalive
oceanic_vtpro_device_open
oceanic_vtpro_device_open2
oceanic_vtpro_device_version
oceanic_vtpro_device_keepalive
reefnet_sensus_device_open
reefnet_sensus_device_get_handshake
reefnet_sensus_extract_dives
reefnet_sensuspro_device_open
reefnet_sensuspro_device_get_handshake
reefnet_sensuspro_device_write_interval
reefnet_sensuspro_extract_dives
reefnet_sensusultra_device_open
reefnet_sensusultra_device_read_user
reefnet_sensusultra_device_sense
reefnet_sensusultra_device_get_handshake
reefnet_sensusultra_device_write_parameter
reefnet_sensusultra_device_write_user
reefnet_sensusultra_extract_dives
suunto_d9_device_open
suunto_d9_device_version
suunto_d9_device_reset_maxdepth
suunto_solution_device_open
suunto_solution_extract_dives
suunto_eon_device_open
suunto_eon_device_write_interval
suunto_eon_device_write_name
suunto_eon_extract_dives
suunto_vyper2_device_open
suunto_vyper2_device_version
suunto_vyper2_device_reset_maxdepth
suunto_vyper_device_open
suunto_vyper_device_read_dive
suunto_vyper_extract_dives
suunto_eonsteel_device_open
uwatec_aladin_device_open
uwatec_aladin_extract_dives
uwatec_memomouse_device_open
uwatec_memomouse_extract_dives
uwatec_smart_device_open
uwatec_smart_extract_dives
uwatec_meridian_device_open
uwatec_meridian_extract_dives
hw_ostc_device_open
hw_ostc_device_md2hash
hw_ostc_device_clock
hw_ostc_device_eeprom_read
hw_ostc_device_eeprom_write
hw_ostc_device_reset
hw_ostc_device_screenshot
hw_ostc_extract_dives
hw_ostc_device_fwupdate
hw_frog_device_open
hw_frog_device_version
hw_frog_device_clock
hw_frog_device_display
hw_frog_device_customtext
hw_ostc3_device_open
hw_ostc3_device_version
hw_ostc3_device_hardware
hw_ostc3_device_clock
@ -170,16 +98,5 @@ hw_ostc3_device_config_read
hw_ostc3_device_config_write
hw_ostc3_device_config_reset
hw_ostc3_device_fwupdate
zeagle_n2ition3_device_open
atomics_cobalt_device_open
atomics_cobalt_device_version
atomics_cobalt_device_set_simulation
shearwater_predator_device_open
shearwater_predator_extract_dives
shearwater_petrel_device_open
diverite_nitekq_device_open
diverite_nitekq_extract_dives
citizen_aqualand_device_open
divesystem_idive_device_open
divesystem_idive_device_open2
cochran_commander_device_open

View File

@ -23,12 +23,12 @@
#include <string.h>
#include <assert.h>
#include <libdivecomputer/mares_darwin.h>
#include <libdivecomputer/units.h>
#include "mares_darwin.h"
#include "mares_common.h"
#include "context-private.h"
#include "device-private.h"
#include "mares_common.h"
#include "array.h"
#define ISINSTANCE(device) dc_device_isinstance((device), &mares_darwin_device_vtable)
@ -93,6 +93,8 @@ static const mares_darwin_layout_t mares_darwinair_layout = {
3 /* samplesize */
};
static dc_status_t
mares_darwin_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
mares_darwin_device_open (dc_device_t **out, dc_context_t *context, const char *name, unsigned int model)
@ -262,7 +264,7 @@ mares_darwin_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback,
}
dc_status_t
static dc_status_t
mares_darwin_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
mares_darwin_device_t *device = (mares_darwin_device_t *) abstract;

View File

@ -22,9 +22,9 @@
#ifndef MARES_DARWIN_H
#define MARES_DARWIN_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {
@ -33,9 +33,6 @@ extern "C" {
dc_status_t
mares_darwin_device_open (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
dc_status_t
mares_darwin_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
mares_darwin_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);

View File

@ -22,9 +22,9 @@
#include <stdlib.h>
#include <string.h>
#include <libdivecomputer/mares_darwin.h>
#include <libdivecomputer/units.h>
#include "mares_darwin.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -23,8 +23,7 @@
#include <stdlib.h> // malloc, free
#include <assert.h> // assert
#include <libdivecomputer/mares_iconhd.h>
#include "mares_iconhd.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
@ -210,7 +209,7 @@ mares_iconhd_transfer (mares_iconhd_device_t *device,
dc_status_t
mares_iconhd_device_open (dc_device_t **out, dc_context_t *context, const char *name, unsigned int model)
mares_iconhd_device_open (dc_device_t **out, dc_context_t *context, const char *name)
{
dc_status_t status = DC_STATUS_SUCCESS;
mares_iconhd_device_t *device = NULL;

View File

@ -22,16 +22,16 @@
#ifndef MARES_ICONHD_H
#define MARES_ICONHD_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
mares_iconhd_device_open (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
mares_iconhd_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
mares_iconhd_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);

View File

@ -21,9 +21,9 @@
#include <stdlib.h>
#include <libdivecomputer/mares_iconhd.h>
#include <libdivecomputer/units.h>
#include "mares_iconhd.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -22,11 +22,10 @@
#include <string.h> // memcpy, memcmp
#include <stdlib.h> // malloc, free
#include <libdivecomputer/mares_nemo.h>
#include "mares_nemo.h"
#include "mares_common.h"
#include "context-private.h"
#include "device-private.h"
#include "mares_common.h"
#include "serial.h"
#include "checksum.h"
#include "array.h"
@ -283,6 +282,8 @@ mares_nemo_device_dump (dc_device_t *abstract, dc_buffer_t *buffer)
static dc_status_t
mares_nemo_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, void *userdata)
{
mares_nemo_device_t *device = (mares_nemo_device_t *) abstract;
dc_buffer_t *buffer = dc_buffer_new (MEMORYSIZE);
if (buffer == NULL)
return DC_STATUS_NOMEMORY;
@ -301,28 +302,6 @@ mares_nemo_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, v
devinfo.serial = array_uint16_be (data + 8);
device_event_emit (abstract, DC_EVENT_DEVINFO, &devinfo);
rc = mares_nemo_extract_dives (abstract, data, MEMORYSIZE, callback, userdata);
dc_buffer_free (buffer);
return rc;
}
dc_status_t
mares_nemo_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
mares_nemo_device_t *device = (mares_nemo_device_t*) abstract;
if (abstract && !ISINSTANCE (abstract))
return DC_STATUS_INVALIDARGS;
if (size < PACKETSIZE)
return DC_STATUS_DATAFORMAT;
dc_context_t *context = (abstract ? abstract->context : NULL);
unsigned char *fingerprint = (device ? device->fingerprint : NULL);
const mares_common_layout_t *layout = NULL;
switch (data[1]) {
case NEMO:
@ -333,12 +312,14 @@ mares_nemo_extract_dives (dc_device_t *abstract, const unsigned char data[], uns
layout = &mares_nemo_apneist_layout;
break;
default: // Unknown, try nemo
WARNING (abstract->context, "Unsupported model %02x detected!", data[1]);
layout = &mares_nemo_layout;
break;
}
if (size < layout->memsize)
return DC_STATUS_DATAFORMAT;
rc = mares_common_extract_dives (abstract->context, layout, device->fingerprint, data, callback, userdata);
return mares_common_extract_dives (context, layout, fingerprint, data, callback, userdata);
dc_buffer_free (buffer);
return rc;
}

View File

@ -22,9 +22,9 @@
#ifndef MARES_NEMO_H
#define MARES_NEMO_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {
@ -33,9 +33,6 @@ extern "C" {
dc_status_t
mares_nemo_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
mares_nemo_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
mares_nemo_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);

View File

@ -22,9 +22,9 @@
#include <stdlib.h>
#include <string.h>
#include <libdivecomputer/mares_nemo.h>
#include <libdivecomputer/units.h>
#include "mares_nemo.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -23,11 +23,10 @@
#include <stdlib.h> // malloc, free
#include <assert.h> // assert
#include <libdivecomputer/mares_puck.h>
#include "mares_puck.h"
#include "mares_common.h"
#include "context-private.h"
#include "device-private.h"
#include "mares_common.h"
#include "serial.h"
#include "checksum.h"
#include "array.h"
@ -267,41 +266,3 @@ mares_puck_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, v
return rc;
}
dc_status_t
mares_puck_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
mares_puck_device_t *device = (mares_puck_device_t*) abstract;
if (abstract && !ISINSTANCE (abstract))
return DC_STATUS_INVALIDARGS;
if (size < PACKETSIZE)
return DC_STATUS_DATAFORMAT;
dc_context_t *context = (abstract ? abstract->context : NULL);
unsigned char *fingerprint = (device ? device->fingerprint : NULL);
const mares_common_layout_t *layout = NULL;
switch (data[1]) {
case NEMOWIDE:
layout = &mares_nemowide_layout;
break;
case NEMOAIR:
case PUCKAIR:
layout = &mares_nemoair_layout;
break;
case PUCK:
layout = &mares_puck_layout;
break;
default: // Unknown, try puck
layout = &mares_puck_layout;
break;
}
if (size < layout->memsize)
return DC_STATUS_DATAFORMAT;
return mares_common_extract_dives (context, layout, fingerprint, data, callback, userdata);
}

View File

@ -22,9 +22,9 @@
#ifndef MARES_PUCK_H
#define MARES_PUCK_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {
@ -33,9 +33,6 @@ extern "C" {
dc_status_t
mares_puck_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
mares_puck_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -22,11 +22,10 @@
#include <string.h> // memcpy
#include <stdlib.h> // malloc, free
#include <libdivecomputer/oceanic_atom2.h>
#include "oceanic_atom2.h"
#include "oceanic_common.h"
#include "context-private.h"
#include "device-private.h"
#include "oceanic_common.h"
#include "serial.h"
#include "array.h"
#include "ringbuffer.h"
@ -556,14 +555,7 @@ oceanic_atom2_quit (oceanic_atom2_device_t *device)
dc_status_t
oceanic_atom2_device_open (dc_device_t **out, dc_context_t *context, const char *name)
{
return oceanic_atom2_device_open2 (out, context, name, 0);
}
dc_status_t
oceanic_atom2_device_open2 (dc_device_t **out, dc_context_t *context, const char *name, unsigned int model)
oceanic_atom2_device_open (dc_device_t **out, dc_context_t *context, const char *name, unsigned int model)
{
dc_status_t status = DC_STATUS_SUCCESS;
oceanic_atom2_device_t *device = NULL;

44
src/oceanic_atom2.h Normal file
View File

@ -0,0 +1,44 @@
/*
* libdivecomputer
*
* Copyright (C) 2008 Jef Driesen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef OCEANIC_ATOM2_H
#define OCEANIC_ATOM2_H
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/oceanic_atom2.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
oceanic_atom2_device_open (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
dc_status_t
oceanic_atom2_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* OCEANIC_ATOM2_H */

View File

@ -21,9 +21,9 @@
#include <stdlib.h>
#include <libdivecomputer/oceanic_atom2.h>
#include <libdivecomputer/units.h>
#include "oceanic_atom2.h"
#include "oceanic_common.h"
#include "context-private.h"
#include "parser-private.h"

View File

@ -22,11 +22,10 @@
#include <string.h> // memcpy
#include <stdlib.h> // malloc, free
#include <libdivecomputer/oceanic_veo250.h>
#include "oceanic_veo250.h"
#include "oceanic_common.h"
#include "context-private.h"
#include "device-private.h"
#include "oceanic_common.h"
#include "serial.h"
#include "ringbuffer.h"
#include "checksum.h"

View File

@ -19,14 +19,26 @@
* MA 02110-1301 USA
*/
#ifndef SUUNTO_H
#define SUUNTO_H
#ifndef OCEANIC_VEO250_H
#define OCEANIC_VEO250_H
#include "suunto_solution.h"
#include "suunto_eon.h"
#include "suunto_vyper.h"
#include "suunto_vyper2.h"
#include "suunto_d9.h"
#include "suunto_eonsteel.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#endif /* SUUNTO_H */
#include <libdivecomputer/oceanic_veo250.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
oceanic_veo250_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
oceanic_veo250_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* OCEANIC_VEO250_H */

View File

@ -21,9 +21,9 @@
#include <stdlib.h>
#include <libdivecomputer/oceanic_veo250.h>
#include <libdivecomputer/units.h>
#include "oceanic_veo250.h"
#include "oceanic_common.h"
#include "context-private.h"
#include "parser-private.h"

View File

@ -23,11 +23,10 @@
#include <stdlib.h> // malloc, free
#include <assert.h>
#include <libdivecomputer/oceanic_vtpro.h>
#include "oceanic_vtpro.h"
#include "oceanic_common.h"
#include "context-private.h"
#include "device-private.h"
#include "oceanic_common.h"
#include "serial.h"
#include "ringbuffer.h"
#include "checksum.h"
@ -385,14 +384,7 @@ oceanic_vtpro_device_logbook (dc_device_t *abstract, dc_event_progress_t *progre
}
dc_status_t
oceanic_vtpro_device_open (dc_device_t **out, dc_context_t *context, const char *name)
{
return oceanic_vtpro_device_open2 (out, context, name, 0);
}
dc_status_t
oceanic_vtpro_device_open2 (dc_device_t **out, dc_context_t *context, const char *name, unsigned int model)
oceanic_vtpro_device_open (dc_device_t **out, dc_context_t *context, const char *name, unsigned int model)
{
dc_status_t status = DC_STATUS_SUCCESS;
oceanic_vtpro_device_t *device = NULL;

44
src/oceanic_vtpro.h Normal file
View File

@ -0,0 +1,44 @@
/*
* libdivecomputer
*
* Copyright (C) 2008 Jef Driesen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef OCEANIC_VTPRO_H
#define OCEANIC_VTPRO_H
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/oceanic_vtpro.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
oceanic_vtpro_device_open (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
dc_status_t
oceanic_vtpro_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* OCEANIC_VTPRO_H */

View File

@ -21,9 +21,9 @@
#include <stdlib.h>
#include <libdivecomputer/oceanic_vtpro.h>
#include <libdivecomputer/units.h>
#include "oceanic_vtpro.h"
#include "oceanic_common.h"
#include "context-private.h"
#include "parser-private.h"
@ -61,14 +61,7 @@ static const dc_parser_vtable_t oceanic_vtpro_parser_vtable = {
dc_status_t
oceanic_vtpro_parser_create (dc_parser_t **out, dc_context_t *context)
{
return oceanic_vtpro_parser_create2 (out, context, 0);
}
dc_status_t
oceanic_vtpro_parser_create2 (dc_parser_t **out, dc_context_t *context, unsigned int model)
oceanic_vtpro_parser_create (dc_parser_t **out, dc_context_t *context, unsigned int model)
{
oceanic_vtpro_parser_t *parser = NULL;

View File

@ -22,20 +22,40 @@
#include <stdlib.h>
#include <assert.h>
#include <libdivecomputer/suunto.h>
#include <libdivecomputer/reefnet.h>
#include <libdivecomputer/uwatec.h>
#include <libdivecomputer/oceanic.h>
#include <libdivecomputer/mares.h>
#include <libdivecomputer/hw.h>
#include <libdivecomputer/cressi.h>
#include <libdivecomputer/zeagle.h>
#include <libdivecomputer/atomics.h>
#include <libdivecomputer/shearwater.h>
#include <libdivecomputer/diverite.h>
#include <libdivecomputer/citizen.h>
#include <libdivecomputer/divesystem.h>
#include <libdivecomputer/cochran.h>
#include "suunto_d9.h"
#include "suunto_eon.h"
#include "suunto_eonsteel.h"
#include "suunto_solution.h"
#include "suunto_vyper2.h"
#include "suunto_vyper.h"
#include "reefnet_sensus.h"
#include "reefnet_sensuspro.h"
#include "reefnet_sensusultra.h"
#include "uwatec_aladin.h"
#include "uwatec_memomouse.h"
#include "uwatec_meridian.h"
#include "uwatec_smart.h"
#include "oceanic_atom2.h"
#include "oceanic_atom2.h"
#include "oceanic_veo250.h"
#include "oceanic_vtpro.h"
#include "mares_darwin.h"
#include "mares_iconhd.h"
#include "mares_nemo.h"
#include "mares_puck.h"
#include "hw_frog.h"
#include "hw_ostc.h"
#include "hw_ostc3.h"
#include "cressi_edy.h"
#include "cressi_leonardo.h"
#include "zeagle_n2ition3.h"
#include "atomics_cobalt.h"
#include "shearwater_petrel.h"
#include "shearwater_predator.h"
#include "diverite_nitekq.h"
#include "citizen_aqualand.h"
#include "divesystem_idive.h"
#include "cochran_commander.h"
#include "context-private.h"
#include "parser-private.h"
@ -90,7 +110,7 @@ dc_parser_new_internal (dc_parser_t **out, dc_context_t *context, dc_family_t fa
rc = reefnet_sensusultra_parser_create (&parser, context, devtime, systime);
break;
case DC_FAMILY_OCEANIC_VTPRO:
rc = oceanic_vtpro_parser_create2 (&parser, context, model);
rc = oceanic_vtpro_parser_create (&parser, context, model);
break;
case DC_FAMILY_OCEANIC_VEO250:
rc = oceanic_veo250_parser_create (&parser, context, model);
@ -123,7 +143,7 @@ dc_parser_new_internal (dc_parser_t **out, dc_context_t *context, dc_family_t fa
rc = cressi_edy_parser_create (&parser, context, model);
break;
case DC_FAMILY_CRESSI_LEONARDO:
rc = cressi_leonardo_parser_create2 (&parser, context, model);
rc = cressi_leonardo_parser_create (&parser, context, model);
break;
case DC_FAMILY_ATOMICS_COBALT:
rc = atomics_cobalt_parser_create (&parser, context);
@ -141,7 +161,7 @@ dc_parser_new_internal (dc_parser_t **out, dc_context_t *context, dc_family_t fa
rc = citizen_aqualand_parser_create (&parser, context);
break;
case DC_FAMILY_DIVESYSTEM_IDIVE:
rc = divesystem_idive_parser_create2 (&parser, context, model);
rc = divesystem_idive_parser_create (&parser, context, model);
break;
case DC_FAMILY_COCHRAN_COMMANDER:
rc = cochran_commander_parser_create (&parser, context, model);

View File

@ -22,8 +22,7 @@
#include <string.h> // memcmp, memcpy
#include <stdlib.h> // malloc, free
#include <libdivecomputer/reefnet_sensus.h>
#include "reefnet_sensus.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
@ -61,6 +60,8 @@ static const dc_device_vtable_t reefnet_sensus_device_vtable = {
reefnet_sensus_device_close /* close */
};
static dc_status_t
reefnet_sensus_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
static dc_status_t
reefnet_sensus_cancel (reefnet_sensus_device_t *device)
@ -369,7 +370,7 @@ reefnet_sensus_device_foreach (dc_device_t *abstract, dc_dive_callback_t callbac
}
dc_status_t
static dc_status_t
reefnet_sensus_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
reefnet_sensus_device_t *device = (reefnet_sensus_device_t*) abstract;

43
src/reefnet_sensus.h Normal file
View File

@ -0,0 +1,43 @@
/*
* libdivecomputer
*
* Copyright (C) 2008 Jef Driesen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef REEFNET_SENSUS_H
#define REEFNET_SENSUS_H
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/reefnet_sensus.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
reefnet_sensus_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
reefnet_sensus_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* REEFNET_SENSUS_H */

View File

@ -21,9 +21,9 @@
#include <stdlib.h> // malloc, free
#include <libdivecomputer/reefnet_sensus.h>
#include <libdivecomputer/units.h>
#include "reefnet_sensus.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -22,8 +22,7 @@
#include <string.h> // memcmp, memcpy
#include <stdlib.h> // malloc, free
#include <libdivecomputer/reefnet_sensuspro.h>
#include "reefnet_sensuspro.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
@ -60,6 +59,8 @@ static const dc_device_vtable_t reefnet_sensuspro_device_vtable = {
reefnet_sensuspro_device_close /* close */
};
static dc_status_t
reefnet_sensuspro_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
reefnet_sensuspro_device_open (dc_device_t **out, dc_context_t *context, const char *name)
@ -362,7 +363,7 @@ reefnet_sensuspro_device_write_interval (dc_device_t *abstract, unsigned char in
}
dc_status_t
static dc_status_t
reefnet_sensuspro_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
reefnet_sensuspro_device_t *device = (reefnet_sensuspro_device_t*) abstract;

43
src/reefnet_sensuspro.h Normal file
View File

@ -0,0 +1,43 @@
/*
* libdivecomputer
*
* Copyright (C) 2008 Jef Driesen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef REEFNET_SENSUSPRO_H
#define REEFNET_SENSUSPRO_H
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/reefnet_sensuspro.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
reefnet_sensuspro_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
reefnet_sensuspro_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* REEFNET_SENSUSPRO_H */

View File

@ -22,9 +22,9 @@
#include <stdlib.h>
#include <string.h> // memcmp
#include <libdivecomputer/reefnet_sensuspro.h>
#include <libdivecomputer/units.h>
#include "reefnet_sensuspro.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -23,8 +23,7 @@
#include <stdlib.h> // malloc, free
#include <assert.h> // assert
#include <libdivecomputer/reefnet_sensusultra.h>
#include "reefnet_sensusultra.h"
#include "context-private.h"
#include "device-private.h"
#include "serial.h"
@ -750,18 +749,3 @@ reefnet_sensusultra_device_foreach (dc_device_t *abstract, dc_dive_callback_t ca
return DC_STATUS_SUCCESS;
}
dc_status_t
reefnet_sensusultra_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
reefnet_sensusultra_device_t *device = (reefnet_sensusultra_device_t *) abstract;
if (abstract && !ISINSTANCE (abstract))
return DC_STATUS_INVALIDARGS;
unsigned int remaining = size;
unsigned int previous = size;
return reefnet_sensusultra_parse (device, data, &remaining, &previous, NULL, callback, userdata);
}

43
src/reefnet_sensusultra.h Normal file
View File

@ -0,0 +1,43 @@
/*
* libdivecomputer
*
* Copyright (C) 2008 Jef Driesen
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301 USA
*/
#ifndef REEFNET_SENSUSULTRA_H
#define REEFNET_SENSUSULTRA_H
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/reefnet_sensusultra.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
reefnet_sensusultra_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
reefnet_sensusultra_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int devtime, dc_ticks_t systime);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* REEFNET_SENSUSULTRA_H */

View File

@ -22,9 +22,9 @@
#include <stdlib.h>
#include <string.h> // memcmp
#include <libdivecomputer/reefnet_sensusultra.h>
#include <libdivecomputer/units.h>
#include "reefnet_sensusultra.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -22,10 +22,8 @@
#include <string.h> // memcmp, memcpy
#include <stdlib.h> // malloc, free
#include <libdivecomputer/shearwater_petrel.h>
#include "shearwater_petrel.h"
#include "shearwater_common.h"
#include "context-private.h"
#include "device-private.h"
#include "array.h"

View File

@ -22,9 +22,9 @@
#ifndef SHEARWATER_PETREL_H
#define SHEARWATER_PETREL_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {

View File

@ -22,10 +22,8 @@
#include <string.h> // memcmp, memcpy
#include <stdlib.h> // malloc, free
#include <libdivecomputer/shearwater_predator.h>
#include "shearwater_predator.h"
#include "shearwater_common.h"
#include "context-private.h"
#include "device-private.h"
#include "array.h"
@ -62,6 +60,8 @@ static const dc_device_vtable_t shearwater_predator_device_vtable = {
shearwater_predator_device_close /* close */
};
static dc_status_t
shearwater_predator_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
shearwater_predator_device_open (dc_device_t **out, dc_context_t *context, const char *name)
@ -339,7 +339,7 @@ shearwater_predator_extract_petrel (dc_device_t *abstract, const unsigned char d
}
dc_status_t
static dc_status_t
shearwater_predator_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
if (abstract && !ISINSTANCE (abstract))

View File

@ -22,9 +22,9 @@
#ifndef SHEARWATER_PREDATOR_H
#define SHEARWATER_PREDATOR_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {
@ -33,9 +33,6 @@ extern "C" {
dc_status_t
shearwater_predator_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
shearwater_predator_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
shearwater_predator_parser_create (dc_parser_t **parser, dc_context_t *context);

View File

@ -21,10 +21,10 @@
#include <stdlib.h>
#include <libdivecomputer/shearwater_predator.h>
#include <libdivecomputer/shearwater_petrel.h>
#include <libdivecomputer/units.h>
#include "shearwater_predator.h"
#include "shearwater_petrel.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -23,10 +23,9 @@
#include <stdlib.h> // malloc, free
#include <assert.h> // assert
#include <libdivecomputer/suunto_d9.h>
#include "context-private.h"
#include "suunto_d9.h"
#include "suunto_common2.h"
#include "context-private.h"
#include "serial.h"
#include "checksum.h"
#include "array.h"

View File

@ -19,11 +19,25 @@
* MA 02110-1301 USA
*/
#ifndef REEFNET_H
#define REEFNET_H
#ifndef SUUNTO_D9_H
#define SUUNTO_D9_H
#include "reefnet_sensus.h"
#include "reefnet_sensuspro.h"
#include "reefnet_sensusultra.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/suunto_d9.h>
#endif /* REEFNET_H */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
suunto_d9_device_open (dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
dc_status_t
suunto_d9_parser_create (dc_parser_t **parser, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SUUNTO_D9_H */

View File

@ -22,8 +22,7 @@
#include <stdlib.h>
#include <string.h> // memcmp
#include <libdivecomputer/suunto_d9.h>
#include "suunto_d9.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -22,11 +22,10 @@
#include <string.h> // memcmp, memcpy
#include <stdlib.h> // malloc, free
#include <libdivecomputer/suunto_eon.h>
#include "suunto_eon.h"
#include "suunto_common.h"
#include "context-private.h"
#include "device-private.h"
#include "suunto_common.h"
#include "serial.h"
#include "checksum.h"
#include "array.h"
@ -217,6 +216,8 @@ suunto_eon_device_dump (dc_device_t *abstract, dc_buffer_t *buffer)
static dc_status_t
suunto_eon_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, void *userdata)
{
suunto_common_device_t *device = (suunto_common_device_t *) abstract;
dc_buffer_t *buffer = dc_buffer_new (SZ_MEMORY);
if (buffer == NULL)
return DC_STATUS_NOMEMORY;
@ -239,8 +240,7 @@ suunto_eon_device_foreach (dc_device_t *abstract, dc_dive_callback_t callback, v
}
device_event_emit (abstract, DC_EVENT_DEVINFO, &devinfo);
rc = suunto_eon_extract_dives (abstract,
dc_buffer_get_data (buffer), dc_buffer_get_size (buffer), callback, userdata);
rc = suunto_common_extract_dives (device, &suunto_eon_layout, data, callback, userdata);
dc_buffer_free (buffer);
@ -292,18 +292,3 @@ suunto_eon_device_write_interval (dc_device_t *abstract, unsigned char interval)
return DC_STATUS_SUCCESS;
}
dc_status_t
suunto_eon_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
suunto_common_device_t *device = (suunto_common_device_t*) abstract;
if (abstract && !ISINSTANCE (abstract))
return DC_STATUS_INVALIDARGS;
if (size < SZ_MEMORY)
return DC_STATUS_DATAFORMAT;
return suunto_common_extract_dives (device, &suunto_eon_layout, data, callback, userdata);
}

View File

@ -19,11 +19,25 @@
* MA 02110-1301 USA
*/
#ifndef OCEANIC_H
#define OCEANIC_H
#ifndef SUUNTO_EON_H
#define SUUNTO_EON_H
#include "oceanic_atom2.h"
#include "oceanic_veo250.h"
#include "oceanic_vtpro.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#include <libdivecomputer/suunto_eon.h>
#endif /* OCEANIC_H */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t
suunto_eon_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
suunto_eon_parser_create (dc_parser_t **parser, dc_context_t *context, int spyder);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SUUNTO_EON_H */

View File

@ -21,9 +21,9 @@
#include <stdlib.h>
#include <libdivecomputer/suunto_eon.h>
#include <libdivecomputer/units.h>
#include "suunto_eon.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -23,8 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <libdivecomputer/suunto_eonsteel.h>
#include "suunto_eonsteel.h"
#include "context-private.h"
#include "device-private.h"
#include "array.h"
@ -548,7 +547,7 @@ static int initialize_eonsteel(suunto_eonsteel_device_t *eon)
}
dc_status_t
suunto_eonsteel_device_open(dc_device_t **out, dc_context_t *context, const char *name, unsigned int model)
suunto_eonsteel_device_open(dc_device_t **out, dc_context_t *context)
{
dc_status_t status = DC_STATUS_SUCCESS;
suunto_eonsteel_device_t *eon = NULL;

View File

@ -22,16 +22,19 @@
#ifndef SUUNTO_EONSTEEL_H
#define SUUNTO_EONSTEEL_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
dc_status_t suunto_eonsteel_device_open(dc_device_t **device, dc_context_t *context, const char *name, unsigned int model);
dc_status_t suunto_eonsteel_parser_create(dc_parser_t **parser, dc_context_t *context, unsigned int model);
dc_status_t
suunto_eonsteel_device_open(dc_device_t **device, dc_context_t *context);
dc_status_t
suunto_eonsteel_parser_create(dc_parser_t **parser, dc_context_t *context, unsigned int model);
#ifdef __cplusplus
}

View File

@ -24,8 +24,7 @@
#include <ctype.h>
#include <math.h>
#include <libdivecomputer/suunto_eonsteel.h>
#include "suunto_eonsteel.h"
#include "context-private.h"
#include "parser-private.h"
#include "array.h"

View File

@ -21,9 +21,9 @@
#include <stdlib.h> // malloc, free
#include <libdivecomputer/suunto_solution.h>
#include <libdivecomputer/units.h>
#include "suunto_solution.h"
#include "context-private.h"
#include "device-private.h"
#include "ringbuffer.h"
@ -57,6 +57,8 @@ static const dc_device_vtable_t suunto_solution_device_vtable = {
suunto_solution_device_close /* close */
};
static dc_status_t
suunto_solution_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
suunto_solution_device_open (dc_device_t **out, dc_context_t *context, const char *name)
@ -281,7 +283,7 @@ suunto_solution_device_foreach (dc_device_t *abstract, dc_dive_callback_t callba
}
dc_status_t
static dc_status_t
suunto_solution_extract_dives (dc_device_t *abstract, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata)
{
if (abstract && !ISINSTANCE (abstract))

View File

@ -22,9 +22,9 @@
#ifndef SUUNTO_SOLUTION_H
#define SUUNTO_SOLUTION_H
#include "context.h"
#include "device.h"
#include "parser.h"
#include <libdivecomputer/context.h>
#include <libdivecomputer/device.h>
#include <libdivecomputer/parser.h>
#ifdef __cplusplus
extern "C" {
@ -33,9 +33,6 @@ extern "C" {
dc_status_t
suunto_solution_device_open (dc_device_t **device, dc_context_t *context, const char *name);
dc_status_t
suunto_solution_extract_dives (dc_device_t *device, const unsigned char data[], unsigned int size, dc_dive_callback_t callback, void *userdata);
dc_status_t
suunto_solution_parser_create (dc_parser_t **parser, dc_context_t *context);

View File

@ -21,9 +21,9 @@
#include <stdlib.h>
#include <libdivecomputer/suunto_solution.h>
#include <libdivecomputer/units.h>
#include "suunto_solution.h"
#include "context-private.h"
#include "parser-private.h"

Some files were not shown because too many files have changed in this diff Show More