annotate src/divemode.inc @ 118:abd30446e1cd

show heading with leading zeros
author heinrichsweikamp
date Fri, 27 Jun 2014 10:18:41 +0200
parents 223579e905c3
children d076e9c02438
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
64976f1e0a1c Show total divetime in apnea mode
mh@mh-THINK.fritz.box
parents: 29
diff changeset
44 #DEFINE total_apnoe_text_column .95
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
heinrichsweikamp
parents:
diff changeset
108 ; Customview GF
heinrichsweikamp
parents:
diff changeset
109 #DEFINE dive_gf_text_row divemode_customview_row+.1
heinrichsweikamp
parents:
diff changeset
110 #DEFINE dive_gf_column1 .8
heinrichsweikamp
parents:
diff changeset
111 #DEFINE dive_gf_column2 .62
heinrichsweikamp
parents:
diff changeset
112 #DEFINE dive_gf_column3 .115
heinrichsweikamp
parents:
diff changeset
113 #DEFINE dive_gf_row divemode_customview_row+.18
heinrichsweikamp
parents:
diff changeset
114 #DEFINE dive_gf_column .0
heinrichsweikamp
parents:
diff changeset
115 #DEFINE dive_agf_row dive_gf_row
heinrichsweikamp
parents:
diff changeset
116 #DEFINE dive_agf_column .60
heinrichsweikamp
parents:
diff changeset
117 #DEFINE dive_currentgf_row dive_gf_row
heinrichsweikamp
parents:
diff changeset
118 #DEFINE dive_currentgf_column .118
heinrichsweikamp
parents:
diff changeset
119
53
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
120 ; Customview Dynamic Gaslist
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
121 #DEFINE dive_custom_dyn_mask_column .59
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
122 #DEFINE dive_custom_dyn_mask_row decoplan_title_row
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
123 #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
124 #DEFINE dive_custom_dyn_mask_column1 .0
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
125 #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
126 #DEFINE dive_custom_dyn_mask_column2 .80
2825f1d2262f NEW: Dynamic Gaslist in OC mode (Divemode, Customview 7)
heinrichsweikamp
parents: 38
diff changeset
127
0
heinrichsweikamp
parents:
diff changeset
128 ; Customview clock/date, END/EAD and Tissues
heinrichsweikamp
parents:
diff changeset
129 #DEFINE dive_clock_row dive_hud_data_row
heinrichsweikamp
parents:
diff changeset
130 #DEFINE dive_clock_column .0
102
37275e0fa7f5 NEW: Show End-of-Dive time together with clock during deco
heinrichsweikamp
parents: 83
diff changeset
131 #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
132 #DEFINE dive_endtime_column dive_clock_column
0
heinrichsweikamp
parents:
diff changeset
133 #DEFINE dive_ead_row dive_hud_data_row
heinrichsweikamp
parents:
diff changeset
134 #DEFINE dive_ead_column .46
heinrichsweikamp
parents:
diff changeset
135 #DEFINE dive_end_row dive_ead_row+.23
heinrichsweikamp
parents:
diff changeset
136 #DEFINE dive_end_column dive_ead_column
heinrichsweikamp
parents:
diff changeset
137
heinrichsweikamp
parents:
diff changeset
138 #DEFINE dive_tissue_N2_row dive_ead_row+.5
heinrichsweikamp
parents:
diff changeset
139 #DEFINE dive_tissue_N2_column .105
heinrichsweikamp
parents:
diff changeset
140 #DEFINE dive_tissue_He_row dive_end_row+.5
heinrichsweikamp
parents:
diff changeset
141 #DEFINE dive_tissue_He_column dive_tissue_N2_column
heinrichsweikamp
parents:
diff changeset
142 #DEFINE tissue_diagram_top divemode_customview_row+.16
heinrichsweikamp
parents:
diff changeset
143 #DEFINE tissue_diagram_bottom .160
heinrichsweikamp
parents:
diff changeset
144 #DEFINE tissue_diagram_left .116
heinrichsweikamp
parents:
diff changeset
145 #DEFINE tissue_diagram_frame_spacing .8
heinrichsweikamp
parents:
diff changeset
146
heinrichsweikamp
parents:
diff changeset
147 #DEFINE dive_custom_avr_stop_row dive_custom_hud_row
heinrichsweikamp
parents:
diff changeset
148 #DEFINE dive_custom_avr_stop_column1 .2
heinrichsweikamp
parents:
diff changeset
149 #DEFINE dive_custom_avr_stop_column2 .57
heinrichsweikamp
parents:
diff changeset
150 #DEFINE dive_custom_avr_stop_column3 .110
heinrichsweikamp
parents:
diff changeset
151 #DEFINE dive_avr_stop_row dive_hud_data_row
heinrichsweikamp
parents:
diff changeset
152 #DEFINE dive_avr_stop_column1 .0
heinrichsweikamp
parents:
diff changeset
153 #DEFINE dive_avr_stop_column2 .54
heinrichsweikamp
parents:
diff changeset
154 #DEFINE dive_avr_stop_column3 .118
heinrichsweikamp
parents:
diff changeset
155
104
223579e905c3 Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents: 102
diff changeset
156 #DEFINE decostop_1st_stop_row .171 ; In medium font...
223579e905c3 Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents: 102
diff changeset
157 #DEFINE decostop_1st_stop_column .82
223579e905c3 Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents: 102
diff changeset
158 #DEFINE safetystop_row .171 ; In medium font...
223579e905c3 Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents: 102
diff changeset
159 #DEFINE safetystop_column .105
0
heinrichsweikamp
parents:
diff changeset
160
heinrichsweikamp
parents:
diff changeset
161 #DEFINE decoplan_title_row .101
heinrichsweikamp
parents:
diff changeset
162 #DEFINE decoplan_title_column .65
heinrichsweikamp
parents:
diff changeset
163
heinrichsweikamp
parents:
diff changeset
164 #DEFINE decostop_2nd_stop_row divemode_customview_row+.15
heinrichsweikamp
parents:
diff changeset
165 #DEFINE decostop_2nd_stop_column .0
heinrichsweikamp
parents:
diff changeset
166 #DEFINE decostop_3rd_stop_row divemode_customview_row+.39
heinrichsweikamp
parents:
diff changeset
167 #DEFINE decostop_3rd_stop_column decostop_2nd_stop_column
heinrichsweikamp
parents:
diff changeset
168 #DEFINE decostop_4th_stop_row decostop_2nd_stop_row
heinrichsweikamp
parents:
diff changeset
169 #DEFINE decostop_4th_stop_column .56
heinrichsweikamp
parents:
diff changeset
170 #DEFINE decostop_5th_stop_row decostop_3rd_stop_row
heinrichsweikamp
parents:
diff changeset
171 #DEFINE decostop_5th_stop_column decostop_4th_stop_column
heinrichsweikamp
parents:
diff changeset
172 #DEFINE decostop_6th_stop_row decostop_2nd_stop_row
heinrichsweikamp
parents:
diff changeset
173 #DEFINE decostop_6th_stop_column .112
heinrichsweikamp
parents:
diff changeset
174 #DEFINE decostop_7th_stop_row decostop_3rd_stop_row
heinrichsweikamp
parents:
diff changeset
175 #DEFINE decostop_7th_stop_column decostop_6th_stop_column
heinrichsweikamp
parents:
diff changeset
176
heinrichsweikamp
parents:
diff changeset
177 #DEFINE divemode_simtext_row .164
heinrichsweikamp
parents:
diff changeset
178 #DEFINE divemode_simtext_column .32
heinrichsweikamp
parents:
diff changeset
179
heinrichsweikamp
parents:
diff changeset
180 ; Divemode menu
heinrichsweikamp
parents:
diff changeset
181 #DEFINE divemode_menu_row .164 ; Upper row
heinrichsweikamp
parents:
diff changeset
182 #DEFINE divemode_menu_lower .239 ; Lower border
heinrichsweikamp
parents:
diff changeset
183 #DEFINE divemode_menu_left .0 ; Left
heinrichsweikamp
parents:
diff changeset
184 #DEFINE divemode_menu_right .159 ; Right
heinrichsweikamp
parents:
diff changeset
185
heinrichsweikamp
parents:
diff changeset
186 #DEFINE divemode_menu_item1_row .164
heinrichsweikamp
parents:
diff changeset
187 #DEFINE divemode_menu_item1_column .9
heinrichsweikamp
parents:
diff changeset
188 #DEFINE divemode_menu_item2_row divemode_menu_item1_row+.24
heinrichsweikamp
parents:
diff changeset
189 #DEFINE divemode_menu_item2_column divemode_menu_item1_column
heinrichsweikamp
parents:
diff changeset
190 #DEFINE divemode_menu_item3_row divemode_menu_item2_row+.24
heinrichsweikamp
parents:
diff changeset
191 #DEFINE divemode_menu_item3_column divemode_menu_item1_column
heinrichsweikamp
parents:
diff changeset
192 #DEFINE divemode_menu_item4_row divemode_menu_item1_row
heinrichsweikamp
parents:
diff changeset
193 #DEFINE divemode_menu_item4_column .90
heinrichsweikamp
parents:
diff changeset
194 #DEFINE divemode_menu_item5_row divemode_menu_item4_row+.24
heinrichsweikamp
parents:
diff changeset
195 #DEFINE divemode_menu_item5_column divemode_menu_item4_column
heinrichsweikamp
parents:
diff changeset
196 #DEFINE divemode_menu_item6_row divemode_menu_item5_row+.24
heinrichsweikamp
parents:
diff changeset
197 #DEFINE divemode_menu_item6_column divemode_menu_item4_column
heinrichsweikamp
parents:
diff changeset
198
heinrichsweikamp
parents:
diff changeset
199 #DEFINE dive_compass_mask_row decoplan_title_row
heinrichsweikamp
parents:
diff changeset
200 #DEFINE dive_compass_mask_column decoplan_title_column
29
50c3e2c7ba7a adding cardinal (and ordinal) directions for the compass
heinrichsweikamp
parents: 11
diff changeset
201 #DEFINE dive_compass_head_column .57
0
heinrichsweikamp
parents:
diff changeset
202 #DEFINE dive_compass_head_row divemode_customview_row+.25
83
eb72c8865f47 Test with graphic compass
heinrichsweikamp
parents: 53
diff changeset
203
eb72c8865f47 Test with graphic compass
heinrichsweikamp
parents: 53
diff changeset
204 #DEFINE dive_compass_graph_row .102
eb72c8865f47 Test with graphic compass
heinrichsweikamp
parents: 53
diff changeset
205 #DEFINE dive_compass_graph_height .20
eb72c8865f47 Test with graphic compass
heinrichsweikamp
parents: 53
diff changeset
206 #DEFINE dive_compass_graph_width .2
eb72c8865f47 Test with graphic compass
heinrichsweikamp
parents: 53
diff changeset
207