comparison src/tft_outputs.asm @ 333:14b466f66a7f new_screen_layout

Extend the Ceiling custom-view with ppO2 and current GF
author Janos Kovacs <kovjanos@gmail.com>
date Sun, 28 Jun 2015 03:30:03 +0200
parents 0ff81ff290ce
children 508d7fb98b34
comparison
equal deleted inserted replaced
332:0ff81ff290ce 333:14b466f66a7f
3803 WIN_STD dm_custom_agf_column+.10, dm_custom_agf_row 3803 WIN_STD dm_custom_agf_column+.10, dm_custom_agf_row
3804 STRCPY_PRINT "---" 3804 STRCPY_PRINT "---"
3805 bcf leftbind 3805 bcf leftbind
3806 return 3806 return
3807 3807
3808 global TFT_gf_mask_cGF ; Setup Mask
3809 TFT_gf_mask_cGF:
3810 ; The mask
3811 call TFT_divemask_color
3812 WIN_TINY dm_custom_gf_title_col3, dm_custom_gf_title_row
3813 STRCPY_TEXT_PRINT tGFInfo
3814 call TFT_standard_color
3815 return
3816
3808 global TFT_gf_info ; Show GF informations 3817 global TFT_gf_info ; Show GF informations
3809 TFT_gf_info: 3818 TFT_gf_info:
3819 call TFT_standard_color
3810 ; Show current GF 3820 ; Show current GF
3811 movff char_O_gradient_factor,lo ; gradient factor absolute (Non-GF model) 3821 movff char_O_gradient_factor,lo ; gradient factor absolute (Non-GF model)
3812 movff char_I_deco_model,hi 3822 movff char_I_deco_model,hi
3813 decfsz hi,F ; jump over next line if char_I_deco_model == 1 3823 decfsz hi,F ; jump over next line if char_I_deco_model == 1
3814 movff char_O_relative_gradient_GF,lo ; gradient factor relative (GF model) 3824 movff char_O_relative_gradient_GF,lo ; gradient factor relative (GF model)
4086 STRCAT_PRINT "" 4096 STRCAT_PRINT ""
4087 call TFT_standard_color 4097 call TFT_standard_color
4088 call TFT_warning_set_window_end 4098 call TFT_warning_set_window_end
4089 return 4099 return
4090 4100
4101 global TFT_mask_ppo2
4102 TFT_mask_ppo2:
4103 call TFT_divemask_color
4104 WIN_TINY dm_custom_ceiling_ppo2_column, dm_custom_ceiling_text_row
4105 STRCPY_TEXT_PRINT tppO2
4106 call TFT_standard_color
4107 return
4108
4109 global TFT_display_ppo2_val
4110 TFT_display_ppo2_val:
4111 SAFE_2BYTE_COPY amb_pressure, xA
4112 movlw d'10'
4113 movwf xB+0
4114 clrf xB+1
4115 call div16x16 ; xC=p_amb/10
4116 movff xC+0,xA+0
4117 movff xC+1,xA+1
4118 movff char_I_O2_ratio,xB+0 ; =O2 ratio
4119 clrf xB+1
4120 call mult16x16 ; char_I_O2_ratio * p_amb/10
4121
4122 call TFT_standard_color
4123 TFT_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC)
4124 WIN_STD dm_custom_ceiling_ppo2_val_col, dm_custom_ceiling_value_row
4125 ; hijacking neg_flag_velocity to know where the value is displayed
4126 bsf neg_flag_velocity
4127 bra TFT_display_ppo2_com
4128
4091 global TFT_display_ppo2 4129 global TFT_display_ppo2
4092 TFT_display_ppo2: ; Show ppO2 (ppO2 stored in xC, in mbar!) 4130 TFT_display_ppo2: ; Show ppO2 (ppO2 stored in xC, in mbar!)
4093 rcall TFT_warning_set_window ; Sets the row and column for the current warning 4131 rcall TFT_warning_set_window ; Sets the row and column for the current warning
4094 tstfsz WREG ; Is there room for the warning? 4132 tstfsz WREG ; Is there room for the warning?
4095 return ; No 4133 return ; No
4096 call TFT_warning_set_window_com 4134 call TFT_warning_set_window_com
4097 TFT_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) 4135 TFT_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC)
4098 STRCPY_TEXT tppO2 ; ppO2: 4136 STRCPY_TEXT tppO2 ; ppO2:
4137 ; hijacking neg_flag_velocity to know where the value is displayed
4138 bcf neg_flag_velocity
4139 TFT_display_ppo2_com:
4099 ; Check very high ppO2 manually 4140 ; Check very high ppO2 manually
4100 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55bar? 4141 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55bar?
4101 bra TFT_show_ppO2_3 ; Yes, display fixed Value! 4142 bra TFT_show_ppO2_3 ; Yes, display fixed Value!
4102 movff xC+0,lo 4143 movff xC+0,lo
4103 movff xC+1,hi 4144 movff xC+1,hi
4104 bsf ignore_digit4 4145 bsf ignore_digit4
4105 output_16dp d'1' 4146 output_16dp d'1'
4106 TFT_show_ppO2_2: 4147 TFT_show_ppO2_2:
4107 movlw dm_warning_length ; Divemode string length 4148 movlw dm_warning_length ; Divemode string length
4149 ; neg_flag_velocity is hijacked, used to toggle the fillup lenght.
4150 btfsc neg_flag_velocity
4151 movlw .4
4108 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) 4152 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG)
4109 STRCAT_PRINT "" 4153 STRCAT_PRINT ""
4110 call TFT_standard_color 4154 call TFT_standard_color
4111 call TFT_warning_set_window_end 4155 call TFT_warning_set_window_end
4112 return 4156 return