mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
b8a4730661
With this commit we not only use the getDivelogs command but also the getDive command for each of the dives that was downloaded. Oddly, that makes quite a bit of redundant (and at times slightly contradictory) data available, but also many new things. We now get weight, suit and notes that were stored with a dive in the logbook on the divecomputer. There are a ton more data available that we don't use, yet. For example information about altitude, a decoindex, dive type and dive activity, other equipment information, etc. I still need to decide how much of this I want to make available in Subsurface (and how I want to present this - after all most of this is not available from other dive computers). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
/*
|
|
* defines and prototypes for the uemis Zurich SDA file parser
|
|
*/
|
|
|
|
#ifndef UEMIS_H
|
|
#define UEMIS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
void uemis_parse_divelog_binary(char *base64, void *divep);
|
|
void decode(uint8_t *in, uint8_t *out, int len);
|
|
|
|
typedef struct {
|
|
uint16_t dive_time;
|
|
uint16_t water_pressure; // (in cbar)
|
|
uint16_t dive_temperature; // (in dC)
|
|
uint8_t ascent_speed; // (units unclear)
|
|
uint8_t work_fact;
|
|
uint8_t cold_fact;
|
|
uint8_t bubble_fact;
|
|
uint16_t ascent_time;
|
|
uint16_t ascent_time_opt;
|
|
uint16_t p_amb_tol;
|
|
uint16_t satt;
|
|
uint16_t hold_depth;
|
|
uint16_t hold_time;
|
|
uint8_t active_tank;
|
|
// bloody glib, when compiled for Windows, forces the whole program to use
|
|
// the Windows packing rules. So to avoid problems on Windows (and since
|
|
// only tank_pressure is currently used and that exactly once) I give in and
|
|
// make this silly low byte / high byte 8bit entries
|
|
uint8_t tank_pressure_low; // (in cbar)
|
|
uint8_t tank_pressure_high;
|
|
uint8_t consumption_low; // (units unclear)
|
|
uint8_t consumption_high;
|
|
uint8_t rgt; // (remaining gas time in minutes)
|
|
uint8_t cns;
|
|
uint8_t flags[8];
|
|
} __attribute((packed)) uemis_sample_t;
|
|
|
|
#endif /* DIVE_H */
|