annotate code_part1/OSTC_code_asm_part1/menu_ppO2.asm @ 498:4c7f7807b250

minor fixes in german layout
author heinrichsweikamp
date Mon, 14 Nov 2011 08:12:13 +0100
parents 6e57b5bb98ce
children cbdcbbc91877
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
1
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
2 ; OSTC - diving computer code
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
3 ; Copyright (C) 2008 HeinrichsWeikamp GbR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
5 ; This program is free software: you can redistribute it and/or modify
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
6 ; it under the terms of the GNU General Public License as published by
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
7 ; the Free Software Foundation, either version 3 of the License, or
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
8 ; (at your option) any later version.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
9
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
10 ; This program is distributed in the hope that it will be useful,
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
13 ; GNU General Public License for more details.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
14
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
15 ; You should have received a copy of the GNU General Public License
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
16 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
17
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
18
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
19 ; Constant ppO2 Setup menu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
20 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
21 ; written: 08/04/04
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
22 ; last updated: 080904
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
23 ; known bugs:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
24 ; ToDo:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
25
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
26 menu_const_ppO2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
27 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
28 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
29
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
30 bcf menubit4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
31 bcf cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
32 bcf sleepmode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
33 clrf decodata+0 ; Here: # of SP
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
34 bcf first_FA ; Here: =1: -, =0: +
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
35 bcf second_FA ; Here: =1: 1, =0: 10 steps
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
36
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
37 menu_const_ppO20:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
38 call PLED_ClearScreen
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
39 call PLED_topline_box
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
40
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
41 WIN_INVERT .1 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
42 DISPLAYTEXT .111 ; Constant ppO2 Setup
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
43 WIN_INVERT .0 ; Init new Wordprocessor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
44
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
45
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
46 menu_const_ppO21:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
47 clrf timeout_counter2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
48 bcf menubit2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
49 bcf menubit3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
50
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
51 WIN_LEFT .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
52 WIN_TOP .35
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
53 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
54 OUTPUTTEXT .112 ; SP#
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
55 movff decodata+0,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
56 incf lo,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
57 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
58 output_99
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 0
diff changeset
59 STRCAT " ("
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
60
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
61 OUTPUTTEXT d'192' ; Dil.
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 0
diff changeset
62 PUTC ' '
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
63
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
64 read_int_eeprom d'33' ; Read byte (stored in EEDATA)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
65 movff EEDATA,active_gas ; Read start gas (1-5)
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
66
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
67 decf active_gas,W ; Gas 0-4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
68 mullw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
69 movf PRODL,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
70 addlw d'6' ; = address for O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
71 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
72 call read_eeprom ; Read O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
73 movff EEDATA, lo ; O2 ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
74
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
75
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
76 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
77 output_99
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
78
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 0
diff changeset
79 PUTC '/'
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
80
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
81 decf active_gas,W ; Gas 0-4
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
82 mullw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
83 movf PRODL,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
84 addlw d'7' ; = address for He ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
85 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
86 call read_eeprom ; Read He ratio
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
87 movff EEDATA,lo ; And copy into hold register
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
88
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
89 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
90 output_99
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 0
diff changeset
91 STRCAT_PRINT ")"
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
92
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
93
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
94 WIN_LEFT .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
95 WIN_TOP .65
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
96
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
97 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
98 OUTPUTTEXT .97 ; "Current: "
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
99 movf decodata+0,W
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
100 addlw d'36' ; offset in eeprom
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
101 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
102 call read_eeprom ; ppO2 value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
103 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
104 clrf hi
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
105 bsf leftbind
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
106 output_16dp d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
107 bcf leftbind
445
6e57b5bb98ce localisation part 1 from Sergei
heinrichsweikamp
parents: 398
diff changeset
108 STRCAT_PRINT TXT_BAR4
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
109
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
110 WIN_LEFT .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
111 WIN_TOP .95
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
112
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
113 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
114 OUTPUTTEXT d'190' ; ppO2 +
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
115 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
116
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
117 WIN_LEFT .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
118 WIN_TOP .125
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
119
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
120 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
121 OUTPUTTEXT d'191' ; ppO2 -
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
122 call word_processor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
123
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
124 WIN_LEFT .20
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
125 WIN_TOP .155
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
126
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
127 lfsr FSR2,letter
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
128 OUTPUTTEXT .89 ; "Default: "
123
6a94f96e9cea The big cleanup, again.
JeanDo
parents: 0
diff changeset
129 STRCAT_PRINT "1.00"
0
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
130
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
131 DISPLAYTEXT .11 ; Exit
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
132 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
133 call PLED_menu_cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
134
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
135 menu_const_ppO2_loop:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
136 call check_switches_logbook
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
137
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
138 btfsc menubit3
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
139 bra menu_const_ppO22 ; move cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
140
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
141 btfsc menubit2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
142 bra do_menu_const_ppO2 ; call submenu
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
143
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
144 btfsc divemode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
145 goto restart ; dive started!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
146
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
147 btfsc onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
148 call timeout_surfmode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
149
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
150 btfsc onesecupdate
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
151 call set_dive_modes
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
152
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
153 bcf onesecupdate ; 1 sec. functions done
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
154
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
155 btfsc sleepmode
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
156 bra exit_menu_const_ppO2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
157
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
158 bra menu_const_ppO2_loop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
159
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
160 menu_const_ppO22:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
161 incf menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
162
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
163 movlw d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
164 cpfseq menupos ; =2?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
165 bra menu_const_ppO22a ; No
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
166 incf menupos,F ; Skip pos. 2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
167
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
168 menu_const_ppO22a:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
169 movlw d'7'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
170 cpfseq menupos ; =7?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
171 bra menu_const_ppO23 ; No
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
172 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
173 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
174
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
175 menu_const_ppO23:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
176 clrf timeout_counter2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
177 call PLED_menu_cursor
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
178
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
179 ; debounce switches
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
180 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
181 bcf menubit3 ; clear flag
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
182 bra menu_const_ppO2_loop
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
183
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
184 do_menu_const_ppO2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
185 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
186 bra next_ppO2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
187 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
188 bra change_ppo2_plus
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
189 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
190 bra change_ppo2_plus
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
191 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
192 bra change_ppo2_minus
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
193 dcfsnz menupos,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
194 bra change_ppo2_reset
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
195 exit_menu_const_ppO2: ; exit...
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
196 movlw d'2'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
197 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
198 goto more_menu2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
199
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
200 change_ppo2_plus:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
201 movf decodata+0,W ; read current value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
202 addlw d'36' ; offset in memory
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
203 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
204 call read_eeprom ; Low-value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
205 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
206
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
207 incf lo,F ; increase depth
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
208 movlw d'251'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
209 cpfseq lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
210 bra change_ppo2_plus2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
211 movlw d'250'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
212 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
213 change_ppo2_plus2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
214 movff lo,EEDATA ; write result
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
215 call write_eeprom ; save result in EEPROM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
216 movlw d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
217 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
218 bra menu_const_ppO21
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
219
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
220 change_ppo2_minus:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
221 movf decodata+0,W ; read current value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
222 addlw d'36' ; offset in memory
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
223 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
224 call read_eeprom ; Low-value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
225 movff EEDATA,lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
226
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
227 decf lo,F ; decrease depth
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
228 movlw d'255'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
229 cpfseq lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
230 bra change_ppo2_minus2
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
231 movlw d'0'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
232 movwf lo
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
233
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
234 change_ppo2_minus2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
235 movff lo,EEDATA ; write result
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
236 call write_eeprom ; save result in EEPROM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
237
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
238 movlw d'4'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
239 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
240 bra menu_const_ppO21
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
241
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
242 change_ppo2_reset: ; reset to 1.00Bar
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
243 movf decodata+0,W ; read current value
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
244 addlw d'36' ; offset in memory
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
245 movwf EEADR
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
246 movlw d'100'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
247 movwf EEDATA
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
248 call write_eeprom ; save result in EEPROM
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
249 movlw d'5'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
250 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
251 bra menu_const_ppO21
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
252
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
253 next_ppO2:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
254 incf decodata+0,F
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
255 movlw d'3'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
256 cpfseq decodata+0 ; =3?
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
257 bra next_ppO22
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
258 clrf decodata+0 ; yes, so reset to zero
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
259 next_ppO22:
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
260 movlw d'1'
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
261 movwf menupos
96a35aeda5f2 Initial setup
heinrichsweikamp
parents:
diff changeset
262 bra menu_const_ppO21