Divinglog import: adding pressure samples

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2015-07-12 23:17:01 +05:30 committed by Dirk Hohndel
parent e53897cd15
commit 7fffe8aba0

View file

@ -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];
char *ptr, temp[4], pres[5];
/* We do not have samples */
if (!data[1])
@ -2938,6 +2938,11 @@ extern int divinglog_profile(void *handle, int columns, char **data, char **colu
cur_sample->temperature.mkelvin = C_to_mkelvin(atoi(temp) / 10);
}
if (data[2]) {
memcpy(pres, &data[2][i * 11 + 3], 4);
cur_sample->cylinderpressure.mbar = atoi(pres) * 100;
}
ptr += 12;
sample_end();
}