comparison src/tft_outputs.asm @ 482:c0ee33f1f399

New customview #12 for PSCR mode shows ppO2, O2 drop and lung ratio
author heinrichsweikamp
date Tue, 07 Feb 2017 12:15:12 +0100
parents ad8acade5567
children 18e047102e49
comparison
equal deleted inserted replaced
481:3e643ec05dac 482:c0ee33f1f399
1905 TFT_active_setpoint_bail: 1905 TFT_active_setpoint_bail:
1906 WIN_SMALL dm_active_gas_column, dm_active_gas_row+.3 ; colides with diluent in FT_MEDIUM 1906 WIN_SMALL dm_active_gas_column, dm_active_gas_row+.3 ; colides with diluent in FT_MEDIUM
1907 STRCPY_TEXT_PRINT tDiveBailout ; Bailout 1907 STRCPY_TEXT_PRINT tDiveBailout ; Bailout
1908 bra TFT_active_setpoint_diluent 1908 bra TFT_active_setpoint_diluent
1909 1909
1910 TFT_show_pscr_mode_divemode:
1911 WIN_TINY dm_active_dil_column, dm_active_dil_row+.1
1912 STRCPY_TEXT_PRINT tDvPSCR ; PSCR
1913 return
1914
1915
1910 global TFT_active_gas_divemode 1916 global TFT_active_gas_divemode
1911 TFT_active_gas_divemode: ; Display gas/Setpoint 1917 TFT_active_gas_divemode: ; Display gas/Setpoint
1912 btfsc divemode_menu ; Is the dive mode menu shown? 1918 btfsc divemode_menu ; Is the dive mode menu shown?
1913 return ; Yes, return 1919 return ; Yes, return
1914 btfsc FLAG_apnoe_mode ; Ignore in Apnoe mode 1920 btfsc FLAG_apnoe_mode ; Ignore in Apnoe mode
1915 return 1921 return
1916 btfsc FLAG_ccr_mode ; in CCR mode 1922 btfsc FLAG_ccr_mode ; in CCR mode?
1917 bra TFT_active_setpoint ; Yes, show setpoint 1923 bra TFT_active_setpoint ; Yes, show setpoint
1918 1924
1919 call TFT_standard_color 1925 call TFT_standard_color
1926
1927 btfsc FLAG_pscr_mode ; in PSCR mode?
1928 rcall TFT_show_pscr_mode_divemode ; Yes, show "PSCR"
1929
1920 WIN_STD dm_active_gas_column, dm_active_gas_row 1930 WIN_STD dm_active_gas_column, dm_active_gas_row
1921 movff char_I_O2_ratio,lo ; lo now stores O2 in % 1931 movff char_I_O2_ratio,lo ; lo now stores O2 in %
1922 movff char_I_He_ratio,hi ; hi now stores He in % 1932 movff char_I_He_ratio,hi ; hi now stores He in %
1923 rcall TFT_active_gas_divemode2 ; Show gas (Non-Inverted in all cases) 1933 rcall TFT_active_gas_divemode2 ; Show gas (Non-Inverted in all cases)
1924 btfss better_gas_available ; =1: A better gas is available and a gas change is advised in divemode 1934 btfss better_gas_available ; =1: A better gas is available and a gas change is advised in divemode
3397 STRCPY_TEXT_PRINT tHe 3407 STRCPY_TEXT_PRINT tHe
3398 call deco_calc_desaturation_time ; calculate desaturation time (and char_O_tissue_N2_saturation and char_O_tissue_He_saturation) 3408 call deco_calc_desaturation_time ; calculate desaturation time (and char_O_tissue_N2_saturation and char_O_tissue_He_saturation)
3399 movlb b'00000001' ; select ram bank 1 3409 movlb b'00000001' ; select ram bank 1
3400 bra DISP_tissue_saturation_graph ; Show char_O_tissue_N2_saturation and char_O_tissue_He_saturation ; and return... 3410 bra DISP_tissue_saturation_graph ; Show char_O_tissue_N2_saturation and char_O_tissue_He_saturation ; and return...
3401 3411
3412
3413 global TFT_pscr_info_mask
3414 TFT_pscr_info_mask: ; Show ppO2, drop and lung ratio mask
3415 rcall TFT_mask_ppo2
3416 call TFT_divemask_color
3417 WIN_TINY dm_custom_pscr_text_drop_column, dm_custom_pscr_text_row
3418 STRCPY_TEXT_PRINT tPSCR_O2_drop
3419 WIN_TINY dm_custom_pscr_text_ratio_column, dm_custom_pscr_text_row
3420 STRCPY_TEXT_PRINT tPSCR_lungratio
3421 goto TFT_standard_color; and return...
3422
3423 global TFT_pscr_info ; Show ppO2, drop and lung ratio
3424 TFT_pscr_info:
3425 ;show ppO2
3426 rcall TFT_display_ppo2_val
3427 ; Show Drop
3428 WIN_STD dm_custom_pscr_drop_column,dm_custom_pscr_drop_row
3429 movff opt_PSCR_drop,lo
3430 bsf leftbind
3431 output_8
3432 STRCAT_PRINT "%"
3433 ; Show lung ratio
3434 WIN_STD dm_custom_pscr_ratio_column,dm_custom_pscr_ratio_row
3435 movff opt_PSCR_lungratio,lo
3436 bsf leftbind
3437 STRCPY "1/"
3438 output_8
3439 STRCAT_PRINT ""
3440 bcf leftbind
3441 return
3442
3443
3402 global TFT_ppo2_ead_end_cns_mask ; Show ppO2, END/EAD and CNS mask 3444 global TFT_ppo2_ead_end_cns_mask ; Show ppO2, END/EAD and CNS mask
3403 TFT_ppo2_ead_end_cns_mask: 3445 TFT_ppo2_ead_end_cns_mask:
3404 rcall TFT_mask_ppo2 3446 rcall TFT_mask_ppo2
3405 call TFT_divemask_color 3447 call TFT_divemask_color
3406 WIN_TINY dm_custom_ead_column, dm_custom_eadend_title_row 3448 WIN_TINY dm_custom_ead_column, dm_custom_eadend_title_row