annotate code_part1/OSTC_code_asm_part1/customview.asm @ 784:46ef1e1388f1

Merge
author heinrichsweikamp
date Mon, 23 Jun 2014 17:29:59 +0200
parents 43ef5a003df7
children b0c96aaa86e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
1 ; OSTC - diving computer code
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
2 ; Copyright (C) 2008 HeinrichsWeikamp GbR
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
3
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
4 ; This program is free software: you can redistribute it and/or modify
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
5 ; it under the terms of the GNU General Public License as published by
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
6 ; the Free Software Foundation, either version 3 of the License, or
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
7 ; (at your option) any later version.
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
8
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
9 ; This program is distributed in the hope that it will be useful,
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
12 ; GNU General Public License for more details.
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
13
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
14 ; You should have received a copy of the GNU General Public License
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
15 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
16
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
17
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
18 ; Customviews for divemode
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
19 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
20 ; history:
478
fd8266b511cc New SAC (CF56/CF57) in 5..50 l/min range (no more decimal).
JeanDo
parents: 476
diff changeset
21 ; 2010-12-12: [MH] First updated
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
22 ; 2011-01-04: [jDG] Saturation graphs in customview divemode
478
fd8266b511cc New SAC (CF56/CF57) in 5..50 l/min range (no more decimal).
JeanDo
parents: 476
diff changeset
23 ; 2011-10-10: [jDG] Added Cave live gas counter
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
24 ; known bugs:
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
25 ; ToDo:
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
26
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
27 ;=============================================================================
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
28 ; Show the customview-dependent entry for the divemode menu
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
29 ;
479
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
30 customview_menu_entry3:
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
31 movff menupos3,WREG ; copy
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
32 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
33 bra customview_menu3_stopwatch ; Show the stopwatch option in divemode menu
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
34 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
35 bra customview_menu3_marker ; Show the marker option in divemode menu
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
36 dcfsnz WREG,F
479
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
37 bra customview_menu3_clock ; Show nothing
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
38 dcfsnz WREG,F
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
39 bra customview_menu3_lead_tiss ; Show nothing
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
40 dcfsnz WREG,F
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
41 bra customview_menu3_average ; Show nothing
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
42 dcfsnz WREG,F
479
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
43 bra customview_menu3_graphs ; Show nothing
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
44 dcfsnz WREG,F
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
45 bra customview_menu3_ead_end ; Show nothing
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
46 dcfsnz WREG,F
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
47 bra customview_menu3_@5 ; Show nothing
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
48 dcfsnz WREG,F
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
49 bra customview_menu3_cave_bailout; Show reset option
666
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
50 dcfsnz WREG,F
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
51 bra customview_menu3_pSCR_ppO2 ; Show nothing
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
52 dcfsnz WREG,F
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
53 bra customview_menu3_show_change_gf; Show toggle option
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
54
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
55 return
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
56
479
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
57 customview_menu3_cave_bailout:
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
58 customview_menu3_stopwatch:
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
59 DISPLAYTEXT .33 ; ResetAvr
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
60 return
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
61
666
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
62 customview_menu3_show_change_gf:
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
63 DISPLAYTEXTH .269 ; ToggleGF
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
64 return
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
65
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
66 customview_menu3_marker:
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
67 DISPLAYTEXT .30 ; Set Marker
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
68 return
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
69
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
70 customview_menu3_clock: ; No menu entry
479
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
71 customview_menu3_lead_tiss:
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
72 customview_menu3_average:
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
73 customview_menu3_graphs:
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
74 customview_menu3_ead_end:
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
75 customview_menu3_@5:
666
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
76 customview_menu3_pSCR_ppO2:
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
77 return
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
78
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
79 ;=============================================================================
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
80 ; Do every-second tasks for the custom view area
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
81
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
82 customview_second:
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
83 movff menupos3,WREG ; copy
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
84 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
85 bra customview_1sec_stopwatch ; Update the Stopwatch
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
86 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
87 bra customview_1sec_marker ; Update the Marker
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
88 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
89 bra customview_1sec_clock ; Update the Clock
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
90 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
91 bra customview_1sec_lead_tiss ; Update the leading tissue
133
35567a646fe5 Minor merge fixes...
JeanDo
parents: 131
diff changeset
92 dcfsnz WREG,F
131
03df42de03e1 Merge 129 with 130
Heinrichsweikamp
parents: 129 128
diff changeset
93 bra customview_1sec_average ; Update the Average depth
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
94 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
95 bra customview_1sec_graphs ; Update the leading tissue
274
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
96 dcfsnz WREG,F
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
97 bra customview_1sec_ead_end ; Show END and EAD in divemode
312
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
98 dcfsnz WREG,F
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
99 bra customview_1sec_@5 ; Show TTS for extra time.
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
100 dcfsnz WREG,F
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
101 bra customview_1sec_cave_bailout; Show Cave conso prediction.
552
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
102 dcfsnz WREG,F
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
103 bra customview_1sec_pSCR_ppO2 ; Show/Update pSCR ppO2
666
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
104 dcfsnz WREG,F
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
105 bra customview_1sec_show_change_gf; Show and/or change GF values
759
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
106 dcfsnz WREG,F
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
107 bra customview_1sec_show_deco_gas
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
108 ; Menupos3=0, do nothing
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
109 return
129
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
110
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
111 customview_1sec_average:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
112 goto DISP_total_average_show2 ; Update the figures only
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
113
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
114 customview_1sec_stopwatch:
386
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
115 btfsc gauge_mode ; In Gauge mode?
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
116 bra customview_1sec_stopwatch_gauge; Yes
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
117
295
1a15d75702f7 Menu3 marker bugfix
Heinrichsweikamp
parents: 277
diff changeset
118 bsf menu3_active ; Set Flag
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
119 goto DISP_stopwatch_show2 ; Update figures only
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
120
386
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
121 customview_1sec_stopwatch_gauge:
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
122 bsf menu3_active ; Set Flag
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
123 goto DISP_stopwatch_show_gauge ; Update figures + Description
386
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
124
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
125 customview_1sec_marker: ; Do nothing extra
666
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
126 customview_1sec_show_change_gf: ; Do nothing extra
295
1a15d75702f7 Menu3 marker bugfix
Heinrichsweikamp
parents: 277
diff changeset
127 bsf menu3_active ; Set Flag
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
128 customview_1sec_lead_tiss: ; Do nothing extra
133
35567a646fe5 Minor merge fixes...
JeanDo
parents: 131
diff changeset
129 return
35567a646fe5 Minor merge fixes...
JeanDo
parents: 131
diff changeset
130
778
43ef5a003df7 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 759
diff changeset
131 customview_1sec_clock:
43ef5a003df7 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 759
diff changeset
132 goto DISP_diveclock3 ; Update end of divetime only
43ef5a003df7 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 759
diff changeset
133
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
134 customview_1sec_graphs: ; Do nothing extra
150
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
135 decfsz apnoe_mins ; 10 sec passed ?
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
136 return ; No: skip.
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
137 movlw .10 ; Yes: reset counter.
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
138 movwf apnoe_mins
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
139
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
140 call deco_calc_desaturation_time ; calculate desaturation time
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
141 movlb b'00000001' ; select ram bank 1
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
142 goto DISP_tissue_saturation_graph
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
143
274
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
144 customview_1sec_ead_end:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
145 goto DISP_show_end_ead_divemode
312
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
146
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
147 customview_1sec_@5:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
148 goto DISP_show_@5
274
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
149
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
150 customview_1sec_cave_bailout:
479
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
151 bsf menu3_active ; Set Flag
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
152 goto DISP_show_cave_bailout
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
153
552
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
154 customview_1sec_pSCR_ppO2:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
155 goto DISP_show_pSCR_ppO2 ; Yes, compute and show value
759
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
156
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
157 customview_1sec_show_deco_gas:
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
158 goto DISP_show_deco_gas1 ; Show the next decogas
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
159
552
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
160
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
161 ;=============================================================================
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
162 ; Do every-minute tasks for the custom view area
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
163
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
164 customview_minute:
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
165 movff menupos3,WREG ; copy
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
166 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
167 bra customview_minute_stopwatch ; Update the Stopwatch
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
168 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
169 bra customview_minute_marker ; Update the Marker
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
170 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
171 bra customview_minute_clock ; Update the Clock
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
172 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
173 bra customview_minute_lead_tiss ; Update the leading tissue
133
35567a646fe5 Minor merge fixes...
JeanDo
parents: 131
diff changeset
174 dcfsnz WREG,F
274
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
175 bra customview_minute_average ; Update the Average depth
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
176 dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
177 bra customview_minute_graphs ; Update the graphs
274
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
178 dcfsnz WREG,F
312
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
179 bra customview_minute_ead_end ; Show END and EAD in divemode
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
180 dcfsnz WREG,F
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
181 bra customview_minute_@5 ; Show TTS for extra time.
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
182 dcfsnz WREG,F
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
183 bra customview_minute_cave_bailout; Show Cave consomation prediction.
552
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
184 dcfsnz WREG,F
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
185 bra customview_minute_pSCR_ppO2; Show pSCR ppO2 level
666
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
186 dcfsnz WREG,F
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
187 bra customview_minute_show_change_gf; Show and/or change GF values
759
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
188 dcfsnz WREG,F
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
189 bra customview_minute_show_deco_gas ; Show the next decogas
274
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
190
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
191 ; Menupos3=0, do nothing
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
192 return
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
193
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
194 customview_minute_clock:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
195 goto DISP_diveclock2 ; Update the clock
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
196
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
197 customview_minute_lead_tiss:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
198 goto DISP_show_leading_tissue_2 ; Update the leading tissue
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
199
666
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
200 customview_minute_show_change_gf: ; Do nothing extra
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
201 customview_minute_cave_bailout: ; Do nothing extra
312
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
202 customview_minute_@5: ; Do nothing extra
274
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
203 customview_minute_ead_end: ; Do nothing extra
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
204 customview_minute_marker: ; Do nothing extra
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
205 customview_minute_stopwatch: ; Do nothing extra
137
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
206 customview_minute_average: ; Do nothing extra
274
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
207 customview_minute_graphs: ; Do nothing extra
552
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
208 customview_minute_pSCR_ppO2: ; Do nothing extra
759
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
209 customview_minute_show_deco_gas: ; Do nothing extra
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
210 return
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
211
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
212 ;=============================================================================
312
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
213 ; Show next customview (and delete this flag)
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
214
277
46d1012d096a Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents: 274
diff changeset
215 customview_toggle:
479
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
216 bcf menu3_active ;=1: menu entry three in divemode menu is active
119
f24137eb85de Background debugger now shows STKPTR
heinrichsweikamp
parents: 115
diff changeset
217 ostc_debug 'X' ; Sends debug-information to screen if debugmode active
137
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
218
626
bab5a9fc1b10 restore last used customview in dive- and surface-mode
heinrichsweikamp
parents: 592
diff changeset
219 incf menupos3,F ; Number of customview to show
bab5a9fc1b10 restore last used customview in dive- and surface-mode
heinrichsweikamp
parents: 592
diff changeset
220 customview_toggle2:
137
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
221 btfsc FLAG_apnoe_mode ; In Apnoe mode?
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
222 bra customview_toggle_exit ; Yes, ignore custom view in divemode completely
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
223
759
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
224 movlw d'12' ; Max number
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
225 cpfsgt menupos3 ; Max reached?
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
226 bra customview_mask ; No, show
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
227 clrf menupos3 ; Reset to zero (Zero=no custom view)
312
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
228
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
229 customview_mask:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
230 call DISP_clear_customview_divemode
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
231 bcf tts_extra_time ; By default, CLEAR computation of @5 request.
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
232
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
233 movff menupos3,WREG ; Menupos3 holds number of customview function
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
234 dcfsnz WREG,F
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
235 bra customview_init_stopwatch ; 1: Show the Stopwatch
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
236 dcfsnz WREG,F
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
237 bra customview_init_marker ; 2: Show the Marker-Menu
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
238 dcfsnz WREG,F
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
239 bra customview_init_clock ; 3: Show the clock
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
240 dcfsnz WREG,F
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
241 bra customview_init_lead_tissue ; 4: Show the leading tissue
133
35567a646fe5 Minor merge fixes...
JeanDo
parents: 131
diff changeset
242 dcfsnz WREG,F
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
243 bra customview_init_average ; 5: Show Total average depth
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
244 dcfsnz WREG,F
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
245 bra customview_init_graphs ; 6: Show the graphs
274
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
246 dcfsnz WREG,F
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
247 bra customview_init_ead_end ; 7: Show END and EAD in divemode
312
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
248 dcfsnz WREG,F
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
249 bra customview_init_@5 ; 8: Show TTS for extra time.
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
250 dcfsnz WREG,F
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
251 bra customview_init_cave_bailout ; 9: Show Cave consomation prediction.
552
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
252 dcfsnz WREG,F
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
253 bra customview_init_pSCR_ppo2 ; 10: Show ppO2 for pSCR users
666
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
254 dcfsnz WREG,F
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
255 bra customview_init_show_change_gf ; 11: Show and/or change GF values
759
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
256 dcfsnz WREG,F
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
257 bra customview_init_show_deco_gas ; 12: Show deco gas
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
258
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
259 customview_init_nocustomview:
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
260 bra customview_toggle_exit
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
261
129
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
262 customview_init_average:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
263 call DISP_total_average_show ; Show Average with mask
129
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
264 bra customview_toggle_exit
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
265
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
266 customview_init_stopwatch:
129
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
267 GETCUSTOM8 d'51' ; Show Stopwatch? (=1 in WREG)
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
268 decfsz WREG,F ; WREG=1?
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
269 bra customview_toggle ; No, use next Customview
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
270
386
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
271 btfsc gauge_mode ; In Gauge mode?
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
272 bra customview_init_stopwatch_gauge ; Yes
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
273
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
274 call DISP_stopwatch_show ; Init Stopwatch display
277
46d1012d096a Quick-access to menupos3 in divemode - ToDo: EAD and END in CCR mode
heinrichsweikamp
parents: 274
diff changeset
275 bsf menu3_active ; Set Flag
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
276 bra customview_toggle_exit
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
277
386
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
278 customview_init_stopwatch_gauge:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
279 call DISP_stopwatch_show_gauge ; Init Stopwatch display
386
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
280 bsf menu3_active ; Set Flag
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
281 bra customview_toggle_exit
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
282
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
283 customview_init_marker: ; Init Marker
386
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
284 btfsc gauge_mode ; In Gauge mode?
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
285 call DISP_clear_divemode_menu; Yes, clear BIG stopwatch
386
deced1cacff7 Added velocity in divemode, BIG stopwatch in Gauge mode
heinrichsweikamp
parents: 323
diff changeset
286
129
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
287 GETCUSTOM8 d'50' ; Show Marker? (=1 in WREG)
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
288 decfsz WREG,F ; WREG=1?
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
289 bra customview_toggle ; No, use next Customview
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
290
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
291 call DISP_standard_color
150
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
292 DISPLAYTEXT d'151' ; Set Marker?
479
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
293 bsf menu3_active ; Set Flag
674
3927bc5019c9 show some feedback if marker was set
heinrichsweikamp
parents: 666
diff changeset
294
3927bc5019c9 show some feedback if marker was set
heinrichsweikamp
parents: 666
diff changeset
295 btfss event_occured ; Is an event active?
3927bc5019c9 show some feedback if marker was set
heinrichsweikamp
parents: 666
diff changeset
296 bra customview_toggle_exit ; No
3927bc5019c9 show some feedback if marker was set
heinrichsweikamp
parents: 666
diff changeset
297
3927bc5019c9 show some feedback if marker was set
heinrichsweikamp
parents: 666
diff changeset
298 movlw d'6' ; Type of Alarm (Manual Marker)
3927bc5019c9 show some feedback if marker was set
heinrichsweikamp
parents: 666
diff changeset
299 cpfseq AlarmType ; Marker recently set?
3927bc5019c9 show some feedback if marker was set
heinrichsweikamp
parents: 666
diff changeset
300 bra customview_toggle_exit ; No
3927bc5019c9 show some feedback if marker was set
heinrichsweikamp
parents: 666
diff changeset
301
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
302 call DISP_marker_set ; Show some feedback
150
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
303 bra customview_toggle_exit
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
304
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
305 customview_init_clock: ; Init Clock
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
306 call DISP_diveclock
150
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
307 bra customview_toggle_exit
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
308
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
309 customview_init_lead_tissue: ; Show leading tissue
129
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
310 GETCUSTOM8 d'53' ; Show Lead Tissue? (=1 in WREG)
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
311 decfsz WREG,F ; WREG=1?
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
312 bra customview_toggle ; No, use next Customview
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
313
137
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
314 btfsc no_deco_customviews ; no-deco-mode-flag = 1
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
315 bra customview_toggle ; Yes, use next Customview!
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
316
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
317 call DISP_show_leading_tissue
150
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
318 bra customview_toggle_exit
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
319
274
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
320 customview_init_ead_end:
312
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
321 btfsc no_deco_customviews ; no-deco-mode-flag = 1
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
322 bra customview_toggle ; Yes, use next Customview!
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
323
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
324 call DISP_show_end_ead_divemode
274
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
325 bra customview_toggle_exit
a728b4a1b660 Setpoint changes stored in profile, EAD and END displayed in divemode (Customview 7)
heinrichsweikamp
parents: 150
diff changeset
326
312
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
327 customview_init_@5:
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
328 GETCUSTOM8 d'58' ; Extra time to simulate
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
329 iorwf WREG,F ; Null ?
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
330 bz customview_toggle ; Yes: use next Customview !
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
331
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
332 btfsc no_deco_customviews ; no-deco-mode-flag = 1
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
333 bra customview_toggle ; Yes, use next Customview!
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
334
323
b7940978edc9 Fix "Future TTS" display customview.
JeanDo
parents: 312
diff changeset
335 setf WREG ; WAIT marker: display "---"
312
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
336 movff WREG,int_O_extra_ascenttime+0
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
337 movff WREG,int_O_extra_ascenttime+1
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
338
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
339 movlw 1
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
340 movwf apnoe_mins ; Start compute after next cycle.
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
341 bsf tts_extra_time
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
342 call DISP_show_@5 ; Show (wait)
312
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
343
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
344 bra customview_toggle_exit
b7e4e74c0e17 New @5 variant: compute TTS if staying some extra time (CF58) at current depth.
JeanDo
parents: 295
diff changeset
345
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
346 customview_init_cave_bailout:
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
347 GETCUSTOM15 d'59' ; Conso level warning set ?
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
348 movf lo,W
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
349 iorwf hi,W
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
350 bz customview_toggle ; No: jump to next Customview !
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
351
479
9fc8feff27a5 Enable reset in cave bailout prediction, by using chrono average depth.
JeanDo
parents: 478
diff changeset
352 bsf menu3_active ; Set Flag
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
353 call DISP_show_cave_bailout
476
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
354 bra customview_toggle_exit
7779bfa89171 Cave bailout prediction.
JeanDo
parents: 386
diff changeset
355
131
03df42de03e1 Merge 129 with 130
Heinrichsweikamp
parents: 129 128
diff changeset
356 customview_init_graphs: ; Show tissue graph
03df42de03e1 Merge 129 with 130
Heinrichsweikamp
parents: 129 128
diff changeset
357 GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG)
03df42de03e1 Merge 129 with 130
Heinrichsweikamp
parents: 129 128
diff changeset
358 decfsz WREG,F ; WREG=1?
03df42de03e1 Merge 129 with 130
Heinrichsweikamp
parents: 129 128
diff changeset
359 bra customview_toggle ; No, use next Customview
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
360
137
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
361 btfsc no_deco_customviews ; no-deco-mode-flag = 1
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
362 bra customview_toggle ; Yes, use next Customview!
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
363
150
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
364 movlw .1 ; Draw next second.
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
365 movwf apnoe_mins ; 10sec counter.
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
366
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
367 call deco_calc_desaturation_time ; calculate desaturation time
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
368 movlb b'00000001' ; select ram bank 1
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
369 call DISP_tissue_saturation_graph
150
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
370
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
371 bra customview_toggle_exit
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
372
552
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
373 customview_init_pSCR_ppo2:
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
374 GETCUSTOM8 d'61' ; Show pSCR ppO2?
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
375 decfsz WREG,F ; WREG=1?
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
376 bra customview_toggle ; No, use next Customview
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
377
666
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
378 btfsc no_deco_customviews ; no-deco-mode-flag = 1
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
379 bra customview_toggle ; Yes, use next Customview!
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
380
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
381 call DISP_show_pSCR_ppO2 ; Yes, compute and show value
552
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
382
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
383 bra customview_toggle_exit
44e9b961f156 Compute ppO2 for pSCR diving
heinrichsweikamp
parents: 479
diff changeset
384
666
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
385 customview_init_show_change_gf:
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
386 GETCUSTOM8 d'69' ; Allow GF change?
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
387 decfsz WREG,F ; WREG=1?
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
388 bra customview_toggle ; No, use next Customview
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
389
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
390 btfsc no_deco_customviews ; no-deco-mode-flag = 1
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
391 bra customview_toggle ; Yes, use next Customview!
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
392
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
393 movff char_I_deco_model,lo
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
394 decfsz lo,F ; jump over next line if char_I_deco_model == 1
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
395 bra customview_toggle_exit
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
396
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
397 bsf menu3_active ; Set Flag
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
398 call DISP_show_gf_customview ; Show info
666
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
399 bra customview_toggle_exit
3282581fe178 Allow gf switch
heinrichsweikamp
parents: 626
diff changeset
400
759
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
401 customview_init_show_deco_gas:
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
402 bra customview_toggle ; mH: Ignore now
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
403
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
404 btfsc no_deco_customviews ; no-deco-mode-flag = 1
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
405 bra customview_toggle ; Yes, use next Customview!
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
406 btfsc FLAG_const_ppO2_mode ; in ppO2 mode
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
407 bra surfcustomview_toggle ; Yes, use next Customview!
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
408
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
409 call DISP_show_deco_gas ; Show the next decogas
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
410
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
411 bra customview_toggle_exit
ae830d5e63ef Start on new decogas display
heinrichsweikamp
parents: 758
diff changeset
412
98
6f8e3a08011e 1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff changeset
413 customview_toggle_exit:
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
414 bcf toggle_customview ; Clear flag
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
415 ostc_debug 'Y' ; Sends debug-information to screen in debugmode
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
416 return
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
417
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
418 ;=============================================================================
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
419 ; Yes, show next customview (and delete this flag)
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
420
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
421 surfcustomview_toggle:
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
422 incf menupos3,F ; Number of customview to show
626
bab5a9fc1b10 restore last used customview in dive- and surface-mode
heinrichsweikamp
parents: 592
diff changeset
423 surfcustomview_toggle2:
758
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
424 movlw d'6' ; Max number
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
425 cpfsgt menupos3 ; Max reached?
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
426 bra surfcustomview_mask ; No, show
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
427 clrf menupos3 ; Reset to zero (Zero=no custom view)
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
428 surfcustomview_mask:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
429 call DISP_clear_customview_surfmode
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
430 movff menupos3,WREG ; Menupos3 holds number of customview function
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
431 dcfsnz WREG,F
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
432 bra surfcustomview_init_graphs ; Show the tissue graphs
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
433 dcfsnz WREG,F
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
434 bra surfcustomview_init_gaslist ; Show pre-dive gaslist/setpoint list
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
435 dcfsnz WREG,F
758
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
436 bra surfcustomview_init_interval ; Show the interval counter
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
437 dcfsnz WREG,F
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
438 bra surfcustomview_init_cfview ; Show important CF settings
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
439 dcfsnz WREG,F
758
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
440 bra surfcustomview_init_first_bail ; Show the first bailout gas
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
441 dcfsnz WREG,F
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
442 bra surfcustomview_init_bailoutlist ; Show the bailout list
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
443
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
444 surfcustomview_init_nocustomview:
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
445 bra surfcustomview_toggle_exit
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
446
758
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
447 surfcustomview_init_first_bail: ; Show the first bailout gas
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
448 btfss FLAG_const_ppO2_mode ; in ppO2 mode
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
449 bra surfcustomview_toggle ; No, use next Customview!
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
450 call DISP_bailoutgas ; Show the first bailout gas
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
451 bra surfcustomview_toggle_exit
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
452
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
453 surfcustomview_init_bailoutlist: ; Show the bailout list
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
454 btfss FLAG_const_ppO2_mode ; in ppO2 mode
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
455 bra surfcustomview_toggle ; No, use next Customview!
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
456 call DISP_bailoutlist ; Show the Bailout list
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
457 bra surfcustomview_toggle_exit
3096294bb06e Show the bailout list in surfacemode (CC Modes)
heinrichsweikamp
parents: 681
diff changeset
458
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
459 surfcustomview_init_graphs:
137
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
460 btfsc no_deco_customviews ; no-deco-mode-flag = 1
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
461 bra surfcustomview_toggle ; Yes, use next Customview!
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
462
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
463 call DISP_tissue_saturation_graph; Draw the graphs
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
464 bra surfcustomview_toggle_exit
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
465
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
466 surfcustomview_init_gaslist:
137
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
467 btfsc no_deco_customviews ; no-deco-mode-flag = 1
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
468 bra surfcustomview_toggle ; Yes, use next Customview!
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
469
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
470 call DISP_pre_dive_screen ; Show the Gaslist/Setpoint list
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
471 bra surfcustomview_toggle_exit
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
472
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
473 surfcustomview_init_interval:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
474 call DISP_standard_color
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
475 DISPLAYTEXT d'189' ; Surface
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
476 DISPLAYTEXT d'240' ; Interval:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
477 call DISP_interval ; Display the interval
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
478 bra surfcustomview_toggle_exit
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
479
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
480 surfcustomview_init_cfview:
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
481 read_int_eeprom d'34' ; Get Decomode
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
482 incf EEDATA,W ; +1 -> WREG
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
483 movwf temp10
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
484 dcfsnz temp10,F
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
485 call DISP_show_cf11_cf12_cf29 ; =0 (ZH-L16 OC)
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
486 dcfsnz temp10,F
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
487 bra surfcustomview_toggle_exit ; =1 (Gauge)
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
488 dcfsnz temp10,F
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
489 call DISP_show_cf11_cf12_cf29 ; =2 (ZH-L16 CC)
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
490 dcfsnz temp10,F
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
491 bra surfcustomview_toggle_exit ; =3 (Apnoe)
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
492 dcfsnz temp10,F
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
493 call DISP_show_cf32_cf33_cf29 ; =4 (L16-GF OC)
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
494 dcfsnz temp10,F
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
495 call DISP_show_cf32_cf33_cf29 ; =5 (L16-GF CC)
592
cda5b45b953f NEW: Deco mode "pSCR-GF": Computes deco and CNS based on pSCR parameters (CF62/63)
heinrichsweikamp
parents: 552
diff changeset
496 dcfsnz temp10,F
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
497 call DISP_show_cf32_cf33_cf62_cf63 ; =6 (pSCR-GF)
592
cda5b45b953f NEW: Deco mode "pSCR-GF": Computes deco and CNS based on pSCR parameters (CF62/63)
heinrichsweikamp
parents: 552
diff changeset
498
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
499 bra surfcustomview_toggle_exit
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
500
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
501 surfcustomview_toggle_exit:
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
502 bcf toggle_customview ; Clear flag
129
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
503 clrf timeout_counter2 ; Clear timeout
06c4899ddb4b Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents: 123
diff changeset
504 return
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
505
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
506 ;=============================================================================
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
507 ; Do every-second tasks for the custom view area
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
508
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
509 surfcustomview_second:
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
510 ; movff menupos3,WREG ; copy
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
511 ; dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
512 ; bra surfcustomview_1sec_graphs ; Update the Graphs
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
513 ; dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
514 ; bra surfcustomview_1sec_gaslist ; Update the Gaslist/SetPoint List
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
515 ; dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
516 ; bra surfcustomview_1sec_interval ; Update the Interval display
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
517 ; dcfsnz WREG,F
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
518 ; bra surfcustomview_1sec_cfview ; Update the critical cf view
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
519 ; ; Menupos3=0, do nothing
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
520 ; return
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
521 ;surfcustomview_1sec_cfview: ; Do nothing extra
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
522 ;surfcustomview_1sec_graphs: ; Do nothing extra
137
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
523 ;surfcustomview_1sec_gaslist: ; Do nothing extra
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
524 ;surfcustomview_1sec_interval: ; Do nothing extra
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
525 return
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
526
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
527 ;=============================================================================
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
528
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
529 surfcustomview_minute: ; Do every-minute tasks for the custom view area
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
530 movff menupos3,WREG ; copy
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
531 dcfsnz WREG,F
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
532 bra surfcustomview_minute_graphs ; Update the Graphs
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
533 dcfsnz WREG,F
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
534 bra surfcustomview_minute_gaslist ; Update the Gaslist/SetPoint List
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
535 dcfsnz WREG,F
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
536 bra surfcustomview_minute_interval ; Update the Interval display
128
4c588c3d1f12 Saturation graphs in customview divemode
JeanDo
parents: 123
diff changeset
537 dcfsnz WREG,F
137
e6aa4a74c3c2 Fix: Customviews for Apnoe and Gauge mode
mh <>
parents: 134
diff changeset
538 bra surfcustomview_minute_cfview ; Update the critical cf view
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
539 ; Menupos3=0, do nothing
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
540 return
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
541
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
542 surfcustomview_minute_graphs:
150
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
543 call deco_calc_desaturation_time ; calculate desaturation time
fc699a7460e6 Fix desat graph:
JeanDo
parents: 137
diff changeset
544 movlb b'00000001' ; select ram bank 1
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
545 call DISP_tissue_saturation_graph ; Draw/Update the graphs
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
546 return
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
547
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
548 surfcustomview_minute_interval:
112
9500f431248a 1.74beta rc2
heinrichsweikamp
parents: 111
diff changeset
549 DISPLAYTEXT d'189' ; Surface
9500f431248a 1.74beta rc2
heinrichsweikamp
parents: 111
diff changeset
550 DISPLAYTEXT d'240' ; Interval:
681
6e456a6398e0 Hardware4 support
heinrichsweikamp
parents: 674
diff changeset
551 call DISP_interval ; Display the interval
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
552 return
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
553
107
a2b9eca1f396 customview for the surfacemode
heinrichsweikamp
parents: 98
diff changeset
554 surfcustomview_minute_gaslist: ; Do nothing extra
111
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
555 surfcustomview_minute_cfview: ; Do nothing extra
ed7826c740a0 1.74beta rc1
heinrichsweikamp
parents: 107
diff changeset
556 return