annotate src/divemode.inc @ 171:2f1f3da0ae98

1.54 beta start
author heinrichsweikamp
date Tue, 30 Sep 2014 10:43:57 +0200
parents 4574aed5cd4c
children d097e10b383b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
heinrichsweikamp
parents:
diff changeset
3 ; File divemode.inc
heinrichsweikamp
parents:
diff changeset
4 ;
heinrichsweikamp
parents:
diff changeset
5 ;
heinrichsweikamp
parents:
diff changeset
6 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
heinrichsweikamp
parents:
diff changeset
7 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
8 ; HISTORY
heinrichsweikamp
parents:
diff changeset
9 ; 2011-08-15 : [mH] moving from OSTC code
heinrichsweikamp
parents:
diff changeset
10
heinrichsweikamp
parents:
diff changeset
11 extern set_dive_modes
heinrichsweikamp
parents:
diff changeset
12 extern diveloop
heinrichsweikamp
parents:
diff changeset
13 extern apnoe_calc_maxdepth
heinrichsweikamp
parents:
diff changeset
14
heinrichsweikamp
parents:
diff changeset
15 ; Divemode layout:
heinrichsweikamp
parents:
diff changeset
16 ; row=0...239
heinrichsweikamp
parents:
diff changeset
17 ; column=0...159 (x2)
heinrichsweikamp
parents:
diff changeset
18
heinrichsweikamp
parents:
diff changeset
19 #DEFINE depth_row .14
heinrichsweikamp
parents:
diff changeset
20 #DEFINE depth_column .0
heinrichsweikamp
parents:
diff changeset
21 #DEFINE depth_feet_row depth_row
heinrichsweikamp
parents:
diff changeset
22 #DEFINE depth_feet_column .0
heinrichsweikamp
parents:
diff changeset
23 #DEFINE depth_dm_row depth_row+.25
heinrichsweikamp
parents:
diff changeset
24 #DEFINE depth_dm_column .40
heinrichsweikamp
parents:
diff changeset
25
heinrichsweikamp
parents:
diff changeset
26 #DEFINE max_depth_row depth_row
heinrichsweikamp
parents:
diff changeset
27 #DEFINE max_depth_column .64
11
04794990b619 Show Max. Depth with 0.1m precision
heinrichsweikamp
parents: 0
diff changeset
28 #DEFINE max_depth_dm_column .87
04794990b619 Show Max. Depth with 0.1m precision
heinrichsweikamp
parents: 0
diff changeset
29 #DEFINE max_depth_dm_row depth_row+.12
0
heinrichsweikamp
parents:
diff changeset
30 #DEFINE max_depth_feet_row max_depth_row
heinrichsweikamp
parents:
diff changeset
31 #DEFINE max_depth_feet_column .64
heinrichsweikamp
parents:
diff changeset
32
heinrichsweikamp
parents:
diff changeset
33 #DEFINE divetime_row depth_row
heinrichsweikamp
parents:
diff changeset
34 #DEFINE divetime_column .103 ; Mins:Secs
heinrichsweikamp
parents:
diff changeset
35 #DEFINE divetime_minsonly_column .100 ; Minutes only
heinrichsweikamp
parents:
diff changeset
36 #DEFINE divetime_secs_column .139
heinrichsweikamp
parents:
diff changeset
37 #DEFINE divetime_secs_row depth_row+.12
heinrichsweikamp
parents:
diff changeset
38 #DEFINE divetime_apnoe_row depth_row
heinrichsweikamp
parents:
diff changeset
39 #DEFINE divetime_apnoe_column .103
38
64976f1e0a1c Show total divetime in apnea mode
mh@mh-THINK.fritz.box
parents: 29
diff changeset
40 #DEFINE apnoe_total_divetime_row divetime_apnoe_row+.50
64976f1e0a1c Show total divetime in apnea mode
mh@mh-THINK.fritz.box
parents: 29
diff changeset
41 #DEFINE apnoe_total_divetime_column divetime_apnoe_column
64976f1e0a1c Show total divetime in apnea mode
mh@mh-THINK.fritz.box
parents: 29
diff changeset
42 #DEFINE apnoe_total_divetime_secs_row apnoe_total_divetime_row+.12
64976f1e0a1c Show total divetime in apnea mode
mh@mh-THINK.fritz.box
parents: 29
diff changeset
43 #DEFINE apnoe_total_divetime_secs_column divetime_secs_column
134
4574aed5cd4c Show clock in Apnea mode, minor layout changes in Apnea mode
heinrichsweikamp
parents: 131
diff changeset
44 #DEFINE total_apnoe_text_column .132
38
64976f1e0a1c Show total divetime in apnea mode
mh@mh-THINK.fritz.box
parents: 29
diff changeset
45 #DEFINE total_apnoe_text_row apnoe_total_divetime_row-.14
64976f1e0a1c Show total divetime in apnea mode
mh@mh-THINK.fritz.box
parents: 29
diff changeset
46
0
heinrichsweikamp
parents:
diff changeset
47
heinrichsweikamp
parents:
diff changeset
48 #DEFINE divemode_mask_depth_row .0
heinrichsweikamp
parents:
diff changeset
49 #DEFINE divemode_mask_depth_column .12
heinrichsweikamp
parents:
diff changeset
50 #DEFINE divemode_mask_maxdepth_row .0
heinrichsweikamp
parents:
diff changeset
51 #DEFINE divemode_mask_maxdepth_column .62
heinrichsweikamp
parents:
diff changeset
52 #DEFINE divemode_mask_divetime_row .0
heinrichsweikamp
parents:
diff changeset
53 #DEFINE divemode_mask_divetime_column .122
heinrichsweikamp
parents:
diff changeset
54
heinrichsweikamp
parents:
diff changeset
55 #DEFINE surface_apnoe_text_row .190
heinrichsweikamp
parents:
diff changeset
56 #DEFINE surface_apnoe_text_column .30
heinrichsweikamp
parents:
diff changeset
57 #DEFINE surface_time_apnoe_row .204
heinrichsweikamp
parents:
diff changeset
58 #DEFINE surface_time_apnoe_column .15
heinrichsweikamp
parents:
diff changeset
59
heinrichsweikamp
parents:
diff changeset
60 #DEFINE last_max_apnoe_text_row .190
heinrichsweikamp
parents:
diff changeset
61 #DEFINE last_max_apnoe_text_column .100
heinrichsweikamp
parents:
diff changeset
62 #DEFINE apnoe_last_max_depth_row .204
heinrichsweikamp
parents:
diff changeset
63 #DEFINE apnoe_last_max_depth_column .100
heinrichsweikamp
parents:
diff changeset
64
heinrichsweikamp
parents:
diff changeset
65 #DEFINE dive_temp_row .163
heinrichsweikamp
parents:
diff changeset
66 #DEFINE dive_temp_column .0
heinrichsweikamp
parents:
diff changeset
67
heinrichsweikamp
parents:
diff changeset
68 ; TTS
heinrichsweikamp
parents:
diff changeset
69 #DEFINE tts_text_row .211
heinrichsweikamp
parents:
diff changeset
70 #DEFINE tts_text_column .85
heinrichsweikamp
parents:
diff changeset
71 #DEFINE tts_value_row .207
heinrichsweikamp
parents:
diff changeset
72 #DEFINE tts_value_column .118
heinrichsweikamp
parents:
diff changeset
73
heinrichsweikamp
parents:
diff changeset
74 #DEFINE ndl_text_row tts_text_row
heinrichsweikamp
parents:
diff changeset
75 #DEFINE ndl_text_column tts_text_column
heinrichsweikamp
parents:
diff changeset
76 #DEFINE ndl_value_row tts_value_row
heinrichsweikamp
parents:
diff changeset
77 #DEFINE ndl_value_column tts_value_column
heinrichsweikamp
parents:
diff changeset
78
heinrichsweikamp
parents:
diff changeset
79 #DEFINE active_gas_row .210
heinrichsweikamp
parents:
diff changeset
80 #DEFINE active_gas_column .0
heinrichsweikamp
parents:
diff changeset
81 #DEFINE active_dil_row .186
heinrichsweikamp
parents:
diff changeset
82 #DEFINE active_dil_column .0
heinrichsweikamp
parents:
diff changeset
83
heinrichsweikamp
parents:
diff changeset
84 ; Warnings
heinrichsweikamp
parents:
diff changeset
85 #DEFINE warning_icon_row .55
heinrichsweikamp
parents:
diff changeset
86 #DEFINE warning_icon_column .135
heinrichsweikamp
parents:
diff changeset
87 #DEFINE warning1_row .50
heinrichsweikamp
parents:
diff changeset
88 #DEFINE warning1_column .70
heinrichsweikamp
parents:
diff changeset
89 #DEFINE warning2_row .74
heinrichsweikamp
parents:
diff changeset
90 #DEFINE warning2_column warning1_column
heinrichsweikamp
parents:
diff changeset
91 #DEFINE warning_length .9 ; total string length
heinrichsweikamp
parents:
diff changeset
92
heinrichsweikamp
parents:
diff changeset
93 #DEFINE velocity_text_row .76
heinrichsweikamp
parents:
diff changeset
94 #DEFINE velocity_text_column .0
heinrichsweikamp
parents:
diff changeset
95
heinrichsweikamp
parents:
diff changeset
96 #DEFINE divemode_customview_row .101 ; Upper border
heinrichsweikamp
parents:
diff changeset
97 #DEFINE divemode_customview_column .0
heinrichsweikamp
parents:
diff changeset
98
heinrichsweikamp
parents:
diff changeset
99 #DEFINE dive_custom_hud_row divemode_customview_row+.1
heinrichsweikamp
parents:
diff changeset
100 #DEFINE dive_custom_hud_column1 .10
heinrichsweikamp
parents:
diff changeset
101 #DEFINE dive_custom_hud_column2 .65
heinrichsweikamp
parents:
diff changeset
102 #DEFINE dive_custom_hud_column3 .120
heinrichsweikamp
parents:
diff changeset
103 #DEFINE dive_hud_data_row divemode_customview_row+.16
heinrichsweikamp
parents:
diff changeset
104 #DEFINE dive_hud_sensor1_column .6
heinrichsweikamp
parents:
diff changeset
105 #DEFINE dive_hud_sensor2_column .62
heinrichsweikamp
parents:
diff changeset
106 #DEFINE dive_hud_sensor3_column .118
heinrichsweikamp
parents:
diff changeset
107
123
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 104
diff changeset
108 ; Customview Ceiling
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 104
diff changeset
109 #DEFINE dive_ceiling_text_row divemode_customview_row+.1
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 104
diff changeset
110 #DEFINE dive_ceiling_text_column .66
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 104
diff changeset
111 #DEFINE dive_ceiling_value_row divemode_customview_row+.18
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 104
diff changeset
112 #DEFINE dive_ceiling_value_column .64
d076e9c02438 add ceiling display
heinrichsweikamp
parents: 104
diff changeset
113
0
heinrichsweikamp
parents:
diff changeset
114 ; Customview GF
heinrichsweikamp
parents:
diff changeset
115 #DEFINE dive_gf_text_row divemode_customview_row+.1
heinrichsweikamp
parents:
diff changeset
116 #DEFINE dive_gf_column1 .8
heinrichsweikamp
parents:
diff changeset
117 #DEFINE dive_gf_column2 .62
heinrichsweikamp
parents:
diff changeset
118 #DEFINE dive_gf_column3 .115
heinrichsweikamp
parents:
diff changeset
119 #DEFINE dive_gf_row divemode_customview_row+.18
heinrichsweikamp
parents:
diff changeset
120 #DEFINE dive_gf_column .0
heinrichsweikamp
parents:
diff changeset
121 #DEFINE dive_agf_row dive_gf_row
heinrichsweikamp
parents:
diff changeset
122 #DEFINE dive_agf_column .60
heinrichsweikamp
parents:
diff changeset
123 #DEFINE dive_currentgf_row dive_gf_row
heinrichsweikamp
parents:
diff changeset
124 #DEFINE dive_currentgf_column .118
heinrichsweikamp
parents:
diff changeset
125
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
126 ; Customview Dynamic Gaslist
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
127 #DEFINE dive_custom_dyn_mask_column .59
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
128 #DEFINE dive_custom_dyn_mask_row decoplan_title_row
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
129 #DEFINE dive_custom_dyn_mask_row1 dive_hud_data_row
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
130 #DEFINE dive_custom_dyn_mask_column1 .0
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
131 #DEFINE dive_custom_dyn_mask_row2 dive_hud_data_row+.23
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
132 #DEFINE dive_custom_dyn_mask_column2 .80
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
133
0
heinrichsweikamp
parents:
diff changeset
134 ; Customview clock/date, END/EAD and Tissues
heinrichsweikamp
parents:
diff changeset
135 #DEFINE dive_clock_row dive_hud_data_row
heinrichsweikamp
parents:
diff changeset
136 #DEFINE dive_clock_column .0
102
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 83
diff changeset
137 #DEFINE dive_endtime_row dive_clock_row+.23
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 83
diff changeset
138 #DEFINE dive_endtime_column dive_clock_column
0
heinrichsweikamp
parents:
diff changeset
139 #DEFINE dive_ead_row dive_hud_data_row
heinrichsweikamp
parents:
diff changeset
140 #DEFINE dive_ead_column .46
heinrichsweikamp
parents:
diff changeset
141 #DEFINE dive_end_row dive_ead_row+.23
heinrichsweikamp
parents:
diff changeset
142 #DEFINE dive_end_column dive_ead_column
heinrichsweikamp
parents:
diff changeset
143
heinrichsweikamp
parents:
diff changeset
144 #DEFINE dive_tissue_N2_row dive_ead_row+.5
heinrichsweikamp
parents:
diff changeset
145 #DEFINE dive_tissue_N2_column .105
heinrichsweikamp
parents:
diff changeset
146 #DEFINE dive_tissue_He_row dive_end_row+.5
heinrichsweikamp
parents:
diff changeset
147 #DEFINE dive_tissue_He_column dive_tissue_N2_column
heinrichsweikamp
parents:
diff changeset
148 #DEFINE tissue_diagram_top divemode_customview_row+.16
heinrichsweikamp
parents:
diff changeset
149 #DEFINE tissue_diagram_bottom .160
heinrichsweikamp
parents:
diff changeset
150 #DEFINE tissue_diagram_left .116
heinrichsweikamp
parents:
diff changeset
151 #DEFINE tissue_diagram_frame_spacing .8
heinrichsweikamp
parents:
diff changeset
152
heinrichsweikamp
parents:
diff changeset
153 #DEFINE dive_custom_avr_stop_row dive_custom_hud_row
heinrichsweikamp
parents:
diff changeset
154 #DEFINE dive_custom_avr_stop_column1 .2
heinrichsweikamp
parents:
diff changeset
155 #DEFINE dive_custom_avr_stop_column2 .57
heinrichsweikamp
parents:
diff changeset
156 #DEFINE dive_custom_avr_stop_column3 .110
heinrichsweikamp
parents:
diff changeset
157 #DEFINE dive_avr_stop_row dive_hud_data_row
heinrichsweikamp
parents:
diff changeset
158 #DEFINE dive_avr_stop_column1 .0
heinrichsweikamp
parents:
diff changeset
159 #DEFINE dive_avr_stop_column2 .54
heinrichsweikamp
parents:
diff changeset
160 #DEFINE dive_avr_stop_column3 .118
heinrichsweikamp
parents:
diff changeset
161
104
223579e905c3 Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents: 102
diff changeset
162 #DEFINE decostop_1st_stop_row .171 ; In medium font...
223579e905c3 Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents: 102
diff changeset
163 #DEFINE decostop_1st_stop_column .82
223579e905c3 Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents: 102
diff changeset
164 #DEFINE safetystop_row .171 ; In medium font...
131
35b9da423de6 NEW: Update warnings every second
heinrichsweikamp
parents: 123
diff changeset
165 #DEFINE safetystop_column .118
35b9da423de6 NEW: Update warnings every second
heinrichsweikamp
parents: 123
diff changeset
166
35b9da423de6 NEW: Update warnings every second
heinrichsweikamp
parents: 123
diff changeset
167 #DEFINE safetystop_text_row .175
35b9da423de6 NEW: Update warnings every second
heinrichsweikamp
parents: 123
diff changeset
168 #DEFINE safetystop_text_column .70
0
heinrichsweikamp
parents:
diff changeset
169
heinrichsweikamp
parents:
diff changeset
170 #DEFINE decoplan_title_row .101
heinrichsweikamp
parents:
diff changeset
171 #DEFINE decoplan_title_column .65
heinrichsweikamp
parents:
diff changeset
172
heinrichsweikamp
parents:
diff changeset
173 #DEFINE decostop_2nd_stop_row divemode_customview_row+.15
heinrichsweikamp
parents:
diff changeset
174 #DEFINE decostop_2nd_stop_column .0
heinrichsweikamp
parents:
diff changeset
175 #DEFINE decostop_3rd_stop_row divemode_customview_row+.39
heinrichsweikamp
parents:
diff changeset
176 #DEFINE decostop_3rd_stop_column decostop_2nd_stop_column
heinrichsweikamp
parents:
diff changeset
177 #DEFINE decostop_4th_stop_row decostop_2nd_stop_row
heinrichsweikamp
parents:
diff changeset
178 #DEFINE decostop_4th_stop_column .56
heinrichsweikamp
parents:
diff changeset
179 #DEFINE decostop_5th_stop_row decostop_3rd_stop_row
heinrichsweikamp
parents:
diff changeset
180 #DEFINE decostop_5th_stop_column decostop_4th_stop_column
heinrichsweikamp
parents:
diff changeset
181 #DEFINE decostop_6th_stop_row decostop_2nd_stop_row
heinrichsweikamp
parents:
diff changeset
182 #DEFINE decostop_6th_stop_column .112
heinrichsweikamp
parents:
diff changeset
183 #DEFINE decostop_7th_stop_row decostop_3rd_stop_row
heinrichsweikamp
parents:
diff changeset
184 #DEFINE decostop_7th_stop_column decostop_6th_stop_column
heinrichsweikamp
parents:
diff changeset
185
heinrichsweikamp
parents:
diff changeset
186 #DEFINE divemode_simtext_row .164
heinrichsweikamp
parents:
diff changeset
187 #DEFINE divemode_simtext_column .32
heinrichsweikamp
parents:
diff changeset
188
heinrichsweikamp
parents:
diff changeset
189 ; Divemode menu
heinrichsweikamp
parents:
diff changeset
190 #DEFINE divemode_menu_row .164 ; Upper row
heinrichsweikamp
parents:
diff changeset
191 #DEFINE divemode_menu_lower .239 ; Lower border
heinrichsweikamp
parents:
diff changeset
192 #DEFINE divemode_menu_left .0 ; Left
heinrichsweikamp
parents:
diff changeset
193 #DEFINE divemode_menu_right .159 ; Right
heinrichsweikamp
parents:
diff changeset
194
heinrichsweikamp
parents:
diff changeset
195 #DEFINE divemode_menu_item1_row .164
heinrichsweikamp
parents:
diff changeset
196 #DEFINE divemode_menu_item1_column .9
heinrichsweikamp
parents:
diff changeset
197 #DEFINE divemode_menu_item2_row divemode_menu_item1_row+.24
heinrichsweikamp
parents:
diff changeset
198 #DEFINE divemode_menu_item2_column divemode_menu_item1_column
heinrichsweikamp
parents:
diff changeset
199 #DEFINE divemode_menu_item3_row divemode_menu_item2_row+.24
heinrichsweikamp
parents:
diff changeset
200 #DEFINE divemode_menu_item3_column divemode_menu_item1_column
heinrichsweikamp
parents:
diff changeset
201 #DEFINE divemode_menu_item4_row divemode_menu_item1_row
heinrichsweikamp
parents:
diff changeset
202 #DEFINE divemode_menu_item4_column .90
heinrichsweikamp
parents:
diff changeset
203 #DEFINE divemode_menu_item5_row divemode_menu_item4_row+.24
heinrichsweikamp
parents:
diff changeset
204 #DEFINE divemode_menu_item5_column divemode_menu_item4_column
heinrichsweikamp
parents:
diff changeset
205 #DEFINE divemode_menu_item6_row divemode_menu_item5_row+.24
heinrichsweikamp
parents:
diff changeset
206 #DEFINE divemode_menu_item6_column divemode_menu_item4_column
heinrichsweikamp
parents:
diff changeset
207
heinrichsweikamp
parents:
diff changeset
208 #DEFINE dive_compass_mask_row decoplan_title_row
heinrichsweikamp
parents:
diff changeset
209 #DEFINE dive_compass_mask_column decoplan_title_column
29
50c3e2c7ba7a adding cardinal (and ordinal) directions for the compass
heinrichsweikamp
parents: 11
diff changeset
210 #DEFINE dive_compass_head_column .57
0
heinrichsweikamp
parents:
diff changeset
211 #DEFINE dive_compass_head_row divemode_customview_row+.25
83
eb72c8865f47 Test with graphic compass
heinrichsweikamp
parents: 53
diff changeset
212
eb72c8865f47 Test with graphic compass
heinrichsweikamp
parents: 53
diff changeset
213 #DEFINE dive_compass_graph_row .102
eb72c8865f47 Test with graphic compass
heinrichsweikamp
parents: 53
diff changeset
214 #DEFINE dive_compass_graph_height .20
eb72c8865f47 Test with graphic compass
heinrichsweikamp
parents: 53
diff changeset
215 #DEFINE dive_compass_graph_width .2
eb72c8865f47 Test with graphic compass
heinrichsweikamp
parents: 53
diff changeset
216