annotate src/menu_tree.asm @ 611:cd7991986ace

undo BOR bit
author heinrichsweikamp
date Wed, 09 Jan 2019 21:28:53 +0100
parents 6341f6663579
children a32212cd5ea9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
3 ; File menu_tree.asm REFACTORED VERSION V2.99e
0
heinrichsweikamp
parents:
diff changeset
4 ;
275
653a3ab08062 rename into hwOS
heinrichsweikamp
parents: 269
diff changeset
5 ; OSTC menus
0
heinrichsweikamp
parents:
diff changeset
6 ;
heinrichsweikamp
parents:
diff changeset
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
heinrichsweikamp
parents:
diff changeset
8 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
9 ; HISTORY
heinrichsweikamp
parents:
diff changeset
10 ; 2011-07-11 : [jDG] Creation.
heinrichsweikamp
parents:
diff changeset
11
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
12 #include "hwos.inc" ; mandatory header
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
13 #include "gaslist.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
14 #include "menu_processor.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
15 #include "start.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
16 #include "comm.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
17 #include "logbook.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
18 #include "tft.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
19 #include "eeprom_rs232.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
20 #include "external_flash.inc"
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
21 #include "shared_definitions.h" ; mailbox from/to p2_deco.c
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
22 #include "isr.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
23 #include "ghostwriter.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
24 #include "adc_lightsensor.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
25 #include "wait.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
26 #include "i2c.inc"
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
27
0
heinrichsweikamp
parents:
diff changeset
28
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
29 extern do_demo_divemode
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
30 extern restart
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
31 extern option_save_all
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
32 extern option_reset
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
33 extern do_demo_planner
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
34 extern calibrate_mix
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
35 extern comm_mode0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
36 extern piezo_config
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
37 extern compass_calibration_loop
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
38 extern option_reset_all
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
39 extern rtc_set_rtc
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
40 extern surfloop
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
41 extern oColorSetDive
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
42 extern option_cleanup_oCCRMode
174
932e91074bdb CHANGE: Clarify Travel Gases with "---" as change depth
heinrichsweikamp
parents: 155
diff changeset
43
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
44
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
45 menu_tree CODE
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
46
0
heinrichsweikamp
parents:
diff changeset
47 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
48 ; Main Menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
49
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
50 do_return_main_menu:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
51 call menu_processor_double_pop ; drop exit line and back to last line
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
52 bra do_main_menu_common
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
53
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
54 global do_main_menu
0
heinrichsweikamp
parents:
diff changeset
55 do_main_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
56 movff menupos3,customview_surfmode ; save last customview
0
heinrichsweikamp
parents:
diff changeset
57
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
58 global do_main_menu2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
59 do_main_menu2: ; entry point used by logbook.asm
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
60 call TFT_boot
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
61 bcf sleepmode ; for timeout
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
62 call menu_processor_reset ; restart from first icon
0
heinrichsweikamp
parents:
diff changeset
63
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
64 do_main_menu_common:
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
65 MENU_BEGIN tMainMenu, .7
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
66 MENU_CALL tLogbook, logbook
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
67 MENU_CALL tGasSetup, do_gas_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
68 MENU_CALL tCCRSetup, do_ccr_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
69 MENU_CALL tPlan, do_planner_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
70 MENU_CALL tDiveModeMenu, do_divemode_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
71 MENU_CALL tSystSets, do_settings_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
72 MENU_CALL tExit, restart
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
73 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
74
0
heinrichsweikamp
parents:
diff changeset
75
heinrichsweikamp
parents:
diff changeset
76 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
77 ; CCR Setup
heinrichsweikamp
parents:
diff changeset
78
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
79 do_return_ccr_menu:
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
80 call menu_processor_double_pop ; drop exit line and back to last line
0
heinrichsweikamp
parents:
diff changeset
81
heinrichsweikamp
parents:
diff changeset
82 do_ccr_menu:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
83 bcf menu_update_sensor_mv ; stop imprinting of live sensor values
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
84 call option_cleanup_oCCRMode ; in pSCR mode, revert AutoSP (2) to calculated SP (0)
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
85
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
86 btfsc analog_o2_input
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
87 bra do_ccr_menu_cR
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
88
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
89 ; COMMENTED OUT - currently there is no difference between the OSTC 2 and 3 regarding this menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
90 ; btfss optical_input
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
91 ; bra do_ccr_menu_ostc2
240
633c7a6de5bc auto-select correct ccr menu
heinrichsweikamp
parents: 236
diff changeset
92
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
93 MENU_BEGIN tCCRSetup, .6 ; OSTC3 menu (and currently also the OSTC2 menu)
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
94 MENU_OPTION tCCRMode, oCCRMode, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
95 MENU_CALL tDiluentSetup, do_diluent_setup
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
96 MENU_CALL tFixedSetpoints, do_fixed_setpoints
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
97 MENU_CALL tPSCRMenu, do_PSCR_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
98 MENU_OPTION tCCmaxFracO2, oCCmaxFracO2, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
99 MENU_CALL tBack, do_return_main_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
100 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
101
174
932e91074bdb CHANGE: Clarify Travel Gases with "---" as change depth
heinrichsweikamp
parents: 155
diff changeset
102
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
103 do_ccr_menu_cR: ; cR menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
104 MENU_BEGIN tCCRSetup, .7
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
105 MENU_OPTION tCCRMode, oCCRMode, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
106 MENU_CALL tCalibrateMenu, do_calibrate_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
107 MENU_CALL tDiluentSetup, do_diluent_setup
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
108 MENU_CALL tFixedSetpoints, do_fixed_setpoints
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
109 MENU_CALL tPSCRMenu, do_PSCR_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
110 MENU_OPTION tCCmaxFracO2, oCCmaxFracO2, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
111 MENU_CALL tBack, do_return_main_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
112 MENU_END
0
heinrichsweikamp
parents:
diff changeset
113
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
114 ; COMMENTED OUT - currently there is no difference between the OSTC 2 and 3 regarding this menu
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
115 ;do_ccr_menu_ostc2:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
116 ; MENU_BEGIN tCCRSetup, .6 ; ostc2 menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
117 ; MENU_OPTION tCCRMode, oCCRMode, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
118 ; MENU_CALL tDiluentSetup, do_diluent_setup
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
119 ; MENU_CALL tFixedSetpoints, do_fixed_setpoints
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
120 ; MENU_CALL tPSCRMenu, do_PSCR_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
121 ; MENU_OPTION tCCmaxFracO2, oCCmaxFracO2, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
122 ; MENU_CALL tBack, do_return_main_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
123 ; MENU_END
240
633c7a6de5bc auto-select correct ccr menu
heinrichsweikamp
parents: 236
diff changeset
124
633c7a6de5bc auto-select correct ccr menu
heinrichsweikamp
parents: 236
diff changeset
125
113
heinrichsweikamp
parents: 104
diff changeset
126 do_calibrate_menu:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
127 call enable_ir_s8 ; enable IR/S8-Port
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
128 bsf menu_update_sensor_mv ; start imprinting of live sensor values
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
129
113
heinrichsweikamp
parents: 104
diff changeset
130 do_calibrate_menu2:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
131 MENU_BEGIN tCalibrateMenu, .6
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
132 MENU_CALL tDiveHudMask1, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
133 MENU_CALL tDiveHudMask2, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
134 MENU_CALL tDiveHudMask3, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
135 MENU_OPTION tCalibrationGas,oCalGasO2, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
136 MENU_CALL tCalibrate, do_calibrate_mix
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
137 MENU_CALL tBack, do_return_ccr_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
138 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
139
113
heinrichsweikamp
parents: 104
diff changeset
140
heinrichsweikamp
parents: 104
diff changeset
141 do_calibrate_mix:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
142 call calibrate_mix ; calibrate with opt_calibration_O2_ratio, also calibrate S8 HUD if connected
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
143 WAITMS d'250' ; wait for HUD v3
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
144 movlw .9
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
145 movff WREG,customview_surfmode ; show sensor mV custom view after restart
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
146 goto restart ; restart into surface mode
113
heinrichsweikamp
parents: 104
diff changeset
147
0
heinrichsweikamp
parents:
diff changeset
148
heinrichsweikamp
parents:
diff changeset
149 do_diluent_setup:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
150 bsf FLAG_diluent_setup ; setting up diluents
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
151 bcf short_gas_decriptions ; do not use short versions of gaslist_strcat_gas_cd and gaslist_strcat_setpoint
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
152 bcf better_gas_hint ; do not mark the best gas/diluent (to be used in dive mode only)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
153 call gaslist_cleanup_list ; take care that only one gas can be first
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
154
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
155 MENU_BEGIN tDiluentSetup, .6
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
156 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
157 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
158 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
159 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
160 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
161 MENU_CALL tBack, do_return_ccr_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
162 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
163
0
heinrichsweikamp
parents:
diff changeset
164
heinrichsweikamp
parents:
diff changeset
165 do_return_fixed_setpoints:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
166 call menu_processor_double_pop ; drop exit line and back to last line
0
heinrichsweikamp
parents:
diff changeset
167
heinrichsweikamp
parents:
diff changeset
168 do_fixed_setpoints:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
169 bcf short_gas_decriptions ; =1: use short versions of gaslist_strcat_gas_cd and gaslist_strcat_setpoint
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
170 bcf better_gas_hint ; do not mark the best gas/diluent (to be used in dive mode only)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
171
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
172 MENU_BEGIN tFixedSetpoints, .6
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
173 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
174 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
175 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
176 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
177 MENU_DYNAMIC gaslist_strcat_setpoint, do_edit_sp_menu
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
178 MENU_CALL tBack, do_return_ccr_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
179 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
180
0
heinrichsweikamp
parents:
diff changeset
181
heinrichsweikamp
parents:
diff changeset
182 do_edit_sp_menu:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
183 movff PRODL,gaslist_gas ; get menu item we came from (0-4)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
184
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
185 MENU_BEGIN tFixedSetpoints, .5
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
186 MENU_DYNAMIC gaslist_strcat_setpoint_0, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
187 MENU_CALL tSPPlus, gaslist_spplus
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
188 MENU_CALL tDepthPlus, gaslist_spdepthplus
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
189 MENU_CALL tDepthMinus, gaslist_spdepthminus
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
190 MENU_CALL tBack, do_return_fixed_setpoints
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
191 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
192
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
193
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
194 do_PSCR_menu:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
195 MENU_BEGIN tPSCRMenu, .3 ; pSCR Menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
196 MENU_OPTION tPSCR_O2_drop, oPSCR_drop, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
197 MENU_OPTION tPSCR_lungratio, oPSCR_lungratio, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
198 MENU_CALL tBack, do_return_ccr_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
199 MENU_END
0
heinrichsweikamp
parents:
diff changeset
200
heinrichsweikamp
parents:
diff changeset
201 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
202 ; OC Gas Setup
heinrichsweikamp
parents:
diff changeset
203
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
204 do_return_gas_menu:
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
205 call menu_processor_double_pop ; drop exit line and back to last line
0
heinrichsweikamp
parents:
diff changeset
206
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
207 btfsc FLAG_diluent_setup ; return to CCR-Menu?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
208 bra do_diluent_setup ; YES
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
209
0
heinrichsweikamp
parents:
diff changeset
210 do_gas_menu:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
211 bcf FLAG_diluent_setup ; not setting up diluents
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
212 bcf short_gas_decriptions ; do not use short versions of gaslist_strcat_gas_cd and gaslist_strcat_setpoint
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
213 bcf better_gas_hint ; do not mark the best gas/diluent (to be used in dive mode only)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
214 call gaslist_cleanup_list ; takes care that only one gas can be first
0
heinrichsweikamp
parents:
diff changeset
215
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
216 MENU_BEGIN tGaslist, .6
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
217 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
218 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
219 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
220 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
221 MENU_DYNAMIC gaslist_strcat_gas_cd, do_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
222 MENU_CALL tBack, do_return_main_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
223 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
224
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
225
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
226 do_return_edit_gas_menu:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
227 IFDEF _rx_functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
228 bcf menu_update_tank_pres ; stop imprinting of tank pressure updates
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
229 bcf FLAG_pairing_mode ; not in pairing menu any more (back to normal timeout)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
230 ENDIF
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
231 call menu_processor_pop ; drop exit line and ...
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
232 do_abort_gas_depth_menu:
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
233 call menu_processor_pop ; back to last line
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
234 bra do_edit_gas_menu_common
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
235 do_edit_gas_menu:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
236 movff PRODL,gaslist_gas ; get menu item we came from (0-4)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
237 movlw .5 ; offset between gases and diluents
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
238 btfsc FLAG_diluent_setup ; in CCR menu?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
239 addwf gaslist_gas,F ; YES - add the offset
0
heinrichsweikamp
parents:
diff changeset
240
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
241 do_edit_gas_menu_common:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
242 MENU_BEGIN tGasEdit, .7
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
243 MENU_DYNAMIC gaslist_gastitle, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
244 MENU_DYNAMIC gaslist_MOD_END, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
245 MENU_DYNAMIC gaslist_show_type, gaslist_toggle_type
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
246 MENU_CALL tSetup_GasMix, do_setup_mix_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
247 MENU_DYNAMIC gaslist_GasDepth, do_setup_depth_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
248 MENU_CALL tSetup_Tank, do_setup_tank_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
249 MENU_CALL tBack, do_return_gas_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
250 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
251
0
heinrichsweikamp
parents:
diff changeset
252
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
253 do_setup_mix_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
254 MENU_BEGIN tGasEdit, .7
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
255 MENU_DYNAMIC gaslist_gastitle, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
256 MENU_DYNAMIC gaslist_MOD_END, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
257 MENU_CALL tO2Plus, gaslist_pO2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
258 MENU_CALL tO2Minus, gaslist_mO2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
259 MENU_CALL tHePlus, gaslist_pHe
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
260 MENU_CALL tHeMinus, gaslist_mHe
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
261 MENU_CALL tBack, do_return_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
262 MENU_END
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
263
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
264
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
265 do_setup_tank_menu:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
266 IFDEF _rx_functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
267 btfsc FLAG_tr_enabled ; TR functions enabled?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
268 bra do_setup_tank_menu_rx ; YES
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
269 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
270
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
271 MENU_BEGIN tSetup_Tank, .6
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
272 MENU_DYNAMIC gaslist_gastitle, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
273 MENU_DYNAMIC gaslist_tank_size_pres, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
274 MENU_CALL tTankSize, gaslist_tank_size
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
275 MENU_CALL tTankUsablePress, gaslist_tank_pres
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
276 MENU_CALL tCopyDilToOC, gaslist_copy_dil_to_oc
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
277 MENU_CALL tBack, do_return_edit_gas_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
278 MENU_END
428
eccae727702f some cleanup
heinrichsweikamp
parents: 396
diff changeset
279
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
280
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
281 IFDEF _rx_functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
282
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
283 do_setup_tank_menu_rx:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
284 setf pairing_slot ; prime slot number with 255 aka -1, used in pairing function
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
285 bsf FLAG_pairing_mode ; in pairing menu (longer timeout)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
286
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
287 MENU_BEGIN tSetup_Tank, .7
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
288 MENU_DYNAMIC gaslist_gastitle, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
289 MENU_DYNAMIC gaslist_tank_id_pres, 0 ; when changing position, adopt TFT_menu_tank_pres!
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
290 MENU_DYNAMIC gaslist_tank_size_pres, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
291 MENU_CALL tTankPairing, gaslist_tank_pairing
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
292 MENU_CALL tTankSize, gaslist_tank_size
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
293 MENU_CALL tTankUsablePress, gaslist_tank_pres
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
294 MENU_CALL tBack, do_return_edit_gas_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
295 MENU_END
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
296
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
297 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
298
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
299
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
300 do_setup_depth_menu:
174
932e91074bdb CHANGE: Clarify Travel Gases with "---" as change depth
heinrichsweikamp
parents: 155
diff changeset
301
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
302 MENU_BEGIN tGasEdit, .7
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
303 MENU_DYNAMIC gaslist_gastitle, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
304 MENU_DYNAMIC gaslist_MOD_END, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
305 MENU_DYNAMIC gaslist_ppo2, 0 ; ppO2 at change depth
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
306 MENU_CALL tDepthPlus, gaslist_pDepth
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
307 MENU_CALL tDepthMinus, gaslist_mDepth
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
308 MENU_DYNAMIC gaslist_reset_mod_title, gaslist_reset_mod
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
309 MENU_CALL tBack, do_return_edit_gas_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
310 MENU_END
0
heinrichsweikamp
parents:
diff changeset
311
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
312
0
heinrichsweikamp
parents:
diff changeset
313 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
314 ; Simulator Menus
0
heinrichsweikamp
parents:
diff changeset
315
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
316 do_return_planner_menu:
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
317 call menu_processor_pop ; drop exit line and ...
0
heinrichsweikamp
parents:
diff changeset
318
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
319 global do_return_demo_planner
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
320 do_return_demo_planner:
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
321 call menu_processor_pop ; back to last line
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
322 bra do_planner_common
0
heinrichsweikamp
parents:
diff changeset
323
heinrichsweikamp
parents:
diff changeset
324 do_planner_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
325 ; to have correct simulator results after mode changes without prior excursion to surfacemode
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
326 call option_save_all
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
327 call restart_set_modes_and_flags
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
328 ; reset dive time/depth to default values
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
329 lfsr FSR0,odiveInterval
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
330 call option_reset
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
331 lfsr FSR0,obottomTime
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
332 call option_reset
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
333 lfsr FSR0,obottomDepth
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
334 call option_reset
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
335 lfsr FSR0,oSimAGF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
336 call option_reset
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
337
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
338 do_planner_common:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
339 movff opt_dive_mode,WREG ; get dive mode: 0=OC, 1=CCR, 2=Gauge, 3=Apnea, 4=pSCR
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
340 dcfsnz WREG,W ; subtract one, became zero?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
341 bra do_planner_common_ccr ; YES - use CCR version
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
342
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
343 MENU_BEGIN tPlan, .7
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
344 MENU_OPTION tIntvl, odiveInterval, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
345 MENU_OPTION tBtDep, obottomDepth, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
346 MENU_CALL tInter, do_demo_divemode
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
347 MENU_OPTION tBtTm, obottomTime, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
348 MENU_OPTION tuseAGF, oSimAGF, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
349 MENU_CALL tDeco, do_demo_planner
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
350 MENU_CALL tBack, do_return_main_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
351 MENU_END
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
352
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
353 do_planner_common_ccr:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
354 MENU_BEGIN tPlan, .7
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
355 MENU_OPTION tIntvl, odiveInterval, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
356 MENU_OPTION tBtDep, obottomDepth, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
357 MENU_CALL tInter, do_demo_divemode
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
358 MENU_OPTION tBtTm, obottomTime, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
359 MENU_CALL tDecoSetup, do_planner_config
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
360 MENU_CALL tDeco, do_demo_planner
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
361 MENU_CALL tBack, do_return_main_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
362 MENU_END
0
heinrichsweikamp
parents:
diff changeset
363
298
2fe34fc0e2ae new submenu for gas consumption, show actual mix instead of GAS1-GAS5 in deco planner
heinrichsweikamp
parents: 275
diff changeset
364 do_planner_config:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
365 MENU_BEGIN tPlan, .3
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
366 MENU_OPTION tSelectSetpoint, oSimSetpoint, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
367 MENU_OPTION tuseAGF, oSimAGF, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
368 MENU_CALL tBack, do_return_planner_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
369 MENU_END
524
d2e52e6e1604 menu work
heinrichsweikamp
parents: 523
diff changeset
370
298
2fe34fc0e2ae new submenu for gas consumption, show actual mix instead of GAS1-GAS5 in deco planner
heinrichsweikamp
parents: 275
diff changeset
371
0
heinrichsweikamp
parents:
diff changeset
372 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
373 ; Divemode Menu
0
heinrichsweikamp
parents:
diff changeset
374
heinrichsweikamp
parents:
diff changeset
375 do_return_divemode_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
376 call menu_processor_double_pop ; drop exit line and back to last line
0
heinrichsweikamp
parents:
diff changeset
377
heinrichsweikamp
parents:
diff changeset
378 do_divemode_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
379 MENU_BEGIN tDiveModeMenu, .7
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
380 MENU_OPTION tDvMode, oDiveMode, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
381 MENU_OPTION tDkMode, oDecoMode, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
382 MENU_CALL tppO2settings, do_ppo2_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
383 MENU_OPTION tsafetystopmenu, oSafetyStop, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
384 MENU_CALL tDecoparameters, do_decoparameters_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
385 MENU_CALL t2ndDecoPlanMenu, do_2nd_deco_plan_menu
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
386 MENU_CALL tBack, do_return_main_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
387 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
388
0
heinrichsweikamp
parents:
diff changeset
389
104
223579e905c3 Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents: 90
diff changeset
390 do_ppo2_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
391 MENU_BEGIN tppO2settings, .6
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
392 MENU_DYNAMIC divesets_ppo2_max, do_toggle_ppo2_max
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
393 MENU_DYNAMIC divesets_ppo2_max_deco, do_toggle_ppo2_max_deco
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
394 MENU_DYNAMIC divesets_ppo2_min, do_toggle_ppo2_min
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
395 MENU_DYNAMIC divesets_ppo2_min_cc, do_toggle_ppo2_min_cc
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
396 MENU_OPTION tShowppO2, oShowppO2, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
397 MENU_CALL tBack, do_return_divemode_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
398 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
399
104
223579e905c3 Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents: 90
diff changeset
400
0
heinrichsweikamp
parents:
diff changeset
401 do_return_decoparameters_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
402 call menu_processor_double_pop ; drop exit line and back to last line
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
403
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
404 do_decoparameters_menu:
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
405 movff char_I_deco_model,lo ; 0 = ZH-L16, 1 = ZH-L16-GF
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
406 tstfsz lo
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
407 bra do_decoparameters_menu_gf ; <> 0 -> GF menu!
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
408 ; NON-GF menu
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
409 MENU_BEGIN tDecoparameters, .6
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
410 MENU_OPTION tSetBotUse, obottom_usage, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
411 MENU_OPTION tSetDecoUse, odeco_usage, 0
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
412 MENU_OPTION tSaturationMult, osatmult, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
413 MENU_OPTION tDesaturationMult, odesatmult, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
414 MENU_CALL tMore, do_decoparameters_menu_more
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
415 MENU_CALL tBack, do_return_divemode_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
416 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
417
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
418 do_decoparameters_menu_gf:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
419 ; GF menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
420 MENU_BEGIN tDecoparameters, .7
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
421 MENU_OPTION tSetBotUse, obottom_usage, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
422 MENU_OPTION tSetDecoUse, odeco_usage, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
423 MENU_CALL tGFMenu, do_GF_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
424 MENU_OPTION tSaturationMult, osatmultgf, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
425 MENU_OPTION tDesaturationMult, odesatmultgf, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
426 MENU_CALL tMore, do_decoparameters_menu_more
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
427 MENU_CALL tBack, do_return_divemode_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
428 MENU_END
0
heinrichsweikamp
parents:
diff changeset
429
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
430
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
431 do_decoparameters_menu_more:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
432 MENU_BEGIN tDecoparameters, .4
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
433 MENU_OPTION tLastDecostop, oLastDeco, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
434 MENU_OPTION tAscentSpeed, oAscentSpeed, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
435 MENU_OPTION tGasChangeTime, oGasChangeTime, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
436 MENU_CALL tBack, do_return_decoparameters_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
437 MENU_END
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
438
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
439
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
440 do_2nd_deco_plan_menu:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
441 MENU_BEGIN t2ndDecoPlanMenu, .3
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
442 MENU_OPTION tFTTSMenu, oExtraTime, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
443 MENU_OPTION tCalcAscGas, oCalcAscGas, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
444 MENU_CALL tBack, do_return_divemode_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
445 MENU_END
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
446
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
447
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
448 do_GF_menu:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
449 MENU_BEGIN tGFMenu, .6
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
450 MENU_OPTION tGF_low, oGF_low, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
451 MENU_OPTION tGF_high, oGF_high, 0
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
452 MENU_OPTION taGF_enable, oEnable_aGF, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
453 MENU_OPTION taGF_low, oaGF_low, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
454 MENU_OPTION taGF_high, oaGF_high, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
455 MENU_CALL tBack, do_return_decoparameters_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
456 MENU_END
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
457
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
458
0
heinrichsweikamp
parents:
diff changeset
459 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
460 ; Setup Menu
heinrichsweikamp
parents:
diff changeset
461
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
462 do_return_settings_deeper: ; entry point for return from set time/date sub-menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
463 bcf settime_setdate ; clear flag
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
464 call menu_processor_pop ; drop one more stack entry
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
465
0
heinrichsweikamp
parents:
diff changeset
466 do_return_settings:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
467 call menu_processor_double_pop ; drop exit line and back to last line
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
468 IFDEF _rx_mode
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
469 bcf FLAG_tr_enabled ; clear TR functions flag by default
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
470 movff opt_TR_mode,WREG ; get TR functions mode
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
471 tstfsz WREG ; TR functions enabled?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
472 bsf FLAG_tr_enabled ; YES
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
473 ENDIF
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
474
0
heinrichsweikamp
parents:
diff changeset
475 do_settings_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
476 btfsc ble_available ; ble available?
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
477 bra do_settings_menu_ble ; YES
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
478
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
479 MENU_BEGIN tSystSets, .5
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
480 MENU_CALL tInfoMenu, do_info_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
481 MENU_CALL tSetTimeDate, do_date_time_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
482 MENU_CALL tDispSets, do_dispsets_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
483 MENU_CALL tMore, do_settings_menu_more
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
484 MENU_CALL tBack, do_return_main_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
485 MENU_END
155
5f71e31bd5b3 CHANGE: Re-arranged Settings Menu, add 180? rotate to menu
heinrichsweikamp
parents: 154
diff changeset
486
345
3f2d0c0bc101 re-arrange settings menu
heinrichsweikamp
parents: 337
diff changeset
487 do_settings_menu_ble:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
488 IFDEF _rx_functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
489 btfsc ostc_rx_present ; RX model?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
490 bra do_settings_menu_rx ; YES
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
491 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
492
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
493 MENU_BEGIN tSystSets, .6
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
494 MENU_CALL tInfoMenu, do_info_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
495 MENU_CALL tBleTitle, comm_mode0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
496 MENU_CALL tSetTimeDate, do_date_time_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
497 MENU_CALL tDispSets, do_dispsets_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
498 MENU_CALL tMore, do_settings_menu_more
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
499 MENU_CALL tBack, do_return_main_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
500 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
501
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
502 IFDEF _rx_functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
503 do_settings_menu_rx:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
504 MENU_BEGIN tSystSets, .7
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
505 MENU_CALL tInfoMenu, do_info_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
506 MENU_CALL tBleTitle, comm_mode0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
507 MENU_CALL tTrSettings, do_settings_menu_TR
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
508 MENU_CALL tSetTimeDate, do_date_time_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
509 MENU_CALL tDispSets, do_dispsets_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
510 MENU_CALL tMore, do_settings_menu_more
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
511 MENU_CALL tBack, do_return_main_menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
512 MENU_END
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
513 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
514
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
515
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
516 do_info_menu:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
517 IFDEF _rx_functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
518 btfsc ostc_rx_present ; TR model?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
519 bra do_info_menu_TR ; YES
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
520 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
521
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
522 MENU_BEGIN tInfoMenu, .6
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
523 MENU_DYNAMIC info_menu_serial, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
524 MENU_DYNAMIC info_menu_firmware, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
525 MENU_DYNAMIC info_menu_battery_volts, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
526 MENU_DYNAMIC info_menu_uptime, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
527 MENU_DYNAMIC info_menu_total_dives, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
528 MENU_CALL tBack, do_return_settings
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
529 MENU_END
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
530
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
531 IFDEF _rx_functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
532 do_info_menu_TR:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
533 MENU_BEGIN tInfoMenu, .7
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
534 MENU_DYNAMIC info_menu_serial, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
535 MENU_DYNAMIC info_menu_firmware, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
536 MENU_DYNAMIC info_menu_firmware_rx, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
537 MENU_DYNAMIC info_menu_total_dives, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
538 MENU_DYNAMIC info_menu_battery_volts, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
539 MENU_DYNAMIC info_menu_uptime, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
540 MENU_CALL tBack, do_return_settings
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
541 MENU_END
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
542 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
543
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
544
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
545 IFDEF _rx_functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
546 do_settings_menu_TR:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
547 movff opt_dive_mode,WREG ; get dive mode: 0=OC, 1=CCR, 2=Gauge, 3=Apnea, 4=pSCR
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
548 incf WREG,W ; add 1
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
549 dcfsnz WREG,W ; subtract one, became zero?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
550 bra do_settings_menu_TR_MaxDelta; YES - OC
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
551 dcfsnz WREG,W ; subtract one, became zero?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
552 bra do_settings_menu_TR_BailPres; YES - CCR
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
553 dcfsnz WREG,W ; subtract one, became zero?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
554 bra do_settings_menu_TR_MaxDelta; YES - Gauge
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
555 dcfsnz WREG,W ; subtract one, became zero?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
556 bra do_settings_menu_TR_abort ; YES - Apnea, abort
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
557 dcfsnz WREG,W ; subtract one, became zero?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
558 bra do_settings_menu_TR_both ; YES - pSCR
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
559 do_settings_menu_TR_abort:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
560 call menu_processor_pop ; drop last menu selection
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
561 bra do_settings_menu ; back to last menu
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
562
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
563 do_settings_menu_TR_MaxDelta: ; menu with oTrMaxDeltaPres
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
564 MENU_BEGIN tTrSettings, .5
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
565 MENU_OPTION tTrMode, oTrMode, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
566 MENU_OPTION tTr1stPres, oTr1stPres, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
567 MENU_OPTION tTr2ndPres, oTr2ndPres, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
568 MENU_DYNAMIC do_toggle_max_pres_diff_label,do_toggle_max_pres_diff
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
569 MENU_CALL tBack, do_return_settings
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
570 MENU_END
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
571
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
572 do_settings_menu_TR_BailPres: ; menu with oTrBailPres
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
573 MENU_BEGIN tTrSettings, .5
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
574 MENU_OPTION tTrMode, oTrMode, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
575 MENU_OPTION tTr1stPres, oTr1stPres, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
576 MENU_OPTION tTr2ndPres, oTr2ndPres, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
577 MENU_OPTION tTrBailPres, oTrBailPres, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
578 MENU_CALL tBack, do_return_settings
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
579 MENU_END
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
580
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
581 do_settings_menu_TR_both: ; menu with oTrBailPres and oTrMaxDeltaPres
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
582 MENU_BEGIN tTrSettings, .6
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
583 MENU_OPTION tTrMode, oTrMode, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
584 MENU_OPTION tTr1stPres, oTr1stPres, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
585 MENU_OPTION tTr2ndPres, oTr2ndPres, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
586 MENU_OPTION tTrBailPres, oTrBailPres, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
587 MENU_DYNAMIC do_toggle_max_pres_diff_label,do_toggle_max_pres_diff
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
588 MENU_CALL tBack, do_return_settings
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
589 MENU_END
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
590
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
591
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
592 do_toggle_max_pres_diff: ; add 5 bar, with hard-coded max.
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
593 movff char_I_max_pres_diff,lo ; get current value
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
594 movlw .5 ; load increment
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
595 addwf lo,F ; add increment
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
596 movlw max_pres_diff_max ; load maximum value
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
597 cpfsgt lo ; above maximum value?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
598 bra do_toggle_max_pres_diff_1 ; NO - store new value
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
599 movlw max_pres_diff_min ; YES - load minimum value
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
600 movwf lo ; - into lo
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
601 do_toggle_max_pres_diff_1:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
602 movff lo,char_I_max_pres_diff ; write back new value
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
603 return ; done
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
604 ENDIF
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
605
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
606
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
607 do_return_settings_more_deeper: ; entry point for returns from reset sub-menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
608 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
609
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
610 do_return_settings_more:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
611 call menu_processor_double_pop ; drop exit line and back to last line
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
612
155
5f71e31bd5b3 CHANGE: Re-arranged Settings Menu, add 180? rotate to menu
heinrichsweikamp
parents: 154
diff changeset
613 do_settings_menu_more:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
614 btfsc battery_gauge_available ; piezo buttons available
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
615 bra do_settings_menu_more_piezo
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
616 btfsc ble_available ; ble available
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
617 bra do_settings_menu_more_ostc3p
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
618 ; All MENU_CALLs that are
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
619 MENU_BEGIN tSystSets, .6 ; in all of this 3 menus
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
620 MENU_CALL tCompassMenu, do_compass_menu ; need to stay together
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
621 MENU_CALL tLogOffset, do_log_offset_menu ; on this menu level in
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
622 MENU_OPTION tAltMode, oAltMode, 0 ; oder to not mess up the
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
623 MENU_OPTION tDvSalinity, oDiveSalinity, 0 ; menu stack on doing the
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
624 MENU_CALL tResetMenu, do_reset_menu ; do_return_settings !
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
625 MENU_CALL tBack, do_return_settings
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
626 MENU_END
220
effd7259f5a5 make button sensitivity configurable (cR hardware)
heinrichsweikamp
parents: 218
diff changeset
627
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
628
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
629 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
630 call TFT_ClearScreen
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
631 call piezo_config ; configure buttons
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
632 call menu_processor_double_pop ; drop exit line and back to last line
524
d2e52e6e1604 menu work
heinrichsweikamp
parents: 523
diff changeset
633
269
1207cf9a9408 adjust menu for different hardware versions
heinrichsweikamp
parents: 243
diff changeset
634 do_settings_menu_more_piezo:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
635 MENU_BEGIN tSystSets, .7
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
636 MENU_CALL tCompassMenu, do_compass_menu ; see above
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
637 MENU_CALL tLogOffset, do_log_offset_menu ;
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
638 MENU_OPTION tAltMode, oAltMode, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
639 MENU_OPTION tDvSalinity, oDiveSalinity, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
640 MENU_CALL tResetMenu, do_reset_menu ;
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
641 MENU_CALL tMore, do_settings_piezo_menu ;
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
642 MENU_CALL tBack, do_return_settings
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
643 MENU_END
0
heinrichsweikamp
parents:
diff changeset
644
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
645 do_settings_menu_more_ostc3p: ; menu with BLE feature
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
646 MENU_BEGIN tSystSets, .6
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
647 MENU_CALL tCompassMenu, do_compass_menu ; see above
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
648 MENU_CALL tLogOffset, do_log_offset_menu ;
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
649 MENU_OPTION tAltMode, oAltMode, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
650 MENU_OPTION tDvSalinity, oDiveSalinity, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
651 MENU_CALL tResetMenu, do_reset_menu ;
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
652 MENU_CALL tBack, do_return_settings
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
653 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
654
243
ee81f46714cb auto-select correct settings menu
heinrichsweikamp
parents: 240
diff changeset
655
345
3f2d0c0bc101 re-arrange settings menu
heinrichsweikamp
parents: 337
diff changeset
656 do_settings_piezo_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
657 ; Menu with features only available in piezo button hardware
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
658 MENU_BEGIN tSystSets, .3
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
659 MENU_OPTION tButtonleft, ocR_button_left, 0 ; left button sensitivity
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
660 MENU_OPTION tButtonright, ocR_button_right, 0 ; right button sensitivity
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
661 MENU_CALL tBack, do_return_settings_menu_more_pz
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
662 MENU_END
220
effd7259f5a5 make button sensitivity configurable (cR hardware)
heinrichsweikamp
parents: 218
diff changeset
663
effd7259f5a5 make button sensitivity configurable (cR hardware)
heinrichsweikamp
parents: 218
diff changeset
664
18
4e3f133dfbf4 add new opt_compass_gain option to work with more magnetic battery types
heinrichsweikamp
parents: 0
diff changeset
665 do_compass_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
666 MENU_BEGIN tSystSets, .5
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
667 MENU_CALL tCompassMenu, compass_calibration_loop ; exits to surfloop
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
668 ; MENU_OPTION tCompassGain, oCompassGain, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
669 MENU_DYNAMIC menu_cal_x, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
670 MENU_DYNAMIC menu_cal_y, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
671 MENU_DYNAMIC menu_cal_z, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
672 MENU_CALL tBack, do_return_settings_more
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
673 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
674
18
4e3f133dfbf4 add new opt_compass_gain option to work with more magnetic battery types
heinrichsweikamp
parents: 0
diff changeset
675
0
heinrichsweikamp
parents:
diff changeset
676 ;=============================================================================
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
677 ; Reset and confirmation menu
0
heinrichsweikamp
parents:
diff changeset
678
heinrichsweikamp
parents:
diff changeset
679 do_reset_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
680 MENU_BEGIN tResetMenu, .6
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
681 MENU_CALL tBack, do_return_settings_more
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
682 MENU_CALL tReboot, do_reset_menu2 ; confirm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
683 MENU_CALL tResetDeco, do_reset_menu3 ; confirm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
684 MENU_CALL tResetSettings, do_reset_menu4 ; confirm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
685 MENU_CALL tResetLogbook, do_reset_menu5 ; confirm
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
686 MENU_CALL tResetBattery, do_new_battery_menu ; confirm
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
687 MENU_END
0
heinrichsweikamp
parents:
diff changeset
688
heinrichsweikamp
parents:
diff changeset
689 do_reset_menu2:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
690 MENU_BEGIN tResetMenu2, .2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
691 MENU_CALL tAbort, do_return_settings_more_deeper
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
692 MENU_CALL tReboot, do_reboot ; reboot
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
693 MENU_END
0
heinrichsweikamp
parents:
diff changeset
694
heinrichsweikamp
parents:
diff changeset
695 do_reset_menu3:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
696 MENU_BEGIN tResetMenu2, .2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
697 MENU_CALL tAbort, do_return_settings_more_deeper
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
698 MENU_CALL tResetDeco, do_reset_deco ; reset deco
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
699 MENU_END
0
heinrichsweikamp
parents:
diff changeset
700
heinrichsweikamp
parents:
diff changeset
701 do_reset_menu4:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
702 MENU_BEGIN tResetMenu2, .2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
703 MENU_CALL tAbort, do_return_settings_more_deeper
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
704 MENU_CALL tResetSettings, do_reset_settings ; reset all settings
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
705 MENU_END
0
heinrichsweikamp
parents:
diff changeset
706
63
5c4d4a42e7a0 allow logbook erase from reset menu
heinrichsweikamp
parents: 50
diff changeset
707 do_reset_menu5:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
708 MENU_BEGIN tResetMenu2, .2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
709 MENU_CALL tAbort, do_return_settings_more_deeper
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
710 MENU_CALL tResetLogbook, do_reset_logbook ; reset logbook
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
711 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
712
63
5c4d4a42e7a0 allow logbook erase from reset menu
heinrichsweikamp
parents: 50
diff changeset
713
5c4d4a42e7a0 allow logbook erase from reset menu
heinrichsweikamp
parents: 50
diff changeset
714 do_reset_logbook:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
715 clrf EEADRH ; make sure to select EEPROM bank 0
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
716 clrf EEDATA
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
717 read_int_eeprom .2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
718 write_int_eeprom .16
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
719 read_int_eeprom .3
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
720 write_int_eeprom .17 ; copy number of dives
63
5c4d4a42e7a0 allow logbook erase from reset menu
heinrichsweikamp
parents: 50
diff changeset
721 clrf EEDATA
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
722 write_int_eeprom .2
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
723 write_int_eeprom .3 ; clear total dives
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
724 write_int_eeprom .4
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
725 write_int_eeprom .5
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
726 write_int_eeprom .6 ; reset logbook pointers
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
727 call ext_flash_erase_logbook ; and complete logbook
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
728 bra do_return_settings_more_deeper
63
5c4d4a42e7a0 allow logbook erase from reset menu
heinrichsweikamp
parents: 50
diff changeset
729
0
heinrichsweikamp
parents:
diff changeset
730
heinrichsweikamp
parents:
diff changeset
731 do_reset_deco:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
732 SAFE_2BYTE_COPY last_surfpressure_30min,int_I_pres_respiration ; copy surface pressure to deco routine
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
733 SAFE_2BYTE_COPY last_surfpressure_30min,int_I_pres_surface ; copy surface pressure to deco routine
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
734
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
735 call deco_clear_tissue ; set all tissues to Pamb * N2_ratio (C-Code)
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
736 call deco_calc_dive_interval_1min; calculate deco in surface mode
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
737 call deco_calc_desaturation_time ; calculate desaturation and no-fly time
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
738 banksel common
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
739 bra do_return_settings_more_deeper
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
740
0
heinrichsweikamp
parents:
diff changeset
741
heinrichsweikamp
parents:
diff changeset
742 do_reset_settings:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
743 call TFT_ClearScreen ; clear screen
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
744 call option_reset_all ; reset all options to factory default
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
745 goto restart ; restart into surfacemode
0
heinrichsweikamp
parents:
diff changeset
746
heinrichsweikamp
parents:
diff changeset
747 do_reboot:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
748 call ext_flash_enable_protection ; enables write protection
0
heinrichsweikamp
parents:
diff changeset
749 reset
heinrichsweikamp
parents:
diff changeset
750
heinrichsweikamp
parents:
diff changeset
751
heinrichsweikamp
parents:
diff changeset
752 do_date_time_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
753 MENU_BEGIN tSetTimeDate, .4
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
754 MENU_CALL tSetTime, do_time_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
755 MENU_CALL tSetDate, do_date_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
756 MENU_OPTION tDateFormat,oDateFormat, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
757 MENU_CALL tBack, do_return_settings
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
758 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
759
0
heinrichsweikamp
parents:
diff changeset
760
heinrichsweikamp
parents:
diff changeset
761 do_date_menu:
heinrichsweikamp
parents:
diff changeset
762 bsf settime_setdate
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
763
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
764 MENU_BEGIN tSetDate, .4
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
765 MENU_OPTION tSetDay, oSetDay, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
766 MENU_OPTION tSetMonth, oSetMonth, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
767 MENU_OPTION tSetYear, oSetYear, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
768 MENU_CALL tBack, do_return_settings_deeper
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
769 MENU_END
0
heinrichsweikamp
parents:
diff changeset
770
heinrichsweikamp
parents:
diff changeset
771
heinrichsweikamp
parents:
diff changeset
772 do_reset_seconds:
heinrichsweikamp
parents:
diff changeset
773 clrf secs
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
774 call rtc_set_rtc ; writes mins, sec, hours, day, month and year to RTC module
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
775 call menu_processor_pop ; clear the MENU_CALL for do_reset_seconds from the stack
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
776 ;bra do_time_menu ; direct jump-back into the menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
777
0
heinrichsweikamp
parents:
diff changeset
778 do_time_menu:
heinrichsweikamp
parents:
diff changeset
779 bsf settime_setdate
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
780
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
781 MENU_BEGIN tSetTime, .4
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
782 MENU_OPTION tSetHours, oSetHours, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
783 MENU_OPTION tSetMinutes, oSetMinutes, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
784 MENU_CALL tSetSeconds, do_reset_seconds
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
785 MENU_CALL tBack, do_return_settings_deeper
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
786 MENU_END
0
heinrichsweikamp
parents:
diff changeset
787
heinrichsweikamp
parents:
diff changeset
788
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
789 do_toggle_ppo2_max: ; add 0.1 bar, with hard-coded max.
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
790 movff char_I_ppO2_max,lo ; banksafe
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
791 movlw .10
0
heinrichsweikamp
parents:
diff changeset
792 addwf lo,F
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
793 movlw ppo2_warning_high_highest
0
heinrichsweikamp
parents:
diff changeset
794 cpfsgt lo
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
795 bra do_toggle_ppo2_max2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
796 movlw ppo2_warning_high_lowest
0
heinrichsweikamp
parents:
diff changeset
797 movwf lo
heinrichsweikamp
parents:
diff changeset
798 do_toggle_ppo2_max2:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
799 movff lo,char_I_ppO2_max
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
800 return
0
heinrichsweikamp
parents:
diff changeset
801
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
802 do_toggle_ppo2_max_deco: ; add 0.1 bar, with hard-coded max.
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
803 movff char_I_ppO2_max_deco,lo ; banksafe
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
804 movlw .10
507
4e6f5c36f4cc NEW: Two ppO2 max settings. One for travel/bottom and one for deco gases
heinrichsweikamp
parents: 505
diff changeset
805 addwf lo,F
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
806 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
807 cpfsgt lo
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
808 bra do_toggle_ppo2_max_deco2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
809 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
810 movwf lo
4e6f5c36f4cc NEW: Two ppO2 max settings. One for travel/bottom and one for deco gases
heinrichsweikamp
parents: 505
diff changeset
811 do_toggle_ppo2_max_deco2:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
812 movff lo,char_I_ppO2_max_deco
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
813 return
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
814
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
815 do_toggle_ppo2_min: ; sub 0.1 bar, with hard-coded min.
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
816 movff char_I_ppO2_min,lo ; banksafe
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
817 incf lo,F
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
818 movlw ppo2_warning_low_highest
0
heinrichsweikamp
parents:
diff changeset
819 cpfsgt lo
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
820 bra do_toggle_ppo2_min2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
821 movlw ppo2_warning_low_lowest
0
heinrichsweikamp
parents:
diff changeset
822 movwf lo
heinrichsweikamp
parents:
diff changeset
823 do_toggle_ppo2_min2:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
824 movff lo,char_I_ppO2_min
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
825 return
0
heinrichsweikamp
parents:
diff changeset
826
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
827 do_toggle_ppo2_min_cc: ; sub 0.1 bar, with hard-coded min.
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
828 movff char_I_ppO2_min_loop,lo ; banksafe
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
829 incf lo,F
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
830 movlw ppo2_warning_loop_highest
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
831 cpfsgt lo
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
832 bra do_toggle_ppo2_min_cc2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
833 movlw ppo2_warning_loop_lowest
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
834 movwf lo
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 545
diff changeset
835 do_toggle_ppo2_min_cc2:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
836 movff lo,char_I_ppO2_min_loop
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
837 return
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
838
0
heinrichsweikamp
parents:
diff changeset
839
heinrichsweikamp
parents:
diff changeset
840 ; Logbook offset sub-menu
heinrichsweikamp
parents:
diff changeset
841 do_log_offset_menu:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
842 MENU_BEGIN tLogOffset, .6
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
843 MENU_DYNAMIC TFT_LogOffset_Logtitle, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
844 MENU_CALL tLogOffsetp1, do_logoffset_plus1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
845 MENU_CALL tLogOffsetp10, do_logoffset_plus10
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
846 MENU_CALL tLogOffsetm1, do_logoffset_minus1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
847 MENU_CALL tLogOffsetm10, do_logoffset_minus10
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
848 MENU_CALL tBack, do_return_settings_more
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
849 MENU_END
0
heinrichsweikamp
parents:
diff changeset
850
heinrichsweikamp
parents:
diff changeset
851
heinrichsweikamp
parents:
diff changeset
852 do_logoffset_minus1:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
853 call do_logoffset_common_read ; read into lo:hi
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
854 movlw .1
0
heinrichsweikamp
parents:
diff changeset
855 subwf lo
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
856 movlw .0
0
heinrichsweikamp
parents:
diff changeset
857 subwfb hi
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
858 btfss hi,7 ; < 0 ?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
859 bra do_logoffset_exit ; store and return
0
heinrichsweikamp
parents:
diff changeset
860 clrf lo
heinrichsweikamp
parents:
diff changeset
861 clrf hi
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
862 bra do_logoffset_exit ; store and return
0
heinrichsweikamp
parents:
diff changeset
863
heinrichsweikamp
parents:
diff changeset
864 do_logoffset_minus10:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
865 call do_logoffset_common_read ; read into lo:hi
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
866 movlw .10
0
heinrichsweikamp
parents:
diff changeset
867 subwf lo
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
868 movlw .0
0
heinrichsweikamp
parents:
diff changeset
869 subwfb hi
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
870 btfss hi,7 ; < 0 ?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
871 bra do_logoffset_exit ; store and return
0
heinrichsweikamp
parents:
diff changeset
872 clrf lo
heinrichsweikamp
parents:
diff changeset
873 clrf hi
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
874 bra do_logoffset_exit ; store and return
0
heinrichsweikamp
parents:
diff changeset
875
heinrichsweikamp
parents:
diff changeset
876 do_logoffset_plus1:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
877 call do_logoffset_common_read ; read into lo:hi
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
878 infsnz lo,F
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
879 incf hi,F
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
880 bra do_logoffset_exit ; store and return
0
heinrichsweikamp
parents:
diff changeset
881
heinrichsweikamp
parents:
diff changeset
882 do_logoffset_plus10:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
883 call do_logoffset_common_read ; read into lo:hi
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
884 movlw .10
0
heinrichsweikamp
parents:
diff changeset
885 addwf lo
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
886 movlw .0
0
heinrichsweikamp
parents:
diff changeset
887 addwfc hi
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
888 do_logoffset_exit:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
889 goto do_logoffset_common_write ; store and return
0
heinrichsweikamp
parents:
diff changeset
890
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
891 do_return_dispsets_menu:
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
892 bcf in_color_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
893 call menu_processor_double_pop ; drop exit line and back to last line
0
heinrichsweikamp
parents:
diff changeset
894
heinrichsweikamp
parents:
diff changeset
895 do_dispsets_menu:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
896
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
897 IF _language_2!=none
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
898 MENU_BEGIN tDispSets, .7
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
899 MENU_OPTION tBright, oBrightness, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
900 MENU_OPTION tLanguage, oLanguage, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
901 MENU_OPTION tUnits, oUnits, 0
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
902 MENU_CALL tColorScheme, do_color_scheme
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
903 MENU_OPTION tFlip, oFlipScreen, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
904 MENU_CALL tMore, do_dispsets_menu_more
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
905 MENU_CALL tBack, do_return_settings
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
906 MENU_END
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
907 ELSE
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
908 MENU_BEGIN tDispSets, .6
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
909 MENU_OPTION tBright, oBrightness, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
910 MENU_OPTION tUnits, oUnits, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
911 MENU_CALL tColorScheme, do_color_scheme
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
912 MENU_OPTION tFlip, oFlipScreen, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
913 MENU_CALL tMore, do_dispsets_menu_more
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
914 MENU_CALL tBack, do_return_settings
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
915 MENU_END
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
916 ENDIF
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
917
335
3d43da7acfe1 Always show ppO2 (warning position, standard color) option
janos_kovacs <kovjanos@gmail.com>
parents: 333
diff changeset
918
3d43da7acfe1 Always show ppO2 (warning position, standard color) option
janos_kovacs <kovjanos@gmail.com>
parents: 333
diff changeset
919 do_dispsets_menu_more:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
920 MENU_BEGIN tDispSets, .7
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
921 MENU_OPTION tMODwarning, oMODwarning, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
922 MENU_OPTION tIBCDwarning, oEnable_IBCD, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
923 MENU_OPTION tVSItext2, oVSItextv2, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
924 MENU_OPTION tVSIgraph, oVSIgraph, 0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
925 MENU_OPTION tTimeoutDive, oDiveTimeout, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
926 MENU_OPTION t2ndDepth, o2ndDepthDisp, 0
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
927 MENU_CALL tBack, do_return_dispsets_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
928 MENU_END
0
heinrichsweikamp
parents:
diff changeset
929
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
930
50
ec4d8503ec45 NEW: user-selectable color schemes
heinrichsweikamp
parents: 39
diff changeset
931 do_color_scheme:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
932 bsf in_color_menu
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
933
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
934 MENU_BEGIN tColorScheme, .2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
935 MENU_OPTION tColorSetDive, oColorSetDive, 0
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
936 MENU_CALL tBack, do_return_dispsets_menu
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
937 MENU_END
50
ec4d8503ec45 NEW: user-selectable color schemes
heinrichsweikamp
parents: 39
diff changeset
938
ec4d8503ec45 NEW: user-selectable color schemes
heinrichsweikamp
parents: 39
diff changeset
939
0
heinrichsweikamp
parents:
diff changeset
940 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
941
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
942 do_new_battery_menu:
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
943 MENU_BEGIN tNewBattTitle, .2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
944 MENU_CALL tAbort, do_return_settings_more_deeper
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
945 MENU_CALL tYes, do_new_battery_select
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
946 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
947
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
948 global do_new_battery_select
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
949 do_new_battery_select:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
950
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
951 IFDEF _screendump
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
952 bsf enable_screen_dumps ; to prevent exiting into COMM mode immediately
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
953 ELSE
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
954 bsf disable_comm_mode ; to prevent exiting into COMM mode immediately
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
955 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
956
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
957 call TFT_boot ; initialize TFT (includes clear screen)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
958 call TFT_Display_FadeIn ; show splash
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
959 movlw .100
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
960 movwf batt_percent ; make sure to reset batt_percent
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
961
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
962 ; Default (in cases of timeout or USB): use old battery
0
heinrichsweikamp
parents:
diff changeset
963 clrf EEADRH
heinrichsweikamp
parents:
diff changeset
964 read_int_eeprom 0x07
heinrichsweikamp
parents:
diff changeset
965 movff EEDATA,battery_gauge+0
heinrichsweikamp
parents:
diff changeset
966 read_int_eeprom 0x08
heinrichsweikamp
parents:
diff changeset
967 movff EEDATA,battery_gauge+1
heinrichsweikamp
parents:
diff changeset
968 read_int_eeprom 0x09
heinrichsweikamp
parents:
diff changeset
969 movff EEDATA,battery_gauge+2
heinrichsweikamp
parents:
diff changeset
970 read_int_eeprom 0x0A
heinrichsweikamp
parents:
diff changeset
971 movff EEDATA,battery_gauge+3
heinrichsweikamp
parents:
diff changeset
972 read_int_eeprom 0x0B
heinrichsweikamp
parents:
diff changeset
973 movff EEDATA,battery_gauge+4
heinrichsweikamp
parents:
diff changeset
974 read_int_eeprom 0x0C
heinrichsweikamp
parents:
diff changeset
975 movff EEDATA,battery_gauge+5
heinrichsweikamp
parents:
diff changeset
976
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
977 call menu_processor_reset ; restart from first item
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
978
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
979 ; hardware_flag1:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
980 ; 3: 0x0A or 0x13 (2016)
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
981 ; cR: 0x05
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
982 ; 2 with BLE: 0x11
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
983 ; Sport: 0x12
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
984 ; 3 with BLE: 0x1A
76
a5ea132770db 1.21 release
heinrichsweikamp
parents: 66
diff changeset
985
609
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
986 movlw 0x0A
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
987 cpfseq hardware_flag1
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
988 bra $+4
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
989 bra menu_new_battery_AA
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
990 movlw 0x13
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
991 cpfseq hardware_flag1
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
992 bra $+4
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
993 bra menu_new_battery_16650
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
994 movlw 0x33
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
995 cpfseq hardware_flag1
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
996 bra $+4
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
997 bra menu_new_battery_AA_16650
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
998 movlw 0x12
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
999 cpfseq hardware_flag1
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1000 bra $+4
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1001 bra menu_new_battery_AA
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1002 movlw 0x1A
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1003 cpfseq hardware_flag1
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1004 bra $+4
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1005 bra menu_new_battery_AA
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1006 movlw 0x11
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1007 cpfseq hardware_flag1
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1008 bra $+4
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1009 bra menu_new_battery_18650
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1010 movlw 0x05
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1011 cpfseq hardware_flag1
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1012 bra $+4
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1013 bra menu_new_battery_18650
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1014 bra use_old_batteries ; any unsupported value
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1015
609
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1016 menu_new_battery_16650:
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1017 MENU_BEGIN tNewBattTitle, .1
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1018 MENU_CALL tNew16650, use_16650_battery
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1019 MENU_END
6341f6663579 TR Battery menu
heinrichsweikamp
parents: 604
diff changeset
1020
474
2880aa1264f5 Fix new battery menu on Power-on reset
heinrichsweikamp
parents: 472
diff changeset
1021 menu_new_battery_AA_16650:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1022 MENU_BEGIN tNewBattTitle, .5
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1023 MENU_CALL tNewBattOld, use_old_batteries
600
cb59872ad53d fix typo
heinrichsweikamp
parents: 582
diff changeset
1024 MENU_CALL tNewBattNew15, use_new_15V_batteries
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1025 MENU_CALL tNewBattNew36, use_new_36V_batteries
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1026 MENU_CALL tNewBattAccu, use_36V_rechargeable
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1027 MENU_CALL tNew16650, use_16650_battery
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1028 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1029
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1030
464
0491a84fd0b8 CHANGE: Easier to understand "New Battery" menu (OSTC model dependent)
heinrichsweikamp
parents: 457
diff changeset
1031 menu_new_battery_AA:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1032 MENU_BEGIN tNewBattTitle, .4
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1033 MENU_CALL tNewBattOld, use_old_batteries
600
cb59872ad53d fix typo
heinrichsweikamp
parents: 582
diff changeset
1034 MENU_CALL tNewBattNew15, use_new_15V_batteries
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1035 MENU_CALL tNewBattNew36, use_new_36V_batteries
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1036 MENU_CALL tNewBattAccu, use_36V_rechargeable
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1037 MENU_END
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1038
464
0491a84fd0b8 CHANGE: Easier to understand "New Battery" menu (OSTC model dependent)
heinrichsweikamp
parents: 457
diff changeset
1039
0491a84fd0b8 CHANGE: Easier to understand "New Battery" menu (OSTC model dependent)
heinrichsweikamp
parents: 457
diff changeset
1040 menu_new_battery_18650:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1041 MENU_BEGIN tNewBattTitle, .2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1042 MENU_CALL tNewBattOld, use_old_batteries
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1043 MENU_CALL tNew18650, use_18650_battery
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1044 MENU_END
0
heinrichsweikamp
parents:
diff changeset
1045
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1046
457
b4417044a042 recover old battery status prior 2.09
heinrichsweikamp
parents: 453
diff changeset
1047 global use_old_prior_209
b4417044a042 recover old battery status prior 2.09
heinrichsweikamp
parents: 453
diff changeset
1048 use_old_prior_209:
b4417044a042 recover old battery status prior 2.09
heinrichsweikamp
parents: 453
diff changeset
1049 clrf EEADRH
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1050 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
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1051 incfsz EEDATA,F ; was 0xFF?
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1052 return ; NO - done
477
44b8a826b314 NEW: Show battery type in surface mode next to battery voltage
heinrichsweikamp
parents: 474
diff changeset
1053
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1054 call lt2942_get_status ; check for gauge IC
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1055 movlw .3 ; Assume a 18650
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1056 btfss battery_gauge_available ; cR/2 hardware?
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1057 movlw .1 ; assume a Saft
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1058 movwf EEDATA
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1059 write_int_eeprom 0x0F ; store the new battery type into EEPROM
457
b4417044a042 recover old battery status prior 2.09
heinrichsweikamp
parents: 453
diff changeset
1060 return
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1061
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1062
0
heinrichsweikamp
parents:
diff changeset
1063 global use_old_batteries
heinrichsweikamp
parents:
diff changeset
1064 use_old_batteries:
heinrichsweikamp
parents:
diff changeset
1065 clrf EEADRH
heinrichsweikamp
parents:
diff changeset
1066 read_int_eeprom 0x07
heinrichsweikamp
parents:
diff changeset
1067 movff EEDATA,battery_gauge+0
heinrichsweikamp
parents:
diff changeset
1068 read_int_eeprom 0x08
heinrichsweikamp
parents:
diff changeset
1069 movff EEDATA,battery_gauge+1
heinrichsweikamp
parents:
diff changeset
1070 read_int_eeprom 0x09
heinrichsweikamp
parents:
diff changeset
1071 movff EEDATA,battery_gauge+2
heinrichsweikamp
parents:
diff changeset
1072 read_int_eeprom 0x0A
heinrichsweikamp
parents:
diff changeset
1073 movff EEDATA,battery_gauge+3
heinrichsweikamp
parents:
diff changeset
1074 read_int_eeprom 0x0B
heinrichsweikamp
parents:
diff changeset
1075 movff EEDATA,battery_gauge+4
heinrichsweikamp
parents:
diff changeset
1076 read_int_eeprom 0x0C
heinrichsweikamp
parents:
diff changeset
1077 movff EEDATA,battery_gauge+5
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 428
diff changeset
1078 read_int_eeprom 0x0F
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1079 movff EEDATA,battery_type ; =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
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 428
diff changeset
1080
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1081 rcall setup_new_saft ; any other value
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1082 incf EEDATA,F ; 1...5
450
791a25c4aab4 bugfix "old battery" type
heinrichsweikamp
parents: 448
diff changeset
1083 dcfsnz EEDATA,F
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1084 rcall setup_new_15v ; =0
450
791a25c4aab4 bugfix "old battery" type
heinrichsweikamp
parents: 448
diff changeset
1085 dcfsnz EEDATA,F
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1086 rcall setup_new_saft ; =1
450
791a25c4aab4 bugfix "old battery" type
heinrichsweikamp
parents: 448
diff changeset
1087 dcfsnz EEDATA,F
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1088 rcall setup_new_panasonic ; =2
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1089 dcfsnz EEDATA,F
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1090 rcall setup_new_18650 ; =3
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1091 dcfsnz EEDATA,F
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1092 rcall setup_new_16650 ; =4
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1093
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1094 bcf use_old_batt_flag ; clear flag
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1095
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1096 IFNDEF _screendump
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1097 bcf disable_comm_mode ; re-enable COMM mode again
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1098 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1099
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1100 goto surfloop ; jump to surface loop
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1101
0
heinrichsweikamp
parents:
diff changeset
1102
472
4fdf6886004b CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents: 470
diff changeset
1103 setup_new_15v:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1104 bsf charge_disable
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1105 bcf TRISE,2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1106 movlw .100
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1107 movwf batt_percent ; to have 1.5V batteries right after firmware update
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1108 movlw .0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1109 movff WREG,battery_type
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1110 return
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1111
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1112
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 428
diff changeset
1113 setup_new_saft:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1114 banksel battery_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1115 movlw LOW internal_saft_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1116 movwf internal_battery_capacity+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1117 movlw HIGH internal_saft_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1118 movwf internal_battery_capacity+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1119 movlw LOW saft_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1120 movwf battery_capacity+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1121 movlw HIGH saft_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1122 movwf battery_capacity+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1123 movlw LOW saft_offset
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1124 movwf battery_offset+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1125 movlw HIGH saft_offset
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1126 movwf battery_offset+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1127 banksel common
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1128 bsf charge_disable
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1129 bcf TRISE,2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1130 movlw .1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1131 movff WREG,battery_type
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1132 return
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1133
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 428
diff changeset
1134
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1135 setup_new_panasonic:
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1136 banksel battery_capacity
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1137 movlw LOW internal_panasonic_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1138 movwf internal_battery_capacity+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1139 movlw HIGH internal_panasonic_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1140 movwf internal_battery_capacity+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1141 movlw LOW panasonic_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1142 movwf battery_capacity+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1143 movlw HIGH panasonic_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1144 movwf battery_capacity+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1145 movlw LOW panasonic_offset
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1146 movwf battery_offset+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1147 movlw HIGH panasonic_offset
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1148 movwf battery_offset+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1149 banksel common
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1150 bcf charge_disable
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1151 bsf TRISE,2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1152 movlw .2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1153 movff WREG,battery_type
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1154 return
472
4fdf6886004b CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents: 470
diff changeset
1155
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1156
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1157 setup_new_18650:
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1158 banksel battery_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1159 clrf internal_battery_capacity+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1160 clrf internal_battery_capacity+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1161 movlw LOW ncr18650_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1162 movwf battery_capacity+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1163 movlw HIGH ncr18650_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1164 movwf battery_capacity+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1165 movlw LOW ncr18650_offset
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1166 movwf battery_offset+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1167 movlw HIGH ncr18650_offset
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1168 movwf battery_offset+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1169 banksel common
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1170 bcf charge_disable
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1171 bsf TRISE,2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1172 movlw .3
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1173 movff WREG,battery_type
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1174 return
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1175
472
4fdf6886004b CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents: 470
diff changeset
1176
4fdf6886004b CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents: 470
diff changeset
1177 setup_new_16650:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1178 banksel battery_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1179 clrf internal_battery_capacity+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1180 clrf internal_battery_capacity+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1181 movlw LOW ur16650_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1182 movwf battery_capacity+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1183 movlw HIGH ur16650_capacity
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1184 movwf battery_capacity+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1185 movlw LOW ur16650_offset
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1186 movwf battery_offset+0
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1187 movlw HIGH ur16650_offset
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1188 movwf battery_offset+1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1189 banksel common
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1190 bcf charge_disable
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1191 bsf TRISE,2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1192 movlw .4
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1193 movff WREG,battery_type
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1194 return
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1195
472
4fdf6886004b CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents: 470
diff changeset
1196
474
2880aa1264f5 Fix new battery menu on Power-on reset
heinrichsweikamp
parents: 472
diff changeset
1197 use_16650_battery:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1198 rcall setup_new_16650
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1199 bra use_batt_exit
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 428
diff changeset
1200 use_18650_battery:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1201 rcall setup_new_18650
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1202 bra use_batt_exit
0
heinrichsweikamp
parents:
diff changeset
1203 use_new_36V_batteries:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1204 rcall setup_new_saft
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1205 bra use_batt_exit
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 428
diff changeset
1206 use_new_15V_batteries:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1207 rcall setup_new_15v
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1208 use_batt_exit:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1209 call reset_battery_pointer ; resets battery pointer 0x07-0x0C and battery_gauge:5
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1210 use_batt_exit1:
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1211
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1212 IFNDEF _screendump
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1213 bcf disable_comm_mode ; re-enable COMM mode again
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1214 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1215
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1216 goto surfloop ; jump to surface loop
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1217
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 428
diff changeset
1218 use_36V_rechargeable:
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1219 rcall setup_new_panasonic
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1220 call reset_battery_internal_only
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 600
diff changeset
1221 bra use_batt_exit1 ; jump to surface loop
0
heinrichsweikamp
parents:
diff changeset
1222
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 562
diff changeset
1223 END