# HG changeset patch # User heinrichsweikamp # Date 1391368793 -3600 # Node ID 50697bd41c54d53ace21eedde66c61b8b18346f2 # Parent 53b64c5472e18f8260078d559cc3ba8b457c77a8 +CHANGE: Some French Translations +CHANGE: Default Future TTS=0 (Disabled) +NEW: Expand "gas change window" up to 1m below programmed + change depth (If ppO2 within user-set max. threshold) +BUGFIX: Intermittent USB connection on MAC diff -r 53b64c5472e1 -r 50697bd41c54 src/changelog.txt --- a/src/changelog.txt Sat Feb 01 15:31:30 2014 +0100 +++ b/src/changelog.txt Sun Feb 02 20:19:53 2014 +0100 @@ -1,6 +1,11 @@ New in 1.12: BUGFIX: Maintain last selected customview in surface mode BUGFIX: Set Day for months <31 days +CHANGE: Some French Translations +CHANGE: Default Future TTS=0 (Disabled) +NEW: Expand "gas change window" up to 1m below programmed + change depth (If ppO2 within user-set max. threshold) +BUGFIX: Intermittent USB connection on MAC New in 1.11: NEW: allow logbook erase from reset menu diff -r 53b64c5472e1 -r 50697bd41c54 src/comm.asm --- a/src/comm.asm Sat Feb 01 15:31:30 2014 +0100 +++ b/src/comm.asm Sun Feb 02 20:19:53 2014 +0100 @@ -100,7 +100,8 @@ call rs232_get_byte btfss vusb_in ; USB plugged in? - bra comm_service_exit_nousb ; Disconnected -> Exit + bra comm_service_exit_nousb_delay ; Disconnected -> Exit +comm_mode4a: btfsc switch_right ; Abort with right bra comm_service_exit @@ -150,6 +151,13 @@ bsf comm_service_enabled bra comm_download_mode0 ; Startbyte for download mode found + +comm_service_exit_nousb_delay: + WAITMS d'200' + btfss vusb_in ; USB plugged in? + bra comm_service_exit_nousb ; Disconnected -> Exit + bra comm_mode4a ; (Still) connected, return + comm_service_exit_nousb: ; Disconnected -> Exit WIN_SMALL comm_status3_column, comm_status3_row STRCPY_TEXT_PRINT tUsbClosed ; Port closed diff -r 53b64c5472e1 -r 50697bd41c54 src/divemode.asm --- a/src/divemode.asm Sat Feb 01 15:31:30 2014 +0100 +++ b/src/divemode.asm Sun Feb 02 20:19:53 2014 +0100 @@ -1002,14 +1002,77 @@ return ; No, Change depth not deep enough, skip! movf xC+0,W ; load depth in m into WREG cpfsgt lo ; gas_change_depth < current depth? - return ; No, check next gas + bra check_gas_common3 ; No, check if we are within the better_gas_window_pos window + incf hi,W ; 1-5 + movwf better_gas_number ; number (1-5) of the "better gas" in divemode, =0: no better gas available + movlw better_gas_window_neg + subwf lo,W ; Change depth-better_gas_window_neg + cpfslt xC+0 ; current depthChange depth+better_gas_window_pos? + bra check_gas_common4 ; Ok, now check the better gas ppO2 65536, ppO2>6,55bar? + return ; Done. + ; Check if ppO2>3,30bar + btfsc xC+1,7 + return ; Done. + +; ; Check for low ppo2 +; movff xC+0,sub_b+0 +; movff xC+1,sub_b+1 +; movff opt_ppO2_min,WREG +; mullw d'100' ; opt_ppO2_min*100 +; movff PRODL,sub_a+0 +; movff PRODH,sub_a+1 +; call subU16 +; btfss neg_flag +; return ; Done (Too low). + +;check if we are within our warning thresholds! + movff xC+0,sub_b+0 + movff xC+1,sub_b+1 + movff opt_ppO2_max,WREG ; PPO2 Max for MOD calculation and color coding in divemode + addlw .1 ; e.g. >1.60 + mullw d'100' ; opt_ppO2_max*100 + movff PRODL,sub_a+0 + movff PRODH,sub_a+1 + call subU16 + btfss neg_flag bsf better_gas_available ;=1: A better gas is available and a gas change is advised in divemode - return + return ; Done. check_dil_common: ; With Dil 0-4 in WREG btfsc better_gas_available ; Better Diluent already found? @@ -1037,9 +1100,9 @@ incf hi,W ; 1-5 addlw .5 ; 6-10 movwf better_gas_number ; number (1-5) of the "better gas" in divemode, =0: no better gas available - movlw better_gas_window - subwf lo,W ; Change depth-better_gas_window - cpfslt xC+0 ; current depth1.60 mullw d'100' ; opt_ppO2_max*100 movff PRODL,sub_a+0 movff PRODH,sub_a+1 diff -r 53b64c5472e1 -r 50697bd41c54 src/options.asm --- a/src/options.asm Sat Feb 01 15:31:30 2014 +0100 +++ b/src/options.asm Sun Feb 02 20:19:53 2014 +0100 @@ -541,14 +541,14 @@ OPTION_UINT8p10 oPPO2Min, .16, ppo2_warning_low, .19, 0, .16, opt_ppO2_min OPTION_UINT8 oaGF_low, .60, .100, .60, tPercent, .17, opt_aGF_low OPTION_UINT8 oaGF_high, .70, .120, .85, tPercent, .18, opt_aGF_high - OPTION_BOOL oEnable_aGF, 1, .19, opt_enable_aGF ; =1: aGF can be selected underwater + OPTION_BOOL oEnable_aGF, 0, .19, opt_enable_aGF ; =1: aGF can be selected underwater OPTION_UINT8 oCompassGain, 0, 7, 6, tcharx, .20, opt_compass_gain ; 0-7 (230LSB/Gauss to 1370LSB/Gaus) OPTION_ENUM8 oSamplingRate, 2, 0, tSampling2s, .21, opt_sampling_rate ; =1: 10s, =0: 2s ;============================================================================= ; Managing Settings extern char_I_extra_time - OPTION_UINT8 oExtraTime, 0, .9, 5,tMinutes, .22, char_I_extra_time + OPTION_UINT8 oExtraTime, 0, .9, 0,tMinutes, .22, char_I_extra_time OPTION_ENUM8 oBrightness, 3, 0, tEco, .23, opt_brightness OPTION_UINT8 oDiveSalinity, 0, 4, 0, tPercent, .24, opt_salinity OPTION_ENUM8 oCCRMode, 2, 0, tCCRModeFixedSP, .25, opt_ccr_mode diff -r 53b64c5472e1 -r 50697bd41c54 src/ostc3.inc --- a/src/ostc3.inc Sat Feb 01 15:31:30 2014 +0100 +++ b/src/ostc3.inc Sun Feb 02 20:19:53 2014 +0100 @@ -96,7 +96,8 @@ ; better_gas_window <= minimum_change_depth ! ; minimum_change_depth >=5 ! #DEFINE minimum_change_depth .3 ; [m] -#DEFINE better_gas_window .3 ; [m] +#DEFINE better_gas_window_neg .3 ; [m] (Depth above change depth) +#DEFINE better_gas_window_pos .1 ; [m] (Depth below change depth, if ppO2" ; View> - TCODE tHeading, "Heading:" ; Heading: + TCODE tHeading, "Cap:" ; Heading: ; Divemode Menu - TCODE tDivemenu_Gaslist, "liste gaz" ; Gaslist - TCODE tDivemenu_ResetAvr, "Resetchrono" ; Reset Avr. + TCODE tDivemenu_Gaslist, "Liste Gaz" ; Gaslist + TCODE tDivemenu_ResetAvr, "RaZChrono" ; Reset Avr. TCODE tDivemenu_Setpoint, "Setpoint" ; Setpoint - TCODE tDivemenu_UseSensor,"cellules" ; Use Sensor - TCODE tDivemenu_ToggleGF, "bascul.GF" ; Toggle GF + TCODE tDivemenu_UseSensor,"Cellules" ; Use Sensor + TCODE tDivemenu_ToggleGF, "Bascul.GF" ; Toggle GF ; Main menu TCODE tNext, "