# HG changeset patch
# User heinrichsweikamp
# Date 1404118882 -7200
# Node ID 0d1a82cdb3dcc6d6413fc532ddf6bd361480d726
# Parent  b0c96aaa86e4e2464956d2b81258a5673fd187b7
compute ceiling in calc_hauptroutine_update_tissues

diff -r b0c96aaa86e4 -r 0d1a82cdb3dc code_part1/OSTC_code_asm_part1/shared_definitions.h
--- a/code_part1/OSTC_code_asm_part1/shared_definitions.h	Sun Jun 29 15:13:32 2014 +0200
+++ b/code_part1/OSTC_code_asm_part1/shared_definitions.h	Mon Jun 30 11:01:22 2014 +0200
@@ -91,7 +91,6 @@
 #define NUM_STOPS   0x20
 #define NUM_GAS     5
 
-VAR_UINT  (int_O_gtissue_limit);
 VAR_UINT  (int_O_gtissue_press);
 VAR_UINT  (int_O_desaturation_time);       //
 VAR_UINT  (int_O_ascenttime);              // TTS (in minutes)
diff -r b0c96aaa86e4 -r 0d1a82cdb3dc code_part1/OSTC_code_c_part2/p2_deco.c
--- a/code_part1/OSTC_code_c_part2/p2_deco.c	Sun Jun 29 15:13:32 2014 +0200
+++ b/code_part1/OSTC_code_c_part2/p2_deco.c	Mon Jun 30 11:01:22 2014 +0200
@@ -1041,12 +1041,6 @@
     calc_hauptroutine_update_tissues();
     calc_gradient_factor();
 
-    // Fill int_O_ceiling if ceiling is below the surface
-    if ((calc_lead_tissue_limit-pres_surface)>0)
-        int_O_ceiling = (short)((calc_lead_tissue_limit-pres_surface)*1000);
-    else
-        int_O_ceiling = 0;
-
     // toggle between calculation for nullzeit (bottom time),
     //                deco stops
     //                and more deco stops (continue)
@@ -1238,7 +1232,12 @@
     // Calc limit for surface, ie. GF_high.
     calc_limit();
 
-    int_O_gtissue_limit = (short)(calc_lead_tissue_limit * 1000);
+    // Fill int_O_ceiling if ceiling is below the surface
+    if ((calc_lead_tissue_limit-pres_surface)>0)
+        int_O_ceiling = (short)((calc_lead_tissue_limit-pres_surface)*1000);
+    else
+        int_O_ceiling = 0;
+
     int_O_gtissue_press = (short)((pres_tissue_N2[char_O_gtissue_no] + pres_tissue_He[char_O_gtissue_no]) * 1000);
 }