changeset 744:7e7e98247a8a

Merge
author JeanDo
date Mon, 12 Aug 2013 15:12:14 +0200
parents 69c9a8c41b94 (current diff) 8466932a2fcf (diff)
children d8c403b69576
files code_part1/OSTC_code_c_part2/p2_deco.c
diffstat 3 files changed, 14 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/shared_definitions.h	Thu Aug 08 11:06:52 2013 +0200
+++ b/code_part1/OSTC_code_asm_part1/shared_definitions.h	Mon Aug 12 15:12:14 2013 +0200
@@ -78,8 +78,8 @@
 
 #ifdef xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
     Define model dimensions.
-    NUM_COMP  is the number of compartiments in the Bühlmann ZH-L16 model, ie 16.
-    NUM_STOPS is the maximum number of stops computed by decoplanning. 
+    NUM_COMP  is the number of compartiments in the Buhlmann ZH-L16 model, ie 16.
+    NUM_STOPS is the maximum number of stops computed by decoplanning.
               Note that the deapest stop is roughly limited to 3m * NUM_STOPS
                    (this is assuming all stops up to the surface are used).
               Note also that if the table overflow, extra stops are ignored,
@@ -93,15 +93,15 @@
 
 VAR_UINT  (int_O_gtissue_limit);
 VAR_UINT  (int_O_gtissue_press);
-VAR_UINT  (int_O_desaturation_time);       // 
+VAR_UINT  (int_O_desaturation_time);       //
 VAR_UINT  (int_O_ascenttime);              // TTS (in minutes)
 VAR_UINT  (int_O_extra_ascenttime);        // TTS for @+5min variant (in minutes)
 
-VAR_UCHAR (char_O_nullzeit);               // 
+VAR_UCHAR (char_O_nullzeit);               //
 VAR_UCHAR (char_O_deco_status);            // Deko state-machine state.
 VAR_UCHAR (char_O_deco_last_stop);         // Depth reached during deko planning.
-VAR_UCHAR (char_O_gradient_factor);        // 
-VAR_UCHAR (char_O_gtissue_no);             // 
+VAR_UCHAR (char_O_gradient_factor);        //
+VAR_UCHAR (char_O_gtissue_no);             //
 VAR_UCHAR (char_O_diluent);                // new in v.101
 VAR_UCHAR (char_O_flush_ppO2);             // 2011-05-01: ppO2 from diluant (CCR mode).
 VAR_UCHAR (char_O_EAD);                    // 2011-05-01: Added EAD/END in deco model.
@@ -135,21 +135,21 @@
 
 VAR_UCHAR (char_I_step_is_1min);           // Use 1min integration for tissue and CNS.
 
-VAR_UINT  (int_I_pres_respiration);        // 
-VAR_UINT  (int_I_pres_surface);            // 
+VAR_UINT  (int_I_pres_respiration);        //
+VAR_UINT  (int_I_pres_surface);            //
 VAR_UINT  (int_I_temp);                    // new in v101
 VAR_UINT  (int_I_divemins);                // Dive time (minutes)
 VAR_UCHAR (char_I_temp);                   // new in v101
-VAR_UCHAR (char_I_actual_ppO2);            // 
+VAR_UCHAR (char_I_actual_ppO2);            //
 VAR_UCHAR (char_I_first_gas);              // Gas used at start of dive (bottom mix)
 VAR_UCHAR (char_I_current_gas);            // Current gas breathed (1..6).
 VAR_UCHAR (char_I_N2_ratio);               //
 VAR_UCHAR (char_I_He_ratio);               //
 VAR_UCHAR (char_I_saturation_multiplier);  // for conservatism/safety values 1.0  no conservatism to 1.5  50% faster saturation
-VAR_UCHAR (char_I_desaturation_multiplier);// for conservatism/safety values 0.66  50% slower desaturation to 1.0  no conservatism// consveratism used in calc_tissue , calc_tissue_step_1_min  and sim_tissue_1min 
+VAR_UCHAR (char_I_desaturation_multiplier);// for conservatism/safety values 0.66  50% slower desaturation to 1.0  no conservatism// consveratism used in calc_tissue , calc_tissue_step_1_min  and sim_tissue_1min
 VAR_UCHAR (char_I_GF_High_percentage);     // new in v.102
 VAR_UCHAR (char_I_GF_Low_percentage);      // new in v.102
-VAR_UCHAR (char_I_deco_distance);          // 
+VAR_UCHAR (char_I_deco_distance);          //
 VAR_UCHAR (char_I_const_ppO2);             // new in v.101
 VAR_UCHAR (char_I_depth_last_deco);        // new in v.101 unit: [m]
 VAR_UCHAR (char_I_deco_model);             // new in v.102. 0 == ZH-L16, 1 = ZH-L16-GF (Grandiant facttor)
--- a/code_part1/OSTC_code_c_part2/p2_deco.c	Thu Aug 08 11:06:52 2013 +0200
+++ b/code_part1/OSTC_code_c_part2/p2_deco.c	Mon Aug 12 15:12:14 2013 +0200
@@ -370,8 +370,7 @@
 static short read_custom_function(PARAMETER unsigned char cf)
 {
 #ifdef CROSS_COMPILE
-    return (cf & 32) ? eeprom.bank1_CF[cf-32].value.lo
-                     : eeprom.bank0_CF[cf   ].value.lo;
+    return READ_CF_MACRO(cf);
 #else
     extern unsigned char hi, lo;
     extern void getcustom15();
@@ -1062,7 +1061,7 @@
     case 3: //---- At surface: start a new dive ------------------------------
         clear_deco_table();
         copy_deco_table();
-        int_O_ascenttime = 0;       // Reset DTR.
+        int_O_ascenttime = 0;       // Reset TTS.
         int_O_extra_ascenttime = 0;
         char_O_nullzeit = 0;        // Reset bottom time.
         char_O_deco_status = 0;     // Calc bottom-time/nullzeit next iteration.
@@ -2242,7 +2241,7 @@
     sim_gas_last_depth = 0;             // Surface gas marker.
     gas_switch_set();                   // Sets initial calc_N2/He_ratio
 
-    //---- CCR mode : do the full TTS at once --------------------------------
+    //---- CCR mode : do the full CNS at once --------------------------------
     if( char_I_const_ppO2 != 0 )
     {
         overlay unsigned short t;       // Needs 16bits here !
--- a/code_part1/OSTC_code_c_part2/p2_definitions.h	Thu Aug 08 11:06:52 2013 +0200
+++ b/code_part1/OSTC_code_c_part2/p2_definitions.h	Mon Aug 12 15:12:14 2013 +0200
@@ -111,8 +111,6 @@
 #   define overlay
 #   define PARAMETER
 
-#   include <assert.h>
-
     // Avoid warnings about float/double mismatches:
 #   ifdef WIN32
 #       pragma warning(disable: 4244 4068 4305)