Mercurial > public > hwos_code
annotate src/menu_tree.asm @ 630:4cd81bdbf15c
3.08 stable release
author | heinrichsweikamp |
---|---|
date | Fri, 21 Feb 2020 10:51:36 +0100 |
parents | 237931377539 |
children | 185ba2f91f59 |
rev | line source |
---|---|
0 | 1 ;============================================================================= |
2 ; | |
628 | 3 ; File menu_tree.asm next combined generation V3.04.3 |
0 | 4 ; |
623 | 5 ; OSTC Surface Menus |
0 | 6 ; |
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | |
8 ;============================================================================= | |
9 ; HISTORY | |
10 ; 2011-07-11 : [jDG] Creation. | |
11 | |
604 | 12 #include "hwos.inc" ; mandatory header |
582 | 13 #include "gaslist.inc" |
14 #include "menu_processor.inc" | |
15 #include "start.inc" | |
16 #include "comm.inc" | |
17 #include "logbook.inc" | |
18 #include "tft.inc" | |
19 #include "eeprom_rs232.inc" | |
20 #include "external_flash.inc" | |
604 | 21 #include "shared_definitions.h" ; mailbox from/to p2_deco.c |
582 | 22 #include "ghostwriter.inc" |
23 #include "adc_lightsensor.inc" | |
24 #include "wait.inc" | |
25 #include "i2c.inc" | |
623 | 26 #include "calibrate.inc" |
27 #include "math.inc" | |
28 #include "rtc.inc" | |
582 | 29 |
0 | 30 |
582 | 31 extern do_demo_divemode |
32 extern restart | |
33 extern option_save_all | |
34 extern option_reset | |
35 extern do_demo_planner | |
623 | 36 extern comm_mode_ble ; will also set CPU speed to normal |
582 | 37 extern piezo_config |
38 extern option_reset_all | |
39 extern rtc_set_rtc | |
40 extern surfloop | |
41 extern oColorSetDive | |
623 | 42 extern vault_decodata_into_eeprom |
43 | |
44 IFDEF _ccr_pscr | |
604 | 45 extern option_cleanup_oCCRMode |
623 | 46 ENDIF |
47 | |
48 IFDEF _compass | |
49 extern compass_calibration_loop | |
50 ENDIF | |
174
932e91074bdb
CHANGE: Clarify Travel Gases with "---" as change depth
heinrichsweikamp
parents:
155
diff
changeset
|
51 |
582 | 52 |
604 | 53 menu_tree CODE |
582 | 54 |
623 | 55 ;----------------------------------------------------------------------------- |
56 | |
57 | |
0 | 58 ;============================================================================= |
59 ; Main Menu | |
582 | 60 |
61 do_return_main_menu: | |
604 | 62 call menu_processor_double_pop ; drop exit line and back to last line |
582 | 63 bra do_main_menu_common |
64 | |
65 global do_main_menu | |
0 | 66 do_main_menu: |
623 | 67 movff active_customview,customview_surfmode ; save last custom view |
68 clrf MS_flags_imprint ; clear all flags for data imprinting | |
0 | 69 |
582 | 70 global do_main_menu2 |
71 do_main_menu2: ; entry point used by logbook.asm | |
623 | 72 call TFT_boot ; initialize display |
73 call menu_processor_reset ; reset menu stack | |
0 | 74 |
582 | 75 do_main_menu_common: |
623 | 76 IFDEF _ccr_pscr |
582 | 77 MENU_BEGIN tMainMenu, .7 |
78 MENU_CALL tLogbook, logbook | |
79 MENU_CALL tGasSetup, do_gas_menu | |
80 MENU_CALL tCCRSetup, do_ccr_menu | |
81 MENU_CALL tPlan, do_planner_menu | |
82 MENU_CALL tDiveModeMenu, do_divemode_menu | |
83 MENU_CALL tSystSets, do_settings_menu | |
623 | 84 MENU_CALL tExit, do_restart |
582 | 85 MENU_END |
623 | 86 ELSE |
87 MENU_BEGIN tMainMenu, .6 | |
88 MENU_CALL tLogbook, logbook | |
89 MENU_CALL tGasSetup, do_gas_menu | |
90 MENU_CALL tPlan, do_planner_menu | |
91 MENU_CALL tDiveModeMenu, do_divemode_menu | |
92 MENU_CALL tSystSets, do_settings_menu | |
93 MENU_CALL tExit, do_restart | |
94 MENU_END | |
95 ENDIF | |
582 | 96 |
0 | 97 |
623 | 98 do_restart: |
99 bsf restart_fast ; skip logos and waits an restart | |
100 goto restart ; restart into surface mode | |
101 | |
0 | 102 ;============================================================================= |
103 ; CCR Setup | |
104 | |
623 | 105 IFDEF _ccr_pscr |
106 | |
582 | 107 do_return_ccr_menu: |
108 call menu_processor_double_pop ; drop exit line and back to last line | |
0 | 109 |
110 do_ccr_menu: | |
604 | 111 call option_cleanup_oCCRMode ; in pSCR mode, revert AutoSP (2) to calculated SP (0) |
560 | 112 |
623 | 113 IFDEF _external_sensor |
114 bcf imprint_sensor_mv ; stop imprinting of live O2 sensor mV data | |
582 | 115 btfsc analog_o2_input |
116 bra do_ccr_menu_cR | |
623 | 117 ENDIF |
240 | 118 |
628 | 119 MENU_BEGIN tCCRSetup, .5 ; OSTC3 menu (and currently also the OSTC2 menu) |
582 | 120 MENU_OPTION tCCRMode, oCCRMode, 0 |
121 MENU_CALL tDiluentSetup, do_diluent_setup | |
122 MENU_CALL tFixedSetpoints, do_fixed_setpoints | |
628 | 123 MENU_CALL tMore, do_ccr_menu_more |
604 | 124 MENU_CALL tBack, do_return_main_menu |
582 | 125 MENU_END |
126 | |
174
932e91074bdb
CHANGE: Clarify Travel Gases with "---" as change depth
heinrichsweikamp
parents:
155
diff
changeset
|
127 |
623 | 128 IFDEF _external_sensor |
129 | |
582 | 130 do_ccr_menu_cR: ; cR menu |
628 | 131 MENU_BEGIN tCCRSetup, .6 |
582 | 132 MENU_OPTION tCCRMode, oCCRMode, 0 |
133 MENU_CALL tCalibrateMenu, do_calibrate_menu | |
134 MENU_CALL tDiluentSetup, do_diluent_setup | |
135 MENU_CALL tFixedSetpoints, do_fixed_setpoints | |
628 | 136 MENU_CALL tMore, do_ccr_menu_more |
604 | 137 MENU_CALL tBack, do_return_main_menu |
582 | 138 MENU_END |
0 | 139 |
240 | 140 |
113 | 141 do_calibrate_menu: |
604 | 142 call enable_ir_s8 ; enable IR/S8-Port |
623 | 143 bsf imprint_sensor_mv ; start imprinting of live O2 sensor mV data |
582 | 144 |
113 | 145 do_calibrate_menu2: |
582 | 146 MENU_BEGIN tCalibrateMenu, .6 |
147 MENU_CALL tDiveHudMask1, 0 | |
148 MENU_CALL tDiveHudMask2, 0 | |
149 MENU_CALL tDiveHudMask3, 0 | |
623 | 150 MENU_OPTION tCalibrationGas, oCalGasO2, 0 |
582 | 151 MENU_CALL tCalibrate, do_calibrate_mix |
604 | 152 MENU_CALL tBack, do_return_ccr_menu |
582 | 153 MENU_END |
154 | |
113 | 155 |
156 do_calibrate_mix: | |
604 | 157 call calibrate_mix ; calibrate with opt_calibration_O2_ratio, also calibrate S8 HUD if connected |
158 WAITMS d'250' ; wait for HUD v3 | |
582 | 159 movlw .9 |
160 movff WREG,customview_surfmode ; show sensor mV custom view after restart | |
623 | 161 bsf restart_fast ; skip logos and waits an restart |
604 | 162 goto restart ; restart into surface mode |
113 | 163 |
623 | 164 ENDIF ; _external_sensor |
165 | |
0 | 166 |
167 do_diluent_setup: | |
623 | 168 bsf is_diluent_menu ; setting up diluents |
169 bcf short_gas_descriptions ; do not use short versions of gaslist_strcat_gas_cd and gaslist_strcat_setpoint | |
604 | 170 bcf better_gas_hint ; do not mark the best gas/diluent (to be used in dive mode only) |
171 call gaslist_cleanup_list ; take care that only one gas can be first | |
582 | 172 |
173 MENU_BEGIN tDiluentSetup, .6 | |
604 | 174 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu |
175 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu | |
176 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu | |
177 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu | |
178 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu | |
179 MENU_CALL tBack, do_return_ccr_menu | |
582 | 180 MENU_END |
181 | |
0 | 182 |
183 do_return_fixed_setpoints: | |
582 | 184 call menu_processor_double_pop ; drop exit line and back to last line |
0 | 185 |
186 do_fixed_setpoints: | |
623 | 187 bcf short_gas_descriptions ; =1: use short versions of gaslist_strcat_gas_cd and gaslist_strcat_setpoint |
604 | 188 bcf better_gas_hint ; do not mark the best gas/diluent (to be used in dive mode only) |
582 | 189 |
190 MENU_BEGIN tFixedSetpoints, .6 | |
191 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu | |
192 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu | |
193 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu | |
194 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu | |
195 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu | |
604 | 196 MENU_CALL tBack, do_return_ccr_menu |
582 | 197 MENU_END |
198 | |
0 | 199 |
200 do_edit_sp_menu: | |
604 | 201 movff PRODL,gaslist_gas ; get menu item we came from (0-4) |
582 | 202 |
203 MENU_BEGIN tFixedSetpoints, .5 | |
204 MENU_DYNAMIC gaslist_strcat_setpoint_0, 0 | |
205 MENU_CALL tSPPlus, gaslist_spplus | |
206 MENU_CALL tDepthPlus, gaslist_spdepthplus | |
207 MENU_CALL tDepthMinus, gaslist_spdepthminus | |
604 | 208 MENU_CALL tBack, do_return_fixed_setpoints |
582 | 209 MENU_END |
210 | |
211 | |
628 | 212 do_ccr_menu_more: |
213 MENU_BEGIN tCCRSetup, .5 ; CCR/pSCR more menu | |
214 MENU_OPTION tCCmaxFracO2, oCCmaxFracO2, 0 | |
215 MENU_OPTION tDilppO2Check, oDilppO2Check, 0 | |
582 | 216 MENU_OPTION tPSCR_O2_drop, oPSCR_drop, 0 |
217 MENU_OPTION tPSCR_lungratio, oPSCR_lungratio, 0 | |
604 | 218 MENU_CALL tBack, do_return_ccr_menu |
582 | 219 MENU_END |
0 | 220 |
623 | 221 ENDIF ; _ccr_pscr |
222 | |
0 | 223 ;============================================================================= |
224 ; OC Gas Setup | |
225 | |
582 | 226 do_return_gas_menu: |
227 call menu_processor_double_pop ; drop exit line and back to last line | |
0 | 228 |
623 | 229 IFDEF _ccr_pscr |
230 btfsc is_diluent_menu ; return from setting up diluents? | |
604 | 231 bra do_diluent_setup ; YES |
623 | 232 ENDIF |
582 | 233 |
0 | 234 do_gas_menu: |
623 | 235 bcf is_diluent_menu ; setting up OC gases |
236 bcf short_gas_descriptions ; do not use short versions of gaslist_strcat_gas_cd and gaslist_strcat_setpoint | |
604 | 237 bcf better_gas_hint ; do not mark the best gas/diluent (to be used in dive mode only) |
238 call gaslist_cleanup_list ; takes care that only one gas can be first | |
0 | 239 |
582 | 240 MENU_BEGIN tGaslist, .6 |
604 | 241 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu |
242 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu | |
243 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu | |
244 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu | |
245 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu | |
246 MENU_CALL tBack, do_return_main_menu | |
582 | 247 MENU_END |
248 | |
249 | |
250 do_return_edit_gas_menu: | |
604 | 251 IFDEF _rx_functions |
623 | 252 bcf imprint_xmitter_pres ; stop imprinting of transmitter pressure data |
253 bcf imprint_xmitter_ID ; not in transmitter selection menu any more (back to normal timeout) | |
604 | 254 ENDIF |
623 | 255 call menu_processor_double_pop ; drop exit line and back to last line |
582 | 256 bra do_edit_gas_menu_common |
623 | 257 |
604 | 258 do_edit_gas_menu: |
259 movff PRODL,gaslist_gas ; get menu item we came from (0-4) | |
260 movlw .5 ; offset between gases and diluents | |
623 | 261 btfsc is_diluent_menu ; setting up diluents? |
604 | 262 addwf gaslist_gas,F ; YES - add the offset |
0 | 263 |
604 | 264 do_edit_gas_menu_common: |
265 MENU_BEGIN tGasEdit, .7 | |
582 | 266 MENU_DYNAMIC gaslist_gastitle, 0 |
267 MENU_DYNAMIC gaslist_MOD_END, 0 | |
268 MENU_DYNAMIC gaslist_show_type, gaslist_toggle_type | |
604 | 269 MENU_CALL tSetup_GasMix, do_setup_mix_menu |
270 MENU_DYNAMIC gaslist_GasDepth, do_setup_depth_menu | |
271 MENU_CALL tSetup_Tank, do_setup_tank_menu | |
272 MENU_CALL tBack, do_return_gas_menu | |
582 | 273 MENU_END |
274 | |
0 | 275 |
604 | 276 do_setup_mix_menu: |
623 | 277 IFDEF _helium |
582 | 278 MENU_BEGIN tGasEdit, .7 |
279 MENU_DYNAMIC gaslist_gastitle, 0 | |
280 MENU_DYNAMIC gaslist_MOD_END, 0 | |
281 MENU_CALL tO2Plus, gaslist_pO2 | |
282 MENU_CALL tO2Minus, gaslist_mO2 | |
283 MENU_CALL tHePlus, gaslist_pHe | |
284 MENU_CALL tHeMinus, gaslist_mHe | |
604 | 285 MENU_CALL tBack, do_return_edit_gas_menu |
286 MENU_END | |
623 | 287 ELSE |
288 MENU_BEGIN tGasEdit, .5 | |
289 MENU_DYNAMIC gaslist_gastitle, 0 | |
290 MENU_DYNAMIC gaslist_MOD_END, 0 | |
291 MENU_CALL tO2Plus, gaslist_pO2 | |
292 MENU_CALL tO2Minus, gaslist_mO2 | |
293 MENU_CALL tBack, do_return_edit_gas_menu | |
294 MENU_END | |
295 ENDIF | |
604 | 296 |
297 | |
298 do_setup_tank_menu: | |
299 IFDEF _rx_functions | |
623 | 300 TSTOSC opt_TR_mode ; TR functions switched on? |
604 | 301 bra do_setup_tank_menu_rx ; YES |
302 ENDIF | |
303 | |
623 | 304 IFDEF _ccr_pscr |
604 | 305 MENU_BEGIN tSetup_Tank, .6 |
306 MENU_DYNAMIC gaslist_gastitle, 0 | |
307 MENU_DYNAMIC gaslist_tank_size_pres, 0 | |
308 MENU_CALL tTankSize, gaslist_tank_size | |
309 MENU_CALL tTankUsablePress, gaslist_tank_pres | |
310 MENU_CALL tCopyDilToOC, gaslist_copy_dil_to_oc | |
311 MENU_CALL tBack, do_return_edit_gas_menu | |
582 | 312 MENU_END |
623 | 313 ELSE |
314 MENU_BEGIN tSetup_Tank, .5 | |
315 MENU_DYNAMIC gaslist_gastitle, 0 | |
316 MENU_DYNAMIC gaslist_tank_size_pres, 0 | |
317 MENU_CALL tTankSize, gaslist_tank_size | |
318 MENU_CALL tTankUsablePress, gaslist_tank_pres | |
319 MENU_CALL tBack, do_return_edit_gas_menu | |
320 MENU_END | |
321 ENDIF | |
428 | 322 |
560 | 323 |
604 | 324 IFDEF _rx_functions |
325 do_setup_tank_menu_rx: | |
326 setf pairing_slot ; prime slot number with 255 aka -1, used in pairing function | |
623 | 327 bsf imprint_xmitter_ID ; in transmitter selection menu (longer timeout) |
604 | 328 |
329 MENU_BEGIN tSetup_Tank, .7 | |
330 MENU_DYNAMIC gaslist_gastitle, 0 | |
331 MENU_DYNAMIC gaslist_tank_id_pres, 0 ; when changing position, adopt TFT_menu_tank_pres! | |
332 MENU_DYNAMIC gaslist_tank_size_pres, 0 | |
333 MENU_CALL tTankPairing, gaslist_tank_pairing | |
334 MENU_CALL tTankSize, gaslist_tank_size | |
335 MENU_CALL tTankUsablePress, gaslist_tank_pres | |
336 MENU_CALL tBack, do_return_edit_gas_menu | |
337 MENU_END | |
338 ENDIF | |
339 | |
340 | |
341 do_setup_depth_menu: | |
174
932e91074bdb
CHANGE: Clarify Travel Gases with "---" as change depth
heinrichsweikamp
parents:
155
diff
changeset
|
342 |
582 | 343 MENU_BEGIN tGasEdit, .7 |
344 MENU_DYNAMIC gaslist_gastitle, 0 | |
345 MENU_DYNAMIC gaslist_MOD_END, 0 | |
346 MENU_DYNAMIC gaslist_ppo2, 0 ; ppO2 at change depth | |
347 MENU_CALL tDepthPlus, gaslist_pDepth | |
348 MENU_CALL tDepthMinus, gaslist_mDepth | |
349 MENU_DYNAMIC gaslist_reset_mod_title, gaslist_reset_mod | |
604 | 350 MENU_CALL tBack, do_return_edit_gas_menu |
582 | 351 MENU_END |
0 | 352 |
582 | 353 |
0 | 354 ;============================================================================= |
604 | 355 ; Simulator Menus |
0 | 356 |
582 | 357 do_return_planner_menu: |
628 | 358 call menu_processor_double_pop ; drop exit line and back to last line |
359 bra do_planner_common_1 | |
0 | 360 |
582 | 361 global do_return_demo_planner |
362 do_return_demo_planner: | |
363 call menu_processor_pop ; back to last line | |
364 bra do_planner_common | |
0 | 365 |
366 do_planner_menu: | |
623 | 367 ; ensure correct simulator results after mode changes without prior excursion to surface mode |
582 | 368 call option_save_all |
623 | 369 |
628 | 370 ; reset planning parameters to default values |
582 | 371 lfsr FSR0,odiveInterval |
372 call option_reset | |
373 lfsr FSR0,obottomTime | |
374 call option_reset | |
375 lfsr FSR0,obottomDepth | |
376 call option_reset | |
604 | 377 lfsr FSR0,oSimAGF |
378 call option_reset | |
582 | 379 |
628 | 380 IFDEF _gas_contingency |
381 ; switch off gas contingency mode by default | |
382 clrf WREG | |
383 movff WREG,char_I_gas_contingency | |
384 ENDIF | |
385 | |
582 | 386 do_planner_common: |
623 | 387 call restart_set_modes_and_flags ; initialize dive mode settings |
628 | 388 do_planner_common_1: |
604 | 389 movff opt_dive_mode,WREG ; get dive mode: 0=OC, 1=CCR, 2=Gauge, 3=Apnea, 4=pSCR |
390 dcfsnz WREG,W ; subtract one, became zero? | |
391 bra do_planner_common_ccr ; YES - use CCR version | |
392 | |
393 MENU_BEGIN tPlan, .7 | |
394 MENU_OPTION tIntvl, odiveInterval, 0 | |
395 MENU_OPTION tBtDep, obottomDepth, 0 | |
396 MENU_CALL tInter, do_demo_divemode | |
397 MENU_OPTION tBtTm, obottomTime, 0 | |
398 MENU_OPTION tuseAGF, oSimAGF, 0 | |
399 MENU_CALL tDeco, do_demo_planner | |
400 MENU_CALL tBack, do_return_main_menu | |
401 MENU_END | |
402 | |
403 do_planner_common_ccr: | |
582 | 404 MENU_BEGIN tPlan, .7 |
405 MENU_OPTION tIntvl, odiveInterval, 0 | |
406 MENU_OPTION tBtDep, obottomDepth, 0 | |
407 MENU_CALL tInter, do_demo_divemode | |
408 MENU_OPTION tBtTm, obottomTime, 0 | |
409 MENU_CALL tDecoSetup, do_planner_config | |
410 MENU_CALL tDeco, do_demo_planner | |
604 | 411 MENU_CALL tBack, do_return_main_menu |
582 | 412 MENU_END |
0 | 413 |
298
2fe34fc0e2ae
new submenu for gas consumption, show actual mix instead of GAS1-GAS5 in deco planner
heinrichsweikamp
parents:
275
diff
changeset
|
414 do_planner_config: |
628 | 415 IFDEF _gas_contingency |
416 MENU_BEGIN tPlan, .4 | |
417 MENU_OPTION tSelectSetpoint, oSimSetpoint, 0 | |
418 MENU_OPTION tuseAGF, oSimAGF, 0 | |
419 MENU_OPTION tGasContingency, oGasContingency, 0 | |
420 MENU_CALL tBack, do_return_planner_menu | |
421 MENU_END | |
422 ELSE | |
582 | 423 MENU_BEGIN tPlan, .3 |
424 MENU_OPTION tSelectSetpoint, oSimSetpoint, 0 | |
425 MENU_OPTION tuseAGF, oSimAGF, 0 | |
604 | 426 MENU_CALL tBack, do_return_planner_menu |
582 | 427 MENU_END |
628 | 428 ENDIF |
524 | 429 |
298
2fe34fc0e2ae
new submenu for gas consumption, show actual mix instead of GAS1-GAS5 in deco planner
heinrichsweikamp
parents:
275
diff
changeset
|
430 |
0 | 431 ;============================================================================= |
604 | 432 ; Divemode Menu |
0 | 433 |
434 do_return_divemode_menu: | |
582 | 435 call menu_processor_double_pop ; drop exit line and back to last line |
0 | 436 |
437 do_divemode_menu: | |
582 | 438 MENU_BEGIN tDiveModeMenu, .7 |
439 MENU_OPTION tDvMode, oDiveMode, 0 | |
440 MENU_OPTION tDkMode, oDecoMode, 0 | |
441 MENU_CALL tppO2settings, do_ppo2_menu | |
442 MENU_OPTION tsafetystopmenu, oSafetyStop, 0 | |
604 | 443 MENU_CALL tDecoparameters, do_decoparameters_menu |
582 | 444 MENU_CALL t2ndDecoPlanMenu, do_2nd_deco_plan_menu |
604 | 445 MENU_CALL tBack, do_return_main_menu |
582 | 446 MENU_END |
447 | |
0 | 448 |
104
223579e905c3
Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents:
90
diff
changeset
|
449 do_ppo2_menu: |
623 | 450 IFDEF _ccr_pscr |
582 | 451 MENU_BEGIN tppO2settings, .6 |
623 | 452 MENU_DYNAMIC divesets_ppo2_max, do_toggle_ppo2_max_work |
582 | 453 MENU_DYNAMIC divesets_ppo2_max_deco, do_toggle_ppo2_max_deco |
454 MENU_DYNAMIC divesets_ppo2_min, do_toggle_ppo2_min | |
455 MENU_DYNAMIC divesets_ppo2_min_cc, do_toggle_ppo2_min_cc | |
456 MENU_OPTION tShowppO2, oShowppO2, 0 | |
604 | 457 MENU_CALL tBack, do_return_divemode_menu |
582 | 458 MENU_END |
623 | 459 ELSE |
460 MENU_BEGIN tppO2settings, .5 | |
461 MENU_DYNAMIC divesets_ppo2_max, do_toggle_ppo2_max_work | |
462 MENU_DYNAMIC divesets_ppo2_max_deco, do_toggle_ppo2_max_deco | |
463 MENU_DYNAMIC divesets_ppo2_min, do_toggle_ppo2_min | |
464 MENU_OPTION tShowppO2, oShowppO2, 0 | |
465 MENU_CALL tBack, do_return_divemode_menu | |
466 MENU_END | |
467 ENDIF | |
582 | 468 |
104
223579e905c3
Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents:
90
diff
changeset
|
469 |
0 | 470 do_return_decoparameters_menu: |
582 | 471 call menu_processor_double_pop ; drop exit line and back to last line |
472 | |
473 do_decoparameters_menu: | |
474 movff char_I_deco_model,lo ; 0 = ZH-L16, 1 = ZH-L16-GF | |
475 tstfsz lo | |
604 | 476 bra do_decoparameters_menu_gf ; <> 0 -> GF menu! |
582 | 477 ; NON-GF menu |
604 | 478 MENU_BEGIN tDecoparameters, .6 |
479 MENU_OPTION tSetBotUse, obottom_usage, 0 | |
480 MENU_OPTION tSetDecoUse, odeco_usage, 0 | |
582 | 481 MENU_OPTION tSaturationMult, osatmult, 0 |
482 MENU_OPTION tDesaturationMult, odesatmult, 0 | |
604 | 483 MENU_CALL tMore, do_decoparameters_menu_more |
484 MENU_CALL tBack, do_return_divemode_menu | |
582 | 485 MENU_END |
486 | |
604 | 487 do_decoparameters_menu_gf: |
582 | 488 ; GF menu |
489 MENU_BEGIN tDecoparameters, .7 | |
604 | 490 MENU_OPTION tSetBotUse, obottom_usage, 0 |
491 MENU_OPTION tSetDecoUse, odeco_usage, 0 | |
492 MENU_CALL tGFMenu, do_GF_menu | |
582 | 493 MENU_OPTION tSaturationMult, osatmultgf, 0 |
494 MENU_OPTION tDesaturationMult, odesatmultgf, 0 | |
604 | 495 MENU_CALL tMore, do_decoparameters_menu_more |
496 MENU_CALL tBack, do_return_divemode_menu | |
582 | 497 MENU_END |
0 | 498 |
560 | 499 |
604 | 500 do_decoparameters_menu_more: |
623 | 501 MENU_BEGIN tDecoparameters, .7 |
604 | 502 MENU_OPTION tLastDecostop, oLastDeco, 0 |
503 MENU_OPTION tAscentSpeed, oAscentSpeed, 0 | |
504 MENU_OPTION tGasChangeTime, oGasChangeTime, 0 | |
623 | 505 MENU_OPTION tExtendedStops, oExtendedStops, 0 |
506 MENU_OPTION tTimeoutDive, oDiveTimeout, 0 | |
507 MENU_OPTION tStoreApnoeDive, oStoreApnoeDive, 0 | |
604 | 508 MENU_CALL tBack, do_return_decoparameters_menu |
582 | 509 MENU_END |
560 | 510 |
511 | |
604 | 512 do_2nd_deco_plan_menu: |
513 MENU_BEGIN t2ndDecoPlanMenu, .3 | |
514 MENU_OPTION tFTTSMenu, oExtraTime, 0 | |
515 MENU_OPTION tCalcAscGas, oCalcAscGas, 0 | |
516 MENU_CALL tBack, do_return_divemode_menu | |
582 | 517 MENU_END |
560 | 518 |
519 | |
604 | 520 do_GF_menu: |
521 MENU_BEGIN tGFMenu, .6 | |
522 MENU_OPTION tGF_low, oGF_low, 0 | |
523 MENU_OPTION tGF_high, oGF_high, 0 | |
582 | 524 MENU_OPTION taGF_enable, oEnable_aGF, 0 |
525 MENU_OPTION taGF_low, oaGF_low, 0 | |
526 MENU_OPTION taGF_high, oaGF_high, 0 | |
604 | 527 MENU_CALL tBack, do_return_decoparameters_menu |
582 | 528 MENU_END |
560 | 529 |
530 | |
0 | 531 ;============================================================================= |
532 ; Setup Menu | |
628 | 533 do_return_settings_deeper: ; entry point for return from info menu 2 |
534 call menu_processor_pop ; drop one more stack entry | |
535 | |
0 | 536 do_return_settings: |
623 | 537 bcf imprint_time_date ; stop imprinting of current time & date |
582 | 538 call menu_processor_double_pop ; drop exit line and back to last line |
604 | 539 IFDEF _rx_mode |
623 | 540 bcf tr_functions_activated ; set TR functions as deactivated by default |
541 btfss ostc_rx_present ; TR model / TR module up & running? | |
542 bra do_settings_menu ; NO | |
543 movff opt_TR_mode,WREG ; YES - get TR mode | |
544 tstfsz WREG ; - TR mode <> off ? | |
545 bsf tr_functions_activated ; YES - set TR functions as activated | |
604 | 546 ENDIF |
582 | 547 |
0 | 548 do_settings_menu: |
629 | 549 IFDEF _hwos_sport |
550 bsf ble_available ; For very old OSTC sport | |
551 ENDIF | |
552 | |
623 | 553 btfsc ble_available ; BLE available? |
582 | 554 bra do_settings_menu_ble ; YES |
629 | 555 |
556 MENU_BEGIN tSystSets, .5 | |
582 | 557 MENU_CALL tInfoMenu, do_info_menu |
558 MENU_CALL tSetTimeDate, do_date_time_menu | |
559 MENU_CALL tDispSets, do_dispsets_menu | |
560 MENU_CALL tMore, do_settings_menu_more | |
604 | 561 MENU_CALL tBack, do_return_main_menu |
582 | 562 MENU_END |
155
5f71e31bd5b3
CHANGE: Re-arranged Settings Menu, add 180? rotate to menu
heinrichsweikamp
parents:
154
diff
changeset
|
563 |
345 | 564 do_settings_menu_ble: |
604 | 565 IFDEF _rx_functions |
623 | 566 btfsc ostc_rx_present ; TR model? |
604 | 567 bra do_settings_menu_rx ; YES |
568 ENDIF | |
569 | |
570 MENU_BEGIN tSystSets, .6 | |
582 | 571 MENU_CALL tInfoMenu, do_info_menu |
623 | 572 MENU_CALL tBleTitle, comm_mode_ble |
582 | 573 MENU_CALL tSetTimeDate, do_date_time_menu |
574 MENU_CALL tDispSets, do_dispsets_menu | |
575 MENU_CALL tMore, do_settings_menu_more | |
604 | 576 MENU_CALL tBack, do_return_main_menu |
582 | 577 MENU_END |
578 | |
604 | 579 IFDEF _rx_functions |
580 do_settings_menu_rx: | |
581 MENU_BEGIN tSystSets, .7 | |
582 MENU_CALL tInfoMenu, do_info_menu | |
623 | 583 MENU_CALL tBleTitle, comm_mode_ble |
604 | 584 MENU_CALL tTrSettings, do_settings_menu_TR |
585 MENU_CALL tSetTimeDate, do_date_time_menu | |
586 MENU_CALL tDispSets, do_dispsets_menu | |
587 MENU_CALL tMore, do_settings_menu_more | |
588 MENU_CALL tBack, do_return_main_menu | |
589 MENU_END | |
590 ENDIF | |
591 | |
592 | |
582 | 593 do_info_menu: |
604 | 594 IFDEF _rx_functions |
595 btfsc ostc_rx_present ; TR model? | |
596 bra do_info_menu_TR ; YES | |
597 ENDIF | |
598 | |
582 | 599 MENU_BEGIN tInfoMenu, .6 |
600 MENU_DYNAMIC info_menu_serial, 0 | |
601 MENU_DYNAMIC info_menu_firmware, 0 | |
628 | 602 MENU_DYNAMIC info_menu_config, 0 |
582 | 603 MENU_DYNAMIC info_menu_battery_volts, 0 |
604 MENU_DYNAMIC info_menu_uptime, 0 | |
628 | 605 MENU_CALL tMore, do_info_menu2 |
604 | 606 MENU_END |
607 | |
608 IFDEF _rx_functions | |
609 do_info_menu_TR: | |
610 MENU_BEGIN tInfoMenu, .7 | |
611 MENU_DYNAMIC info_menu_serial, 0 | |
612 MENU_DYNAMIC info_menu_firmware, 0 | |
613 MENU_DYNAMIC info_menu_firmware_rx, 0 | |
628 | 614 MENU_DYNAMIC info_menu_config, 0 |
604 | 615 MENU_DYNAMIC info_menu_battery_volts, 0 |
616 MENU_DYNAMIC info_menu_uptime, 0 | |
628 | 617 MENU_CALL tMore, do_info_menu2 |
582 | 618 MENU_END |
604 | 619 ENDIF |
620 | |
628 | 621 do_info_menu2: ;same for all hardware versions |
622 MENU_BEGIN tInfoMenu, .2 | |
623 MENU_DYNAMIC info_menu_total_dives, 0 | |
624 MENU_CALL tBack, do_return_settings_deeper | |
625 MENU_END | |
626 | |
627 | |
604 | 628 |
629 IFDEF _rx_functions | |
623 | 630 |
604 | 631 do_settings_menu_TR: |
632 movff opt_dive_mode,WREG ; get dive mode: 0=OC, 1=CCR, 2=Gauge, 3=Apnea, 4=pSCR | |
633 incf WREG,W ; add 1 | |
634 dcfsnz WREG,W ; subtract one, became zero? | |
635 bra do_settings_menu_TR_MaxDelta; YES - OC | |
636 dcfsnz WREG,W ; subtract one, became zero? | |
637 bra do_settings_menu_TR_BailPres; YES - CCR | |
638 dcfsnz WREG,W ; subtract one, became zero? | |
639 bra do_settings_menu_TR_MaxDelta; YES - Gauge | |
640 dcfsnz WREG,W ; subtract one, became zero? | |
641 bra do_settings_menu_TR_abort ; YES - Apnea, abort | |
642 dcfsnz WREG,W ; subtract one, became zero? | |
643 bra do_settings_menu_TR_both ; YES - pSCR | |
644 do_settings_menu_TR_abort: | |
645 call menu_processor_pop ; drop last menu selection | |
646 bra do_settings_menu ; back to last menu | |
647 | |
648 do_settings_menu_TR_MaxDelta: ; menu with oTrMaxDeltaPres | |
649 MENU_BEGIN tTrSettings, .5 | |
650 MENU_OPTION tTrMode, oTrMode, 0 | |
651 MENU_OPTION tTr1stPres, oTr1stPres, 0 | |
652 MENU_OPTION tTr2ndPres, oTr2ndPres, 0 | |
653 MENU_DYNAMIC do_toggle_max_pres_diff_label,do_toggle_max_pres_diff | |
654 MENU_CALL tBack, do_return_settings | |
655 MENU_END | |
656 | |
657 do_settings_menu_TR_BailPres: ; menu with oTrBailPres | |
658 MENU_BEGIN tTrSettings, .5 | |
659 MENU_OPTION tTrMode, oTrMode, 0 | |
660 MENU_OPTION tTr1stPres, oTr1stPres, 0 | |
661 MENU_OPTION tTr2ndPres, oTr2ndPres, 0 | |
662 MENU_OPTION tTrBailPres, oTrBailPres, 0 | |
663 MENU_CALL tBack, do_return_settings | |
664 MENU_END | |
665 | |
666 do_settings_menu_TR_both: ; menu with oTrBailPres and oTrMaxDeltaPres | |
667 MENU_BEGIN tTrSettings, .6 | |
668 MENU_OPTION tTrMode, oTrMode, 0 | |
669 MENU_OPTION tTr1stPres, oTr1stPres, 0 | |
670 MENU_OPTION tTr2ndPres, oTr2ndPres, 0 | |
671 MENU_OPTION tTrBailPres, oTrBailPres, 0 | |
672 MENU_DYNAMIC do_toggle_max_pres_diff_label,do_toggle_max_pres_diff | |
673 MENU_CALL tBack, do_return_settings | |
674 MENU_END | |
675 | |
676 | |
677 do_toggle_max_pres_diff: ; add 5 bar, with hard-coded max. | |
678 movff char_I_max_pres_diff,lo ; get current value | |
679 movlw .5 ; load increment | |
680 addwf lo,F ; add increment | |
681 movlw max_pres_diff_max ; load maximum value | |
682 cpfsgt lo ; above maximum value? | |
683 bra do_toggle_max_pres_diff_1 ; NO - store new value | |
684 movlw max_pres_diff_min ; YES - load minimum value | |
685 movwf lo ; - into lo | |
686 do_toggle_max_pres_diff_1: | |
687 movff lo,char_I_max_pres_diff ; write back new value | |
688 return ; done | |
623 | 689 |
690 ENDIF ; _rx_functions | |
582 | 691 |
692 | |
693 do_return_settings_more_deeper: ; entry point for returns from reset sub-menu | |
694 call menu_processor_pop ; drop one more stack entry | |
326
d21b172d5a7a
VSIbar #4: VSI settings submenu, graph option, logbook offset and compass calib. menu exit fix
Janos Kovacs <kovjanos@gmail.com>
parents:
307
diff
changeset
|
695 |
d21b172d5a7a
VSIbar #4: VSI settings submenu, graph option, logbook offset and compass calib. menu exit fix
Janos Kovacs <kovjanos@gmail.com>
parents:
307
diff
changeset
|
696 do_return_settings_more: |
582 | 697 call menu_processor_double_pop ; drop exit line and back to last line |
698 | |
155
5f71e31bd5b3
CHANGE: Re-arranged Settings Menu, add 180? rotate to menu
heinrichsweikamp
parents:
154
diff
changeset
|
699 do_settings_menu_more: |
623 | 700 btfsc battery_gauge_available ; piezo buttons available? |
701 bra do_settings_menu_more_piezo ; YES | |
702 | |
703 IFDEF _compass | |
704 MENU_BEGIN tSystSets, .6 ; All MENU_CALLs | |
705 MENU_CALL tCompassMenu, do_compass_menu ; in this menu need to | |
706 MENU_CALL tLogOffset, do_log_offset_menu ; stay together on this | |
707 MENU_OPTION tAltMode, oAltMode, 0 ; menu level in order to | |
708 MENU_OPTION tDvSalinity, oDiveSalinity, 0 ; not mess up the menu | |
709 MENU_CALL tResetMenu, do_reset_menu ; stack on doing the | |
710 MENU_CALL tBack, do_return_settings ; do_return_settings ! | |
582 | 711 MENU_END |
623 | 712 ELSE |
713 MENU_BEGIN tSystSets, .5 ; see above | |
714 MENU_CALL tLogOffset, do_log_offset_menu ; | |
715 MENU_OPTION tAltMode, oAltMode, 0 ; | |
716 MENU_OPTION tDvSalinity, oDiveSalinity, 0 ; | |
717 MENU_CALL tResetMenu, do_reset_menu ; | |
718 MENU_CALL tBack, do_return_settings ; | |
719 MENU_END | |
720 ENDIF ; _compass | |
220
effd7259f5a5
make button sensitivity configurable (cR hardware)
heinrichsweikamp
parents:
218
diff
changeset
|
721 |
582 | 722 |
723 do_return_settings_menu_more_pz: | |
375
a9e35c1327aa
1.88 release, BUGFIX: Start with Sensor use from sleep (cR only), CHANGE: Apply button settings when button menu is closed, NEW: Reset button settings on a magnet reset (cR and OSTC 2)
heinrichsweikamp
parents:
359
diff
changeset
|
724 call TFT_ClearScreen |
604 | 725 call piezo_config ; configure buttons |
582 | 726 call menu_processor_double_pop ; drop exit line and back to last line |
524 | 727 |
269
1207cf9a9408
adjust menu for different hardware versions
heinrichsweikamp
parents:
243
diff
changeset
|
728 do_settings_menu_more_piezo: |
623 | 729 IFDEF _compass |
582 | 730 MENU_BEGIN tSystSets, .7 |
604 | 731 MENU_CALL tCompassMenu, do_compass_menu ; see above |
732 MENU_CALL tLogOffset, do_log_offset_menu ; | |
623 | 733 MENU_OPTION tAltMode, oAltMode, 0 ; |
734 MENU_OPTION tDvSalinity, oDiveSalinity, 0 ; | |
604 | 735 MENU_CALL tResetMenu, do_reset_menu ; |
736 MENU_CALL tMore, do_settings_piezo_menu ; | |
623 | 737 MENU_CALL tBack, do_return_settings ; |
582 | 738 MENU_END |
623 | 739 ELSE |
582 | 740 MENU_BEGIN tSystSets, .6 |
623 | 741 MENU_CALL tLogOffset, do_log_offset_menu ; see above |
742 MENU_OPTION tAltMode, oAltMode, 0 ; | |
743 MENU_OPTION tDvSalinity, oDiveSalinity, 0 ; | |
604 | 744 MENU_CALL tResetMenu, do_reset_menu ; |
623 | 745 MENU_CALL tMore, do_settings_piezo_menu ; |
746 MENU_CALL tBack, do_return_settings ; | |
582 | 747 MENU_END |
623 | 748 ENDIF |
582 | 749 |
243 | 750 |
345 | 751 do_settings_piezo_menu: |
582 | 752 ; Menu with features only available in piezo button hardware |
753 MENU_BEGIN tSystSets, .3 | |
604 | 754 MENU_OPTION tButtonleft, ocR_button_left, 0 ; left button sensitivity |
582 | 755 MENU_OPTION tButtonright, ocR_button_right, 0 ; right button sensitivity |
604 | 756 MENU_CALL tBack, do_return_settings_menu_more_pz |
582 | 757 MENU_END |
220
effd7259f5a5
make button sensitivity configurable (cR hardware)
heinrichsweikamp
parents:
218
diff
changeset
|
758 |
effd7259f5a5
make button sensitivity configurable (cR hardware)
heinrichsweikamp
parents:
218
diff
changeset
|
759 |
623 | 760 IFDEF _compass |
761 | |
18
4e3f133dfbf4
add new opt_compass_gain option to work with more magnetic battery types
heinrichsweikamp
parents:
0
diff
changeset
|
762 do_compass_menu: |
582 | 763 MENU_BEGIN tSystSets, .5 |
623 | 764 MENU_CALL tCompassMenu, compass_calibration_loop ; exits to surface loop |
582 | 765 ; MENU_OPTION tCompassGain, oCompassGain, 0 |
766 MENU_DYNAMIC menu_cal_x, 0 | |
767 MENU_DYNAMIC menu_cal_y, 0 | |
768 MENU_DYNAMIC menu_cal_z, 0 | |
604 | 769 MENU_CALL tBack, do_return_settings_more |
582 | 770 MENU_END |
771 | |
623 | 772 ENDIF ; _compass |
773 | |
18
4e3f133dfbf4
add new opt_compass_gain option to work with more magnetic battery types
heinrichsweikamp
parents:
0
diff
changeset
|
774 |
0 | 775 ;============================================================================= |
604 | 776 ; Reset and confirmation menu |
0 | 777 |
778 do_reset_menu: | |
582 | 779 MENU_BEGIN tResetMenu, .6 |
604 | 780 MENU_CALL tBack, do_return_settings_more |
623 | 781 MENU_CALL tReboot, do_reset_menu_reboot ; confirm |
782 MENU_CALL tResetDeco, do_reset_menu_deco ; confirm | |
783 MENU_CALL tResetSettings, do_reset_menu_settings ; confirm | |
784 MENU_CALL tResetLogbook, do_reset_menu_logbook ; confirm | |
604 | 785 MENU_CALL tResetBattery, do_new_battery_menu ; confirm |
582 | 786 MENU_END |
0 | 787 |
623 | 788 do_reset_menu_reboot: |
582 | 789 MENU_BEGIN tResetMenu2, .2 |
790 MENU_CALL tAbort, do_return_settings_more_deeper | |
623 | 791 MENU_CALL tReboot, do_reboot ; reboot (cold start) |
582 | 792 MENU_END |
0 | 793 |
623 | 794 do_reset_menu_deco: |
582 | 795 MENU_BEGIN tResetMenu2, .2 |
796 MENU_CALL tAbort, do_return_settings_more_deeper | |
623 | 797 MENU_CALL tResetDeco, do_reset_deco ; reset deco and return to main reset menu |
582 | 798 MENU_END |
0 | 799 |
623 | 800 do_reset_menu_settings: |
582 | 801 MENU_BEGIN tResetMenu2, .2 |
802 MENU_CALL tAbort, do_return_settings_more_deeper | |
623 | 803 MENU_CALL tResetSettings, do_reset_settings ; reset all settings and go to surface mode |
582 | 804 MENU_END |
0 | 805 |
623 | 806 do_reset_menu_logbook: |
582 | 807 MENU_BEGIN tResetMenu2, .2 |
808 MENU_CALL tAbort, do_return_settings_more_deeper | |
623 | 809 MENU_CALL tResetLogbook, do_reset_logbook ; reset logbook and return to main reset menu |
582 | 810 MENU_END |
811 | |
63 | 812 |
813 do_reset_logbook: | |
604 | 814 clrf EEADRH ; make sure to select EEPROM bank 0 |
582 | 815 clrf EEDATA |
816 read_int_eeprom .2 | |
817 write_int_eeprom .16 | |
818 read_int_eeprom .3 | |
604 | 819 write_int_eeprom .17 ; copy number of dives |
63 | 820 clrf EEDATA |
582 | 821 write_int_eeprom .2 |
604 | 822 write_int_eeprom .3 ; clear total dives |
582 | 823 write_int_eeprom .4 |
824 write_int_eeprom .5 | |
604 | 825 write_int_eeprom .6 ; reset logbook pointers |
826 call ext_flash_erase_logbook ; and complete logbook | |
827 bra do_return_settings_more_deeper | |
63 | 828 |
0 | 829 |
830 do_reset_deco: | |
623 | 831 call deco_clear_tissue ; set all tissues to absolute pressure * N2_ratio (C-code) |
832 call deco_calc_dive_interval_1min ; update tissues by 1 minute to calculate current GF factor (C-code) | |
833 call deco_calc_desaturation_time ; calculate desaturation and no-fly/no-altitude time (C-code) | |
582 | 834 banksel common |
623 | 835 call vault_decodata_into_eeprom ; store updated deco data to EEPROM |
604 | 836 bra do_return_settings_more_deeper |
582 | 837 |
0 | 838 |
839 do_reset_settings: | |
604 | 840 call TFT_ClearScreen ; clear screen |
841 call option_reset_all ; reset all options to factory default | |
623 | 842 call do_logoffset_reset ; reset log offset |
843 goto restart ; restart into surface mode | |
0 | 844 |
845 do_reboot: | |
623 | 846 call ext_flash_enable_protection ; set write protection on external EEPROM |
847 call rtc_init ; reset the real time clock (will reset to firmware creation date) | |
0 | 848 reset |
849 | |
623 | 850 do_return_date_time_menu: |
851 call menu_processor_double_pop ; drop exit line and back to last line | |
0 | 852 |
853 do_date_time_menu: | |
623 | 854 bsf imprint_time_date ; start imprinting current time & date |
855 bcf block_option_value ; allow display of option values again | |
856 | |
582 | 857 MENU_BEGIN tSetTimeDate, .4 |
858 MENU_CALL tSetTime, do_time_menu | |
859 MENU_CALL tSetDate, do_date_menu | |
623 | 860 MENU_OPTION tDateFormat, oDateFormat, 0 |
604 | 861 MENU_CALL tBack, do_return_settings |
582 | 862 MENU_END |
863 | |
0 | 864 |
865 do_date_menu: | |
623 | 866 bsf block_option_value ; suspend display of option values |
582 | 867 |
868 MENU_BEGIN tSetDate, .4 | |
869 MENU_OPTION tSetDay, oSetDay, 0 | |
870 MENU_OPTION tSetMonth, oSetMonth, 0 | |
871 MENU_OPTION tSetYear, oSetYear, 0 | |
623 | 872 MENU_CALL tBack, do_return_date_time_menu |
582 | 873 MENU_END |
0 | 874 |
875 | |
876 do_time_menu: | |
623 | 877 bsf block_option_value ; suspend display of option values |
582 | 878 |
879 MENU_BEGIN tSetTime, .4 | |
880 MENU_OPTION tSetHours, oSetHours, 0 | |
881 MENU_OPTION tSetMinutes, oSetMinutes, 0 | |
623 | 882 MENU_OPTION tSetSeconds, oClearSeconds, 0 |
883 MENU_CALL tBack, do_return_date_time_menu | |
582 | 884 MENU_END |
0 | 885 |
886 | |
623 | 887 do_toggle_ppo2_max_work: ; add 0.1 bar, with hard-coded max. |
888 movff char_I_ppO2_max_work,lo ; bank-safe copy | |
582 | 889 movlw .10 |
0 | 890 addwf lo,F |
582 | 891 movlw ppo2_warning_high_highest |
0 | 892 cpfsgt lo |
582 | 893 bra do_toggle_ppo2_max2 |
894 movlw ppo2_warning_high_lowest | |
0 | 895 movwf lo |
896 do_toggle_ppo2_max2: | |
623 | 897 movff lo,char_I_ppO2_max_work |
582 | 898 return |
0 | 899 |
604 | 900 do_toggle_ppo2_max_deco: ; add 0.1 bar, with hard-coded max. |
623 | 901 movff char_I_ppO2_max_deco,lo ; bank-safe copy |
582 | 902 movlw .10 |
507
4e6f5c36f4cc
NEW: Two ppO2 max settings. One for travel/bottom and one for deco gases
heinrichsweikamp
parents:
505
diff
changeset
|
903 addwf lo,F |
582 | 904 movlw ppo2_warning_deco_highest |
507
4e6f5c36f4cc
NEW: Two ppO2 max settings. One for travel/bottom and one for deco gases
heinrichsweikamp
parents:
505
diff
changeset
|
905 cpfsgt lo |
582 | 906 bra do_toggle_ppo2_max_deco2 |
907 movlw ppo2_warning_deco_lowest | |
507
4e6f5c36f4cc
NEW: Two ppO2 max settings. One for travel/bottom and one for deco gases
heinrichsweikamp
parents:
505
diff
changeset
|
908 movwf lo |
4e6f5c36f4cc
NEW: Two ppO2 max settings. One for travel/bottom and one for deco gases
heinrichsweikamp
parents:
505
diff
changeset
|
909 do_toggle_ppo2_max_deco2: |
582 | 910 movff lo,char_I_ppO2_max_deco |
911 return | |
912 | |
604 | 913 do_toggle_ppo2_min: ; sub 0.1 bar, with hard-coded min. |
623 | 914 movff char_I_ppO2_min,lo ; bank-safe copy |
582 | 915 incf lo,F |
916 movlw ppo2_warning_low_highest | |
0 | 917 cpfsgt lo |
582 | 918 bra do_toggle_ppo2_min2 |
919 movlw ppo2_warning_low_lowest | |
0 | 920 movwf lo |
921 do_toggle_ppo2_min2: | |
582 | 922 movff lo,char_I_ppO2_min |
923 return | |
0 | 924 |
604 | 925 do_toggle_ppo2_min_cc: ; sub 0.1 bar, with hard-coded min. |
623 | 926 movff char_I_ppO2_min_loop,lo ; bank-safe copy |
582 | 927 incf lo,F |
928 movlw ppo2_warning_loop_highest | |
560 | 929 cpfsgt lo |
582 | 930 bra do_toggle_ppo2_min_cc2 |
931 movlw ppo2_warning_loop_lowest | |
560 | 932 movwf lo |
933 do_toggle_ppo2_min_cc2: | |
582 | 934 movff lo,char_I_ppO2_min_loop |
935 return | |
936 | |
0 | 937 |
938 ; Logbook offset sub-menu | |
939 do_log_offset_menu: | |
623 | 940 |
941 clrf WREG ; select an initial step size of 1 | |
942 movff WREG,opt_logoffset_step ; bank-safe write to option variable | |
943 | |
944 MENU_BEGIN tLogOffset, .5 | |
945 MENU_DYNAMIC TFT_LogOffset, 0 | |
946 MENU_OPTION tLogOffStepSize, oLogOffsetStep, 0 | |
947 MENU_CALL tLogOffsetplus, do_logoffset_plus | |
948 MENU_CALL tLogOffsetminus, do_logoffset_minus | |
604 | 949 MENU_CALL tBack, do_return_settings_more |
582 | 950 MENU_END |
0 | 951 |
952 | |
623 | 953 do_logoffset_common: |
954 call do_logoffset_common_read ; read current offset into mpr+1:mpr+0 | |
955 movff opt_logoffset_step,ul ; get step size: 0=1, 1=10, 2=100, 3=1000 | |
956 incf ul,F ; 0...3 -> 1...4 | |
957 clrf mpr+3 ; clear step size, high byte | |
958 movlw .1 ; set a step size of 1 | |
959 movwf mpr+2 ; copy to step size, low byte | |
960 dcfsnz ul,F ; ul--, did ul became 0, i.e. step size = 1 ? | |
961 return ; YES - done | |
962 movlw .10 ; NO - set a step size of 10 | |
963 movwf mpr+2 ; - copy to step size, low byte | |
964 dcfsnz ul,F ; ul--, did ul became 0, i.e. step size = 10 ? | |
965 return ; YES - done | |
966 movlw .100 ; NO - set a step size of 100 | |
967 movwf mpr+2 ; - copy to step size, low byte | |
968 dcfsnz ul,F ; ul--, did ul became 0, i.e. step size = 100 ? | |
969 return ; YES - done | |
970 movlw LOW .1000 ; NO - set a step size of 1000, low byte | |
971 movwf mpr+2 ; - copy to step size, low byte | |
972 movlw HIGH .1000 ; - set a step size of 1000, high byte | |
973 movwf mpr+3 ; - copy to step size, high byte | |
974 return ; - done | |
0 | 975 |
623 | 976 do_logoffset_plus: |
977 rcall do_logoffset_common ; load current offset and step size | |
978 ; add step size to current offset | |
979 movf mpr+2,W ; get step size, low byte | |
980 addwf mpr+0,F ; add to offset, low byte | |
981 movf mpr+3,W ; get step size, high byte | |
982 addwfc mpr+1,F ; add to offset, high byte, considering carry flag | |
983 ; check if new offset is within limit | |
984 MOVLI .9999,sub_a ; load max limit into sub_a | |
985 MOVII mpr, sub_b ; copy new offset into sub_b | |
986 call cmpU16 ; compute sub_a - sub_b, setting neg_flag if result becomes negative | |
987 btfss neg_flag ; neg_flag set, i.e. new offset > 9999 ? | |
988 bra do_logoffset_exit ; NO - store offset and return | |
989 MOVLI .9999,mpr ; YES - limit offset to 9999 | |
990 bra do_logoffset_exit ; - store offset and return | |
0 | 991 |
623 | 992 do_logoffset_minus: |
993 rcall do_logoffset_common ; load current offset and step size | |
994 ; subtract step size from current offset | |
995 movf mpr+2,W ; get step size, low byte | |
996 subwf mpr+0,F ; subtract from offset, low byte | |
997 movf mpr+3,W ; get step size, high byte | |
998 subwfb mpr+1,F ; subtract from offset, high byte, considering borrow flag | |
999 ; check if new offset is within limit | |
1000 btfsc STATUS,C ; borrow to propagate (B == /CARRY) ? | |
1001 bra do_logoffset_exit ; NO - result >= 0, store and return | |
1002 do_logoffset_reset: | |
1003 clrf mpr+0 ; YES - revert offset to 0, low byte | |
1004 clrf mpr+1 ; - ... high byte | |
1005 ;bra do_logoffset_exit ; - store offset and return | |
0 | 1006 |
604 | 1007 do_logoffset_exit: |
623 | 1008 goto do_logoffset_common_write ; store offset and return |
1009 | |
0 | 1010 |
582 | 1011 do_return_dispsets_menu: |
623 | 1012 bcf imprint_color_schemes ; not in color schemes menu any more |
582 | 1013 call menu_processor_double_pop ; drop exit line and back to last line |
0 | 1014 |
1015 do_dispsets_menu: | |
604 | 1016 IF _language_2!=none |
1017 MENU_BEGIN tDispSets, .7 | |
582 | 1018 MENU_OPTION tBright, oBrightness, 0 |
604 | 1019 MENU_OPTION tLanguage, oLanguage, 0 |
1020 MENU_OPTION tUnits, oUnits, 0 | |
582 | 1021 MENU_CALL tColorScheme, do_color_scheme |
1022 MENU_OPTION tFlip, oFlipScreen, 0 | |
1023 MENU_CALL tMore, do_dispsets_menu_more | |
604 | 1024 MENU_CALL tBack, do_return_settings |
582 | 1025 MENU_END |
604 | 1026 ELSE |
1027 MENU_BEGIN tDispSets, .6 | |
1028 MENU_OPTION tBright, oBrightness, 0 | |
1029 MENU_OPTION tUnits, oUnits, 0 | |
1030 MENU_CALL tColorScheme, do_color_scheme | |
1031 MENU_OPTION tFlip, oFlipScreen, 0 | |
1032 MENU_CALL tMore, do_dispsets_menu_more | |
1033 MENU_CALL tBack, do_return_settings | |
1034 MENU_END | |
1035 ENDIF | |
582 | 1036 |
335
3d43da7acfe1
Always show ppO2 (warning position, standard color) option
janos_kovacs <kovjanos@gmail.com>
parents:
333
diff
changeset
|
1037 |
3d43da7acfe1
Always show ppO2 (warning position, standard color) option
janos_kovacs <kovjanos@gmail.com>
parents:
333
diff
changeset
|
1038 do_dispsets_menu_more: |
623 | 1039 IFDEF _helium |
582 | 1040 MENU_BEGIN tDispSets, .7 |
1041 MENU_OPTION tMODwarning, oMODwarning, 0 | |
623 | 1042 ; MENU_OPTION tIBCDwarning, oEnable_IBCD, 0 ; taken out in favor of option oLayout |
582 | 1043 MENU_OPTION tVSItext2, oVSItextv2, 0 |
1044 MENU_OPTION tVSIgraph, oVSIgraph, 0 | |
623 | 1045 MENU_OPTION tLayout, oLayout, 0 |
1046 MENU_OPTION t2ndDepth, o2ndDepthDisp, 0 | |
1047 MENU_OPTION tTissueGraphics, oTissueGraphics, 0 | |
1048 MENU_CALL tBack, do_return_dispsets_menu | |
1049 MENU_END | |
1050 ELSE | |
1051 MENU_BEGIN tDispSets, .6 | |
1052 MENU_OPTION tMODwarning, oMODwarning, 0 | |
1053 ; MENU_OPTION tIBCDwarning, oEnable_IBCD, 0 ; taken out in favor of option oLayout | |
1054 MENU_OPTION tVSItext2, oVSItextv2, 0 | |
1055 MENU_OPTION tVSIgraph, oVSIgraph, 0 | |
1056 MENU_OPTION tLayout, oLayout, 0 | |
604 | 1057 MENU_OPTION t2ndDepth, o2ndDepthDisp, 0 |
1058 MENU_CALL tBack, do_return_dispsets_menu | |
582 | 1059 MENU_END |
623 | 1060 ENDIF |
0 | 1061 |
582 | 1062 |
50 | 1063 do_color_scheme: |
623 | 1064 bsf imprint_color_schemes ; in color schemes menu |
582 | 1065 |
1066 MENU_BEGIN tColorScheme, .2 | |
1067 MENU_OPTION tColorSetDive, oColorSetDive, 0 | |
604 | 1068 MENU_CALL tBack, do_return_dispsets_menu |
582 | 1069 MENU_END |
50 | 1070 |
1071 | |
0 | 1072 ;============================================================================= |
1073 | |
582 | 1074 do_new_battery_menu: |
1075 MENU_BEGIN tNewBattTitle, .2 | |
1076 MENU_CALL tAbort, do_return_settings_more_deeper | |
623 | 1077 MENU_CALL tYes, do_new_battery_select_1 |
582 | 1078 MENU_END |
1079 | |
623 | 1080 |
582 | 1081 global do_new_battery_select |
1082 do_new_battery_select: | |
623 | 1083 call TFT_boot ; initialize TFT (includes clear screen) |
1084 call TFT_Display_FadeIn ; dim up the display | |
1085 call menu_processor_reset ; reset menu stack | |
1086 | |
1087 do_new_battery_select_1: | |
1088 ; make sure to reset battery percentage | |
1089 movlw .100 | |
1090 movwf batt_percent ; set battery level to full | |
1091 | |
1092 ; default (in cases of timeout or USB): use old battery | |
1093 call retrieve_battery_registers ; retrieve stored battery gauge value from EEPROM | |
604 | 1094 |
1095 IFDEF _screendump | |
623 | 1096 bsf screen_dump_avail ; enable screen dump function to prevent exiting into COMM mode immediately |
604 | 1097 ELSE |
623 | 1098 bsf comm_mode_disabled ; disable COMM mode to prevent exiting into COMM mode immediately |
604 | 1099 ENDIF |
1100 | |
623 | 1101 ; hardware descriptor: user changeable battery charger supported battery types |
614 | 1102 ; ------------------------------------------------------------------------------------------------------------------------------------------------------- |
623 | 1103 ; 0x11: BLE and battery gauge ---> OSTC 2 (old model) NO YES internal 18650 |
1104 ; 0x05: analog input and battery gauge ---> OSTC 2 cR NO YES internal 18650 | |
1105 ; 0x33: BLE and RX module and ambient sensor and battery gauge ---> OSTC 2 TR NO YES internal 16650 | |
1106 ; 0x13: BLE and ambient sensor and battery gauge -+-> OSTC 2 (new model) NO YES internal 16650 | |
1107 ; +-> OSTC Plus YES YES 1.5V ----- NO! ----- 3.6V rechargeable | |
1108 ; 0x0A: optical input and ambient sensor ---> OSTC 3 (USB model) YES NO 1.5V 3.6V disposable 3.6V rechargeable | |
1109 ; 0x1A: BLE and optical input and ambient sensor ---> OSTC 3 (BLE model) YES NO 1.5V 3.6V disposable 3.6V rechargeable | |
1110 ; 0x02: ambient sensor ---> OSTC Sport (USB model) YES NO 1.5V 3.6V disposable 3.6V rechargeable | |
1111 ; 0x52: BLE and ambient sensor and low volt core ---> OSTC Sport (BLE model) YES NO 1.5V 3.6V disposable 3.6V rechargeable | |
614 | 1112 |
1113 | |
623 | 1114 movlw 0x11 ; OSTC 2 (old model) |
1115 cpfseq HW_descriptor | |
614 | 1116 bra $+4 |
623 | 1117 bra use_18650_battery |
614 | 1118 |
623 | 1119 movlw 0x05 ; OSTC 2 cR |
1120 cpfseq HW_descriptor | |
614 | 1121 bra $+4 |
623 | 1122 bra use_18650_battery |
76 | 1123 |
614 | 1124 movlw 0x33 ; OSTC 2 TR |
623 | 1125 cpfseq HW_descriptor |
614 | 1126 bra $+4 |
623 | 1127 bra use_16650_battery |
614 | 1128 |
623 | 1129 ; movlw 0xXX ; OSTC 2 (new model) TODO: define signature |
1130 ; cpfseq HW_descriptor | |
1131 ; bra $+4 | |
1132 ; bra use_16650_battery | |
614 | 1133 |
623 | 1134 movlw 0x13 ; OSTC Plus TODO: and OSTC 2 new model as of now |
1135 cpfseq HW_descriptor | |
614 | 1136 bra $+4 |
623 | 1137 bra menu_new_battery_AA_charger |
614 | 1138 |
623 | 1139 ; movlw 0x0A ; OSTC 3 (USB model) |
1140 ; cpfseq HW_descriptor | |
1141 ; bra $+4 | |
1142 ; bra menu_new_battery_AA_no_charger | |
1143 | |
1144 ; movlw 0x1A ; OSTC 3 (BLE model) | |
1145 ; cpfseq HW_descriptor | |
1146 ; bra $+4 | |
1147 ; bra menu_new_battery_AA_no_charger | |
614 | 1148 |
623 | 1149 ; movlw 0x02 ; OSTC Sport (USB model) |
1150 ; cpfseq HW_descriptor | |
1151 ; bra $+4 | |
1152 ; bra menu_new_battery_AA_no_charger | |
614 | 1153 |
623 | 1154 ; movlw 0x52 ; OSTC Sport (BLE model) |
1155 ; cpfseq HW_descriptor | |
1156 ; bra $+4 | |
1157 ; bra menu_new_battery_AA_no_charger | |
1158 | |
1159 bra menu_new_battery_AA_no_charger ; any other model | |
582 | 1160 |
614 | 1161 |
623 | 1162 do_return_menu_new_bat_AA_chrg: |
614 | 1163 call menu_processor_double_pop ; drop exit line and back to last line |
1164 | |
623 | 1165 ; OSTC Plus (charging function) TODO: and OSTC 2 new model as of now |
1166 menu_new_battery_AA_charger: | |
614 | 1167 MENU_BEGIN tNewBattTitle, .4 |
1168 MENU_CALL tNewBattOld, use_old_batteries | |
1169 MENU_CALL tNewBattNew15, use_new_15V_batteries ; not rechargeable | |
623 | 1170 ; MENU_CALL tNewBattNew36, use_36V_disposable ; not rechargeable -> not allowed any more !!! |
1171 MENU_CALL tNewBattAccu, pre_36V_rechargeable ; rechargeable -> goto safety question | |
1172 MENU_CALL tNew16650, use_16650_battery ; OSTC 2 new model TODO: remove when OSTC 2 new model can be separated from Plus | |
614 | 1173 MENU_END |
1174 | |
1175 pre_36V_rechargeable: | |
1176 MENU_BEGIN tNewBattTitle, .5 | |
1177 MENU_CALL tConfirmChargeable1, 0 ; safety question, line 1 | |
1178 MENU_CALL tConfirmChargeable2, 0 ; safety question, line 2 | |
1179 MENU_CALL tConfirmChargeable3, 0 ; safety question, line 3 | |
623 | 1180 MENU_CALL tNo, do_return_menu_new_bat_AA_chrg ; NO - go back |
1181 MENU_CALL tYes, use_37V_rechargeable ; YES - confirmed rechargeable | |
1182 MENU_END | |
1183 | |
1184 ; OSTC 3 and Sport (no charging function) | |
1185 menu_new_battery_AA_no_charger: | |
1186 MENU_BEGIN tNewBattTitle, .4 | |
1187 MENU_CALL tNewBattOld, use_old_batteries | |
1188 MENU_CALL tNewBattNew15, use_new_15V_batteries ; not rechargeable | |
1189 MENU_CALL tNewBattNew36, use_36V_disposable ; not rechargeable | |
1190 MENU_CALL tNewBattAccu, use_37V_rechargeable ; rechargeable | |
582 | 1191 MENU_END |
0 | 1192 |
582 | 1193 |
457 | 1194 global use_old_prior_209 |
1195 use_old_prior_209: | |
1196 clrf EEADRH | |
582 | 1197 read_int_eeprom 0x0F ; =0:1.5V, =1:3,6V Saft, =2:LiIon 3,7V/0.8Ah, =3:LiIon 3,7V/3.1Ah, =4: LiIon 3,7V/2.3Ah |
604 | 1198 incfsz EEDATA,F ; was 0xFF? |
1199 return ; NO - done | |
477
44b8a826b314
NEW: Show battery type in surface mode next to battery voltage
heinrichsweikamp
parents:
474
diff
changeset
|
1200 |
604 | 1201 call lt2942_get_status ; check for gauge IC |
623 | 1202 movlw .3 ; Assume a 18650 |
582 | 1203 btfss battery_gauge_available ; cR/2 hardware? |
604 | 1204 movlw .1 ; assume a Saft |
582 | 1205 movwf EEDATA |
604 | 1206 write_int_eeprom 0x0F ; store the new battery type into EEPROM |
457 | 1207 return |
582 | 1208 |
1209 | |
0 | 1210 use_old_batteries: |
623 | 1211 rcall get_battery_data ; load data of old battery |
1212 goto surfloop ; proceed to surface loop | |
582 | 1213 |
0 | 1214 |
623 | 1215 global get_battery_data |
1216 get_battery_data: | |
1217 call retrieve_battery_registers ; retrieve stored battery gauge value from EEPROM | |
1218 movff battery_type,lo ; copy retrieved battery type to lo | |
1219 rcall setup_new_saft ; default battery configuration | |
1220 incf lo,F ; (0-4) -> (1-5) | |
1221 dcfsnz lo,F | |
1222 rcall setup_new_15v ; =0 | |
1223 dcfsnz lo,F | |
1224 rcall setup_new_saft ; =1 | |
1225 dcfsnz lo,F | |
1226 rcall setup_new_panasonic ; =2 | |
1227 dcfsnz lo,F | |
1228 rcall setup_new_18650 ; =3 | |
1229 dcfsnz lo,F | |
1230 rcall setup_new_16650 ; =4 | |
1231 bcf use_old_batt_flag ; clear flag | |
1232 IFNDEF _screendump | |
1233 bcf comm_mode_disabled ; re-enable COMM mode again | |
1234 ENDIF | |
1235 return ; done | |
1236 | |
1237 | |
1238 ; disposable 1.5 Volt Alkaline | |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
470
diff
changeset
|
1239 setup_new_15v: |
623 | 1240 bsf charge_disable ; set charging-inhibit signal |
1241 bcf charge_enable ; activate charging-inhibit signal | |
582 | 1242 movlw .100 |
604 | 1243 movwf batt_percent ; to have 1.5V batteries right after firmware update |
582 | 1244 movlw .0 |
623 | 1245 movwf battery_type |
1246 return | |
1247 | |
1248 ; disposable 3.6 Volt Lithium | |
1249 setup_new_saft: | |
1250 bsf charge_disable ; set charging-inhibit signal | |
1251 bcf charge_enable ; activate charging-inhibit signal | |
1252 MOVLI capacity_saft_internal, battery_capacity_internal | |
1253 MOVLI capacity_saft, battery_capacity | |
1254 MOVLI offset_saft, battery_offset | |
1255 movlw .1 | |
1256 movwf battery_type | |
1257 return | |
1258 | |
1259 ; rechargeable user-changeable 3.7 Volt Lithium-ion | |
1260 setup_new_panasonic: | |
1261 bcf charge_disable ; release charging-inhibit signal | |
1262 bsf charge_enable ; tristate charging-inhibit signal | |
1263 MOVLI capacity_panasonic_internal, battery_capacity_internal | |
1264 MOVLI capacity_panasonic, battery_capacity | |
1265 MOVLI offset_panasonic, battery_offset | |
1266 movlw .2 | |
1267 movwf battery_type | |
1268 return | |
1269 | |
1270 ; rechargeable internal Lithium-ion | |
1271 setup_new_18650: | |
1272 bcf charge_disable ; release charging-inhibit signal | |
1273 bsf charge_enable ; tristate charging-inhibit signal | |
1274 CLRI battery_capacity_internal | |
1275 MOVLI capacity_ncr18650, battery_capacity | |
1276 MOVLI offset_ncr18650, battery_offset | |
1277 movlw .3 | |
1278 movwf battery_type | |
1279 return | |
1280 | |
1281 ; rechargeable internal Lithium-ion | |
1282 setup_new_16650: | |
1283 bcf charge_disable ; release charging-inhibit signal | |
1284 bsf charge_enable ; tristate charging-inhibit signal | |
1285 CLRI battery_capacity_internal | |
1286 MOVLI capacity_ur16650, battery_capacity | |
1287 MOVLI offset_ur16650, battery_offset | |
1288 movlw .4 | |
1289 movwf battery_type | |
582 | 1290 return |
1291 | |
1292 | |
623 | 1293 use_new_15V_batteries: |
1294 rcall setup_new_15v | |
1295 bra use_batt_exit | |
448 | 1296 |
623 | 1297 use_36V_disposable: |
1298 rcall setup_new_saft | |
1299 bra use_batt_exit | |
582 | 1300 |
623 | 1301 use_37V_rechargeable: |
1302 rcall setup_new_panasonic | |
1303 call reset_battery_internal_only | |
1304 bra use_batt_exit_1 | |
472
4fdf6886004b
CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents:
470
diff
changeset
|
1305 |
474 | 1306 use_16650_battery: |
582 | 1307 rcall setup_new_16650 |
604 | 1308 bra use_batt_exit |
623 | 1309 |
448 | 1310 use_18650_battery: |
582 | 1311 rcall setup_new_18650 |
623 | 1312 ;bra use_batt_exit |
1313 | |
604 | 1314 use_batt_exit: |
623 | 1315 call reset_battery_pointer ; reset battery pointer 0x07-0x0C and battery gauge |
1316 use_batt_exit_1: | |
604 | 1317 IFNDEF _screendump |
623 | 1318 bcf comm_mode_disabled ; re-enable COMM mode again |
604 | 1319 ENDIF |
1320 goto surfloop ; jump to surface loop | |
1321 | |
623 | 1322 ;----------------------------------------------------------------------------- |
0 | 1323 |
623 | 1324 END |