[PATCH] Record the cylinder idx on DLF gaschange

Anton Lundin glance at acc.umu.se
Tue Dec 30 08:05:51 PST 2014


Use the new and fancy cylinder idx to record which cylinder we change to
on the DLF import.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 parse-xml.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/parse-xml.c b/parse-xml.c
index 115e2a2..33b4c3e 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -2653,6 +2653,9 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size)
 					cur_dive->cylinder[cur_cylinder_index].gasmix.o2.permille = ptr[6] * 10;
 					cur_dive->cylinder[cur_cylinder_index].gasmix.he.permille = ptr[7] * 10;
 					cylinder_end();
+					cur_event.gas.index = cur_cylinder_index;
+				} else {
+					cur_event.gas.index = i;
 				}
 				break;
 			case 6:
-- 
2.1.0



More information about the subsurface mailing list