aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-11-06 17:31:42 +0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-06 05:22:24 -0800
commit56bfa1b1be061cc292412ddc4da9b2e11160cbca (patch)
tree33d32cca58bc4a21757314afcf2a85e1305754f5 /file.c
parent676713335bb9710d9a35a6a8a27e5d242c691e44 (diff)
downloadsubsurface-56bfa1b1be061cc292412ddc4da9b2e11160cbca.tar.gz
Reset counters when importing new MK6 log
Naturally the pressure counters and cylinder index must be reset to zero when reading in a new Poseidon dive log. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/file.c b/file.c
index 60b79f228..5c4b7a1f3 100644
--- a/file.c
+++ b/file.c
@@ -430,7 +430,6 @@ char *parse_mkvi_value(const char *haystack, const char *needle)
return ret;
}
-static int cur_cylinder_index;
int parse_txt_file(const char *filename, const char *csv)
{
struct memblock memtxt, memcsv;
@@ -449,7 +448,7 @@ int parse_txt_file(const char *filename, const char *csv)
int prev_depth = 0, cur_sampletime = 0, prev_setpoint = -1;
bool has_depth = false, has_setpoint = false;
char *lineptr;
- static int diluent_pressure = 0, cylinder_pressure = 0;
+ int diluent_pressure = 0, cylinder_pressure = 0, cur_cylinder_index = 0;
struct dive *dive;
struct divecomputer *dc;