comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 69:df2d3b28947f

1.71beta for Mk.2
author heinrichsweikamp
date Tue, 19 Oct 2010 15:35:23 +0200
parents d0b677e1e9a5
children 8d8e753d72e3
comparison
equal deleted inserted replaced
68:d0b677e1e9a5 69:df2d3b28947f
88 bra PLED_color_code_gf ; CF45 [%] 88 bra PLED_color_code_gf ; CF45 [%]
89 dcfsnz debug_temp,F 89 dcfsnz debug_temp,F
90 bra PLED_color_code_ppo2 ; CF46 [cBar] 90 bra PLED_color_code_ppo2 ; CF46 [cBar]
91 dcfsnz debug_temp,F 91 dcfsnz debug_temp,F
92 bra PLED_color_code_velocity ; CF47 [m/min] 92 bra PLED_color_code_velocity ; CF47 [m/min]
93 dcfsnz debug_temp,F
94 bra PLED_color_code_ceiling ; Show warning if CF41=1 and current depth>shown ceiling
95
96 PLED_color_code_ceiling:
97 GETCUSTOM8 d'40' ; =1: Warn at all?
98 movwf lo
99 movlw d'1'
100 cpfseq lo ; =1?
101 bra PLED_color_code_ceiling1 ; No, Set to default color
102
103 movff char_O_array_decodepth+0,lo ; Ceiling in m
104 decf lo,F ; -1
105 movff rel_pressure+1,xA+1
106 movff rel_pressure+0,xA+0
107 movlw LOW d'100'
108 movwf xB+0
109 clrf xB+1 ; Devide/100 -> xC+0 = Depth in m
110 call div16x16 ; xA/xB=xC with xA as remainder
111 movf xC+0,W ; Depth in m
112 subwf lo,W
113 btfsc STATUS,C
114 bra PLED_color_code_ceiling2 ; Set to warning color
115 PLED_color_code_ceiling1:
116 call PLED_standard_color
117 return
118 PLED_color_code_ceiling2:
119 call PLED_warnings_color
120 return
93 121
94 PLED_color_code_depth: 122 PLED_color_code_depth:
95 movff hi,hi_temp 123 movff hi,hi_temp
96 movff lo,lo_temp 124 movff lo,lo_temp
97 movff rel_pressure+1,hi 125 movff rel_pressure+1,hi
399 427
400 WIN_TOP .118 428 WIN_TOP .118
401 WIN_LEFT .94 429 WIN_LEFT .94
402 WIN_FONT FT_MEDIUM 430 WIN_FONT FT_MEDIUM
403 WIN_INVERT .0 ; Init new Wordprocessor 431 WIN_INVERT .0 ; Init new Wordprocessor
404 call PLED_standard_color 432 PLED_color_code warn_ceiling ; Color-code Output
405 lfsr FSR2,letter 433 lfsr FSR2,letter
406 movff char_O_array_decodepth+0,lo ; Ceiling in m 434 movff char_O_array_decodepth+0,lo ; Ceiling in m
407 output_99 435 output_99
408 movlw 'm' ; "m" 436 movlw 'm' ; "m"
409 movwf POSTINC2 437 movwf POSTINC2