# HG changeset patch # User heinrichsweikamp # Date 1344696914 -7200 # Node ID 8d2dc109ecfc8bd0126a1b7521cbacb96f4b7ec2 # Parent bab5a9fc1b108d343e920fe922ffefed089c1935 NEW: Gaslist highlights "better gas" in divemode diff -r bab5a9fc1b10 -r 8d2dc109ecfc code_part1/OSTC_code_asm_part1/changelog.txt --- a/code_part1/OSTC_code_asm_part1/changelog.txt Sat Aug 11 15:30:30 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/changelog.txt Sat Aug 11 16:55:14 2012 +0200 @@ -1,3 +1,8 @@ +New in 2.51: +BETA Version - Do NOT use for diving! +NEW: Saves last selected custom view for surface mode and dive mode +NEW: Gaslist highlights "better gas" in divemode + New in 2.50 Stable: INFO: This update will reset all Custom Functions and gases to defaults BUGFIX: Divetime display in Gauge mode diff -r bab5a9fc1b10 -r 8d2dc109ecfc code_part1/OSTC_code_asm_part1/definitions.asm --- a/code_part1/OSTC_code_asm_part1/definitions.asm Sat Aug 11 15:30:30 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Sat Aug 11 16:55:14 2012 +0200 @@ -358,6 +358,7 @@ total_divetime_seconds res 2 ; counts dive seconds regardless of CF01 (18h max.) safety_stop_countdown res 1 ; counts seconds of safety stop +better_gas_number res 1 ; number (1-5) of the "better gas" in divemode, =0: no better gas available ASSERT_BANK1 MACRO tag Ifdef __DEBUG diff -r bab5a9fc1b10 -r 8d2dc109ecfc code_part1/OSTC_code_asm_part1/divemode.asm --- a/code_part1/OSTC_code_asm_part1/divemode.asm Sat Aug 11 15:30:30 2012 +0200 +++ b/code_part1/OSTC_code_asm_part1/divemode.asm Sat Aug 11 16:55:14 2012 +0200 @@ -1064,7 +1064,7 @@ ;============================================================================= ; Compare all enabled gas in list, to see if a better one is available. ; -; Output: better_gas_available +; Output: better_gas_available, better_gas_number ; check_gas_change: ; Checks if a better gas should be selected (by user) bcf better_gas_available ;=1: A better gas is available and a gas change is advised in divemode @@ -1090,6 +1090,8 @@ movf xC+0,W ; load depth in m into WREG cpfsgt EEDATA ; gas_change_depth < current depth? bra check_gas_change2 ; No, check next gas + movlw .1 + movwf better_gas_number ; number (1-5) of the "better gas" in divemode, =0: no better gas available movlw better_gas_window subwf EEDATA,W ; Change depth-better_gas_window cpfslt xC+0 ; current depth