comparison code_part1/OSTC_code_asm_part1/customview.asm @ 98:6f8e3a08011e

1.73beta rc1 (Added new customview for divemode)
author heinrichsweikamp
date Sun, 12 Dec 2010 15:01:05 +0100
parents
children a2b9eca1f396
comparison
equal deleted inserted replaced
97:dc349e4264bb 98:6f8e3a08011e
1 ; OSTC - diving computer code
2 ; Copyright (C) 2008 HeinrichsWeikamp GbR
3
4 ; This program is free software: you can redistribute it and/or modify
5 ; it under the terms of the GNU General Public License as published by
6 ; the Free Software Foundation, either version 3 of the License, or
7 ; (at your option) any later version.
8
9 ; This program is distributed in the hope that it will be useful,
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ; GNU General Public License for more details.
13
14 ; You should have received a copy of the GNU General Public License
15 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17
18 ; Customviews for divemode
19 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com
20 ; written: 101212
21 ; last updated: 101212
22 ; known bugs:
23 ; ToDo:
24
25 customview_menu_entry3: ; Show the customview-dependent entry for the divemode menu
26 bcf menu3_active ;=1: menu entry three in divemode menu is active
27 movff menupos3,temp1 ; copy
28 dcfsnz temp1,F
29 bra customview_menu3_stopwatch ; Show the stopwatch option in divemode menu
30 dcfsnz temp1,F
31 bra customview_menu3_marker ; Show the marker option in divemode menu
32 dcfsnz temp1,F
33 bra customview_menu3_clock ; Show the clock option in divemode menu
34 dcfsnz temp1,F
35 bra customview_menu3_lead_tiss ; Show the leading tissue option in divemode menu
36 ; Menupos3=0, do nothing
37 return
38
39 customview_menu3_stopwatch:
40 bsf menu3_active ; Set Flag
41 DISPLAYTEXT .33 ; ResetAvr
42 return
43
44 customview_menu3_marker:
45 bsf menu3_active ; Set Flag
46 DISPLAYTEXT .30 ; Set Marker
47 return
48
49 customview_menu3_clock: ; No menu entry
50 customview_menu3_lead_tiss ; No menu entry
51 return
52
53 customview_second: ; Do every-second tasks for the custom view area
54 movff menupos3,temp1 ; copy
55 dcfsnz temp1,F
56 bra customview_1sec_stopwatch ; Update the Stopwatch
57 dcfsnz temp1,F
58 bra customview_1sec_marker ; Update the Marker
59 dcfsnz temp1,F
60 bra customview_1sec_clock ; Update the Clock
61 dcfsnz temp1,F
62 bra customview_1sec_lead_tiss ; Update the leading tissue
63 ; Menupos3=0, do nothing
64 return
65
66 customview_1sec_stopwatch:
67 call PLED_stopwatch_show2 ; Update figures only
68 return
69
70 customview_1sec_marker: ; Do nothing extra
71 return
72
73 customview_1sec_lead_tiss: ; Do nothing extra
74 return
75
76 customview_1sec_clock:
77 ; call PLED_diveclock2
78 return
79
80
81 customview_minute: ; Do every-minute tasks for the custom view area
82 movff menupos3,temp1 ; copy
83 dcfsnz temp1,F
84 bra customview_minute_stopwatch ; Update the Stopwatch
85 dcfsnz temp1,F
86 bra customview_minute_marker ; Update the Marker
87 dcfsnz temp1,F
88 bra customview_minute_clock ; Update the Clock
89 dcfsnz temp1,F
90 bra customview_minute_lead_tiss ; Update the leading tissue
91 ; Menupos3=0, do nothing
92 return
93
94 customview_minute_clock:
95 call PLED_diveclock2 ; Update the clock
96 return
97
98 customview_minute_lead_tiss:
99 call PLED_show_leading_tissue_2 ; Update the leading tissue
100 return
101
102 customview_minute_marker: ; Do nothing extra
103 customview_minute_stopwatch: ; Do nothing extra
104 return
105
106
107 customview_toggle: ; Yes, show next customview (and delete this flag)
108 incf menupos3,F ; Number of customview to show
109 movlw d'5' ; Max number+1
110 cpfseq menupos3 ; Max reached?
111 bra customview_mask ; No, show
112 clrf menupos3 ; Reset to zero (Zero=no custom view)
113 customview_mask:
114 call PLED_clear_customview_divemode
115 movff menupos3,temp1 ; Menupos3 holds number of customview function
116 dcfsnz temp1,F
117 bra customview_init_stopwatch ; Show the Stopwatch
118 dcfsnz temp1,F
119 bra customview_init_marker ; Show the Marker-Menu
120 dcfsnz temp1,F
121 bra customview_init_clock ; Show the clock
122 dcfsnz temp1,F
123 bra customview_init_lead_tissue ; Show the leading tissue
124 ; bra customview_init_nocustomview ; menupos3=0 -> No Customview
125 customview_init_nocustomview:
126 bra customview_toggle_exit
127
128 customview_init_stopwatch:
129 ; Init Stopwatch
130 call PLED_stopwatch_show
131 bra customview_toggle_exit
132
133 customview_init_marker:
134 ; Init Marker
135 DISPLAYTEXT d'151' ; Set Marker?
136 bra customview_toggle_exit
137
138 customview_init_clock:
139 ; Init Clock
140 call PLED_diveclock
141 bra customview_toggle_exit
142
143 customview_init_lead_tissue:
144 ; Show leading tissue
145 call PLED_show_leading_tissue
146 bra customview_toggle_exit
147
148 customview_toggle_exit:
149 bcf toggle_customview ; Clear flag
150 return