comparison code_part1/OSTC_code_asm_part1/menu_gassetup.asm @ 681:6e456a6398e0

Hardware4 support
author heinrichsweikamp
date Fri, 25 Jan 2013 18:00:49 +0100
parents 420e62cd88ad
children aebb6d039249
comparison
equal deleted inserted replaced
680:c6220d340684 681:6e456a6398e0
26 menu_gassetup: 26 menu_gassetup:
27 movlw d'1' 27 movlw d'1'
28 movwf menupos 28 movwf menupos
29 29
30 menu_gassetup_prelist: 30 menu_gassetup_prelist:
31 call PLED_ClearScreen 31 call DISP_ClearScreen
32 call gassetup_sort_gaslist ; Sorts Gaslist according to change depth 32 call gassetup_sort_gaslist ; Sorts Gaslist according to change depth
33 call menu_pre_loop_common ; Clear some menu flags, timeout and switches 33 call menu_pre_loop_common ; Clear some menu flags, timeout and switches
34 call PLED_topline_box 34 call DISP_topline_box
35 WIN_INVERT .1 ; Init new Wordprocessor 35 WIN_INVERT .1 ; Init new Wordprocessor
36 DISPLAYTEXT .106 ; Gas List 36 DISPLAYTEXT .106 ; Gas List
37 WIN_INVERT .0 ; Init new Wordprocessor 37 WIN_INVERT .0 ; Init new Wordprocessor
38 clrf decodata+0 ; Here: # of gas 0-4 38 clrf decodata+0 ; Here: # of gas 0-4
39 clrf divemins+0 ; Here: # of Gas * 4 39 clrf divemins+0 ; Here: # of Gas * 4
58 bsf leftbind 58 bsf leftbind
59 output_99 59 output_99
60 PUTC ':' 60 PUTC ':'
61 61
62 movf decodata+0,W 62 movf decodata+0,W
63 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases 63 call DISP_grey_inactive_gas ; Sets Greyvalue for inactive gases
64 call word_processor 64 call word_processor
65 WIN_LEFT .40 65 WIN_LEFT .40
66 movf waitms_temp,W ; Load row into WREG 66 movf waitms_temp,W ; Load row into WREG
67 movff WREG,win_top 67 movff WREG,win_top
68 lfsr FSR2,letter 68 lfsr FSR2,letter
76 PUTC '*' ; display * 76 PUTC '*' ; display *
77 77
78 ; New v1.44se 78 ; New v1.44se
79 menu_gassetup_Tx: 79 menu_gassetup_Tx:
80 movf decodata+0,W 80 movf decodata+0,W
81 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases 81 call DISP_grey_inactive_gas ; Sets Greyvalue for inactive gases
82 call word_processor 82 call word_processor
83 83
84 WIN_LEFT .48 84 WIN_LEFT .48
85 movf waitms_temp,W ; Load row into WREG 85 movf waitms_temp,W ; Load row into WREG
86 movff WREG,win_top 86 movff WREG,win_top
147 output_8 147 output_8
148 148
149 ; Changed v1.44se 149 ; Changed v1.44se
150 menu_gassetup_list0: 150 menu_gassetup_list0:
151 movf decodata+0,W 151 movf decodata+0,W
152 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases 152 call DISP_grey_inactive_gas ; Sets Greyvalue for inactive gases
153 call word_processor 153 call word_processor
154 154
155 WIN_LEFT .105 155 WIN_LEFT .105
156 movf waitms_temp,W ; Load row into WREG 156 movf waitms_temp,W ; Load row into WREG
157 movff WREG,win_top 157 movff WREG,win_top
165 movff EEDATA,lo 165 movff EEDATA,lo
166 166
167 output_8 167 output_8
168 PUTC TXT_METER_C 168 PUTC TXT_METER_C
169 movf decodata+0,W 169 movf decodata+0,W
170 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases 170 call DISP_grey_inactive_gas ; Sets Greyvalue for inactive gases
171 call word_processor 171 call word_processor
172 172
173 call PLED_standard_color 173 call DISP_standard_color
174 174
175 incf decodata+0,F 175 incf decodata+0,F
176 movlw d'5' 176 movlw d'5'
177 cpfseq decodata+0 177 cpfseq decodata+0
178 goto menu_gassetup_list 178 goto menu_gassetup_list
179 179
180 DISPLAYTEXT .11 ; Exit 180 DISPLAYTEXT .11 ; Exit
181 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! 181 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
182 call PLED_menu_cursor 182 call DISP_menu_cursor
183 183
184 gassetup_list_loop: 184 gassetup_list_loop:
185 call check_switches_logbook 185 call check_switches_logbook
186 186
187 btfsc menubit3 187 btfsc menubit3
208 movlw d'1' 208 movlw d'1'
209 movwf menupos 209 movwf menupos
210 210
211 gassetup_list3: 211 gassetup_list3:
212 clrf timeout_counter2 212 clrf timeout_counter2
213 call PLED_menu_cursor 213 call DISP_menu_cursor
214 214
215 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! 215 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
216 216
217 bcf menubit3 ; clear flag 217 bcf menubit3 ; clear flag
218 bra gassetup_list_loop 218 bra gassetup_list_loop
276 bcf gas_setup_page2 ; Page 1 of gassetup 276 bcf gas_setup_page2 ; Page 1 of gassetup
277 bcf menubit4 277 bcf menubit4
278 bcf first_FA ; Here: =1: -, =0: + 278 bcf first_FA ; Here: =1: -, =0: +
279 279
280 menu_gassetup0: 280 menu_gassetup0:
281 call PLED_ClearScreen 281 call DISP_ClearScreen
282 DISPLAYTEXT .147 ; More... 282 DISPLAYTEXT .147 ; More...
283 DISPLAYTEXT .11 ; Exit 283 DISPLAYTEXT .11 ; Exit
284 284
285 menu_gassetup1: 285 menu_gassetup1:
286 call menu_pre_loop_common ; Clear some menu flags, timeout and switches 286 call menu_pre_loop_common ; Clear some menu flags, timeout and switches
400 movff EEDATA,lo 400 movff EEDATA,lo
401 output_8 401 output_8
402 STRCAT_PRINT " " 402 STRCAT_PRINT " "
403 403
404 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! 404 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
405 call PLED_menu_cursor 405 call DISP_menu_cursor
406 406
407 gassetup_loop: 407 gassetup_loop:
408 call check_switches_logbook 408 call check_switches_logbook
409 409
410 btfsc menubit3 410 btfsc menubit3
432 movwf menupos 432 movwf menupos
433 433
434 gassetup3: 434 gassetup3:
435 435
436 clrf timeout_counter2 436 clrf timeout_counter2
437 call PLED_menu_cursor 437 call DISP_menu_cursor
438 438
439 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! 439 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
440 440
441 bcf menubit3 ; clear flag 441 bcf menubit3 ; clear flag
442 bra gassetup_loop 442 bra gassetup_loop
604 movwf menupos 604 movwf menupos
605 bra menu_gassetup1 ; 605 bra menu_gassetup1 ;
606 606
607 607
608 next_gas_page: 608 next_gas_page:
609 call PLED_ClearScreen 609 call DISP_ClearScreen
610 movlw d'1' 610 movlw d'1'
611 movwf menupos 611 movwf menupos
612 bcf first_FA ; Here: =1: -, =0: + 612 bcf first_FA ; Here: =1: -, =0: +
613 bcf second_FA ; Here: =1: Is first gas 613 bcf second_FA ; Here: =1: Is first gas
614 DISPLAYTEXT .107 ; Depth +/- 614 DISPLAYTEXT .107 ; Depth +/-
675 movwf sub_b+0 675 movwf sub_b+0
676 clrf sub_b+1 676 clrf sub_b+1
677 call sub16 ; sub_c = sub_a - sub_b 677 call sub16 ; sub_c = sub_a - sub_b
678 btfss neg_flag 678 btfss neg_flag
679 bra gassetup_color_code_ppo2_1; too high -> Warning Color! 679 bra gassetup_color_code_ppo2_1; too high -> Warning Color!
680 call PLED_standard_color 680 call DISP_standard_color
681 bra gassetup_color_code_ppo2_2 681 bra gassetup_color_code_ppo2_2
682 gassetup_color_code_ppo2_1: 682 gassetup_color_code_ppo2_1:
683 call PLED_warnings_color 683 call DISP_warnings_color
684 gassetup_color_code_ppo2_2: 684 gassetup_color_code_ppo2_2:
685 call word_processor 685 call word_processor
686 call PLED_standard_color 686 call DISP_standard_color
687 687
688 WIN_TOP .95 688 WIN_TOP .95
689 WIN_LEFT .95 689 WIN_LEFT .95
690 lfsr FSR2,letter 690 lfsr FSR2,letter
691 movlw '+' 691 movlw '+'
737 737
738 active_gas_display_end: 738 active_gas_display_end:
739 call word_processor 739 call word_processor
740 740
741 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! 741 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
742 call PLED_menu_cursor 742 call DISP_menu_cursor
743 743
744 next_gas_page_loop: 744 next_gas_page_loop:
745 call check_switches_logbook 745 call check_switches_logbook
746 746
747 btfsc menubit3 747 btfsc menubit3
769 movlw d'1' 769 movlw d'1'
770 movwf menupos 770 movwf menupos
771 771
772 next_gas_page3: 772 next_gas_page3:
773 clrf timeout_counter2 773 clrf timeout_counter2
774 call PLED_menu_cursor 774 call DISP_menu_cursor
775 775
776 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! 776 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
777 777
778 bcf menubit3 ; clear flag 778 bcf menubit3 ; clear flag
779 bra next_gas_page_loop 779 bra next_gas_page_loop
895 bra next_gas_page1 895 bra next_gas_page1
896 896
897 897
898 ; Changed v1.44se 898 ; Changed v1.44se
899 gassetup_title_bar2: 899 gassetup_title_bar2:
900 call PLED_topline_box 900 call DISP_topline_box
901 WIN_INVERT .1 ; Init new Wordprocessor 901 WIN_INVERT .1 ; Init new Wordprocessor
902 WIN_TOP .2 902 WIN_TOP .2
903 WIN_LEFT .0 903 WIN_LEFT .0
904 lfsr FSR2,letter 904 lfsr FSR2,letter
905 OUTPUTTEXT .95 ; Gas# 905 OUTPUTTEXT .95 ; Gas#