comparison src/divemode.asm @ 521:06e9370c6d75

CHANGE: Apply safety margin parameters to both models (GF and non-GF) Put B?hlmann constants in code for readability Fix unused gas warning (Do not warn)
author heinrichsweikamp
date Fri, 04 Aug 2017 16:01:28 +0200
parents 2ef8cf6b320d
children 0d1cda9f2d43
comparison
equal deleted inserted replaced
520:1d74d6221084 521:06e9370c6d75
1649 movwf apnoe_secs 1649 movwf apnoe_secs
1650 bsf divemode2 ; displayed divetime is running (Divetime starts HERE) 1650 bsf divemode2 ; displayed divetime is running (Divetime starts HERE)
1651 1651
1652 movff int_O_CNS_fraction+0,CNS_start+0 1652 movff int_O_CNS_fraction+0,CNS_start+0
1653 movff int_O_CNS_fraction+1,CNS_start+1 ; Save CNS value at beginning of dive 1653 movff int_O_CNS_fraction+1,CNS_start+1 ; Save CNS value at beginning of dive
1654 movff char_O_relative_gradient_GF,GF_start ; Save GF value at beginning of dive 1654 movff char_O_gradient_factor,GF_start ; Save GF value at beginning of dive
1655 return ; Done with divemode boot 1655 return ; Done with divemode boot
1656 1656
1657 divemode_check_for_warnings: 1657 divemode_check_for_warnings:
1658 movlw .2 1658 movlw .2
1659 cpfsgt warning_counter ; only two warnings active? 1659 cpfsgt warning_counter ; only two warnings active?
1903 1903
1904 1904
1905 global check_and_store_gf_violation 1905 global check_and_store_gf_violation
1906 check_and_store_gf_violation: 1906 check_and_store_gf_violation:
1907 movff char_O_gradient_factor,lo ; gradient factor absolute (Non-GF model) 1907 movff char_O_gradient_factor,lo ; gradient factor absolute (Non-GF model)
1908 movff char_I_deco_model,hi
1909 decfsz hi,F ; jump over next line if char_I_deco_model == 1
1910 movff char_O_relative_gradient_GF,lo ; gradient factor relative (GF model)
1911 1908
1912 movlw gf_warning_high 1909 movlw gf_warning_high
1913 cpfsgt lo 1910 cpfsgt lo
1914 bra check_and_store_gf_violation2 ; No warning 1911 bra check_and_store_gf_violation2 ; No warning
1915 movlw d'2' ; Type of Alarm 1912 movlw d'2' ; Type of Alarm