Mercurial > public > hwos_code
comparison src/tft_outputs.asm @ 341:0740bd920c51
Show ppo2 <1bar with leading zero
author | heinrichsweikamp |
---|---|
date | Mon, 06 Jul 2015 12:50:49 +0200 |
parents | 692903c50788 |
children | 573f2251cf49 |
comparison
equal
deleted
inserted
replaced
340:1c4ff889fcf0 | 341:0740bd920c51 |
---|---|
2042 movff hi,lo | 2042 movff hi,lo |
2043 output_99x | 2043 output_99x |
2044 movlw surf_warning_length ; No, use surface string length | 2044 movlw surf_warning_length ; No, use surface string length |
2045 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) | 2045 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) |
2046 STRCAT_PRINT "" | 2046 STRCAT_PRINT "" |
2047 call TFT_warning_set_window_end | 2047 bcf win_invert |
2048 return | 2048 return |
2049 | 2049 |
2050 global TFT_surface_decosettings ; Show all deco settings | 2050 global TFT_surface_decosettings ; Show all deco settings |
2051 TFT_surface_decosettings: | 2051 TFT_surface_decosettings: |
2052 ; Deco Mode | 2052 ; Deco Mode |
2053 call TFT_standard_color | 2053 call TFT_standard_color |
2142 movff hi,lo | 2142 movff hi,lo |
2143 output_99x | 2143 output_99x |
2144 movlw dm_warning_length ; Divemode string length | 2144 movlw dm_warning_length ; Divemode string length |
2145 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) | 2145 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) |
2146 STRCAT_PRINT "" | 2146 STRCAT_PRINT "" |
2147 call TFT_warning_set_window_end | 2147 bcf win_invert |
2148 return | 2148 return |
2149 | 2149 |
2150 global TFT_ftts | 2150 global TFT_ftts |
2151 TFT_ftts: | 2151 TFT_ftts: |
2152 movff char_I_extra_time,lo | 2152 movff char_I_extra_time,lo |
2185 bcf leftbind | 2185 bcf leftbind |
2186 PUTC "'" | 2186 PUTC "'" |
2187 movlw dm_warning_length ; Divemode string length | 2187 movlw dm_warning_length ; Divemode string length |
2188 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) | 2188 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) |
2189 STRCAT_PRINT "" | 2189 STRCAT_PRINT "" |
2190 call TFT_warning_set_window_end | 2190 bcf win_invert |
2191 return | 2191 return |
2192 | 2192 |
2193 TFT_ftts2: | 2193 TFT_ftts2: |
2194 STRCAT "---" | 2194 STRCAT "---" |
2195 bcf leftbind | 2195 bcf leftbind |
2196 movlw dm_warning_length ; Divemode string length | 2196 movlw dm_warning_length ; Divemode string length |
2197 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) | 2197 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) |
2198 STRCAT_PRINT "" | 2198 STRCAT_PRINT "" |
2199 call TFT_warning_set_window_end | 2199 bcf win_invert |
2200 return | 2200 return |
2201 | 2201 |
2202 | 2202 |
2203 ;============================================================================= | 2203 ;============================================================================= |
2204 | 2204 |
3619 movlw surf_warning_length ; Only use surface string length | 3619 movlw surf_warning_length ; Only use surface string length |
3620 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) | 3620 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) |
3621 movlw .0 | 3621 movlw .0 |
3622 movff WREG,buffer+11 | 3622 movff WREG,buffer+11 |
3623 STRCAT_PRINT "" | 3623 STRCAT_PRINT "" |
3624 call TFT_warning_set_window_end | 3624 bcf win_invert |
3625 return | 3625 return |
3626 | 3626 |
3627 global TFT_nofly_time | 3627 global TFT_nofly_time |
3628 TFT_nofly_time: | 3628 TFT_nofly_time: |
3629 rcall TFT_warning_set_window ; Sets the row and column for the current warning | 3629 rcall TFT_warning_set_window ; Sets the row and column for the current warning |
3646 movlw surf_warning_length ; Only use surface string length | 3646 movlw surf_warning_length ; Only use surface string length |
3647 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) | 3647 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) |
3648 movlw .0 | 3648 movlw .0 |
3649 movff WREG,buffer+11 | 3649 movff WREG,buffer+11 |
3650 STRCAT_PRINT "" | 3650 STRCAT_PRINT "" |
3651 call TFT_warning_set_window_end | 3651 bcf win_invert |
3652 return | 3652 return |
3653 | 3653 |
3654 global TFT_warning_agf | 3654 global TFT_warning_agf |
3655 TFT_warning_agf: | 3655 TFT_warning_agf: |
3656 rcall TFT_warning_set_window ; Sets the row and column for the current warning | 3656 rcall TFT_warning_set_window ; Sets the row and column for the current warning |
3661 STRCPY_TEXT tDiveaGF_active ; "aGF!" | 3661 STRCPY_TEXT tDiveaGF_active ; "aGF!" |
3662 movlw dm_warning_length ; Divemode string length | 3662 movlw dm_warning_length ; Divemode string length |
3663 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) | 3663 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) |
3664 STRCAT_PRINT "" | 3664 STRCAT_PRINT "" |
3665 call TFT_standard_color | 3665 call TFT_standard_color |
3666 call TFT_warning_set_window_end | 3666 bcf win_invert |
3667 return | 3667 return |
3668 | 3668 |
3669 global TFT_warning_fallback | 3669 global TFT_warning_fallback |
3670 TFT_warning_fallback: ; Show fallback warning | 3670 TFT_warning_fallback: ; Show fallback warning |
3671 rcall TFT_warning_set_window ; Sets the row and column for the current warning | 3671 rcall TFT_warning_set_window ; Sets the row and column for the current warning |
3696 movlw surf_warning_length ; No, use surface string length | 3696 movlw surf_warning_length ; No, use surface string length |
3697 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) | 3697 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) |
3698 STRCAT_PRINT "" | 3698 STRCAT_PRINT "" |
3699 bcf leftbind | 3699 bcf leftbind |
3700 call TFT_standard_color | 3700 call TFT_standard_color |
3701 call TFT_warning_set_window_end | 3701 bcf win_invert |
3702 return | 3702 return |
3703 | 3703 |
3704 TFT_warning_set_window: ; Sets the row and column for the current warning | 3704 TFT_warning_set_window: ; Sets the row and column for the current warning |
3705 ; ignore warning (now)? | 3705 ; ignore warning (now)? |
3706 decf warning_counter,W ; -1 | 3706 decf warning_counter,W ; -1 |
3737 | 3737 |
3738 TFT_warning_set_window_com: | 3738 TFT_warning_set_window_com: |
3739 if dm_offset == 0 | 3739 if dm_offset == 0 |
3740 bsf win_invert | 3740 bsf win_invert |
3741 endif | 3741 endif |
3742 return | |
3743 | |
3744 TFT_warning_set_window_end: | |
3745 bcf win_invert | |
3746 return | 3742 return |
3747 | 3743 |
3748 global TFT_update_batt_percent_divemode | 3744 global TFT_update_batt_percent_divemode |
3749 TFT_update_batt_percent_divemode: | 3745 TFT_update_batt_percent_divemode: |
3750 rcall TFT_warning_set_window ; Sets the row and column for the current warning | 3746 rcall TFT_warning_set_window ; Sets the row and column for the current warning |
3762 btfss divemode ; In Divemode? | 3758 btfss divemode ; In Divemode? |
3763 movlw surf_warning_length ; No, use surface string length | 3759 movlw surf_warning_length ; No, use surface string length |
3764 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) | 3760 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) |
3765 STRCAT_PRINT "" | 3761 STRCAT_PRINT "" |
3766 call TFT_standard_color | 3762 call TFT_standard_color |
3767 call TFT_warning_set_window_end | 3763 bcf win_invert |
3768 return | 3764 return |
3769 | 3765 |
3770 global TFT_gf_mask ; Setup Mask | 3766 global TFT_gf_mask ; Setup Mask |
3771 TFT_gf_mask: | 3767 TFT_gf_mask: |
3772 ; The mask | 3768 ; The mask |
4104 btfss divemode ; In Divemode? | 4100 btfss divemode ; In Divemode? |
4105 movlw surf_warning_length ; No, use surface string length | 4101 movlw surf_warning_length ; No, use surface string length |
4106 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) | 4102 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) |
4107 STRCAT_PRINT "" | 4103 STRCAT_PRINT "" |
4108 call TFT_standard_color | 4104 call TFT_standard_color |
4109 call TFT_warning_set_window_end | 4105 bcf win_invert |
4110 return | 4106 return |
4111 | 4107 |
4112 global TFT_mask_ppo2 | 4108 global TFT_mask_ppo2 |
4113 TFT_mask_ppo2: | 4109 TFT_mask_ppo2: |
4114 call TFT_divemask_color | 4110 call TFT_divemask_color |
4151 ; Check very high ppO2 manually | 4147 ; Check very high ppO2 manually |
4152 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55bar? | 4148 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55bar? |
4153 bra TFT_show_ppO2_3 ; Yes, display fixed Value! | 4149 bra TFT_show_ppO2_3 ; Yes, display fixed Value! |
4154 movff xC+0,lo | 4150 movff xC+0,lo |
4155 movff xC+1,hi | 4151 movff xC+1,hi |
4156 bsf ignore_digit4 | 4152 bsf ignore_digit4 ; no mbar resolution |
4157 output_16dp d'1' | 4153 output_16dp d'1' |
4154 | |
4155 ; Set ".xx" to "0.xx" (bar) | |
4156 banksel buffer | |
4157 movlw " " | |
4158 cpfseq buffer+5 ; For ppO2 in warning area | |
4159 bra TFT_show_ppO2_1 | |
4160 movlw "0" ; Replace Space with "0" | |
4161 movwf buffer+5 | |
4162 TFT_show_ppO2_1: | |
4163 movlw " " | |
4164 cpfseq buffer+0 ; For ppO2 in custom view | |
4165 bra TFT_show_ppO2_2 | |
4166 movlw "0" ; Replace Space with "0" | |
4167 movwf buffer+0 | |
4158 TFT_show_ppO2_2: | 4168 TFT_show_ppO2_2: |
4159 movlw dm_warning_length ; Divemode string length | 4169 banksel common |
4170 movlw dm_warning_length ; Divemode string length | |
4160 ; neg_flag_velocity is hijacked, used to toggle the fillup lenght. | 4171 ; neg_flag_velocity is hijacked, used to toggle the fillup lenght. |
4161 btfsc neg_flag_velocity | 4172 btfsc neg_flag_velocity |
4162 movlw .4 | 4173 movlw .4 |
4163 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) | 4174 rcall TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) |
4164 STRCAT_PRINT "" | 4175 STRCAT_PRINT "" |
4165 call TFT_standard_color | 4176 call TFT_standard_color |
4166 call TFT_warning_set_window_end | 4177 bcf win_invert |
4167 return | 4178 return |
4168 | 4179 |
4169 TFT_show_ppO2_3: | 4180 TFT_show_ppO2_3: |
4170 STRCAT ">6.6" | 4181 STRCAT "'6.6" ; Workaround until a ">" is available in STD font |
4171 bra TFT_show_ppO2_2 | 4182 bra TFT_show_ppO2_2 |
4172 | 4183 |
4173 | 4184 |
4174 global TFT_LogOffset_Logtitle | 4185 global TFT_LogOffset_Logtitle |
4175 TFT_LogOffset_Logtitle: | 4186 TFT_LogOffset_Logtitle: |