Pass the model number to the open function.
This change will be necessary for the Oceanic VTX, because it uses a higher baudrate. To maintain backwards compatibility, the existing function remains unchanged and a new function is introduced instead.
This commit is contained in:
parent
f5d96a081c
commit
4dfca21a2b
@ -33,6 +33,9 @@ extern "C" {
|
||||
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);
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ dc_device_open (dc_device_t **out, dc_context_t *context, dc_descriptor_t *descr
|
||||
rc = oceanic_veo250_device_open (&device, context, name);
|
||||
break;
|
||||
case DC_FAMILY_OCEANIC_ATOM2:
|
||||
rc = oceanic_atom2_device_open (&device, context, name);
|
||||
rc = oceanic_atom2_device_open2 (&device, context, name, dc_descriptor_get_model (descriptor));
|
||||
break;
|
||||
case DC_FAMILY_MARES_NEMO:
|
||||
rc = mares_nemo_device_open (&device, context, name);
|
||||
|
||||
@ -92,6 +92,7 @@ mares_darwin_extract_dives
|
||||
mares_iconhd_device_open
|
||||
mares_iconhd_extract_dives
|
||||
oceanic_atom2_device_open
|
||||
oceanic_atom2_device_open2
|
||||
oceanic_atom2_device_version
|
||||
oceanic_atom2_device_keepalive
|
||||
oceanic_veo250_device_open
|
||||
|
||||
@ -492,6 +492,14 @@ 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)
|
||||
|
||||
{
|
||||
if (out == NULL)
|
||||
return DC_STATUS_INVALIDARGS;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user