mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
Divinglog import: show stop depth / ceiling
This shows the ceiling as stored by Divinglog. (I am not sure if it is DC reported ceiling, or just a calculated one.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
20b9c241f0
commit
5dd0b1bad5
1 changed files with 7 additions and 2 deletions
|
@ -2882,7 +2882,7 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu
|
|||
{
|
||||
int sinterval = 0;
|
||||
unsigned long i, len, lenprofile2 = 0;
|
||||
char *ptr, temp[4], pres[5], hbeat[4];
|
||||
char *ptr, temp[4], pres[5], hbeat[4], stop[4];
|
||||
short oldcyl = -1;
|
||||
|
||||
/* We do not have samples */
|
||||
|
@ -2949,6 +2949,11 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu
|
|||
cur_sample->heartbeat = atoi(hbeat);
|
||||
}
|
||||
|
||||
if (data[4] && strlen(data[4])) {
|
||||
memcpy(stop, &data[4][i * 9 + 6], 3);
|
||||
cur_sample->stopdepth.mm = atoi(stop) * 1000;
|
||||
}
|
||||
|
||||
ptr += 12;
|
||||
sample_end();
|
||||
}
|
||||
|
@ -3017,7 +3022,7 @@ extern int divinglog_dive(void *param, int columns, char **data, char **column)
|
|||
int retval = 0;
|
||||
sqlite3 *handle = (sqlite3 *)param;
|
||||
char *err = NULL;
|
||||
char get_profile_template[] = "select ProfileInt,Profile,Profile2,Profile3 from Logbook where ID = %d";
|
||||
char get_profile_template[] = "select ProfileInt,Profile,Profile2,Profile3,Profile4 from Logbook where ID = %d";
|
||||
char get_cylinder0_template[] = "select 0,TankSize,PresS,PresE,PresW,O2,He,DblTank from Logbook where ID = %d";
|
||||
char get_cylinder_template[] = "select TankID,TankSize,PresS,PresE,PresW,O2,He,DblTank from Tank where LogID = %d order by TankID";
|
||||
char get_buffer[1024];
|
||||
|
|
Loading…
Reference in a new issue