Mercurial > public > hwos_code
comparison src/menu_tree.asm @ 174:932e91074bdb
CHANGE: Clarify Travel Gases with "---" as change depth
CHANGE: Enable "Change Depth" Menu only for deco gases
author | heinrichsweikamp |
---|---|
date | Sun, 05 Oct 2014 15:36:17 +0200 |
parents | 5f71e31bd5b3 |
children | 669b5d00706d |
comparison
equal
deleted
inserted
replaced
173:3de05d9b7716 | 174:932e91074bdb |
---|---|
21 #include "shared_definitions.h" ; Mailbox from/to p2_deco.c | 21 #include "shared_definitions.h" ; Mailbox from/to p2_deco.c |
22 #include "isr.inc" | 22 #include "isr.inc" |
23 #include "ghostwriter.inc" | 23 #include "ghostwriter.inc" |
24 #include "adc_lightsensor.inc" | 24 #include "adc_lightsensor.inc" |
25 | 25 |
26 CBLOCK tmp+0x40 ; Keep space for menu processor | |
27 gaslist_gas ; Check ram position in gaslist.asm, too! | |
28 ENDC | |
29 | |
26 gui CODE | 30 gui CODE |
27 ;============================================================================= | 31 ;============================================================================= |
28 ; Main Menu | 32 ; Main Menu |
29 global do_main_menu,do_main_menu2 | 33 global do_main_menu,do_main_menu2 |
30 do_main_menu: | 34 do_main_menu: |
65 call menu_processor_pop ; back to last gas. | 69 call menu_processor_pop ; back to last gas. |
66 | 70 |
67 do_ccr_menu: | 71 do_ccr_menu: |
68 bcf menu_show_sensors ; Clear flag | 72 bcf menu_show_sensors ; Clear flag |
69 bcf menu_show_sensors2 ; Clear flag | 73 bcf menu_show_sensors2 ; Clear flag |
74 btfsc c3_hardware | |
75 bra do_ccr_menu_c3 | |
76 MENU_BEGIN tCCRSetup, .5 | |
77 MENU_OPTION tCCRMode, oCCRMode, 0 | |
78 MENU_CALL tCCRSensor, do_ccr_sensor | |
79 MENU_CALL tDiluentSetup, do_diluent_setup | |
80 MENU_CALL tFixedSetpoints, do_fixed_setpoints | |
81 MENU_CALL tExit, do_continue_main_menu | |
82 MENU_END | |
83 | |
84 do_ccr_menu_c3: ; including "Calibrate" | |
70 MENU_BEGIN tCCRSetup, .6 | 85 MENU_BEGIN tCCRSetup, .6 |
71 MENU_OPTION tCCRMode, oCCRMode, 0 | 86 MENU_OPTION tCCRMode, oCCRMode, 0 |
72 MENU_CALL tCCRSensor, do_ccr_sensor | 87 MENU_CALL tCCRSensor, do_ccr_sensor |
73 MENU_CALL tCalibrateMenu, do_calibrate_menu | 88 MENU_CALL tCalibrateMenu, do_calibrate_menu |
74 MENU_CALL tDiluentSetup, do_diluent_setup | 89 MENU_CALL tDiluentSetup, do_diluent_setup |
75 MENU_CALL tFixedSetpoints, do_fixed_setpoints | 90 MENU_CALL tFixedSetpoints, do_fixed_setpoints |
76 MENU_CALL tExit, do_continue_main_menu | 91 MENU_CALL tExit, do_continue_main_menu |
77 MENU_END | 92 MENU_END |
78 | 93 |
79 do_calibrate_menu: | 94 do_calibrate_menu: |
80 btfss c3_hardware | |
81 bra return_ccr_menu ; Not for normal OSTC3 hardware | |
82 call enable_ir ; Enable IR-Port | 95 call enable_ir ; Enable IR-Port |
83 bsf menu_show_sensors2 ; Set flag | 96 bsf menu_show_sensors2 ; Set flag |
84 do_calibrate_menu2: | 97 do_calibrate_menu2: |
85 MENU_BEGIN tCalibrateMenu, .6 | 98 MENU_BEGIN tCalibrateMenu, .6 |
86 MENU_CALL tDiveHudMask1, 0 | 99 MENU_CALL tDiveHudMask1, 0 |
195 MENU_CALL tExit, return_gas_depth | 208 MENU_CALL tExit, return_gas_depth |
196 MENU_END | 209 MENU_END |
197 | 210 |
198 global do_gas_depth_menu | 211 global do_gas_depth_menu |
199 do_gas_depth_menu: | 212 do_gas_depth_menu: |
213 movff gaslist_gas,WREG | |
214 lfsr FSR1,opt_gas_type ; Read opt_gas_type[WREG] | |
215 movff PLUSW1,lo ; Used as temp | |
216 movlw .3 ; 3=Deco | |
217 btfsc ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") | |
218 movlw .2 ; 2=Normal | |
219 cpfseq lo | |
220 bra return_gas_depth ; Non-Deco gas or "Normal" Diluent, Return! | |
221 | |
200 MENU_BEGIN tGasEdit, .7 | 222 MENU_BEGIN tGasEdit, .7 |
201 MENU_DYNAMIC gaslist_gastitle, 0 | 223 MENU_DYNAMIC gaslist_gastitle, 0 |
202 MENU_DYNAMIC gaslist_MOD_END, 0 | 224 MENU_DYNAMIC gaslist_MOD_END, 0 |
203 MENU_DYNAMIC gaslist_ppo2, 0 ; ppO2 at change depth | 225 MENU_DYNAMIC gaslist_ppo2, 0 ; ppO2 at change depth |
204 MENU_CALL tDepthPlus, gaslist_pDepth | 226 MENU_CALL tDepthPlus, gaslist_pDepth |