The Sporasub SP2 uses a very simple communication protocol and memory layout, but with some unusual aspects: Dives are artifically limited to a maximum of 6000 samples. Unlike all other dive computers, the dives are not stored in some kind of ringbuffer structure. Once the memory is full, no new dives can be recorded. The existing dives need to be erased first, and the dive computer will start recording again at te start of the memory area. The Sporasub application has an "Auto-clear watch memory after data transfer" feature for this purpose. I didn't implement a more efficient download algorithm because downloading a full memory dumps takes less than 10 seconds.
44 lines
1.3 KiB
C
44 lines
1.3 KiB
C
/*
|
|
* libdivecomputer
|
|
*
|
|
* Copyright (C) 2021 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 SPORASUB_SP2_H
|
|
#define SPORASUB_SP2_H
|
|
|
|
#include <libdivecomputer/context.h>
|
|
#include <libdivecomputer/iostream.h>
|
|
#include <libdivecomputer/device.h>
|
|
#include <libdivecomputer/parser.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
dc_status_t
|
|
sporasub_sp2_device_open (dc_device_t **device, dc_context_t *context, dc_iostream_t *iostream);
|
|
|
|
dc_status_t
|
|
sporasub_sp2_parser_create (dc_parser_t **parser, dc_context_t *context);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
#endif /* SPORASUB_SP2_H */
|