mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 00:23:23 +00:00
Divinglog import: added setpoint
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5e439cef63
commit
6e109a2129
1 changed files with 4 additions and 1 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], stop[4], stime[4], ndl[4], ppo2_1[4], ppo2_2[4], ppo2_3[4], cns[5];
|
||||
char *ptr, temp[4], pres[5], hbeat[4], stop[4], stime[4], ndl[4], ppo2_1[4], ppo2_2[4], ppo2_3[4], cns[5], setpoint[3];
|
||||
short oldcyl = -1;
|
||||
|
||||
/* We do not have samples */
|
||||
|
@ -2991,6 +2991,7 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu
|
|||
memcpy(ppo2_2, &data[5][i * 19 + 3], 3);
|
||||
memcpy(ppo2_3, &data[5][i * 19 + 6], 3);
|
||||
memcpy(cns, &data[5][i * 19 + 13], 4);
|
||||
memcpy(setpoint, &data[5][i * 19 + 17], 2);
|
||||
|
||||
if (atoi(ppo2_1) > 0)
|
||||
cur_sample->o2sensor[0].mbar = atoi(ppo2_1) * 100;
|
||||
|
@ -3000,6 +3001,8 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu
|
|||
cur_sample->o2sensor[2].mbar = atoi(ppo2_3) * 100;
|
||||
if (atoi(cns) > 0)
|
||||
cur_sample->cns = rint(atoi(cns) / 10);
|
||||
if (atoi(setpoint) > 0)
|
||||
cur_sample->setpoint.mbar = atoi(setpoint) * 100;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue