Mercurial > public > mk2
annotate code_part1/OSTC_code_asm_part1/menu_gassetup.asm @ 121:e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
author | JeanDo |
---|---|
date | Sun, 26 Dec 2010 23:49:11 +0100 |
parents | 50a06adabc67 |
children | 6a94f96e9cea |
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 | |
58 movlw 'G' | |
59 movwf POSTINC2 | |
60 movff decodata+0,lo | |
61 incf lo,F | |
62 bsf leftbind | |
63 output_99 | |
64 movlw ':' | |
65 movwf POSTINC2 | |
66 | |
121
e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
JeanDo
parents:
115
diff
changeset
|
67 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
|
68 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases |
0 | 69 call word_processor |
70 WIN_LEFT .40 | |
71 movf waitms_temp,W ; Load row into WREG | |
72 movff WREG,win_top | |
73 lfsr FSR2,letter | |
74 | |
75 movlw d'33' | |
76 movwf EEADR | |
77 call read_eeprom ; Get current startgas 1-5 # into EEDATA | |
78 decf EEDATA,W ; 0-4 | |
79 cpfseq decodata+0 ; =current displayed gas #? | |
80 bra menu_gassetup_Tx ; no, do not display * | |
81 movlw '*' ; display * | |
82 movwf POSTINC2 | |
83 | |
84 ; New v1.44se | |
85 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
|
86 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
|
87 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases |
0 | 88 call word_processor |
89 | |
90 WIN_LEFT .48 | |
91 movf waitms_temp,W ; Load row into WREG | |
92 movff WREG,win_top | |
93 lfsr FSR2,letter | |
94 | |
95 movff wait_temp, EEADR ; Gas %He - Set address in internal EEPROM | |
96 incf EEADR,F ; Gas %He - Set address in internal EEPROM | |
97 call read_eeprom ; Read He value from EEPROM | |
98 movff EEDATA,lo ; Move EEDATA -> lo | |
99 movf lo,f ; Move lo -> f | |
100 movlw d'0' ; Move 0 -> WREG | |
101 cpfsgt lo ; He > 0? | |
102 bra menu_gassetup_Nx ; NO check o2 | |
103 | |
104 ; YES Write TX 15/55 | |
105 call gassetup_write_Tx | |
106 movff wait_temp, EEADR ; Gas %O2 - Set address in internal EEPROM | |
107 call read_eeprom ; O2 value | |
108 movff EEDATA,lo | |
109 output_8 | |
110 movlw '/' | |
111 movwf POSTINC2 | |
112 incf EEADR,F ; Gas #hi: %He - Set address in internal EEPROM | |
113 call read_eeprom ; He value | |
114 movff EEDATA,lo | |
115 output_8 | |
116 bra menu_gassetup_list0 | |
117 | |
118 ; New v1.44se | |
119 menu_gassetup_Nx: | |
120 movff wait_temp, EEADR ; Gas %O2 - Set address in internal EEPROM | |
121 call read_eeprom ; Read O2 value from EEPROM | |
122 movff EEDATA,lo ; Move EEDATA -> lo | |
123 movf lo,f ; Move lo -> f | |
124 movlw d'21' ; Move 21 -> WREG | |
125 cpfsgt lo ; o2 > 21% | |
126 bra menu_gassetup_Air ; NO AIR | |
127 movlw d'100' ; Move 100 -> WREG | |
128 cpfslt lo ; o2 < 100% | |
129 bra menu_gassetup_O2 ; NO write O2 | |
130 | |
131 ; YES Write NX 32 | |
132 call gassetup_write_Nx | |
133 output_8 | |
134 bra menu_gassetup_list0 | |
135 | |
136 ; New v1.44se | |
137 menu_gassetup_O2: | |
138 movlw 'O' | |
139 movwf POSTINC2 | |
140 movlw '2' | |
141 movwf POSTINC2 | |
142 movlw ' ' | |
143 movwf POSTINC2 | |
144 output_8 | |
145 bra menu_gassetup_list0 | |
146 | |
147 ; New v1.44se | |
148 menu_gassetup_Air: | |
149 cpfseq lo ; o2 = 21% | |
150 call menu_gassetup_Err | |
151 | |
152 movlw 'A' | |
153 movwf POSTINC2 | |
154 movlw 'I' | |
155 movwf POSTINC2 | |
156 movlw 'R' | |
157 movwf POSTINC2 | |
158 movlw ' ' | |
159 movwf POSTINC2 | |
160 output_8 | |
161 bra menu_gassetup_list0 | |
162 | |
163 ; New v1.44se | |
164 menu_gassetup_Err: | |
165 movlw 'E' | |
166 movwf POSTINC2 | |
167 movlw 'R' | |
168 movwf POSTINC2 | |
169 movlw 'R' | |
170 movwf POSTINC2 | |
171 movlw ' ' | |
172 movwf POSTINC2 | |
173 output_8 | |
174 | |
175 ; Changed v1.44se | |
176 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
|
177 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
|
178 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases |
0 | 179 call word_processor |
180 | |
181 WIN_LEFT .105 | |
182 movf waitms_temp,W ; Load row into WREG | |
183 movff WREG,win_top | |
184 lfsr FSR2,letter | |
185 | |
186 movlw ' ' | |
187 movwf POSTINC2 | |
188 movlw 'i' | |
189 movwf POSTINC2 | |
190 movlw 'n' | |
191 movwf POSTINC2 | |
192 movlw ' ' | |
193 movwf POSTINC2 | |
194 movf decodata+0,W ; read current value | |
195 addlw d'28' ; offset in memory | |
196 movwf EEADR | |
197 call read_eeprom ; Low-value | |
198 movff EEDATA,lo | |
199 output_8 | |
200 movlw 'm' | |
201 movwf POSTINC2 | |
121
e0f29e20bd24
Mix-type icons: check apnoe/gauge/CF#41, depth=0, and first gas. Changed colors.
JeanDo
parents:
115
diff
changeset
|
202 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
|
203 call PLED_grey_inactive_gas ; Sets Greyvalue for inactive gases |
0 | 204 call word_processor |
205 | |
3 | 206 call PLED_standard_color |
0 | 207 |
208 incf decodata+0,F | |
209 movlw d'5' | |
210 cpfseq decodata+0 | |
211 goto menu_gassetup_list | |
212 | |
213 DISPLAYTEXT .11 ; Exit | |
214 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
215 call PLED_menu_cursor | |
216 | |
217 gassetup_list_loop: | |
218 call check_switches_logbook | |
219 | |
220 btfsc menubit3 | |
221 bra gassetup_list2 ; move cursor | |
222 | |
223 btfsc menubit2 | |
224 bra do_gassetup_list; call gas-specific submenu | |
225 | |
226 btfsc divemode | |
227 goto restart ; dive started! | |
228 | |
229 btfsc onesecupdate | |
230 call timeout_surfmode | |
231 | |
232 btfsc onesecupdate | |
233 call set_dive_modes | |
234 | |
235 bcf onesecupdate ; 1 sec. functions done | |
236 | |
237 btfsc sleepmode | |
238 bra exit_gassetup_list | |
239 | |
240 bra gassetup_list_loop | |
241 | |
242 gassetup_list2: | |
243 incf menupos,F | |
244 movlw d'7' | |
245 cpfseq menupos ; =7? | |
246 bra gassetup_list3 ; No | |
247 movlw d'1' | |
248 movwf menupos | |
249 | |
250 gassetup_list3: | |
251 clrf timeout_counter2 | |
252 call PLED_menu_cursor | |
253 | |
254 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
255 | |
256 bcf menubit3 ; clear flag | |
257 bra gassetup_list_loop | |
258 | |
259 exit_gassetup_list: ; exit... | |
260 movlw d'2' | |
261 movwf menupos | |
262 goto menu2 | |
263 | |
264 do_gassetup_list: | |
265 dcfsnz menupos,F | |
266 bra gassetup_list_edit_gas1 | |
267 dcfsnz menupos,F | |
268 bra gassetup_list_edit_gas2 | |
269 dcfsnz menupos,F | |
270 bra gassetup_list_edit_gas3 | |
271 dcfsnz menupos,F | |
272 bra gassetup_list_edit_gas4 | |
273 dcfsnz menupos,F | |
274 bra gassetup_list_edit_gas5 | |
275 bra exit_gassetup_list ; Exit List | |
276 | |
277 gassetup_list_edit_gas1: | |
278 movlw d'0' | |
279 movwf decodata+0 | |
280 movlw d'0' | |
281 movwf divemins+0 | |
282 bra menu_gassetup_page1 | |
283 | |
284 gassetup_list_edit_gas2: | |
285 movlw d'1' | |
286 movwf decodata+0 | |
287 movlw d'4' | |
288 movwf divemins+0 | |
289 bra menu_gassetup_page1 | |
290 | |
291 gassetup_list_edit_gas3: | |
292 movlw d'2' | |
293 movwf decodata+0 | |
294 movlw d'8' | |
295 movwf divemins+0 | |
296 bra menu_gassetup_page1 | |
297 | |
298 gassetup_list_edit_gas4: | |
299 movlw d'3' | |
300 movwf decodata+0 | |
301 movlw d'12' | |
302 movwf divemins+0 | |
303 bra menu_gassetup_page1 | |
304 | |
305 gassetup_list_edit_gas5: | |
306 movlw d'4' | |
307 movwf decodata+0 | |
308 movlw d'16' | |
309 movwf divemins+0 | |
310 bra menu_gassetup_page1 | |
311 | |
312 menu_gassetup_page1: | |
313 movlw d'1' | |
314 movwf menupos | |
315 bcf gas_setup_page2 ; Page 1 of gassetup | |
316 bcf menubit4 | |
317 bcf cursor | |
318 bcf sleepmode | |
319 bcf first_FA ; Here: =1: -, =0: + | |
320 | |
321 menu_gassetup0: | |
322 call PLED_ClearScreen | |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
50
diff
changeset
|
323 DISPLAYTEXT .147 ; More... |
0 | 324 DISPLAYTEXT .11 ; Exit |
325 | |
326 menu_gassetup1: | |
327 clrf timeout_counter2 | |
328 bcf menubit2 | |
329 bcf menubit3 | |
330 | |
331 rcall gassetup_title_bar2 ; Displays the title bar with the current Gas info | |
332 | |
333 WIN_TOP .65 | |
334 WIN_LEFT .20 | |
335 lfsr FSR2,letter | |
336 movlw 'O' | |
337 movwf POSTINC2 | |
338 movlw '2' | |
339 movwf POSTINC2 | |
340 movlw ':' | |
341 movwf POSTINC2 | |
342 movlw ' ' | |
343 movwf POSTINC2 | |
344 | |
345 movf divemins+0,W | |
346 addlw 0x06 | |
347 movwf EEADR | |
348 call read_eeprom ; O2 value | |
349 movff EEDATA,lo | |
350 output_8 | |
351 movlw '%' | |
352 movwf POSTINC2 | |
353 movlw ' ' | |
354 movwf POSTINC2 | |
355 movlw '(' | |
356 movwf POSTINC2 | |
357 movlw 'M' | |
358 movwf POSTINC2 | |
359 movlw 'O' | |
360 movwf POSTINC2 | |
361 movlw 'D' | |
362 movwf POSTINC2 | |
363 movlw ':' | |
364 movwf POSTINC2 | |
365 | |
366 ; Show MOD in m | |
367 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG | |
368 mullw d'10' | |
369 movff PRODL,xA+0 | |
370 movff PRODH,xA+1 ; ppO2 in [0.01Bar] * 10 | |
371 | |
372 movf divemins+0,W | |
373 addlw 0x06 | |
374 movwf EEADR | |
375 call read_eeprom ; O2 value | |
376 movff EEDATA,xB+0 | |
377 clrf xB+1 | |
378 call div16x16 ;xA/xB=xC with xA as remainder | |
379 movlw d'10' | |
380 subwf xC+0,F ; Subtract 10m... | |
381 movff xC+0,lo | |
382 movlw d'0' | |
383 subwfb xC+1,F | |
384 movff xC+1,hi | |
385 output_16 | |
386 movlw 'm' | |
387 movwf POSTINC2 | |
388 movlw ')' | |
389 movwf POSTINC2 | |
390 movlw ' ' | |
391 movwf POSTINC2 | |
392 movlw ' ' | |
393 movwf POSTINC2 | |
394 call word_processor | |
395 | |
396 WIN_TOP .95 | |
397 lfsr FSR2,letter | |
398 movlw 'H' | |
399 movwf POSTINC2 | |
400 movlw 'e' | |
401 movwf POSTINC2 | |
402 movlw ':' | |
403 movwf POSTINC2 | |
404 movlw ' ' | |
405 movwf POSTINC2 | |
406 movf divemins+0,W | |
407 addlw 0x07 | |
408 movwf EEADR | |
409 call read_eeprom ; He value | |
410 movff EEDATA,lo | |
411 output_8 | |
412 movlw '%' | |
413 movwf POSTINC2 | |
414 movlw ' ' | |
415 movwf POSTINC2 | |
105 | 416 movlw '(' |
417 movwf POSTINC2 | |
418 movlw 'E' | |
419 movwf POSTINC2 | |
420 movlw 'N' | |
421 movwf POSTINC2 | |
422 movlw 'D' | |
423 movwf POSTINC2 | |
424 movlw ':' | |
425 movwf POSTINC2 | |
426 | |
427 ; Show END in m | |
428 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG | |
429 mullw d'10' | |
430 movff PRODL,xA+0 | |
431 movff PRODH,xA+1 ; ppO2 in [0.01Bar] * 10 | |
432 movf divemins+0,W | |
433 addlw 0x06 | |
434 movwf EEADR | |
435 call read_eeprom ; O2 value | |
436 movff EEDATA,xB+0 | |
437 clrf xB+1 | |
438 call div16x16 ;xA/xB=xC with xA as remainder | |
439 movlw d'10' | |
440 subwf xC+0,F ; Subtract 10m... | |
441 movff xC+0,lo | |
442 movlw d'0' | |
443 subwfb xC+1,F | |
444 movff xC+1,hi ; lo:hi holding MOD in meters | |
445 movlw d'10' | |
446 addwf lo,F | |
447 movlw d'0' | |
448 addwfc hi,F ; lo:hi holding MOD+10m | |
449 | |
450 movf divemins+0,W | |
451 addlw 0x07 | |
452 movwf EEADR | |
453 call read_eeprom ; He value in % -> EEDATA | |
454 movlw d'100' | |
455 movwf xA+0 | |
456 movf EEDATA,W ; He value in % -> EEDATA | |
457 subwf xA+0,F ; xA+0 = 100 - He Value in % | |
458 clrf xA+1 | |
459 movff lo,xB+0 | |
460 movff hi,xB+1 ; Copy MOD+10 | |
461 call mult16x16 ;xA*xB=xC | |
462 movff xC+0,xA+0 | |
463 movff xC+1,xA+1 | |
464 movlw d'100' | |
465 movwf xB+0 | |
466 clrf xB+1 | |
467 call div16x16 ;xA/xB=xC with xA as remainder | |
468 ; xC:2 = ((MOD+10) * 100 - HE Value in %) / 100 | |
469 movlw d'10' | |
470 subwf xC+0,F ; Subtract 10m... | |
471 movff xC+0,lo | |
472 movlw d'0' | |
473 subwfb xC+1,F | |
474 movff xC+1,hi | |
475 output_16 | |
476 movlw 'm' | |
477 movwf POSTINC2 | |
478 movlw ')' | |
479 movwf POSTINC2 | |
0 | 480 movlw ' ' |
481 movwf POSTINC2 | |
105 | 482 movlw ' ' |
483 movwf POSTINC2 | |
484 | |
0 | 485 call word_processor |
486 | |
487 WIN_TOP .125 | |
488 lfsr FSR2,letter | |
489 movlw '+' | |
490 movwf POSTINC2 | |
491 movlw '/' | |
492 movwf POSTINC2 | |
493 movlw '-' | |
494 movwf POSTINC2 | |
495 movlw ':' | |
496 movwf POSTINC2 | |
497 movlw ' ' | |
498 movwf POSTINC2 | |
499 movlw '+' | |
500 btfsc first_FA | |
501 movlw '-' | |
502 movwf POSTINC2 | |
503 call word_processor | |
504 | |
505 WIN_TOP .155 | |
506 lfsr FSR2,letter | |
507 OUTPUTTEXT .89 ; Default: | |
508 movf divemins+0,W | |
509 addlw 0x04 | |
510 movwf EEADR | |
511 call read_eeprom ; Default O2 value | |
512 movff EEDATA,lo | |
513 output_8 | |
514 movlw '/' | |
515 movwf POSTINC2 | |
516 movf divemins+0,W | |
517 addlw 0x05 | |
518 movwf EEADR | |
519 call read_eeprom ; Default He value | |
520 movff EEDATA,lo | |
521 output_8 | |
522 movlw ' ' | |
523 movwf POSTINC2 | |
524 movlw ' ' | |
525 movwf POSTINC2 | |
526 call word_processor | |
527 | |
528 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
529 call PLED_menu_cursor | |
530 | |
531 gassetup_loop: | |
532 call check_switches_logbook | |
533 | |
534 btfsc menubit3 | |
535 bra gassetup2 ; move cursor | |
536 | |
537 btfsc menubit2 | |
538 bra do_gassetup ; call submenu | |
539 | |
540 btfsc divemode | |
541 goto restart ; dive started! | |
542 | |
543 btfsc onesecupdate | |
544 call timeout_surfmode | |
545 | |
546 btfsc onesecupdate | |
547 call set_dive_modes | |
548 | |
549 bcf onesecupdate ; 1 sec. functions done | |
550 | |
551 btfsc sleepmode | |
552 bra exit_gassetup | |
553 | |
554 bra gassetup_loop | |
555 | |
556 gassetup2: | |
557 incf menupos,F | |
558 movlw d'7' | |
559 cpfseq menupos ; =7? | |
560 bra gassetup3 ; No | |
561 movlw d'1' | |
562 movwf menupos | |
563 | |
564 gassetup3: | |
565 | |
566 clrf timeout_counter2 | |
567 call PLED_menu_cursor | |
568 | |
569 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
570 | |
571 bcf menubit3 ; clear flag | |
572 bra gassetup_loop | |
573 | |
574 do_gassetup: | |
575 dcfsnz menupos,F | |
576 bra next_gas_page | |
577 dcfsnz menupos,F | |
578 bra adjust_o2 | |
579 dcfsnz menupos,F | |
580 bra adjust_he | |
581 dcfsnz menupos,F | |
582 bra toggle_plus_minus_gassetup | |
583 dcfsnz menupos,F | |
584 bra restore_gas | |
585 exit_gassetup: ; exit... | |
586 movff decodata+0,menupos | |
587 incf menupos,F | |
588 bra menu_gassetup_prelist | |
589 | |
590 toggle_plus_minus_gassetup: | |
591 btg first_FA | |
592 movlw d'4' | |
593 movwf menupos | |
594 bra menu_gassetup1 ; return | |
595 | |
596 next_gas: | |
597 movlw d'1' | |
598 movwf menupos | |
599 bra menu_gassetup0 ; incl. clear screen | |
600 | |
601 adjust_o2: | |
602 movf divemins+0,W ; read current value | |
603 addlw 0x06 | |
604 movwf EEADR | |
605 call read_eeprom ; Low-value | |
606 movff EEDATA,lo | |
607 | |
608 btfsc first_FA ; Minus? | |
609 bra adjust_o2_1 ; yes, minus! | |
610 | |
611 incf lo,F ; increase O2 | |
612 movlw d'101' | |
613 cpfseq lo | |
614 bra adjust_o2_2 | |
615 movlw d'4' ; LOWER O2 Limit | |
616 movwf lo | |
617 bra adjust_o2_2 | |
618 | |
619 adjust_o2_1: | |
620 decf lo,F ; decrease O2 | |
621 movlw d'3' | |
622 cpfseq lo | |
623 bra adjust_o2_2 | |
624 | |
625 movf divemins+0,W | |
626 addlw 0x07 | |
627 movwf EEADR | |
628 call read_eeprom ; read He value | |
629 | |
630 movlw d'100' | |
631 movwf lo | |
632 movf EEDATA,W ; He value | |
633 subwf lo,F ; lo=100% - He% | |
634 | |
635 adjust_o2_2: ; test if O2+He>100... | |
636 movf divemins+0,W | |
637 addlw 0x07 | |
638 movwf EEADR | |
639 call read_eeprom ; read He value | |
640 movf EEDATA,W ; He value | |
641 addwf lo,W ; add O2 value | |
642 movwf hi ; store in temp | |
643 movlw d'101' | |
644 cpfseq hi ; O2 and He > 100? | |
645 bra adjust_o2_3 ; No! | |
646 | |
647 movlw d'4' ; LOWER O2 Limit | |
648 movwf lo | |
649 | |
650 adjust_o2_3: | |
651 movf divemins+0,W ; save current value | |
652 addlw 0x06 | |
653 movwf EEADR | |
654 movff lo,EEDATA | |
655 call write_eeprom ; Low-value | |
656 | |
657 movlw d'2' | |
658 movwf menupos | |
659 bra menu_gassetup1 | |
660 | |
661 adjust_he: | |
662 movf divemins+0,W ; read current value | |
663 addlw 0x07 | |
664 movwf EEADR | |
665 call read_eeprom ; Low-value | |
666 movff EEDATA,lo | |
667 | |
668 btfsc first_FA ; Minus? | |
669 bra adjust_he_1 ; yes, minus! | |
670 | |
671 incf lo,F | |
672 movlw d'92' ; He limited to (useless) 90% | |
673 cpfseq lo | |
674 bra adjust_he_2 | |
675 clrf lo | |
676 bra adjust_he_2 | |
677 | |
678 adjust_he_1: | |
679 decf lo,F ; decrease He | |
680 movlw d'255' | |
681 cpfseq lo | |
682 bra adjust_he_2 | |
683 clrf lo | |
684 | |
685 adjust_he_2: ; test if O2+He>100... | |
686 movf divemins+0,W | |
687 addlw 0x06 | |
688 movwf EEADR | |
689 call read_eeprom ; read He value | |
690 movf EEDATA,W ; He value | |
691 addwf lo,W ; add O2 value | |
692 movwf hi ; store in temp | |
693 movlw d'101' | |
694 cpfseq hi ; O2 and He > 100? | |
695 bra adjust_he_3 ; No! | |
696 ; clrf lo ; Yes, clear He to zero | |
697 decf lo,F ; reduce He again = unchanged after operation | |
698 | |
699 adjust_he_3: | |
700 movf divemins+0,W ; save current value | |
701 addlw 0x07 | |
702 movwf EEADR | |
703 movff lo,EEDATA | |
704 call write_eeprom ; Low-value | |
705 | |
706 movlw d'3' | |
707 movwf menupos | |
708 bra menu_gassetup1 ; | |
709 | |
710 restore_gas: | |
711 movf divemins+0,W ; read Default value | |
712 addlw 0x04 | |
713 movwf EEADR | |
714 call read_eeprom ; Low-value | |
715 movff EEDATA,lo | |
716 movf divemins+0,W | |
717 addlw 0x05 | |
718 movwf EEADR | |
719 call read_eeprom ; High-value | |
720 movff EEDATA,hi | |
721 | |
722 movf divemins+0,W ; save Default value | |
723 addlw 0x06 | |
724 movwf EEADR | |
725 movff lo,EEDATA | |
726 call write_eeprom ; Low-value | |
727 movf divemins+0,W | |
728 addlw 0x07 | |
729 movwf EEADR | |
730 movff hi,EEDATA | |
731 call write_eeprom ; High-value | |
732 | |
733 movlw d'5' | |
734 movwf menupos | |
735 bra menu_gassetup1 ; | |
736 | |
737 | |
738 next_gas_page: | |
739 call PLED_ClearScreen | |
740 movlw d'1' | |
741 movwf menupos | |
742 DISPLAYTEXT .109 ; Back | |
743 | |
744 DISPLAYTEXT .11 ; Exit | |
745 | |
746 next_gas_page1: | |
747 clrf timeout_counter2 | |
748 bcf menubit2 | |
749 bcf menubit3 | |
750 | |
751 rcall gassetup_title_bar2 ; Displays the title bar with the current Gas info | |
752 rcall gassetup_show_ppO2 ; Display the ppO2 of the change depth with the current gas | |
753 | |
754 WIN_TOP .65 | |
755 WIN_LEFT .20 | |
756 lfsr FSR2,letter | |
757 OUTPUTTEXT .105 ; "Active Gas? " | |
758 read_int_eeprom d'27' ; read flag register | |
759 | |
760 ; hi contains active gas flags in BIT0:4 .... | |
761 | |
762 movff decodata+0,lo ; Gas 0-4 | |
763 incf lo,F ; Gas 1-5 | |
764 | |
765 active_gas_display: | |
766 rrcf EEDATA ; roll flags into carry | |
767 decfsz lo,F ; max. 5 times... | |
768 bra active_gas_display | |
769 | |
770 btfss STATUS,C ; test carry | |
771 bra active_gas_display_no | |
772 | |
773 OUTPUTTEXT .96 ; Yes | |
774 bra active_gas_display_end | |
775 | |
776 active_gas_display_no: | |
777 movlw ' ' ; three spaces instead of "Yes" | |
778 movwf POSTINC2 | |
779 movlw ' ' | |
780 movwf POSTINC2 | |
781 movlw ' ' | |
782 movwf POSTINC2 | |
783 | |
784 active_gas_display_end: | |
785 call word_processor | |
786 | |
787 WIN_TOP .95 | |
788 WIN_LEFT .20 | |
789 lfsr FSR2,letter | |
790 OUTPUTTEXT .88 ; First Gas? | |
791 movlw ' ' | |
792 movwf POSTINC2 | |
793 | |
794 movlw d'33' | |
795 movwf EEADR | |
796 call read_eeprom ; Get current startgas 1-5 # into EEDATA | |
797 decf EEDATA,W ; 0-4 | |
798 cpfseq decodata+0 ; =current displayed gas #? | |
799 bra menu_firstgas0 ; no, display three spaces | |
800 | |
801 OUTPUTTEXT .96 ; Yes | |
802 bra menu_firstgas1 | |
803 | |
804 menu_firstgas0: | |
805 movlw ' ' | |
806 movwf POSTINC2 | |
807 movlw ' ' | |
808 movwf POSTINC2 | |
809 movlw ' ' | |
810 movwf POSTINC2 | |
811 | |
812 menu_firstgas1: | |
813 call word_processor | |
814 | |
815 WIN_TOP .125 | |
816 WIN_LEFT .20 | |
817 lfsr FSR2,letter | |
818 OUTPUTTEXT .107 ; Change+ | |
819 call word_processor | |
820 | |
821 WIN_TOP .155 | |
822 WIN_LEFT .20 | |
823 lfsr FSR2,letter | |
824 OUTPUTTEXT .108 ; Change- | |
825 call word_processor | |
826 | |
827 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
828 call PLED_menu_cursor | |
829 | |
830 next_gas_page_loop: | |
831 call check_switches_logbook | |
832 | |
833 btfsc menubit3 | |
834 bra next_gas_page2 ; move cursor | |
835 | |
836 btfsc menubit2 | |
837 bra do_next_gas_page ; call submenu | |
838 | |
839 btfsc divemode | |
840 goto restart ; dive started! | |
841 | |
842 btfsc onesecupdate | |
843 call timeout_surfmode | |
844 | |
845 btfsc onesecupdate | |
846 call set_dive_modes | |
847 | |
848 bcf onesecupdate ; 1 sec. functions done | |
849 | |
850 btfsc sleepmode | |
851 bra exit_gassetup | |
852 | |
853 bra next_gas_page_loop | |
854 | |
855 next_gas_page2: | |
856 incf menupos,F | |
857 | |
858 movlw d'7' | |
859 cpfseq menupos ; =7? | |
860 bra next_gas_page3 ; No | |
861 movlw d'1' | |
862 movwf menupos | |
863 | |
864 next_gas_page3: | |
865 clrf timeout_counter2 | |
866 call PLED_menu_cursor | |
867 | |
868 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! | |
869 | |
870 bcf menubit3 ; clear flag | |
871 bra next_gas_page_loop | |
872 | |
873 do_next_gas_page: | |
874 dcfsnz menupos,F | |
875 bra next_gas | |
876 dcfsnz menupos,F | |
877 bra toggle_active_gas | |
878 dcfsnz menupos,F | |
879 bra make_first_gas | |
880 dcfsnz menupos,F | |
881 bra change_gas_depth_plus | |
882 dcfsnz menupos,F | |
883 bra change_gas_depth_minus | |
884 bra exit_gassetup ; Exit menu | |
885 | |
886 make_first_gas: | |
887 movff decodata+0,EEDATA ; current gas (0-4) into EEDATA | |
888 incf EEDATA,F ; current gas (1-5) into EEDATA | |
889 movlw d'33' | |
890 movwf EEADR | |
891 call write_eeprom ; store in internal EEPROM | |
115 | 892 |
893 ; Set First gas to "Active" | |
894 read_int_eeprom d'27' ; read flag register | |
895 movff decodata+0,lo ; selected gas 0-4 | |
896 incf lo,F | |
897 dcfsnz lo,F | |
898 bsf EEDATA,0 | |
899 dcfsnz lo,F | |
900 bsf EEDATA,1 | |
901 dcfsnz lo,F | |
902 bsf EEDATA,2 | |
903 dcfsnz lo,F | |
904 bsf EEDATA,3 | |
905 dcfsnz lo,F | |
906 bsf EEDATA,4 | |
907 write_int_eeprom d'27' ; write flag register | |
908 | |
0 | 909 movlw d'3' |
910 movwf menupos | |
911 bra next_gas_page1 | |
912 | |
913 toggle_active_gas: | |
914 read_int_eeprom d'27' ; read flag register | |
915 movff decodata+0,lo ; selected gas 0-4 | |
916 incf lo,F | |
917 dcfsnz lo,F | |
918 btg EEDATA,0 | |
919 dcfsnz lo,F | |
920 btg EEDATA,1 | |
921 dcfsnz lo,F | |
922 btg EEDATA,2 | |
923 dcfsnz lo,F | |
924 btg EEDATA,3 | |
925 dcfsnz lo,F | |
926 btg EEDATA,4 | |
927 write_int_eeprom d'27' ; write flag register | |
928 movlw d'2' | |
929 movwf menupos | |
930 bra next_gas_page1 | |
931 | |
932 change_gas_depth_plus: | |
933 movf decodata+0,W ; read current value | |
934 addlw d'28' ; offset in memory | |
935 movwf EEADR | |
936 call read_eeprom ; Low-value | |
937 movff EEDATA,lo | |
938 | |
939 incf lo,F ; increase depth | |
940 movlw d'100' ; Change depth limit + 1 | |
941 cpfseq lo | |
942 bra change_gas_depth_plus2 | |
943 movlw d'99' ; Change depth limit | |
944 movwf lo | |
945 change_gas_depth_plus2: | |
946 movff lo,EEDATA ; write result | |
947 call write_eeprom ; save result in EEPROM | |
948 | |
949 movlw d'4' | |
950 movwf menupos | |
951 bra next_gas_page1 | |
952 | |
953 | |
954 change_gas_depth_minus: | |
955 movf decodata+0,W ; read current value | |
956 addlw d'28' ; offset in memory | |
957 movwf EEADR | |
958 call read_eeprom ; Low-value | |
959 movff EEDATA,lo | |
960 | |
961 decf lo,F ; decrease depth | |
962 movlw d'255' | |
963 cpfseq lo | |
964 bra change_gas_depth_minus2 | |
965 movlw d'0' | |
966 movwf lo | |
967 | |
968 change_gas_depth_minus2: | |
969 movff lo,EEDATA ; write result | |
970 call write_eeprom ; save result in EEPROM | |
971 | |
972 movlw d'5' | |
973 movwf menupos | |
974 bra next_gas_page1 | |
975 | |
976 ; Changed v1.44se | |
977 gassetup_title_bar2: | |
978 call PLED_topline_box | |
979 WIN_INVERT .1 ; Init new Wordprocessor | |
980 WIN_TOP .2 | |
981 WIN_LEFT .0 | |
982 lfsr FSR2,letter | |
983 OUTPUTTEXT .95 ; Gas# | |
984 movff decodata+0,lo | |
985 incf lo,F | |
986 bsf leftbind | |
987 output_99 | |
988 movlw ':' | |
989 movwf POSTINC2 | |
990 movlw ' ' | |
991 movwf POSTINC2 | |
992 call word_processor | |
993 | |
994 WIN_TOP .2 | |
995 WIN_LEFT .50 | |
996 lfsr FSR2,letter | |
997 | |
998 ;He check | |
999 movf divemins+0,W | |
1000 addlw 0x07 | |
1001 movwf EEADR | |
1002 call read_eeprom ; He value | |
1003 movff EEDATA,lo ; Move EEData -> lo | |
1004 movf lo,f ; Move lo -> f | |
1005 movlw d'0' ; Move 0 -> WREG | |
1006 cpfsgt lo ; He > 0? | |
1007 bra gassetup_title_bar3 ; NO check o2 | |
1008 | |
1009 ; YES Write TX 15/55 | |
1010 call gassetup_write_Tx ; Write TX | |
1011 movf divemins+0,W | |
1012 addlw 0x06 | |
1013 movwf EEADR | |
1014 call read_eeprom ; O2 value | |
1015 movff EEDATA,lo | |
1016 output_8 ; Write O2 | |
1017 movlw '/' | |
1018 movwf POSTINC2 | |
1019 movf divemins+0,W | |
1020 addlw 0x07 | |
1021 movwf EEADR | |
1022 call read_eeprom ; He value | |
1023 movff EEDATA,lo | |
1024 output_8 ; Write He | |
1025 bra gassetup_title_bar7 | |
1026 | |
1027 ; New v1.44se | |
1028 gassetup_title_bar3: ; O2 Check | |
1029 movf divemins+0,W | |
1030 addlw 0x06 | |
1031 movwf EEADR | |
1032 call read_eeprom ; O2 value | |
1033 movff EEDATA,lo | |
1034 movf lo,f ; Move lo -> f | |
1035 movlw d'21' ; Move 21 -> WREG | |
1036 cpfseq lo ; o2 = 21 | |
1037 cpfsgt lo ; o2 > 21% | |
1038 bra gassetup_title_bar5 ; NO AIR | |
1039 movlw d'100' ; Move 100 -> WREG | |
1040 cpfslt lo ; o2 < 100% | |
1041 bra gassetup_title_bar4 ; NO write O2 | |
1042 | |
1043 ; YES Write NX 32 | |
1044 call gassetup_write_Nx | |
1045 output_8 | |
1046 bra gassetup_title_bar7 | |
1047 | |
1048 ; New v1.44se | |
1049 gassetup_title_bar4: | |
1050 movlw 'O' | |
1051 movwf POSTINC2 | |
1052 movlw '2' | |
1053 movwf POSTINC2 | |
1054 movlw ' ' | |
1055 movwf POSTINC2 | |
1056 output_8 | |
1057 bra gassetup_title_bar7 | |
1058 | |
1059 ; New v1.44se | |
1060 gassetup_title_bar5: | |
1061 cpfseq lo ; o2 = 21% | |
1062 bra gassetup_title_bar6 | |
1063 | |
1064 movlw 'A' | |
1065 movwf POSTINC2 | |
1066 movlw 'I' | |
1067 movwf POSTINC2 | |
1068 movlw 'R' | |
1069 movwf POSTINC2 | |
1070 movlw ' ' | |
1071 movwf POSTINC2 | |
1072 output_8 | |
1073 bra gassetup_title_bar7 | |
1074 | |
1075 ; New v1.44se | |
1076 gassetup_title_bar6: ; ERROR | |
1077 movlw 'E' | |
1078 movwf POSTINC2 | |
1079 movlw 'R' | |
1080 movwf POSTINC2 | |
1081 movlw 'R' | |
1082 movwf POSTINC2 | |
1083 movlw ' ' | |
1084 movwf POSTINC2 | |
1085 output_8 | |
1086 bra gassetup_title_bar7 | |
1087 | |
1088 gassetup_title_bar7: | |
1089 movlw ' ' | |
1090 movwf POSTINC2 | |
1091 movlw 'i' | |
1092 movwf POSTINC2 | |
1093 movlw 'n' | |
1094 movwf POSTINC2 | |
1095 movlw ' ' | |
1096 movwf POSTINC2 | |
1097 movf decodata+0,W ; read current value | |
1098 addlw d'28' ; offset in memory | |
1099 movwf EEADR | |
1100 call read_eeprom ; Low-value | |
1101 movff EEDATA,lo | |
1102 output_8 | |
1103 movlw 'm' | |
1104 movwf POSTINC2 | |
1105 movlw ' ' | |
1106 movwf POSTINC2 | |
1107 | |
1108 call word_processor | |
1109 WIN_INVERT .0 ; Init new Wordprocessor | |
1110 return | |
1111 | |
1112 ; New v1.44se | |
1113 gassetup_write_Nx: | |
1114 movlw 'N' | |
1115 movwf POSTINC2 | |
1116 movlw 'X' | |
1117 movwf POSTINC2 | |
1118 movlw ' ' | |
1119 movwf POSTINC2 | |
1120 return | |
1121 | |
1122 ; New v1.44se | |
1123 gassetup_write_Tx: | |
1124 movlw 'T' | |
1125 movwf POSTINC2 | |
1126 movlw 'X' | |
1127 movwf POSTINC2 | |
1128 movlw ' ' | |
1129 movwf POSTINC2 | |
1130 return | |
1131 | |
1132 gassetup_show_ppO2: | |
1133 movf divemins+0,W | |
1134 addlw 0x06 | |
1135 movwf EEADR | |
1136 call read_eeprom ; O2 value | |
1137 movff EEDATA,hi | |
1138 | |
1139 movf decodata+0,W ; read current value | |
1140 addlw d'28' ; offset in memory | |
1141 movwf EEADR | |
1142 call read_eeprom ; Change depth in m | |
1143 movff EEDATA,lo | |
1144 movlw d'10' | |
1145 addwf lo,F ; Depth+10m=lo | |
1146 movf hi,W | |
1147 mulwf lo ; (Depth+10m)*O2 | |
1148 movff PRODL,xA+0 | |
1149 movff PRODH,xA+1 | |
1150 movlw d'10' | |
1151 movwf xB+0 | |
1152 clrf xB+1 | |
1153 call div16x16 ;xA/xB=xC with xA as remainder | |
1154 movff xC+0,lo ; ((Depth+10m)*O2)/10 = [0.01Bar] ppO2 | |
1155 movff xC+1,hi | |
1156 | |
1157 WIN_LEFT .55 | |
1158 WIN_TOP .35 | |
1159 lfsr FSR2,letter | |
50 | 1160 OUTPUTTEXT d'149' ; (ppO2: |
0 | 1161 output_16dp d'3' |
50 | 1162 OUTPUTTEXT d'150' ; Bar: |
0 | 1163 call word_processor |
35 | 1164 return |
1165 | |
1166 | |
1167 gassetup_sort_gaslist: ; Sorts Gaslist according to change depth | |
1168 ; EEPROM Locations of Gaslist | |
1169 ; Gas1: | |
1170 ; O2 Default:4 | |
1171 ; He Default:5 | |
1172 ; O2 Current:6 | |
1173 ; He Current:7 | |
1174 ; Change: 28 | |
1175 ; Active: 27,0 | |
1176 | |
1177 ; Gas2: | |
1178 ; O2 Default:8 | |
1179 ; He Default:9 | |
1180 ; O2 Current:10 | |
1181 ; He Current:11 | |
1182 ; Change: 29 | |
1183 ; Active: 27,1 | |
1184 | |
1185 ; Gas3: | |
1186 ; O2 Default:12 | |
1187 ; He Default:13 | |
1188 ; O2 Current:14 | |
1189 ; He Current:15 | |
1190 ; Change: 30 | |
1191 ; Active: 27,2 | |
1192 | |
1193 ; Gas4: | |
1194 ; O2 Default:16 | |
1195 ; He Default:17 | |
1196 ; O2 Current:18 | |
1197 ; He Current:19 | |
1198 ; Change: 31 | |
1199 ; Active: 27,3 | |
1200 | |
1201 ; Gas5: | |
1202 ; O2 Default:20 | |
1203 ; He Default:21 | |
1204 ; O2 Current:22 | |
1205 ; He Current:23 | |
1206 ; Change: 32 | |
1207 ; Active: 27,4 | |
1208 | |
47 | 1209 ; reset Change depths (Important for all users who upgrade from <1.60!) |
1210 clrf EEADRH | |
1211 clrf EEDATA | |
1212 write_int_eeprom d'118' ; | |
1213 write_int_eeprom d'119' ; | |
1214 write_int_eeprom d'120' ; | |
1215 write_int_eeprom d'121' ; | |
1216 write_int_eeprom d'122' ; | |
1217 movlw d'21' ; O2 Current | |
1218 movwf EEDATA | |
1219 write_int_eeprom d'96' ; | |
1220 write_int_eeprom d'100' ; | |
1221 write_int_eeprom d'104' ; | |
1222 write_int_eeprom d'108' ; | |
1223 write_int_eeprom d'112' ; | |
1224 | |
1225 clrf EEDATA ; He Current | |
1226 write_int_eeprom d'97' ; | |
1227 write_int_eeprom d'101' ; | |
1228 write_int_eeprom d'105' ; | |
1229 write_int_eeprom d'109' ; | |
1230 write_int_eeprom d'113' ; | |
1231 | |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1232 ; Find deepest Gas |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1233 ; Copy all to RAM |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1234 movlw d'3' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1235 movwf EEADR |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1236 clrf EEADRH |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1237 lfsr FSR2,letter ; Store gases in Letter buffer (max. 26Byte!) |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1238 gassetup_sort_gaslist1: |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1239 incf EEADR,F ; Next Adress |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1240 call read_eeprom ; Read byte |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1241 movff EEDATA,POSTINC2 ; Copy into RAM |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1242 movlw d'23' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1243 cpfseq EEADR ; All done? |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1244 bra gassetup_sort_gaslist1 ; No, not yet |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1245 ; Letter+0 = EEPROM 4 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1246 ; ... |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1247 ; Letter+20 = EEPROM 23 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1248 read_int_eeprom d'28' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1249 movff EEDATA,POSTINC2 ; Change Depth Gas1 -> Letter+21 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1250 read_int_eeprom d'29' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1251 movff EEDATA,POSTINC2 ; Change Depth Gas2 -> Letter+22 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1252 read_int_eeprom d'30' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1253 movff EEDATA,POSTINC2 ; Change Depth Gas3 -> Letter+23 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1254 read_int_eeprom d'31' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1255 movff EEDATA,POSTINC2 ; Change Depth Gas4 -> Letter+24 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1256 read_int_eeprom d'32' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1257 movff EEDATA,POSTINC2 ; Change Depth Gas5 -> Letter+25 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1258 read_int_eeprom d'27' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1259 movff EEDATA,POSTINC2 ; Active Byte -> Letter+26 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1260 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1261 ; All change depths = 0? -> Skip sort! |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1262 lfsr FSR2,letter+.20 ; Change depths... |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1263 movlw d'5' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1264 movwf logbook_temp3 ; Gas (0-4) |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1265 clrf logbook_temp1 ; counter |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1266 gassetup_sort_gaslist1a: |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1267 movf POSTINC2,W |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1268 addwf logbook_temp1,F ; sum |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1269 decfsz logbook_temp3,F ; Loop |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1270 bra gassetup_sort_gaslist1a |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1271 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1272 tstfsz logbook_temp1 ; All depths = 0? |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1273 bra gassetup_sort_gaslist1b ; No |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1274 return ; Yes, skip all! |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1275 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1276 gassetup_sort_gaslist1b: |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1277 ; Initialize sorting... |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1278 bcf menubit2 ; Change Start gas only 1x |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1279 movlw d'99' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1280 movwf logbook_temp4 ; Last Gas change depth |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1281 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1282 rcall gassetup_sort_sort ; Sort! |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1283 ; Done. Copy Gas #logbook_temp3 into EEPROM Place Gas 5 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1284 movlw d'5' ; Gas 5 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1285 movwf logbook_temp5 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1286 rcall gassetup_sort_store |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1287 movff logbook_temp1,EEDATA ; Change depth -> EEDATA |
45 | 1288 write_int_eeprom d'122' ; Write Change Depth Gas 5 |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1289 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1290 rcall gassetup_sort_sort ; Sort! |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1291 ; Done. Copy Gas #logbook_temp3 into EEPROM Place Gas 4 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1292 movlw d'4' ; Gas 4 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1293 movwf logbook_temp5 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1294 rcall gassetup_sort_store |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1295 movff logbook_temp1,EEDATA ; Change depth -> EEDATA |
45 | 1296 write_int_eeprom d'121' ; Write Change Depth Gas 4 |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1297 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1298 rcall gassetup_sort_sort ; Sort! |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1299 ; Done. Copy Gas #logbook_temp3 into EEPROM Place Gas 3 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1300 movlw d'3' ; Gas 3 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1301 movwf logbook_temp5 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1302 rcall gassetup_sort_store |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1303 movff logbook_temp1,EEDATA ; Change depth -> EEDATA |
45 | 1304 write_int_eeprom d'120' ; Write Change Depth Gas 3 |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1305 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1306 rcall gassetup_sort_sort ; Sort! |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1307 ; Done. Copy Gas #logbook_temp3 into EEPROM Place Gas 2 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1308 movlw d'2' ; Gas 2 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1309 movwf logbook_temp5 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1310 rcall gassetup_sort_store |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1311 movff logbook_temp1,EEDATA ; Change depth -> EEDATA |
45 | 1312 write_int_eeprom d'119' ; Write Change Depth Gas 2 |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1313 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1314 rcall gassetup_sort_sort ; Sort! |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1315 ; Done. Copy Gas #logbook_temp3 into EEPROM Place Gas 1 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1316 movlw d'1' ; Gas 1 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1317 movwf logbook_temp5 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1318 rcall gassetup_sort_store |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1319 movff logbook_temp1,EEDATA ; Change depth -> EEDATA |
45 | 1320 write_int_eeprom d'118' ; Write Change Depth Gas 1 |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1321 return |
35 | 1322 |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1323 gassetup_sort_sort: |
41 | 1324 clrf logbook_temp2 ; Gas (0-4) |
1325 clrf logbook_temp1 ; Here: Change depth in m | |
1326 clrf logbook_temp3 ; Gas (0-4) | |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1327 |
41 | 1328 lfsr FSR2,letter+.20 ; Change depths... |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1329 gassetup_sort_gaslist2: |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1330 movf POSTINC2,W ; Get Change depth into WREG |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1331 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1332 cpfsgt logbook_temp4 ; logbook_temp4 < W? Here: Change depth of last sort run |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1333 bra gassetup_sort_gaslist3 ; Skip, tested depth > max. Depth from last run |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1334 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1335 cpfslt logbook_temp1 ; logbook_temp1 < W? |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1336 bra gassetup_sort_gaslist3 ; Skip, tested depth < max. Depth from this run |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1337 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1338 movwf logbook_temp1 ; copy new depth (current run) |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1339 movff logbook_temp2,logbook_temp3 ; Holds deepest Gas 0-4 of this run |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1340 gassetup_sort_gaslist3: |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1341 incf logbook_temp2,F ; Check next Gas |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1342 movlw d'5' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1343 cpfseq logbook_temp2 ; All done? |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1344 bra gassetup_sort_gaslist2 ; No |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1345 gassetup_sort_gaslist4: |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1346 movff logbook_temp1,logbook_temp4 ; copy new depth (Store for next run) |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1347 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1348 ; Debugger |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1349 ;call enable_rs232 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1350 ; movff logbook_temp1,TXREG |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1351 ; call rs232_wait_tx ; wait for UART |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1352 ; movff logbook_temp2,TXREG |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1353 ; call rs232_wait_tx ; wait for UART |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1354 ; movff logbook_temp3,TXREG |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1355 ; call rs232_wait_tx ; wait for UART |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1356 ; movff logbook_temp4,TXREG |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1357 ; call rs232_wait_tx ; wait for UART |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1358 ; movff logbook_temp5,TXREG |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1359 ; call rs232_wait_tx ; wait for UART |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1360 ; WAITMS d'255' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1361 return |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1362 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1363 gassetup_sort_store: |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1364 lfsr FSR2,letter ; Point to Gas0 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1365 movf logbook_temp3,W |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1366 mullw d'4' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1367 movf PRODL,W ; x4 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1368 addwf FSR2L,F |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1369 movlw d'0' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1370 addwfc FSR2H,F ; Point to Gas #logbook_temp3 (0-4) |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1371 |
50 | 1372 ; btfsc menubit2 ; Change Start gas only 1x |
1373 ; bra gassetup_sort_store2 ; Skip | |
1374 ;; First Gas: 33 (1-5) | |
1375 ;; Was gas #logbook_temp3 first gas? | |
1376 ; read_int_eeprom d'33' ; Get old first gas (1-5) | |
1377 ; incf logbook_temp3,W ; Gas 1-5 -> WREG | |
1378 ; cpfseq EEDATA ; Compare with EEDATA d'33' | |
1379 ; bra gassetup_sort_store2 ; Was not first gas! | |
1380 ; movff logbook_temp5,EEDATA ; Copy new first gas | |
1381 ; write_int_eeprom d'123' ; Store | |
1382 ; bsf menubit2 ; Done. Do not change again. | |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1383 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1384 gassetup_sort_store2: |
45 | 1385 ; Was Gas #logbook_temp3 active? |
1386 ; Letter+26 holds active bits 25? | |
1387 movff logbook_temp3,logbook_temp6 ; Counter 0-4 | |
1388 incf logbook_temp6,F ; Counter 1-5 | |
1389 movff letter+.25, logbook_temp2 ; No longer used | |
1390 read_int_eeprom d'27' ; Active flag register | |
1391 gassetup_sort_store3: | |
1392 rrcf logbook_temp2,F ; Shift into Carry | |
1393 decfsz logbook_temp6,F ; 1-5 x | |
1394 bra gassetup_sort_store3 ; Loop | |
1395 ; Carry now holds active bit of gas #logbook_temp3 (0-4) | |
1396 | |
1397 btfss STATUS,C ; Was Gas active? | |
1398 clrf logbook_temp1 ; No!, Clear change Depth to make it inactive for sorted list! | |
1399 | |
49 | 1400 ;call enable_rs232 |
1401 ;movff logbook_temp1,TXREG | |
1402 ;call rs232_wait_tx ; wait for UART | |
1403 | |
1404 movf logbook_temp5,W ; 1-5 | |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1405 mullw d'4' |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1406 movff PRODL,EEADR ; Point to EEPROM of Gas #logbook_temp5 |
45 | 1407 movlw d'90' ; +90 Offset to new... |
1408 addwf EEADR,F ; ..sorted list! | |
1409 | |
36
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1410 movff POSTINC2,EEDATA ; O2 Default |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1411 call write_eeprom ; store in internal EEPROM |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1412 incf EEADR,F ; +1 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1413 movff POSTINC2,EEDATA ; He Default |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1414 call write_eeprom ; store in internal EEPROM |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1415 incf EEADR,F ; +1 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1416 movff POSTINC2,EEDATA ; O2 Current |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1417 call write_eeprom ; store in internal EEPROM |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1418 incf EEADR,F ; +1 |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1419 movff POSTINC2,EEDATA ; He Current |
3c38ba950dfb
Gas Setup now sorts Gases for new Deco code
heinrichsweikamp
parents:
35
diff
changeset
|
1420 call write_eeprom ; store in internal EEPROM |
0 | 1421 return |