Mercurial > public > mk2
annotate code_part1/OSTC_code_asm_part1/menu_gassetup.asm @ 575:cbdcbbc91877
some code cleaning
author | heinrichsweikamp |
---|---|
date | Sat, 21 Apr 2012 15:08:09 +0200 |
parents | 7f5419d4157d |
children | ab2686087bce |
rev | line source |
---|---|
0 | 1 |
2 ; OSTC - diving computer code | |
3 ; Copyright (C) 2008 HeinrichsWeikamp GbR | |
4 | |
5 ; This program is free software: you can redistribute it and/or modify | |
6 ; it under the terms of the GNU General Public License as published by | |
7 ; the Free Software Foundation, either version 3 of the License, or | |
8 ; (at your option) any later version. | |
9 | |
10 ; This program is distributed in the hope that it will be useful, | |
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 ; GNU General Public License for more details. | |
14 | |
15 ; You should have received a copy of the GNU General Public License | |
16 ; along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 | |
18 | |
19 ; Gas Setup menu | |
20 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com | |
21 ; written: 10/08/07 | |
22 ; last updated: 080906 | |
23 ; known bugs: | |
24 ; ToDo: | |
25 | |
26 menu_gassetup: | |
27 movlw d'1' | |
28 movwf menupos | |
29 | |
30 menu_gassetup_prelist: | |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
31 call PLED_ClearScreen |
47 | 32 call gassetup_sort_gaslist ; Sorts Gaslist according to change depth |
0 | 33 clrf timeout_counter2 |
34 bcf sleepmode | |
35 bcf menubit2 | |
36 bcf menubit3 | |
37 call PLED_topline_box | |
38 WIN_INVERT .1 ; Init new Wordprocessor | |
39 DISPLAYTEXT .106 ; Gas List | |
40 WIN_INVERT .0 ; Init new Wordprocessor | |
41 clrf decodata+0 ; Here: # of gas 0-4 | |
42 clrf divemins+0 ; Here: # of Gas * 4 | |
43 movlw d'5' | |
44 movwf waitms_temp ; here: stores row for gas list | |
45 movlw d'2' | |
46 movwf wait_temp ; here: stores eeprom address for gas list | |
47 | |
48 ; Changed v1.44se | |
49 menu_gassetup_list: | |
50 WIN_LEFT .20 | |
51 movlw d'4' | |
52 addwf wait_temp,F ; Increase eeprom address for gas list | |
53 movlw d'30' | |
54 addwf waitms_temp,F ; Increase row | |
55 movf waitms_temp,W ; Load row into WREG | |
56 movff WREG,win_top | |
57 lfsr FSR2,letter | |
445 | 58 PUTC TXT_GAS_C |
0 | 59 movff decodata+0,lo |
60 incf lo,F | |
61 bsf leftbind | |
62 output_99 | |
123 | 63 PUTC ':' |
0 | 64 |
121
e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
JeanDo
parents:
115
diff
changeset
|
65 movf decodata+0,W |
e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
JeanDo
parents:
115
diff
changeset
|
66 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases |
0 | 67 call word_processor |
68 WIN_LEFT .40 | |
69 movf waitms_temp,W ; Load row into WREG | |
70 movff WREG,win_top | |
71 lfsr FSR2,letter | |
72 | |
73 movlw d'33' | |
74 movwf EEADR | |
75 call read_eeprom ; Get current startgas 1-5 # into EEDATA | |
76 decf EEDATA,W ; 0-4 | |
77 cpfseq decodata+0 ; =current displayed gas #? | |
78 bra menu_gassetup_Tx ; no, do not display * | |
123 | 79 PUTC '*' ; display * |
0 | 80 |
81 ; New v1.44se | |
82 menu_gassetup_Tx: | |
121
e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
JeanDo
parents:
115
diff
changeset
|
83 movf decodata+0,W |
e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
JeanDo
parents:
115
diff
changeset
|
84 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases |
0 | 85 call word_processor |
86 | |
87 WIN_LEFT .48 | |
88 movf waitms_temp,W ; Load row into WREG | |
89 movff WREG,win_top | |
90 lfsr FSR2,letter | |
91 | |
92 movff wait_temp, EEADR ; Gas %He - Set address in internal EEPROM | |
93 incf EEADR,F ; Gas %He - Set address in internal EEPROM | |
94 call read_eeprom ; Read He value from EEPROM | |
95 movff EEDATA,lo ; Move EEDATA -> lo | |
96 movf lo,f ; Move lo -> f | |
97 movlw d'0' ; Move 0 -> WREG | |
98 cpfsgt lo ; He > 0? | |
99 bra menu_gassetup_Nx ; NO check o2 | |
100 | |
101 ; YES Write TX 15/55 | |
102 call gassetup_write_Tx | |
103 movff wait_temp, EEADR ; Gas %O2 - Set address in internal EEPROM | |
104 call read_eeprom ; O2 value | |
105 movff EEDATA,lo | |
106 output_8 | |
123 | 107 PUTC '/' |
0 | 108 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM |
109 call read_eeprom ; He value | |
110 movff EEDATA,lo | |
111 output_8 | |
112 bra menu_gassetup_list0 | |
113 | |
114 ; New v1.44se | |
115 menu_gassetup_Nx: | |
116 movff wait_temp, EEADR ; Gas %O2 - Set address in internal EEPROM | |
117 call read_eeprom ; Read O2 value from EEPROM | |
118 movff EEDATA,lo ; Move EEDATA -> lo | |
119 movf lo,f ; Move lo -> f | |
120 movlw d'21' ; Move 21 -> WREG | |
121 cpfsgt lo ; o2 > 21% | |
122 bra menu_gassetup_Air ; NO AIR | |
123 movlw d'100' ; Move 100 -> WREG | |
124 cpfslt lo ; o2 < 100% | |
125 bra menu_gassetup_O2 ; NO write O2 | |
126 | |
127 ; YES Write NX 32 | |
128 call gassetup_write_Nx | |
129 output_8 | |
130 bra menu_gassetup_list0 | |
131 | |
132 ; New v1.44se | |
133 menu_gassetup_O2: | |
445 | 134 STRCAT TXT_O2_3 |
0 | 135 output_8 |
136 bra menu_gassetup_list0 | |
137 | |
138 ; New v1.44se | |
139 menu_gassetup_Air: | |
140 cpfseq lo ; o2 = 21% | |
141 call menu_gassetup_Err | |
142 | |
445 | 143 STRCAT TXT_AIR4 |
0 | 144 output_8 |
145 bra menu_gassetup_list0 | |
146 | |
147 ; New v1.44se | |
148 menu_gassetup_Err: | |
445 | 149 STRCAT TXT_ERR4 |
0 | 150 output_8 |
151 | |
152 ; Changed v1.44se | |
153 menu_gassetup_list0: | |
121
e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
JeanDo
parents:
115
diff
changeset
|
154 movf decodata+0,W |
e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
JeanDo
parents:
115
diff
changeset
|
155 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases |
0 | 156 call word_processor |
157 | |
158 WIN_LEFT .105 | |
159 movf waitms_temp,W ; Load row into WREG | |
160 movff WREG,win_top | |
161 lfsr FSR2,letter | |
162 | |
532 | 163 STRCAT TXT_AT4 |
0 | 164 movf decodata+0,W ; read current value |
165 addlw d'28' ; offset in memory | |
166 movwf EEADR | |
167 call read_eeprom ; Low-value | |
168 movff EEDATA,lo | |
169 output_8 | |
445 | 170 PUTC TXT_METER_C |
121
e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
JeanDo
parents:
115
diff
changeset
|
171 movf decodata+0,W |
e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
JeanDo
parents:
115
diff
changeset
|
172 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases |
0 | 173 call word_processor |
174 | |
3 | 175 call PLED_standard_color |
0 | 176 |
177 incf decodata+0,F | |
178 movlw d'5' | |
179 cpfseq decodata+0 | |
180 goto menu_gassetup_list | |
181 | |
337 | 182 DISPLAYTEXT .11 ; Exit |
183 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
0 | 184 call PLED_menu_cursor |
185 | |
186 gassetup_list_loop: | |
187 call check_switches_logbook | |
188 | |
189 btfsc menubit3 | |
337 | 190 bra gassetup_list2 ; move cursor |
0 | 191 |
192 btfsc menubit2 | |
337 | 193 bra do_gassetup_list ; call gas-specific submenu |
0 | 194 |
195 btfsc onesecupdate | |
575 | 196 call menu_check_dive_and_timeout ; "Goto restart" or sets sleepmode flag |
0 | 197 |
337 | 198 bcf onesecupdate ; 1 sec. functions done |
0 | 199 |
200 btfsc sleepmode | |
201 bra exit_gassetup_list | |
202 | |
203 bra gassetup_list_loop | |
204 | |
205 gassetup_list2: | |
206 incf menupos,F | |
207 movlw d'7' | |
208 cpfseq menupos ; =7? | |
209 bra gassetup_list3 ; No | |
210 movlw d'1' | |
211 movwf menupos | |
212 | |
213 gassetup_list3: | |
214 clrf timeout_counter2 | |
215 call PLED_menu_cursor | |
216 | |
217 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
218 | |
219 bcf menubit3 ; clear flag | |
220 bra gassetup_list_loop | |
221 | |
222 exit_gassetup_list: ; exit... | |
223 movlw d'2' | |
224 movwf menupos | |
225 goto menu2 | |
226 | |
227 do_gassetup_list: | |
228 dcfsnz menupos,F | |
229 bra gassetup_list_edit_gas1 | |
230 dcfsnz menupos,F | |
231 bra gassetup_list_edit_gas2 | |
232 dcfsnz menupos,F | |
233 bra gassetup_list_edit_gas3 | |
234 dcfsnz menupos,F | |
235 bra gassetup_list_edit_gas4 | |
236 dcfsnz menupos,F | |
237 bra gassetup_list_edit_gas5 | |
238 bra exit_gassetup_list ; Exit List | |
239 | |
240 gassetup_list_edit_gas1: | |
241 movlw d'0' | |
242 movwf decodata+0 | |
243 movlw d'0' | |
244 movwf divemins+0 | |
245 bra menu_gassetup_page1 | |
246 | |
247 gassetup_list_edit_gas2: | |
248 movlw d'1' | |
249 movwf decodata+0 | |
250 movlw d'4' | |
251 movwf divemins+0 | |
252 bra menu_gassetup_page1 | |
253 | |
254 gassetup_list_edit_gas3: | |
255 movlw d'2' | |
256 movwf decodata+0 | |
257 movlw d'8' | |
258 movwf divemins+0 | |
259 bra menu_gassetup_page1 | |
260 | |
261 gassetup_list_edit_gas4: | |
262 movlw d'3' | |
263 movwf decodata+0 | |
264 movlw d'12' | |
265 movwf divemins+0 | |
266 bra menu_gassetup_page1 | |
267 | |
268 gassetup_list_edit_gas5: | |
269 movlw d'4' | |
270 movwf decodata+0 | |
271 movlw d'16' | |
272 movwf divemins+0 | |
273 bra menu_gassetup_page1 | |
274 | |
275 menu_gassetup_page1: | |
276 movlw d'1' | |
277 movwf menupos | |
278 bcf gas_setup_page2 ; Page 1 of gassetup | |
279 bcf menubit4 | |
280 bcf cursor | |
281 bcf sleepmode | |
282 bcf first_FA ; Here: =1: -, =0: + | |
283 | |
284 menu_gassetup0: | |
285 call PLED_ClearScreen | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
50
diff
changeset
|
286 DISPLAYTEXT .147 ; More... |
0 | 287 DISPLAYTEXT .11 ; Exit |
288 | |
289 menu_gassetup1: | |
290 clrf timeout_counter2 | |
291 bcf menubit2 | |
292 bcf menubit3 | |
293 | |
294 rcall gassetup_title_bar2 ; Displays the title bar with the current Gas info | |
295 | |
296 WIN_LEFT .20 | |
199 | 297 WIN_TOP .65 |
445 | 298 STRCPY TXT_O2_4 |
0 | 299 |
300 movf divemins+0,W | |
301 addlw 0x06 | |
302 movwf EEADR | |
199 | 303 call read_eeprom ; O2 value |
0 | 304 movff EEDATA,lo |
305 output_8 | |
199 | 306 STRCAT_PRINT "% " |
0 | 307 |
308 ; Show MOD in m | |
199 | 309 WIN_LEFT .90 |
310 lfsr FSR2, letter | |
311 OUTPUTTEXTH .297 ; MOD: | |
312 | |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
313 rcall gassetup_get_mod ; compute MOD based on CF18 into lo:hi |
0 | 314 |
315 output_16 | |
445 | 316 STRCAT_PRINT TXT_METER3 |
0 | 317 |
199 | 318 WIN_LEFT .20 |
0 | 319 WIN_TOP .95 |
445 | 320 STRCPY TXT_HE4 |
0 | 321 movf divemins+0,W |
322 addlw 0x07 | |
323 movwf EEADR | |
199 | 324 call read_eeprom ; He value |
0 | 325 movff EEDATA,lo |
326 output_8 | |
199 | 327 STRCAT_PRINT "% " |
105 | 328 |
329 ; Show END in m | |
199 | 330 lfsr FSR2, letter |
331 WIN_LEFT .90 | |
332 OUTPUTTEXTH .298 ; END: | |
304 | 333 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG |
334 mullw d'10' | |
335 movff PRODL,xA+0 | |
398
ab962c4b19d6
Fixing issue 50, correct "Bar" to "bar" in texts and comments
heinrichsweikamp
parents:
377
diff
changeset
|
336 movff PRODH,xA+1 ; ppO2 in [0.01bar] * 10 |
304 | 337 movf divemins+0,W |
338 addlw 0x06 | |
339 movwf EEADR | |
340 call read_eeprom ; O2 value | |
341 movff EEDATA,xB+0 | |
342 clrf xB+1 | |
343 call div16x16 ; xA/xB=xC with xA as remainder | |
344 movlw d'10' | |
345 subwf xC+0,F ; Subtract 10m... | |
346 movff xC+0,lo | |
347 movlw d'0' | |
348 subwfb xC+1,F | |
349 movff xC+1,hi ; lo:hi holding MOD in meters | |
105 | 350 movlw d'10' |
351 addwf lo,F | |
352 movlw d'0' | |
199 | 353 addwfc hi,F ; lo:hi holding MOD+10m |
105 | 354 |
355 movf divemins+0,W | |
356 addlw 0x07 | |
357 movwf EEADR | |
199 | 358 call read_eeprom ; He value in % -> EEDATA |
105 | 359 movlw d'100' |
360 movwf xA+0 | |
199 | 361 movf EEDATA,W ; He value in % -> EEDATA |
362 subwf xA+0,F ; xA+0 = 100 - He Value in % | |
105 | 363 clrf xA+1 |
364 movff lo,xB+0 | |
199 | 365 movff hi,xB+1 ; Copy MOD+10 |
366 call mult16x16 ; xA*xB=xC | |
105 | 367 movff xC+0,xA+0 |
368 movff xC+1,xA+1 | |
369 movlw d'100' | |
370 movwf xB+0 | |
371 clrf xB+1 | |
199 | 372 call div16x16 ; xA/xB=xC with xA as remainder |
105 | 373 ; xC:2 = ((MOD+10) * 100 - HE Value in %) / 100 |
374 movlw d'10' | |
199 | 375 subwf xC+0,F ; Subtract 10m... |
105 | 376 movff xC+0,lo |
377 movlw d'0' | |
378 subwfb xC+1,F | |
379 movff xC+1,hi | |
380 output_16 | |
445 | 381 STRCAT_PRINT TXT_METER3 |
0 | 382 |
199 | 383 WIN_LEFT .20 |
0 | 384 WIN_TOP .125 |
123 | 385 STRCPY "+/-: " |
0 | 386 movlw '+' |
387 btfsc first_FA | |
388 movlw '-' | |
389 movwf POSTINC2 | |
390 call word_processor | |
391 | |
392 WIN_TOP .155 | |
393 lfsr FSR2,letter | |
199 | 394 OUTPUTTEXT .89 ; Default: |
0 | 395 movf divemins+0,W |
396 addlw 0x04 | |
397 movwf EEADR | |
199 | 398 call read_eeprom ; Default O2 value |
0 | 399 movff EEDATA,lo |
400 output_8 | |
123 | 401 PUTC '/' |
0 | 402 movf divemins+0,W |
403 addlw 0x05 | |
404 movwf EEADR | |
199 | 405 call read_eeprom ; Default He value |
0 | 406 movff EEDATA,lo |
407 output_8 | |
123 | 408 STRCAT_PRINT " " |
0 | 409 |
410 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
411 call PLED_menu_cursor | |
412 | |
413 gassetup_loop: | |
414 call check_switches_logbook | |
415 | |
416 btfsc menubit3 | |
417 bra gassetup2 ; move cursor | |
418 | |
419 btfsc menubit2 | |
420 bra do_gassetup ; call submenu | |
421 | |
422 btfsc onesecupdate | |
575 | 423 call menu_check_dive_and_timeout ; "Goto restart" or sets sleepmode flag |
0 | 424 |
425 bcf onesecupdate ; 1 sec. functions done | |
426 | |
427 btfsc sleepmode | |
428 bra exit_gassetup | |
429 | |
430 bra gassetup_loop | |
431 | |
432 gassetup2: | |
433 incf menupos,F | |
434 movlw d'7' | |
435 cpfseq menupos ; =7? | |
436 bra gassetup3 ; No | |
437 movlw d'1' | |
438 movwf menupos | |
439 | |
440 gassetup3: | |
441 | |
442 clrf timeout_counter2 | |
443 call PLED_menu_cursor | |
444 | |
445 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
446 | |
447 bcf menubit3 ; clear flag | |
448 bra gassetup_loop | |
449 | |
450 do_gassetup: | |
451 dcfsnz menupos,F | |
452 bra next_gas_page | |
453 dcfsnz menupos,F | |
454 bra adjust_o2 | |
455 dcfsnz menupos,F | |
456 bra adjust_he | |
457 dcfsnz menupos,F | |
458 bra toggle_plus_minus_gassetup | |
459 dcfsnz menupos,F | |
460 bra restore_gas | |
461 exit_gassetup: ; exit... | |
462 movff decodata+0,menupos | |
463 incf menupos,F | |
464 bra menu_gassetup_prelist | |
465 | |
466 toggle_plus_minus_gassetup: | |
467 btg first_FA | |
468 movlw d'4' | |
469 movwf menupos | |
470 bra menu_gassetup1 ; return | |
471 | |
472 next_gas: | |
473 movlw d'1' | |
474 movwf menupos | |
475 bra menu_gassetup0 ; incl. clear screen | |
476 | |
477 adjust_o2: | |
478 movf divemins+0,W ; read current value | |
479 addlw 0x06 | |
480 movwf EEADR | |
481 call read_eeprom ; Low-value | |
482 movff EEDATA,lo | |
483 | |
484 btfsc first_FA ; Minus? | |
485 bra adjust_o2_1 ; yes, minus! | |
486 | |
487 incf lo,F ; increase O2 | |
488 movlw d'101' | |
489 cpfseq lo | |
490 bra adjust_o2_2 | |
491 movlw d'4' ; LOWER O2 Limit | |
492 movwf lo | |
493 bra adjust_o2_2 | |
494 | |
495 adjust_o2_1: | |
496 decf lo,F ; decrease O2 | |
497 movlw d'3' | |
498 cpfseq lo | |
499 bra adjust_o2_2 | |
500 | |
501 movf divemins+0,W | |
502 addlw 0x07 | |
503 movwf EEADR | |
504 call read_eeprom ; read He value | |
505 | |
506 movlw d'100' | |
507 movwf lo | |
508 movf EEDATA,W ; He value | |
509 subwf lo,F ; lo=100% - He% | |
510 | |
511 adjust_o2_2: ; test if O2+He>100... | |
512 movf divemins+0,W | |
513 addlw 0x07 | |
514 movwf EEADR | |
515 call read_eeprom ; read He value | |
516 movf EEDATA,W ; He value | |
517 addwf lo,W ; add O2 value | |
518 movwf hi ; store in temp | |
519 movlw d'101' | |
520 cpfseq hi ; O2 and He > 100? | |
521 bra adjust_o2_3 ; No! | |
522 | |
523 movlw d'4' ; LOWER O2 Limit | |
524 movwf lo | |
525 | |
526 adjust_o2_3: | |
527 movf divemins+0,W ; save current value | |
528 addlw 0x06 | |
529 movwf EEADR | |
530 movff lo,EEDATA | |
531 call write_eeprom ; Low-value | |
532 | |
533 movlw d'2' | |
534 movwf menupos | |
535 bra menu_gassetup1 | |
536 | |
537 adjust_he: | |
538 movf divemins+0,W ; read current value | |
539 addlw 0x07 | |
540 movwf EEADR | |
541 call read_eeprom ; Low-value | |
542 movff EEDATA,lo | |
543 | |
544 btfsc first_FA ; Minus? | |
545 bra adjust_he_1 ; yes, minus! | |
546 | |
547 incf lo,F | |
548 movlw d'92' ; He limited to (useless) 90% | |
549 cpfseq lo | |
550 bra adjust_he_2 | |
551 clrf lo | |
552 bra adjust_he_2 | |
553 | |
554 adjust_he_1: | |
555 decf lo,F ; decrease He | |
556 movlw d'255' | |
557 cpfseq lo | |
558 bra adjust_he_2 | |
559 clrf lo | |
560 | |
561 adjust_he_2: ; test if O2+He>100... | |
562 movf divemins+0,W | |
563 addlw 0x06 | |
564 movwf EEADR | |
565 call read_eeprom ; read He value | |
566 movf EEDATA,W ; He value | |
567 addwf lo,W ; add O2 value | |
568 movwf hi ; store in temp | |
569 movlw d'101' | |
570 cpfseq hi ; O2 and He > 100? | |
571 bra adjust_he_3 ; No! | |
572 ; clrf lo ; Yes, clear He to zero | |
573 decf lo,F ; reduce He again = unchanged after operation | |
574 | |
575 adjust_he_3: | |
576 movf divemins+0,W ; save current value | |
577 addlw 0x07 | |
578 movwf EEADR | |
579 movff lo,EEDATA | |
580 call write_eeprom ; Low-value | |
581 | |
582 movlw d'3' | |
583 movwf menupos | |
584 bra menu_gassetup1 ; | |
585 | |
586 restore_gas: | |
587 movf divemins+0,W ; read Default value | |
588 addlw 0x04 | |
589 movwf EEADR | |
590 call read_eeprom ; Low-value | |
591 movff EEDATA,lo | |
592 movf divemins+0,W | |
593 addlw 0x05 | |
594 movwf EEADR | |
595 call read_eeprom ; High-value | |
596 movff EEDATA,hi | |
597 | |
598 movf divemins+0,W ; save Default value | |
599 addlw 0x06 | |
600 movwf EEADR | |
601 movff lo,EEDATA | |
602 call write_eeprom ; Low-value | |
603 movf divemins+0,W | |
604 addlw 0x07 | |
605 movwf EEADR | |
606 movff hi,EEDATA | |
607 call write_eeprom ; High-value | |
608 | |
609 movlw d'5' | |
610 movwf menupos | |
611 bra menu_gassetup1 ; | |
612 | |
613 | |
614 next_gas_page: | |
615 call PLED_ClearScreen | |
616 movlw d'1' | |
617 movwf menupos | |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
618 bcf first_FA ; Here: =1: -, =0: + |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
619 bcf second_FA ; Here: =1: Is first gas |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
620 DISPLAYTEXT .107 ; Depth +/- |
0 | 621 DISPLAYTEXT .11 ; Exit |
622 | |
623 next_gas_page1: | |
624 clrf timeout_counter2 | |
625 bcf menubit2 | |
626 bcf menubit3 | |
627 | |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
628 WIN_TOP .65 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
629 WIN_LEFT .20 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
630 lfsr FSR2,letter |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
631 OUTPUTTEXT .88 ; First Gas? |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
632 PUTC ' ' |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
633 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
634 movlw d'33' |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
635 movwf EEADR |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
636 call read_eeprom ; Get current startgas 1-5 # into EEDATA |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
637 decf EEDATA,W ; 0-4 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
638 cpfseq decodata+0 ; =current displayed gas #? |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
639 bra menu_firstgas0 ; no, display three spaces |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
640 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
641 OUTPUTTEXT .96 ; Yes |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
642 bsf second_FA ; Is first gas |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
643 |
376
ed26990716fe
first gas does not reset change depth, display fix with multigas dives in logbook
heinrichsweikamp
parents:
337
diff
changeset
|
644 ; Do not reset change depth (Kind request from Pascal)! |
ed26990716fe
first gas does not reset change depth, display fix with multigas dives in logbook
heinrichsweikamp
parents:
337
diff
changeset
|
645 ; movf decodata+0,W ; read current value |
ed26990716fe
first gas does not reset change depth, display fix with multigas dives in logbook
heinrichsweikamp
parents:
337
diff
changeset
|
646 ; addlw d'28' ; offset in memory |
ed26990716fe
first gas does not reset change depth, display fix with multigas dives in logbook
heinrichsweikamp
parents:
337
diff
changeset
|
647 ; movwf EEADR |
ed26990716fe
first gas does not reset change depth, display fix with multigas dives in logbook
heinrichsweikamp
parents:
337
diff
changeset
|
648 ; call read_eeprom ; Low-value |
ed26990716fe
first gas does not reset change depth, display fix with multigas dives in logbook
heinrichsweikamp
parents:
337
diff
changeset
|
649 ; clrf EEDATA ; Set change depth to zero |
ed26990716fe
first gas does not reset change depth, display fix with multigas dives in logbook
heinrichsweikamp
parents:
337
diff
changeset
|
650 ; call write_eeprom ; save result in EEPROM |
ed26990716fe
first gas does not reset change depth, display fix with multigas dives in logbook
heinrichsweikamp
parents:
337
diff
changeset
|
651 ; |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
652 bra menu_firstgas1 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
653 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
654 menu_firstgas0: |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
655 bcf second_FA ; Is not first gas |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
656 STRCAT " " ; 3 spaces. |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
657 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
658 menu_firstgas1: |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
659 call word_processor |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
660 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
661 |
0 | 662 rcall gassetup_title_bar2 ; Displays the title bar with the current Gas info |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
663 WIN_TOP .125 |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
664 WIN_LEFT .20 |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
665 lfsr FSR2,letter |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
666 |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
667 OUTPUTTEXT .108 ; Change: |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
668 |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
669 ; lo still holds change depth |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
670 bsf leftbind |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
671 output_8 |
445 | 672 STRCAT_PRINT TXT_METER2 |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
673 |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
674 ; Show ppO2 after change depth |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
675 WIN_TOP .125 |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
676 WIN_LEFT .110 |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
677 lfsr FSR2,letter |
0 | 678 rcall gassetup_show_ppO2 ; Display the ppO2 of the change depth with the current gas |
679 | |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
680 movff xC+0,sub_a+0 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
681 movff xC+1,sub_a+1 |
398
ab962c4b19d6
Fixing issue 50, correct "Bar" to "bar" in texts and comments
heinrichsweikamp
parents:
377
diff
changeset
|
682 GETCUSTOM8 d'46' ; color-code ppO2 warning [cbar] |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
683 movwf sub_b+0 |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
684 clrf sub_b+1 |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
685 call sub16 ; sub_c = sub_a - sub_b |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
686 btfss neg_flag |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
687 bra gassetup_color_code_ppo2_1; too high -> Warning Color! |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
688 call PLED_standard_color |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
689 bra gassetup_color_code_ppo2_2 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
690 gassetup_color_code_ppo2_1: |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
691 call PLED_warnings_color |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
692 gassetup_color_code_ppo2_2: |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
693 call word_processor |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
694 call PLED_standard_color |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
695 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
696 WIN_TOP .95 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
697 WIN_LEFT .95 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
698 lfsr FSR2,letter |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
699 movlw '+' |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
700 btfsc first_FA |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
701 movlw '-' |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
702 movwf POSTINC2 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
703 call word_processor |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
704 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
705 ; Show MOD as "default" |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
706 WIN_TOP .155 |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
707 WIN_LEFT .20 |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
708 lfsr FSR2, letter |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
709 |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
710 OUTPUTTEXT .109 ; Default: |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
711 |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
712 rcall gassetup_get_mod ; compute MOD based on CF18 into lo:hi |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
713 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
714 btfsc second_FA ; Is first gas? |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
715 clrf lo ; Yes, display 0m |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
716 btfsc second_FA ; Is first gas? |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
717 clrf hi ; Yes, display 0m |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
718 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
719 output_16 |
445 | 720 STRCAT_PRINT TXT_METER3 |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
721 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
722 WIN_TOP .35 |
0 | 723 WIN_LEFT .20 |
724 lfsr FSR2,letter | |
725 OUTPUTTEXT .105 ; "Active Gas? " | |
726 | |
287 | 727 ; Active gas flags in BIT0:4 .... |
0 | 728 movff decodata+0,lo ; Gas 0-4 |
729 incf lo,F ; Gas 1-5 | |
730 | |
287 | 731 read_int_eeprom d'27' ; read flag register |
0 | 732 active_gas_display: |
733 rrcf EEDATA ; roll flags into carry | |
734 decfsz lo,F ; max. 5 times... | |
735 bra active_gas_display | |
736 | |
737 btfss STATUS,C ; test carry | |
738 bra active_gas_display_no | |
739 | |
740 OUTPUTTEXT .96 ; Yes | |
741 bra active_gas_display_end | |
742 | |
743 active_gas_display_no: | |
123 | 744 STRCAT " " ; three spaces instead of "Yes" |
0 | 745 |
746 active_gas_display_end: | |
747 call word_processor | |
748 | |
749 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
750 call PLED_menu_cursor | |
751 | |
752 next_gas_page_loop: | |
753 call check_switches_logbook | |
754 | |
755 btfsc menubit3 | |
756 bra next_gas_page2 ; move cursor | |
757 | |
758 btfsc menubit2 | |
759 bra do_next_gas_page ; call submenu | |
760 | |
761 btfsc onesecupdate | |
575 | 762 call menu_check_dive_and_timeout ; "Goto restart" or sets sleepmode flag |
0 | 763 |
764 bcf onesecupdate ; 1 sec. functions done | |
765 | |
571
7f5419d4157d
timeout for 2nd page of Gas Setup, ceiling allingment
heinrichsweikamp
parents:
532
diff
changeset
|
766 btfsc sleepmode |
7f5419d4157d
timeout for 2nd page of Gas Setup, ceiling allingment
heinrichsweikamp
parents:
532
diff
changeset
|
767 bra exit_gassetup |
7f5419d4157d
timeout for 2nd page of Gas Setup, ceiling allingment
heinrichsweikamp
parents:
532
diff
changeset
|
768 |
0 | 769 bra next_gas_page_loop |
770 | |
771 next_gas_page2: | |
772 incf menupos,F | |
773 | |
774 movlw d'7' | |
775 cpfseq menupos ; =7? | |
776 bra next_gas_page3 ; No | |
777 movlw d'1' | |
778 movwf menupos | |
779 | |
780 next_gas_page3: | |
781 clrf timeout_counter2 | |
782 call PLED_menu_cursor | |
783 | |
784 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
785 | |
786 bcf menubit3 ; clear flag | |
787 bra next_gas_page_loop | |
788 | |
789 do_next_gas_page: | |
790 dcfsnz menupos,F | |
791 bra toggle_active_gas | |
792 dcfsnz menupos,F | |
793 bra make_first_gas | |
794 dcfsnz menupos,F | |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
795 bra change_gas_depth_plus_minus |
0 | 796 dcfsnz menupos,F |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
797 bra change_gas_depth_apply |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
798 dcfsnz menupos,F |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
799 bra change_gas_depth_default |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
800 bra next_gas |
0 | 801 |
802 make_first_gas: | |
803 movff decodata+0,EEDATA ; current gas (0-4) into EEDATA | |
804 incf EEDATA,F ; current gas (1-5) into EEDATA | |
805 movlw d'33' | |
806 movwf EEADR | |
807 call write_eeprom ; store in internal EEPROM | |
115 | 808 |
809 ; Set First gas to "Active" | |
810 read_int_eeprom d'27' ; read flag register | |
811 movff decodata+0,lo ; selected gas 0-4 | |
812 incf lo,F | |
813 dcfsnz lo,F | |
814 bsf EEDATA,0 | |
815 dcfsnz lo,F | |
816 bsf EEDATA,1 | |
817 dcfsnz lo,F | |
818 bsf EEDATA,2 | |
819 dcfsnz lo,F | |
820 bsf EEDATA,3 | |
821 dcfsnz lo,F | |
822 bsf EEDATA,4 | |
823 write_int_eeprom d'27' ; write flag register | |
824 | |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
825 movlw d'2' |
0 | 826 movwf menupos |
827 bra next_gas_page1 | |
828 | |
829 toggle_active_gas: | |
830 read_int_eeprom d'27' ; read flag register | |
831 movff decodata+0,lo ; selected gas 0-4 | |
832 incf lo,F | |
833 dcfsnz lo,F | |
834 btg EEDATA,0 | |
835 dcfsnz lo,F | |
836 btg EEDATA,1 | |
837 dcfsnz lo,F | |
838 btg EEDATA,2 | |
839 dcfsnz lo,F | |
840 btg EEDATA,3 | |
841 dcfsnz lo,F | |
842 btg EEDATA,4 | |
843 write_int_eeprom d'27' ; write flag register | |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
844 movlw d'1' |
0 | 845 movwf menupos |
846 bra next_gas_page1 | |
847 | |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
848 change_gas_depth_apply: ; Apply +1 or -1m |
0 | 849 movf decodata+0,W ; read current value |
850 addlw d'28' ; offset in memory | |
851 movwf EEADR | |
852 call read_eeprom ; Low-value | |
853 movff EEDATA,lo | |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
854 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
855 btfsc first_FA ; Minus? |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
856 bra change_gas_depth_minus ; yes, minus! |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
857 ; +1m |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
858 |
0 | 859 incf lo,F ; increase depth |
860 movlw d'100' ; Change depth limit + 1 | |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
861 cpfslt lo ; >99? |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
862 clrf lo ; Yes, set to zero m |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
863 |
0 | 864 change_gas_depth_plus2: |
865 movff lo,EEDATA ; write result | |
866 call write_eeprom ; save result in EEPROM | |
867 movlw d'4' | |
868 movwf menupos | |
869 bra next_gas_page1 | |
870 | |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
871 change_gas_depth_minus: |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
872 ; -1m |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
873 decf lo,F ; decrease depth |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
874 btfsc lo,7 ; 255? |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
875 clrf lo ; Yes, stay at zero m |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
876 bra change_gas_depth_plus2 ; exit |
0 | 877 |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
878 change_gas_depth_plus_minus: |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
879 btg first_FA |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
880 movlw d'3' |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
881 movwf menupos |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
882 bra next_gas_page1 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
883 |
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
884 change_gas_depth_default: |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
885 rcall gassetup_get_mod ; compute MOD based on CF18 into lo:hi |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
886 |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
887 movlw d'99' |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
888 cpfslt lo |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
889 movwf lo ; limit to 99m |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
890 |
377
be71e563ac09
First gas can be reset to 0m, test for timer1 race condition
heinrichsweikamp
parents:
376
diff
changeset
|
891 btfsc second_FA ; Is first gas? |
be71e563ac09
First gas can be reset to 0m, test for timer1 race condition
heinrichsweikamp
parents:
376
diff
changeset
|
892 clrf lo ; Yes, set to 0m |
be71e563ac09
First gas can be reset to 0m, test for timer1 race condition
heinrichsweikamp
parents:
376
diff
changeset
|
893 |
0 | 894 movf decodata+0,W ; read current value |
895 addlw d'28' ; offset in memory | |
896 movwf EEADR | |
377
be71e563ac09
First gas can be reset to 0m, test for timer1 race condition
heinrichsweikamp
parents:
376
diff
changeset
|
897 ; call read_eeprom ; Low-value |
0 | 898 movff lo,EEDATA ; write result |
899 call write_eeprom ; save result in EEPROM | |
900 | |
901 movlw d'5' | |
902 movwf menupos | |
903 bra next_gas_page1 | |
904 | |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
905 |
0 | 906 ; Changed v1.44se |
907 gassetup_title_bar2: | |
908 call PLED_topline_box | |
909 WIN_INVERT .1 ; Init new Wordprocessor | |
910 WIN_TOP .2 | |
911 WIN_LEFT .0 | |
912 lfsr FSR2,letter | |
913 OUTPUTTEXT .95 ; Gas# | |
914 movff decodata+0,lo | |
915 incf lo,F | |
916 bsf leftbind | |
917 output_99 | |
123 | 918 STRCAT_PRINT ": " |
0 | 919 |
920 WIN_TOP .2 | |
921 WIN_LEFT .50 | |
922 lfsr FSR2,letter | |
923 | |
924 ;He check | |
925 movf divemins+0,W | |
926 addlw 0x07 | |
927 movwf EEADR | |
928 call read_eeprom ; He value | |
929 movff EEDATA,lo ; Move EEData -> lo | |
930 movf lo,f ; Move lo -> f | |
931 movlw d'0' ; Move 0 -> WREG | |
932 cpfsgt lo ; He > 0? | |
933 bra gassetup_title_bar3 ; NO check o2 | |
934 | |
935 ; YES Write TX 15/55 | |
936 call gassetup_write_Tx ; Write TX | |
937 movf divemins+0,W | |
938 addlw 0x06 | |
939 movwf EEADR | |
940 call read_eeprom ; O2 value | |
941 movff EEDATA,lo | |
942 output_8 ; Write O2 | |
123 | 943 PUTC '/' |
0 | 944 movf divemins+0,W |
945 addlw 0x07 | |
946 movwf EEADR | |
947 call read_eeprom ; He value | |
948 movff EEDATA,lo | |
949 output_8 ; Write He | |
950 bra gassetup_title_bar7 | |
951 | |
952 ; New v1.44se | |
953 gassetup_title_bar3: ; O2 Check | |
954 movf divemins+0,W | |
955 addlw 0x06 | |
956 movwf EEADR | |
957 call read_eeprom ; O2 value | |
958 movff EEDATA,lo | |
959 movf lo,f ; Move lo -> f | |
960 movlw d'21' ; Move 21 -> WREG | |
961 cpfseq lo ; o2 = 21 | |
962 cpfsgt lo ; o2 > 21% | |
963 bra gassetup_title_bar5 ; NO AIR | |
964 movlw d'100' ; Move 100 -> WREG | |
965 cpfslt lo ; o2 < 100% | |
966 bra gassetup_title_bar4 ; NO write O2 | |
967 | |
968 ; YES Write NX 32 | |
969 call gassetup_write_Nx | |
970 output_8 | |
971 bra gassetup_title_bar7 | |
972 | |
973 ; New v1.44se | |
974 gassetup_title_bar4: | |
445 | 975 STRCAT TXT_O2_3 |
0 | 976 output_8 |
977 bra gassetup_title_bar7 | |
978 | |
979 ; New v1.44se | |
980 gassetup_title_bar5: | |
981 cpfseq lo ; o2 = 21% | |
982 bra gassetup_title_bar6 | |
983 | |
445 | 984 STRCAT TXT_AIR4 |
0 | 985 output_8 |
986 bra gassetup_title_bar7 | |
987 | |
988 ; New v1.44se | |
989 gassetup_title_bar6: ; ERROR | |
445 | 990 STRCAT TXT_ERR4 |
0 | 991 output_8 |
992 bra gassetup_title_bar7 | |
993 | |
994 gassetup_title_bar7: | |
532 | 995 STRCAT TXT_AT4 |
0 | 996 movf decodata+0,W ; read current value |
997 addlw d'28' ; offset in memory | |
998 movwf EEADR | |
999 call read_eeprom ; Low-value | |
1000 movff EEDATA,lo | |
1001 output_8 | |
445 | 1002 STRCAT_PRINT TXT_METER2 |
0 | 1003 |
1004 WIN_INVERT .0 ; Init new Wordprocessor | |
1005 return | |
1006 | |
1007 ; New v1.44se | |
1008 gassetup_write_Nx: | |
445 | 1009 STRCAT TXT_NX3 |
0 | 1010 return |
1011 | |
1012 ; New v1.44se | |
1013 gassetup_write_Tx: | |
445 | 1014 STRCAT TXT_TX3 |
0 | 1015 return |
1016 | |
1017 gassetup_show_ppO2: | |
1018 movf divemins+0,W | |
1019 addlw 0x06 | |
1020 movwf EEADR | |
1021 call read_eeprom ; O2 value | |
1022 movff EEDATA,hi | |
1023 | |
1024 movf decodata+0,W ; read current value | |
1025 addlw d'28' ; offset in memory | |
1026 movwf EEADR | |
1027 call read_eeprom ; Change depth in m | |
1028 movff EEDATA,lo | |
1029 movlw d'10' | |
1030 addwf lo,F ; Depth+10m=lo | |
1031 movf hi,W | |
1032 mulwf lo ; (Depth+10m)*O2 | |
1033 movff PRODL,xA+0 | |
1034 movff PRODH,xA+1 | |
1035 movlw d'10' | |
1036 movwf xB+0 | |
1037 clrf xB+1 | |
1038 call div16x16 ;xA/xB=xC with xA as remainder | |
398
ab962c4b19d6
Fixing issue 50, correct "Bar" to "bar" in texts and comments
heinrichsweikamp
parents:
377
diff
changeset
|
1039 movff xC+0,lo ; ((Depth+10m)*O2)/10 = [0.01bar] ppO2 |
0 | 1040 movff xC+1,hi |
1041 output_16dp d'3' | |
297
ceedf078b2d8
Gas Setup page 2 reworked, Texts 107, 108, 109,150, 149, 168, 42, 43, 53,54,55, 165 need update in french, spanish and german
Heinrichsweikamp
parents:
290
diff
changeset
|
1042 OUTPUTTEXT d'150' ; bar: |
35 | 1043 return |
1044 | |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1045 gassetup_get_mod: |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1046 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1047 mullw d'10' |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1048 movff PRODL,xA+0 |
398
ab962c4b19d6
Fixing issue 50, correct "Bar" to "bar" in texts and comments
heinrichsweikamp
parents:
377
diff
changeset
|
1049 movff PRODH,xA+1 ; ppO2 in [0.01bar] * 10 |
299
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1050 movf divemins+0,W |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1051 addlw 0x06 |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1052 movwf EEADR |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1053 call read_eeprom ; O2 value |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1054 movff EEDATA,xB+0 |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1055 clrf xB+1 |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1056 call div16x16 ; xA/xB=xC with xA as remainder |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1057 movlw d'10' |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1058 subwf xC+0,F ; Subtract 10m... |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1059 movff xC+0,lo |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1060 movlw d'0' |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1061 subwfb xC+1,F |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1062 movff xC+1,hi |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1063 return |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1064 |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1065 |
eac799f69360
some cleanup, french and german texts updated
heinrichsweikamp
parents:
297
diff
changeset
|
1066 |
227 | 1067 ;============================================================================= |
287 | 1068 ; Make sure first gas is marked active. |
1069 ; Note: - Gas are not soted anymore. | |
1070 ; - Gas with a depth>0 should not be forced active, or it is impossible | |
1071 ; to de-activate them. | |
1072 gassetup_sort_gaslist: | |
286 | 1073 |
287 | 1074 clrf EEADRH ; Select EEPROM lower page. |
1075 read_int_eeprom d'33' ; Get First gas (1-5) | |
1076 movff EEDATA,lo ; into register lo | |
286 | 1077 |
287 | 1078 read_int_eeprom d'27' ; Read selected gases |
286 | 1079 |
287 | 1080 dcfsnz lo,F ; If lo==1 |
1081 bsf EEDATA,0 ; Select Gas1 | |
1082 dcfsnz lo,F ; If lo==2 | |
1083 bsf EEDATA,1 ; Select Gas2 | |
1084 dcfsnz lo,F | |
1085 bsf EEDATA,2 | |
1086 dcfsnz lo,F | |
1087 bsf EEDATA,3 | |
1088 dcfsnz lo,F | |
1089 bsf EEDATA,4 | |
1090 | |
1091 ; Copy result to register: | |
290
4dbff2aa31ee
Hunting for refusing to ignore disabled gas in list...
JeanDo
parents:
287
diff
changeset
|
1092 movff EEDATA,gaslist_active |
287 | 1093 |
1094 ; And write to EEPROM too, to survive next reboot: | |
1095 write_int_eeprom d'27' | |
286 | 1096 |
1097 return | |
281 | 1098 |
287 | 1099 ;============================================================================= |
35 | 1100 ; EEPROM Locations of Gaslist |
1101 ; Gas1: | |
1102 ; O2 Default:4 | |
1103 ; He Default:5 | |
1104 ; O2 Current:6 | |
1105 ; He Current:7 | |
1106 ; Change: 28 | |
1107 ; Active: 27,0 | |
1108 | |
1109 ; Gas2: | |
1110 ; O2 Default:8 | |
1111 ; He Default:9 | |
1112 ; O2 Current:10 | |
1113 ; He Current:11 | |
1114 ; Change: 29 | |
1115 ; Active: 27,1 | |
1116 | |
1117 ; Gas3: | |
1118 ; O2 Default:12 | |
1119 ; He Default:13 | |
1120 ; O2 Current:14 | |
1121 ; He Current:15 | |
1122 ; Change: 30 | |
1123 ; Active: 27,2 | |
1124 | |
1125 ; Gas4: | |
1126 ; O2 Default:16 | |
1127 ; He Default:17 | |
1128 ; O2 Current:18 | |
1129 ; He Current:19 | |
1130 ; Change: 31 | |
1131 ; Active: 27,3 | |
1132 | |
1133 ; Gas5: | |
1134 ; O2 Default:20 | |
1135 ; He Default:21 | |
1136 ; O2 Current:22 | |
1137 ; He Current:23 | |
1138 ; Change: 32 | |
1139 ; Active: 27,4 |