Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/menu_gassetup.asm @ 642:2cecac640202
Diluent setup menu work
author | heinrichsweikamp |
---|---|
date | Wed, 03 Oct 2012 11:39:50 +0200 |
parents | ab2686087bce |
children | 420e62cd88ad |
comparison
equal
deleted
inserted
replaced
641:9dc52559956e | 642:2cecac640202 |
---|---|
94 movlw d'0' ; Move 0 -> WREG | 94 movlw d'0' ; Move 0 -> WREG |
95 cpfsgt lo ; He > 0? | 95 cpfsgt lo ; He > 0? |
96 bra menu_gassetup_Nx ; NO check o2 | 96 bra menu_gassetup_Nx ; NO check o2 |
97 | 97 |
98 ; YES Write TX 15/55 | 98 ; YES Write TX 15/55 |
99 call gassetup_write_Tx | 99 STRCAT TXT_TX3 |
100 movff wait_temp, EEADR ; Gas %O2 - Set address in internal EEPROM | 100 movff wait_temp, EEADR ; Gas %O2 - Set address in internal EEPROM |
101 call read_eeprom ; O2 value | 101 call read_eeprom ; O2 value |
102 movff EEDATA,lo | 102 movff EEDATA,lo |
103 output_8 | 103 output_8 |
104 PUTC '/' | 104 PUTC '/' |
120 movlw d'100' ; Move 100 -> WREG | 120 movlw d'100' ; Move 100 -> WREG |
121 cpfslt lo ; o2 < 100% | 121 cpfslt lo ; o2 < 100% |
122 bra menu_gassetup_O2 ; NO write O2 | 122 bra menu_gassetup_O2 ; NO write O2 |
123 | 123 |
124 ; YES Write NX 32 | 124 ; YES Write NX 32 |
125 call gassetup_write_Nx | 125 STRCAT TXT_NX3 |
126 output_8 | 126 output_8 |
127 bra menu_gassetup_list0 | 127 bra menu_gassetup_list0 |
128 | 128 |
129 ; New v1.44se | 129 ; New v1.44se |
130 menu_gassetup_O2: | 130 menu_gassetup_O2: |
133 bra menu_gassetup_list0 | 133 bra menu_gassetup_list0 |
134 | 134 |
135 ; New v1.44se | 135 ; New v1.44se |
136 menu_gassetup_Air: | 136 menu_gassetup_Air: |
137 cpfseq lo ; o2 = 21% | 137 cpfseq lo ; o2 = 21% |
138 call menu_gassetup_Err | 138 bra menu_gassetup_Err |
139 | 139 |
140 STRCAT TXT_AIR4 | 140 STRCAT TXT_AIR4 |
141 output_8 | 141 output_8 |
142 bra menu_gassetup_list0 | 142 bra menu_gassetup_list0 |
143 | 143 |
272 menu_gassetup_page1: | 272 menu_gassetup_page1: |
273 movlw d'1' | 273 movlw d'1' |
274 movwf menupos | 274 movwf menupos |
275 bcf gas_setup_page2 ; Page 1 of gassetup | 275 bcf gas_setup_page2 ; Page 1 of gassetup |
276 bcf menubit4 | 276 bcf menubit4 |
277 bcf sleepmode | |
278 bcf first_FA ; Here: =1: -, =0: + | 277 bcf first_FA ; Here: =1: -, =0: + |
279 | 278 |
280 menu_gassetup0: | 279 menu_gassetup0: |
281 call PLED_ClearScreen | 280 call PLED_ClearScreen |
282 DISPLAYTEXT .147 ; More... | 281 DISPLAYTEXT .147 ; More... |
923 movlw d'0' ; Move 0 -> WREG | 922 movlw d'0' ; Move 0 -> WREG |
924 cpfsgt lo ; He > 0? | 923 cpfsgt lo ; He > 0? |
925 bra gassetup_title_bar3 ; NO check o2 | 924 bra gassetup_title_bar3 ; NO check o2 |
926 | 925 |
927 ; YES Write TX 15/55 | 926 ; YES Write TX 15/55 |
928 call gassetup_write_Tx ; Write TX | 927 STRCAT TXT_TX3 |
929 movf divemins+0,W | 928 movf divemins+0,W |
930 addlw 0x06 | 929 addlw 0x06 |
931 movwf EEADR | 930 movwf EEADR |
932 call read_eeprom ; O2 value | 931 call read_eeprom ; O2 value |
933 movff EEDATA,lo | 932 movff EEDATA,lo |
956 movlw d'100' ; Move 100 -> WREG | 955 movlw d'100' ; Move 100 -> WREG |
957 cpfslt lo ; o2 < 100% | 956 cpfslt lo ; o2 < 100% |
958 bra gassetup_title_bar4 ; NO write O2 | 957 bra gassetup_title_bar4 ; NO write O2 |
959 | 958 |
960 ; YES Write NX 32 | 959 ; YES Write NX 32 |
961 call gassetup_write_Nx | 960 STRCAT TXT_NX3 |
962 output_8 | 961 output_8 |
963 bra gassetup_title_bar7 | 962 bra gassetup_title_bar7 |
964 | 963 |
965 ; New v1.44se | 964 ; New v1.44se |
966 gassetup_title_bar4: | 965 gassetup_title_bar4: |
979 | 978 |
980 ; New v1.44se | 979 ; New v1.44se |
981 gassetup_title_bar6: ; ERROR | 980 gassetup_title_bar6: ; ERROR |
982 STRCAT TXT_ERR4 | 981 STRCAT TXT_ERR4 |
983 output_8 | 982 output_8 |
984 bra gassetup_title_bar7 | 983 ;bra gassetup_title_bar7 |
985 | 984 |
986 gassetup_title_bar7: | 985 gassetup_title_bar7: |
987 STRCAT TXT_AT4 | 986 STRCAT TXT_AT4 |
988 movf decodata+0,W ; read current value | 987 movf decodata+0,W ; read current value |
989 addlw d'28' ; offset in memory | 988 addlw d'28' ; offset in memory |
992 movff EEDATA,lo | 991 movff EEDATA,lo |
993 output_8 | 992 output_8 |
994 STRCAT_PRINT TXT_METER2 | 993 STRCAT_PRINT TXT_METER2 |
995 | 994 |
996 WIN_INVERT .0 ; Init new Wordprocessor | 995 WIN_INVERT .0 ; Init new Wordprocessor |
997 return | |
998 | |
999 ; New v1.44se | |
1000 gassetup_write_Nx: | |
1001 STRCAT TXT_NX3 | |
1002 return | |
1003 | |
1004 ; New v1.44se | |
1005 gassetup_write_Tx: | |
1006 STRCAT TXT_TX3 | |
1007 return | 996 return |
1008 | 997 |
1009 gassetup_show_ppO2: | 998 gassetup_show_ppO2: |
1010 movf divemins+0,W | 999 movf divemins+0,W |
1011 addlw 0x06 | 1000 addlw 0x06 |