Mercurial > public > mk2
annotate code_part1/OSTC_code_asm_part1/customview.asm @ 129:06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Total Average Depth (Non-Resetable)
Some Display fixes in Divemode
Bugfix Timeout reset in Surfacemode
author | Heinrichsweikamp |
---|---|
date | Tue, 04 Jan 2011 16:32:28 +0100 |
parents | 6a94f96e9cea |
children | 03df42de03e1 |
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 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
20 ; written: 101212 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
21 ; last updated: 101212 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
22 ; known bugs: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
23 ; ToDo: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
24 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
25 customview_menu_entry3: ; Show the customview-dependent entry for the divemode menu |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
26 bcf menu3_active ;=1: menu entry three in divemode menu is active |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
27 movff menupos3,temp1 ; copy |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
28 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
29 bra customview_menu3_stopwatch ; Show the stopwatch option in divemode menu |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
30 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
31 bra customview_menu3_marker ; Show the marker option in divemode menu |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
32 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
33 bra customview_menu3_clock ; Show the clock option in divemode menu |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
34 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
35 bra customview_menu3_lead_tiss ; Show the leading tissue option in divemode menu |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
36 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
37 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
38 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
39 customview_menu3_stopwatch: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
40 bsf menu3_active ; Set Flag |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
41 DISPLAYTEXT .33 ; ResetAvr |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
42 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
43 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
44 customview_menu3_marker: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
45 bsf menu3_active ; Set Flag |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
46 DISPLAYTEXT .30 ; Set Marker |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
47 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
48 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
49 customview_menu3_clock: ; No menu entry |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
50 customview_menu3_lead_tiss ; No menu entry |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
51 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
52 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
53 customview_second: ; Do every-second tasks for the custom view area |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
54 movff menupos3,temp1 ; copy |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
55 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
56 bra customview_1sec_stopwatch ; Update the Stopwatch |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
57 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
58 bra customview_1sec_marker ; Update the Marker |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
59 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
60 bra customview_1sec_clock ; Update the Clock |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
61 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
62 bra customview_1sec_lead_tiss ; Update the leading tissue |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
63 dcfsnz temp1,F |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
64 bra customview_1sec_average ; Update the Average depth |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
65 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
66 return |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
67 |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
68 customview_1sec_average: |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
69 call PLED_total_average_show2 ; Update the figures only |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
70 return |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
71 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
72 customview_1sec_stopwatch: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
73 call PLED_stopwatch_show2 ; Update figures only |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
74 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
75 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
76 customview_1sec_marker: ; Do nothing extra |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
77 customview_1sec_lead_tiss: ; Do nothing extra |
107 | 78 customview_1sec_clock: ; Do nothing extra |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
79 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
80 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
81 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
82 customview_minute: ; Do every-minute tasks for the custom view area |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
83 movff menupos3,temp1 ; copy |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
84 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
85 bra customview_minute_stopwatch ; Update the Stopwatch |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
86 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
87 bra customview_minute_marker ; Update the Marker |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
88 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
89 bra customview_minute_clock ; Update the Clock |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
90 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
91 bra customview_minute_lead_tiss ; Update the leading tissue |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
92 dcfsnz temp1,F |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
93 bra customview_minute_average ; Update the Average depth |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
94 ; Menupos3=0, do nothing |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
95 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
96 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
97 customview_minute_clock: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
98 call PLED_diveclock2 ; Update the clock |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
99 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
100 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
101 customview_minute_lead_tiss: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
102 call PLED_show_leading_tissue_2 ; Update the leading tissue |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
103 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
104 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
105 customview_minute_marker: ; Do nothing extra |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
106 customview_minute_stopwatch: ; Do nothing extra |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
107 customview_minute_average: ; Do nothing extra |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
108 return |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
109 |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
110 customview_toggle: ; Yes, show next customview (and delete this flag) |
119 | 111 ostc_debug 'X' ; Sends debug-information to screen if debugmode active |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
112 incf menupos3,F ; Number of customview to show |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
113 movlw d'5' ; Max number |
111 | 114 cpfsgt menupos3 ; Max reached? |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
115 bra customview_mask ; No, show |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
116 clrf menupos3 ; Reset to zero (Zero=no custom view) |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
117 customview_mask: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
118 call PLED_clear_customview_divemode |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
119 movff menupos3,temp1 ; Menupos3 holds number of customview function |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
120 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
121 bra customview_init_stopwatch ; Show the Stopwatch |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
122 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
123 bra customview_init_marker ; Show the Marker-Menu |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
124 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
125 bra customview_init_clock ; Show the clock |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
126 dcfsnz temp1,F |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
127 bra customview_init_lead_tissue ; Show the leading tissue |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
128 dcfsnz temp1,F |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
129 bra customview_init_average ; Show Total average depth |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
130 ; bra customview_init_nocustomview ; menupos3=0 -> No Customview |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
131 customview_init_nocustomview: |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
132 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
133 |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
134 customview_init_average: |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
135 call PLED_total_average_show ; Show Average with mask |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
136 bra customview_toggle_exit |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
137 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
138 customview_init_stopwatch: |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
139 GETCUSTOM8 d'51' ; Show Stopwatch? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
140 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
141 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
142 |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
143 call PLED_stopwatch_show ; Init Stopwatch display |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
144 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
145 |
107 | 146 customview_init_marker: ; Init Marker |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
147 GETCUSTOM8 d'50' ; Show Marker? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
148 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
149 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
150 |
107 | 151 DISPLAYTEXT d'151' ; Set Marker? |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
152 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
153 |
107 | 154 customview_init_clock: ; Init Clock |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
155 call PLED_diveclock |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
156 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
157 |
107 | 158 customview_init_lead_tissue: ; Show leading tissue |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
159 GETCUSTOM8 d'53' ; Show Lead Tissue? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
160 decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
161 bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
162 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
163 call PLED_show_leading_tissue |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
164 bra customview_toggle_exit |
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
165 |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
166 ;customview_init_graphs: ; Show tissue graph |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
167 ; GETCUSTOM8 d'52' ; Show Tissue Graph? (=1 in WREG) |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
168 ; decfsz WREG,F ; WREG=1? |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
169 ; bra customview_toggle ; No, use next Customview |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
170 |
98
6f8e3a08011e
1.73beta rc1 (Added new customview for divemode)
heinrichsweikamp
parents:
diff
changeset
|
171 customview_toggle_exit: |
107 | 172 bcf toggle_customview ; Clear flag |
119 | 173 ostc_debug 'Y' ; Sends debug-information to screen if debugmode active |
107 | 174 return |
175 | |
176 | |
177 | |
178 surfcustomview_toggle: ; Yes, show next customview (and delete this flag) | |
179 incf menupos3,F ; Number of customview to show | |
111 | 180 movlw d'4' ; Max number |
181 cpfsgt menupos3 ; Max reached? | |
107 | 182 bra surfcustomview_mask ; No, show |
183 clrf menupos3 ; Reset to zero (Zero=no custom view) | |
184 surfcustomview_mask: | |
115 | 185 call PLED_clear_customview_surfmode |
107 | 186 movff menupos3,temp1 ; Menupos3 holds number of customview function |
187 dcfsnz temp1,F | |
188 bra surfcustomview_init_graphs ; Show the tissue graphs | |
189 dcfsnz temp1,F | |
190 bra surfcustomview_init_gaslist ; Show pre-dive gaslist/setpoint list | |
111 | 191 dcfsnz temp1,F |
192 bra surfcustomview_init_interval ; Show the interval counter | |
193 dcfsnz temp1,F | |
194 bra surfcustomview_init_cfview ; Show the interval counter | |
107 | 195 ; bra surfcustomview_init_nocustomview ; menupos3=0 -> No Customview |
196 surfcustomview_init_nocustomview: | |
197 bra surfcustomview_toggle_exit | |
198 | |
199 surfcustomview_init_graphs: | |
200 call PLED_tissue_saturation_graph ; Draw the graphs | |
201 bra surfcustomview_toggle_exit | |
202 | |
203 surfcustomview_init_gaslist: | |
204 call PLED_pre_dive_screen ; Show the Gaslist/Setpoint list | |
205 bra surfcustomview_toggle_exit | |
206 | |
111 | 207 surfcustomview_init_interval: |
123 | 208 call PLED_standard_color |
111 | 209 DISPLAYTEXT d'189' ; Surface |
210 DISPLAYTEXT d'240' ; Interval: | |
211 call PLED_interval ; Display the interval | |
212 bra surfcustomview_toggle_exit | |
213 | |
214 surfcustomview_init_cfview: | |
215 read_int_eeprom d'34' ; Get Decomode | |
216 incf EEDATA,W ; +1 -> WREG | |
217 movwf temp10 | |
218 dcfsnz temp10,F | |
219 call PLED_show_cf11_cf12_cf29 ; =0 (ZH-L16 OC) | |
220 dcfsnz temp10,F | |
221 bra surfcustomview_toggle_exit ; =1 (Gauge) | |
222 dcfsnz temp10,F | |
223 call PLED_show_cf11_cf12_cf29 ; =2 (ZH-L16 CC) | |
224 dcfsnz temp10,F | |
225 bra surfcustomview_toggle_exit ; =3 (Apnoe) | |
226 dcfsnz temp10,F | |
227 call PLED_show_cf32_cf33_cf29 ; =4 (L16-GF OC) | |
228 dcfsnz temp10,F | |
229 call PLED_show_cf32_cf33_cf29 ; =5 (L16-GF CC) | |
230 bra surfcustomview_toggle_exit | |
231 | |
107 | 232 surfcustomview_toggle_exit: |
233 bcf toggle_customview ; Clear flag | |
129
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
234 clrf timeout_counter2 ; Clear timeout |
06c4899ddb4b
Custom views in dive mode configrable (New CF50-CF53)
Heinrichsweikamp
parents:
123
diff
changeset
|
235 return |
107 | 236 |
237 | |
238 | |
239 surfcustomview_second: ; Do every-second tasks for the custom view area | |
240 movff menupos3,temp1 ; copy | |
241 dcfsnz temp1,F | |
242 bra surfcustomview_1sec_graphs ; Update the Graphs | |
243 dcfsnz temp1,F | |
244 bra surfcustomview_1sec_gaslist ; Update the Gaslist/SetPoint List | |
111 | 245 dcfsnz temp1,F |
246 bra surfcustomview_1sec_interval ; Update the Interval display | |
247 dcfsnz temp1,F | |
248 bra surfcustomview_1sec_cfview ; Update the critical cf view | |
107 | 249 ; Menupos3=0, do nothing |
250 return | |
111 | 251 surfcustomview_1sec_cfview: ; Do nothing extra |
107 | 252 surfcustomview_1sec_graphs: ; Do nothing extra |
111 | 253 surfcustomview_1sec_gaslist: ; Do nothing extra |
254 surfcustomview_1sec_interval: ; Do nothing extra | |
107 | 255 return |
256 | |
257 | |
258 surfcustomview_minute: ; Do every-minute tasks for the custom view area | |
259 movff menupos3,temp1 ; copy | |
260 dcfsnz temp1,F | |
261 bra surfcustomview_minute_graphs ; Update the Graphs | |
262 dcfsnz temp1,F | |
263 bra surfcustomview_minute_gaslist ; Update the Gaslist/SetPoint List | |
111 | 264 dcfsnz temp1,F |
265 bra surfcustomview_minute_interval ; Update the Interval display | |
266 dcfsnz temp1,F | |
267 bra surfcustomview_minute_cfview ; Update the critical cf view | |
107 | 268 ; Menupos3=0, do nothing |
269 return | |
270 | |
271 surfcustomview_minute_graphs: | |
272 call PLED_tissue_saturation_graph ; Draw/Update the graphs | |
273 return | |
274 | |
111 | 275 surfcustomview_minute_interval: |
112 | 276 DISPLAYTEXT d'189' ; Surface |
277 DISPLAYTEXT d'240' ; Interval: | |
111 | 278 call PLED_interval ; Display the interval |
279 return | |
280 | |
107 | 281 surfcustomview_minute_gaslist: ; Do nothing extra |
111 | 282 surfcustomview_minute_cfview: ; Do nothing extra |
283 return |