# HG changeset patch # User heinrichsweikamp # Date 1402999220 -7200 # Node ID c61b7a4e317c6d62c00b5e459a1902cacf4da1c8 # Parent d39493c786a2bd4166ef1ab7e5bd83eeeca82247 Bugfix: CNS in planner diff -r d39493c786a2 -r c61b7a4e317c .hgignore --- a/.hgignore Tue Jun 10 10:14:18 2014 +0200 +++ b/.hgignore Tue Jun 17 12:00:20 2014 +0200 @@ -1,3 +1,6 @@ syntax: glob ostc3.X/* tools/o3_tiny.hex +tools/crop_ostc3_hex_büro.bat +tools/o3pack.exe +tools/o3pack_büro.bat diff -r d39493c786a2 -r c61b7a4e317c src/changelog.txt --- a/src/changelog.txt Tue Jun 10 10:14:18 2014 +0200 +++ b/src/changelog.txt Tue Jun 17 12:00:20 2014 +0200 @@ -1,8 +1,9 @@ -New in 1.31: +New in 1.40: CHANGE: Minor language updates NEW: Show a Safety Stop if enabled (Menu "Deco Parameters") BUGFIX: dive profile recording issue in OC mode BUGFIX: OSTC settings via USB issues +BUGFIX: CNS in deco planner New in 1.30: NEW: Show event "Bailout" in internal logbook diff -r d39493c786a2 -r c61b7a4e317c src/colorschemes.inc --- a/src/colorschemes.inc Tue Jun 10 10:14:18 2014 +0200 +++ b/src/colorschemes.inc Tue Jun 17 12:00:20 2014 +0200 @@ -8,7 +8,7 @@ ; Standard #DEFINE color_scheme_divemode_mask1 color_green #DEFINE color_scheme_divemode_std1 color_white -#DEFINE color_scheme_divemode_dis1 color_grey +#DEFINE color_scheme_divemode_dis1 color_lightblue ;color_grey ; Redish #DEFINE color_scheme_divemode_mask2 color_red diff -r d39493c786a2 -r c61b7a4e317c src/divemode.asm --- a/src/divemode.asm Tue Jun 10 10:14:18 2014 +0200 +++ b/src/divemode.asm Tue Jun 17 12:00:20 2014 +0200 @@ -233,7 +233,21 @@ global set_actual_ppo2 set_actual_ppo2: ; calculate ppO2 in 0.01bar (e.g. 150 = 1.50 bar ppO2) + btfsc divemode ; in divemode + bra set_actual_ppo2_dive ; Yes + ; No, use simulated ambient pressure for char_I_actual_ppO2 + movff char_I_bottom_depth,WREG + mullw .100 + movlw LOW(.1000) + addwf PRODL,W + movwf xA+0 + movlw HIGH(.1000) + addwfc PRODH,W + movwf xA+1 ; P_amb in millibar (1000 = 1.00 bar). + bra set_actual_ppo2_common +set_actual_ppo2_dive: SAFE_2BYTE_COPY amb_pressure, xA ; P_amb in millibar (1000 = 1.00 bar). +set_actual_ppo2_common: movlw d'10' movwf xB+0 clrf xB+1 diff -r d39493c786a2 -r c61b7a4e317c src/ostc3.inc --- a/src/ostc3.inc Tue Jun 10 10:14:18 2014 +0200 +++ b/src/ostc3.inc Tue Jun 17 12:00:20 2014 +0200 @@ -19,8 +19,8 @@ #include ; Portmap #DEFINE softwareversion_x d'1' ; Software version XX.YY -#DEFINE softwareversion_y d'31' ; Software version XX.YY -#DEFINE softwareversion_beta 1 ; (and 0 for release) +#DEFINE softwareversion_y d'40' ; Software version XX.YY +#DEFINE softwareversion_beta 0 ; (and 0 for release) #DEFINE comm_service_key 0xABCDEF @@ -161,7 +161,7 @@ #DEFINE lithium_36v_25 .2600 ; [mV] #DEFINE lithium_36v_10 .2500 ; [mV] -#DEFINE current_sleepmode .62 +#DEFINE current_sleepmode .10 #DEFINE current_backlight_multi .115 ; *CCPR1L+current_backlight_offset #DEFINE current_backlight_offset .216 #DEFINE current_speed_eco .1914 diff -r d39493c786a2 -r c61b7a4e317c src/p2_deco.c --- a/src/p2_deco.c Tue Jun 10 10:14:18 2014 +0200 +++ b/src/p2_deco.c Tue Jun 17 12:00:20 2014 +0200 @@ -218,6 +218,7 @@ static float float_deco_distance; // new in v.101 static unsigned char deco_gas_change[NUM_GAS]; // new in v.109 +static unsigned char internal_deco_gas [NUM_STOPS]; //---- Bank 7 parameters ----------------------------------------------------- #ifndef UNIX @@ -599,7 +600,7 @@ { // Copy depth of the first (deepest) stop, because when reversing // order, it will be hard to find... - char_O_first_deco_depth = internal_deco_depth[0] & 0x7F; + char_O_first_deco_depth = internal_deco_depth[0]; char_O_first_deco_time = internal_deco_time [0]; { @@ -609,6 +610,7 @@ { char_O_deco_depth[x] = internal_deco_depth[x]; char_O_deco_time [x] = internal_deco_time [x]; + char_O_deco_gas [x] = internal_deco_gas [x]; } //Now fill the char_O_deco_time_for_log array @@ -629,6 +631,7 @@ for(y++; y