Signed-off-by: Miika Turkia <miika.tur...@gmail.com>
---
 parse-xml.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/parse-xml.c b/parse-xml.c
index 974906e..991b1e9 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -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();
        }
-- 
2.1.4

_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to