comparison src/tft_outputs.asm @ 303:9b1b0b32e7d5 new_screen_layout

Add configuration option to control depth warning blinking
author janos_kovacs <kovjanos@gmail.com>
date Mon, 01 Jun 2015 15:21:25 +0200
parents 5ad479f2a868
children 14719662fb95
comparison
equal deleted inserted replaced
301:4e803c136972 303:9b1b0b32e7d5
237 movwf hi 237 movwf hi
238 movff lo,sub_b+0 238 movff lo,sub_b+0
239 movff hi,sub_b+1 239 movff hi,sub_b+1
240 movff hi_temp,hi 240 movff hi_temp,hi
241 movff lo_temp,lo ; Restore hi, lo 241 movff lo_temp,lo ; Restore hi, lo
242
243 TSTOSS opt_depthblink ; 0=standard, 1=blink
244 bra TFT_color_code_depth_std
245 ;TFT_color_code_depth_blink:
242 call subU16 ; sub_c = sub_a - sub_b 246 call subU16 ; sub_c = sub_a - sub_b
243 btfss neg_flag 247 btfss neg_flag
244 bra TFT_color_code_depth_warn ; Set to warning color 248 bra TFT_color_code_depth_warn ; Set to warning color
245 call TFT_color_code_ppo2_depth ; check depth against MOD 249 call TFT_color_code_ppo2_depth ; check depth against MOD
250 return
251
252 TFT_color_code_depth_std:
253 call subU16 ; sub_c = sub_a - sub_b
254 btfss neg_flag
255 bra TFT_warnings_color ; Set to warning color
256 call TFT_standard_color
246 return 257 return
247 258
248 TFT_color_code_ppo2_depth: 259 TFT_color_code_ppo2_depth:
249 SAFE_2BYTE_COPY amb_pressure, xA 260 SAFE_2BYTE_COPY amb_pressure, xA
250 movlw d'10' 261 movlw d'10'
1914 output_16 ; feet in Big font 1925 output_16 ; feet in Big font
1915 bcf leftbind 1926 bcf leftbind
1916 movlw .3 ; limit to three chars 1927 movlw .3 ; limit to three chars
1917 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) 1928 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG)
1918 STRCAT_PRINT "" ; Display feet 1929 STRCAT_PRINT "" ; Display feet
1919 bcf win_invert ; Reset invert flag 1930 bcf win_invert ; Reset invert flag
1920 return 1931 return
1921 1932
1922 depth_less_0.3mtr_feet: 1933 depth_less_0.3mtr_feet:
1923 STRCAT_PRINT "0 " ; manual zero 1934 STRCAT_PRINT "0 " ; manual zero
1924 bcf win_invert ; Reset invert flag 1935 bcf win_invert ; Reset invert flag
2026 WIN_BOX_BLACK dm_depth_row, dm_depth_bot, dm_depth_column, dm_depth_rgt ;top, bottom, left, right 2037 WIN_BOX_BLACK dm_depth_row, dm_depth_bot, dm_depth_column, dm_depth_rgt ;top, bottom, left, right
2027 bsf depth_greater_100m ; Set Flag 2038 bsf depth_greater_100m ; Set Flag
2028 return 2039 return
2029 2040
2030 TFT_depth_blink: 2041 TFT_depth_blink:
2042 TSTOSS opt_depthblink ; 0=standard, 1=blink
2043 return
2044
2031 ; check if previous cycle had the blinking warning or not 2045 ; check if previous cycle had the blinking warning or not
2032 btfsc blinking_depth_prev ; did we have warning prev? 2046 btfsc blinking_depth_prev ; did we have warning prev?
2033 bra TFT_depth_blink_prevwarn ; Yes 2047 bra TFT_depth_blink_prevwarn ; Yes
2034 2048
2035 ; No; check if it's set now 2049 ; No; check if it's set now