comparison src/hwos.inc @ 604:ca4556fb60b9

bump to 2.99beta, work on 3.00 stable
author heinrichsweikamp
date Thu, 22 Nov 2018 19:47:26 +0100
parents ab88a7e3de94
children c5151a490d88
comparison
equal deleted inserted replaced
603:00b24fb4324d 604:ca4556fb60b9
1 ;============================================================================= 1 ;=============================================================================
2 ; 2 ;
3 ; File hwos.inc REFACTORED VERSION V2.97 SP1 3 ; File hwos.inc REFACTORED VERSION V2.99e
4 ; 4 ;
5 ; OSTC Platform definitions 5 ; OSTC Platform definitions
6 ; 6 ;
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. 7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
8 ;============================================================================= 8 ;=============================================================================
9 ; HISTORY 9 ; HISTORY
10 ; 2011-05-24 : [jDG] Cleanups from initial Matthias code. 10 ; 2011-05-24 : [jDG] Cleanups from initial Matthias code
11
12 ;============================================================================= 11 ;=============================================================================
13 12
14 LIST P=18F87K22 ; change also: Configure->SelectDevice from Mplab 13 ; Low Level Settings
15 14 LIST P=18F87K22 ; compiler settings, if changed, change also: Configure -> SelectDevice in MPLAB
16 ;#DEFINE __DEBUG 15 #include <p18f87k22.inc> ; processor definitions
17 16 #include <ports.inc> ; Portmap definitions
18 ;#DEFINE french_italian ; If defined, use french and italian instead of english and german 17
19 18
20 #include <p18f87k22.inc> 19 ; Debug Mode
21 #include <ports.inc> ; Portmap 20 ;#DEFINE __DEBUG ; if defined, compile firmware in debug mode
22 21
23 ; Firmware definition 22 ; Conditional Compiles (note: not all options will fit at the same time)
24 #DEFINE softwareversion_x .2 ; Software version XX.YY 23 #DEFINE _screendump ; if defined, compile screen dump into firmware (default: included )
25 #DEFINE softwareversion_y .98 ; Software version XX.YY 24 #DEFINE _rx_functions ; if defined, compile RX (OSTC TR) into firmware (default: included *)
26 #DEFINE softwareversion_beta .0 ; 0= release, 1=beta, 2=SP1, 3=SP2, ... 25 ;#DEFINE _ostc_logo ; if defined, compile OSTC logo into firmware (default: not included )
27 26 ;#DEFINE _cave_mode ; if defined, compile cave mode into firmware (default: not included *) ## OPTION IS UNDER CONSTRUCTION ##
28 ; Firmware version will appear in "Change Firmware" style 27 ;
29 #DEFINE firmware_expire_year .19 28 ; * option needs to be included / excluded in p2_deco.c, too!
30 #DEFINE firmware_expire_month .8 29
31 #DEFINE firmware_expire_day .27 30
32 31 ; Language Selection
32 #DEFINE none 0 ; no language selected
33 #DEFINE en 1 ; English
34 #DEFINE de 2 ; German
35 #DEFINE fr 3 ; French
36 #DEFINE it 4 ; Italian
37
38 #DEFINE _language_1 en ; first or single language - must be set to en, de, fr, or it, defaults to en
39 #DEFINE _language_2 none ; second language or none
40
41
42 ; Firmware Version
43 #DEFINE softwareversion_x .2 ; Software Version, major (1 - 9)
44 #DEFINE softwareversion_y .99 ; Software Version, minor (1 - 99)
45 #DEFINE softwareversion_beta .0 ; 0= Release, 1= Beta-1, 2= Beta-2, ... (0 - 255)
46
47 ; Firmware Expiration Date, will cause version to be displayed in "Update Firmware" style after the following date:
48 #DEFINE firmware_expire_year .18
49 #DEFINE firmware_expire_month .12
50 #DEFINE firmware_expire_day .31
51
52 ; Magic Cookie Definition
33 #DEFINE comm_service_key 0xABCDEF 53 #DEFINE comm_service_key 0xABCDEF
54
55 ; Logo Address Vectors
56 #DEFINE hw_logo_block 0x01E000 ; color image data for heinrichsweikamp logo
57 #DEFINE usb_ble_logo_block 0x01EEDE ; color image data for USB or BLE logo
58
34 59
35 ;-----------------------------EEPROM DATA ------------------------------------ 60 ;-----------------------------EEPROM DATA ------------------------------------
36 ; Automatic reset of all options when this is changed: 61 ; Automatic reset of all options when this is changed:
37 #define eeprom_opt_serial 0x0006 ; Version 0.6 62 #DEFINE eeprom_opt_serial 0x0008 ; Version 0.8
38 ;----------------------------------------------------------------------------- 63 ;-----------------------------------------------------------------------------
39 64
40 #DEFINE CCP1CON_VALUE b'00001100' ; PWM1 for LED dimming 65 #DEFINE CCP1CON_VALUE b'00001100' ; PWM1 for LED dimming
41 #DEFINE T2CON_ECO b'00000100' ; 1:1 Postscaler, 1:1 Prescaler, Timer 2 start -> 980Hz (Good compromise of no-flicker and efficiency) 66 #DEFINE T2CON_ECO b'01111110' ;
42 #DEFINE T2CON_NORMAL b'00001110' 67 #DEFINE T2CON_NORMAL b'01111110' ;
43 #DEFINE T2CON_FASTEST b'00001110' ; 1:2 Postscaler, 1:16 Prescaler, Timer 2 start -> 1960Hz (no-flicker) 68 #DEFINE T2CON_FASTEST b'01111110' ;
69
70 ; Divemode Custom View Indexes - Attention: these numbers need to be in line with the jump tables in customview.asm!
71 #DEFINE index_avr_stopwatch .1 ; average depth and stopwatch
72 #DEFINE index_compass_dm .2 ; compass
73 #DEFINE index_ppo2_sensors .3 ; ppO2 sensors
74 #DEFINE index_sensor_check .4 ; sensor check
75 #DEFINE index_pscr_info .5 ; pSCR data
76 #DEFINE index_pressures_SAC .6 ; tank pressure and SAC rate
77 #DEFINE index_gas_needs_ascent .7 ; gas needs for ascent / cave return
78 #DEFINE index_decoplan .8 ; deco plan
79 #DEFINE index_ceiling_GF_tissue .9 ; ceiling, current GF and tissues
80 #DEFINE index_CNS .10 ; CNS values
81 #DEFINE index_ppo2_ead_end_cns .11 ; ppO2, END/EAD and CNS
82 #DEFINE index_gf_factors .12 ; GF factors
83 #DEFINE index_clock_batt_surfpress .13 ; clock, battery and surface pressure
84 #DEFINE index_cv_dm_max .13 ; highest index in use in dive mode custom view
44 85
45 ; Timing for button hold-down flags 86 ; Timing for button hold-down flags
46 #DEFINE TMR1H_VALUE_FIRST .255-.128 ; in steps of 7,8125ms -> 1s 87 #DEFINE TMR1H_VALUE_FIRST .255-.128 ; in steps of 7.8125 ms -> 1 s
47 #DEFINE TMR1H_VALUE_CONT .255-.32 ; in steps of 7,8125ms -> 0.25s 88 #DEFINE TMR1H_VALUE_CONT .255-.32 ; in steps of 7.8125 ms -> 0.25 s
48 #DEFINE TMR1H_VALUE_CONT_DIVE .255-.64 ; in steps of 7,8125ms -> 0.5s 89 #DEFINE TMR1H_VALUE_CONT_DIVE .255-.64 ; in steps of 7.8125 ms -> 0.5 s
49 90
50 ; Color Definitions: 8Bit RGB b'RRRGGGBB' 91 ; Color Definitions: 8 bit RGB b'RRRGGGBB'
51 #DEFINE color_red b'11100000' ; (7,0,0) 92 #DEFINE color_red b'11100000' ; (7,0,0)
52 #DEFINE color_dark_red b'10000101' ; (4,1,1) 93 #DEFINE color_dark_red b'10000101' ; (4,1,1)
53 #DEFINE color_violet b'11101011' ; (7,2,3) 94 #DEFINE color_violet b'11101011' ; (7,2,3)
54 #DEFINE color_blue b'11000111' ; (6,1,3) 95 #DEFINE color_blue b'11000111' ; (6,1,3)
55 #DEFINE color_green b'00011100' ; (0,7,0) 96 #DEFINE color_green b'00011100' ; (0,7,0)
68 #DEFINE FT_TINY .0 109 #DEFINE FT_TINY .0
69 #DEFINE FT_SMALL .1 110 #DEFINE FT_SMALL .1
70 #DEFINE FT_MEDIUM .2 ; not used 111 #DEFINE FT_MEDIUM .2 ; not used
71 #DEFINE FT_LARGE .3 ; not used 112 #DEFINE FT_LARGE .3 ; not used
72 113
73 ; External O2 cell input parameters 114 ; External O2 cell input Parameters
74 #DEFINE min_mv .80 ; = 8mV 115 #DEFINE min_mv .80 ; = 8 mV
75 #DEFINE max_mv .2500 ; = 250mV 116 #DEFINE max_mv .2500 ; = 250 mV
76 #DEFINE ignore_mv .3500 ; = 350mV (to suppress ghost readings for long, open cables) 117 #DEFINE ignore_mv .3500 ; = 350 mV (to suppress ghost readings for long, open cables)
77 118
78 ; Profile recording parameters 119 ; Profile Recording Parameters
79 #DEFINE logbook_profile_version 0x24 120 #DEFINE logbook_profile_version 0x24
80 #DEFINE samplingrate_apnoe .1 ; [seconds] 121 #DEFINE samplingrate_apnoe .1 ; [seconds]
81 122
82 ; Warning: Divisors must be <.16 ! 123 ; Attention: Divisors must be < 16 !
83 #DEFINE div_temperature .6 ; x samplingrate [s] 124 #DEFINE div_temperature .6 ; x sampling rate [s]
84 #DEFINE div_deco .6 ; x samplingrate [s] 125 #DEFINE div_deco .6 ; x sampling rate [s]
85 #DEFINE div_gf .12 ; x samplingrate [s] 126 #DEFINE div_gf .12 ; x sampling rate [s]
86 #DEFINE div_ppo2_sensors .2 ; x samplingrate [s] 127 #DEFINE div_ppo2_sensors .2 ; x sampling rate [s]
87 #DEFINE div_decoplan .12 ; x samplingrate [s] 128 #DEFINE div_decoplan .12 ; x sampling rate [s]
88 #DEFINE div_cns .12 ; x samplingrate [s] 129 #DEFINE div_cns .12 ; x sampling rate [s]
89 #DEFINE div_tank .0 ; x samplingrate [s] 130 #DEFINE div_tank .0 ; x sampling rate [s]
90 131
91 ; Warning: Information lengths must be <.16 ! 132 ; Attention: Information Lengths must be < 16 !
92 #DEFINE infolength_temperature .2 ; [byte] 133 #DEFINE infolength_temperature .2 ; [byte]
93 #DEFINE infolength_deco .2 ; [byte] 134 #DEFINE infolength_deco .2 ; [byte]
94 #DEFINE infolength_gf .1 ; [byte] 135 #DEFINE infolength_gf .1 ; [byte]
95 #DEFINE infolength_ppo2_sensors .9 ; [byte] 136 #DEFINE infolength_ppo2_sensors .9 ; [byte]
96 #DEFINE infolength_decoplan .15 ; [byte] 137 #DEFINE infolength_decoplan .15 ; [byte]
97 #DEFINE infolength_cns .2 ; [byte] 138 #DEFINE infolength_cns .2 ; [byte]
98 #DEFINE infolength_tank .0 ; [byte] 139 #DEFINE infolength_tank .0 ; [byte]
99 140
100 ; "Better Gas" behavior 141 ; RX Functions (no conditional compile because defines are used in options_table)
101 ; better_gas_window <= minimum_change_depth ! 142 #DEFINE rx_packet_overdue_timeout .60 ; [seconds]
102 ; minimum_change_depth >=5 ! 143 #DEFINE max_pres_diff_min .5 ; [bar] minimum selectable pressure difference for ind.double mode
103 #DEFINE minimum_change_depth .3 ; [m] 144 #DEFINE max_pres_diff_max .50 ; [bar] maximum selectable pressure difference for ind.double mode
104 #DEFINE better_gas_window_neg .3 ; [m] (Depth above change depth) 145
105 #DEFINE better_gas_window_pos .1 ; [m] (Depth below change depth, if ppO2<opt_ppO2_max) 146 ; Gas Needs Settings
106 147 #DEFINE min_tank_size .1 ; [liter]
107 ; Dive mode limits and thresholds 148 #DEFINE max_tank_size .40 ; [liter]
149 #DEFINE min_fill_press .5 ; [0 bar] value is in multiples of 10 bar
150 #DEFINE max_fill_press .29 ; [0 bar] value is in multiples of 10 bar, no 300 bar due to too far beyond ideal gas laws
151
152
153 ;; "Better Gas" Behavior
154 ;#DEFINE minimum_change_depth .2 ; [m]
155
156 ; Dive Mode Limits and Thresholds
108 #DEFINE start_dive_threshold .100 ; [cm] 157 #DEFINE start_dive_threshold .100 ; [cm]
109 #DEFINE high_altitude_dive_threshold .300 ; [cm] 158 #DEFINE high_altitude_dive_threshold .300 ; [cm]
110 #DEFINE apnoe_timeout .15 ; [min] 159 #DEFINE apnoe_timeout .15 ; [min]
111 #DEFINE divemode_menuview_timeout .10 ; [s] 160 #DEFINE divemode_menuview_timeout .10 ; [s]
112 #DEFINE divemode_menu_timeout .30 ; [s] 161 #DEFINE divemode_menu_timeout .30 ; [s]
113 162
114 #DEFINE ppo2_warning_low_lowest .16 ; [cbar] (Min. value) for minimum on OC 163 #DEFINE ppo2_warning_low_lowest .15 ; [cbar] (min. value) for minimum on OC
115 #DEFINE ppo2_warning_low_default .19 ; [cbar] (Default value) for minimum on OC 164 #DEFINE ppo2_warning_low_default .17 ; [cbar] (default value) for minimum on OC
116 #DEFINE ppo2_warning_low_highest .21 ; [cbar] (Max. value) for minimum on OC 165 #DEFINE ppo2_warning_low_highest .21 ; [cbar] (max. value) for minimum on OC
117 166
118 #DEFINE ppo2_warning_loop_lowest .20 ; [cbar] (Min. value) for minimum on loop 167 #DEFINE ppo2_warning_loop_lowest .20 ; [cbar] (min. value) for minimum on loop
119 #DEFINE ppo2_warning_loop_default .40 ; [cbar] (Default Value) for minimum on loop 168 #DEFINE ppo2_warning_loop_default .40 ; [cbar] (default Value) for minimum on loop
120 #DEFINE ppo2_warning_loop_highest .60 ; [cbar] (Max. value) for minimum on loop 169 #DEFINE ppo2_warning_loop_highest .60 ; [cbar] (max. value) for minimum on loop
121 170
122 #DEFINE ppo2_warning_high_lowest .120 ; [cbar] (Min. value) for maximum in none-deco phase 171 #DEFINE ppo2_warning_high_lowest .120 ; [cbar] (min. value) for maximum in none-deco phase
123 #DEFINE ppo2_warning_high_default .140 ; [cbar] (Default value) for maximum in none-deco phase 172 #DEFINE ppo2_warning_high_default .140 ; [cbar] (default value) for maximum in none-deco phase
124 #DEFINE ppo2_warning_high_highest .160 ; [cbar] (Max. value) for maximum in none-deco phase 173 #DEFINE ppo2_warning_high_highest .160 ; [cbar] (max. value) for maximum in none-deco phase
125 174
126 #DEFINE ppo2_warning_deco_lowest .120 ; [cbar] (Min. value) for maximum in deco phase 175 #DEFINE ppo2_warning_deco_lowest .120 ; [cbar] (min. value) for maximum in deco phase
127 #DEFINE ppo2_warning_deco_default .160 ; [cbar] (Default Value) for maximum in deco phase 176 #DEFINE ppo2_warning_deco_default .160 ; [cbar] (default Value) for maximum in deco phase
128 #DEFINE ppo2_warning_deco_highest .160 ; [cbar] (Max. value) for maximum in deco phase 177 #DEFINE ppo2_warning_deco_highest .160 ; [cbar] (max. value) for maximum in deco phase
129 178
130 #DEFINE depth_warn_mbar .13000 ; [mbar] 179 #DEFINE depth_warn_mbar .13000 ; [mbar]
131 #DEFINE wake_up_from_sleep .1160 ; [mbar] 180 #DEFINE wake_up_from_sleep .1160 ; [mbar]
132 #DEFINE simulator_timeout .15 ; [s] 181 #DEFINE simulator_timeout .15 ; [s]
133 182
134 #DEFINE sensor_voting_logic_threshold .10 ; Threshold in 0.01bar 183 #DEFINE sensor_voting_logic_threshold .10 ; threshold in 0.01 bar
135 184
136 ; Surface mode limits and thresholds 185 ; Surface Mode Limits and Thresholds
137 #DEFINE high_altitude_threshold .880 ; [mbar] 186 #DEFINE high_altitude_threshold .880 ; [mbar]
138 #DEFINE max_surfpressure .1080 ; [mbar] 187 #DEFINE max_surfpressure .1080 ; [mbar]
139 #DEFINE timeout_surfacemode .90 ; [s] 188 #DEFINE timeout_surfacemode .240 ; [s] ; ex 90 seconds
140 #DEFINE timeout_calibrate_menu .240 ; [s] 189 #DEFINE timeout_calibrate_menu .240 ; [s]
190 #DEFINE timeout_tanksetup_menu .240 ; [s]
141 #DEFINE timeout_ccr_surface .240 ; [s] 191 #DEFINE timeout_ccr_surface .240 ; [s]
142 192
143 ; Decomodel paramters 193 ; Deco-Model Parameters
144 #DEFINE deco_distance .10 ; [dm] 194 #DEFINE deco_distance .10 ; [dm]
145 195
146 ; Color-code parameters for the divemode 196 ; Color-Code Parameters for the Dive Mode
147 #DEFINE color_code_velocity_warn_high .11 ; [m/min] 197 #DEFINE color_code_velocity_warn_high .11 ; [m/min]
148 #DEFINE color_code_velocity_attn_high .10 ; [m/min] 198 #DEFINE color_code_velocity_attn_high .10 ; [m/min]
149 #DEFINE velocity_display_threshold_1 .3 ; [m/min] 199 #DEFINE velocity_display_threshold_1 .3 ; [m/min]
150 200
151 ; Battery thresholds 201 ; Battery Thresholds
152 #DEFINE lithium_36v_empty .2400 ; [mV] Saft 3,6V LS14500 AA - threshold for battery percent display 202 #DEFINE lithium_36v_empty .2400 ; [mV] Saft 3.6 V LS14500 AA - threshold for battery percent display
153 #DEFINE lithium_36v_low .2000 ; [mV] (Must be bigger then aa_15v_high!) 203 #DEFINE lithium_36v_low .2000 ; [mV] (must be bigger than aa_15v_high!)
154 #DEFINE aa_15v_high .1550 ; [mV] Energizer 1,5V E2 AA 204 #DEFINE aa_15v_high .1550 ; [mV] Energizer 1.5 V E2 AA
155 #DEFINE aa_15v_low .1100 ; [mV] According to Energizer Datasheet EBC-4201R, Page 2 205 #DEFINE aa_15v_low .1100 ; [mV] according to Energizer data sheet EBC-4201R, page 2
156 #DEFINE color_code_battery_low .10 ; [%] 206 #DEFINE color_code_battery_low .10 ; [%]
157 #DEFINE battery_show_level .24 ; [%] 207 #DEFINE battery_show_level .24 ; [%]
158 208
159 ; 3,6V battery sensing data points at 70mA load 209 ; 3.6 Volt Battery sensing Data Points at 70 mA Load
160 #DEFINE lithium_36v_75 .3000 ; [mV] 210 #DEFINE lithium_36v_75 .3000 ; [mV]
161 #DEFINE lithium_36v_50 .2900 ; [mV] 211 #DEFINE lithium_36v_50 .2900 ; [mV]
162 #DEFINE lithium_36v_25 .2600 ; [mV] 212 #DEFINE lithium_36v_25 .2600 ; [mV]
163 #DEFINE lithium_36v_10 .2500 ; [mV] 213 #DEFINE lithium_36v_10 .2500 ; [mV]
164 214
165 ; Capacity for 2.4Ah Saft LS14500 and 0.8Ah Panasonic UR14500P 215 ; Capacity for 2.4 Ah Saft LS14500 and 0.8 Ah Panasonic UR14500P
166 ; battery_gauge:6 is nAs 216 ; battery_gauge:6 is nAs
167 ; devide through 65536 217 ; devide through 65536
168 ; a) devide through 364 -> Result is in percent of a 2.4Ah Battery 218 ; a) devide through 364 -> result is in percent of a 2.4 Ah battery
169 ; or b) devide through 121 -> Result is in percent of a 0.8Ah Battery 219 ; or b) devide through 121 -> result is in percent of a 0.8 Ah battery
170 220
171 ; For internal battery gauging 221 ; internal Battery Gauging
172 #DEFINE internal_saft_capacity .364 222 #DEFINE internal_saft_capacity .364
173 #DEFINE internal_panasonic_capacity .121 223 #DEFINE internal_panasonic_capacity .121
174 224
175 ; For gauge IC 225 ; Gauge IC
176 #DEFINE saft_capacity .281 ; 2.4Ah/0.085mAh/100 [%] 226 #DEFINE saft_capacity .281 ; 2.4Ah/0.085mAh/100 [%]
177 #DEFINE saft_offset .37300 ; 65536-(2.4Ah/0.085mAh) 227 #DEFINE saft_offset .37300 ; 65536-(2.4Ah/0.085mAh)
178 228
179 #DEFINE panasonic_capacity .94 ; 0.8Ah/0.085mAh/100 [%] 229 #DEFINE panasonic_capacity .94 ; 0.8Ah/0.085mAh/100 [%]
180 #DEFINE panasonic_offset .56124 ; 65536-(0.8Ah/0.085mAh) 230 #DEFINE panasonic_offset .56124 ; 65536-(0.8Ah/0.085mAh)
192 #DEFINE current_speed_normal .4027 242 #DEFINE current_speed_normal .4027
193 #DEFINE current_speed_fastest .5050 243 #DEFINE current_speed_fastest .5050
194 #DEFINE current_ir_receiver .139 244 #DEFINE current_ir_receiver .139
195 #DEFINE current_compass .28 245 #DEFINE current_compass .28
196 246
197 ; Brightness thresholds (between zero (off) and 255 (max. power)) 247 ; Brightness Thresholds (between zero (off) and 255 (max. power))
198 #DEFINE ambient_light_max_high_36V .170 248 #DEFINE ambient_light_max_high_36V .170
199 #DEFINE ambient_light_max_high_cr .240 249 #DEFINE ambient_light_max_high_cr .240
200 #DEFINE ambient_light_max_high_15V .140 250 #DEFINE ambient_light_max_high_15V .140
201 #DEFINE ambient_light_min_high .35 251 #DEFINE ambient_light_min_high .35
202 #DEFINE ambient_light_max_medium .125 252 #DEFINE ambient_light_max_medium .125
203 #DEFINE ambient_light_min_medium .25 253 #DEFINE ambient_light_min_medium .25
204 #DEFINE ambient_light_max_eco .70 254 #DEFINE ambient_light_max_eco .70
205 #DEFINE ambient_light_min_eco .10 ; must be the lowest value! 255 #DEFINE ambient_light_min_eco .10 ; must be the lowest value!
206 256
207 ; IR Link timeout 257 ; IR Link Timeout
208 #DEFINE ir_timeout_value .64 ; multiples of 62,5ms 258 #DEFINE ir_timeout_value .64 ; multiples of 62.5 ms
209 259
210 ; Sp control constants 260 ; Setpoint Control
211 #DEFINE surface_sp .50 ; in cbar 261 #DEFINE surface_sp .50 ; in cbar
212 262
213 ; Gaslist hard-coded limits 263 ; Gaslist hard-coded Limits
214 #DEFINE gaslist_min_o2 .5 ; Minimum O2 [%] 264 #DEFINE gaslist_min_o2 .6 ; minimum O2 [%]
215 #DEFINE gaslist_max_He .100-gaslist_min_o2 ; Maximum He [%] 265 #DEFINE gaslist_max_He .100-gaslist_min_o2 ; maximum He [%]
216 266 #DEFINE gaslist_max_change_depth .99 ; max. change depth [m]
217 #DEFINE gaslist_max_change_depth .99 ; Max. change depth [m] 267 #DEFINE gaslist_sp_stepsize .10 ; steps for setpoint setup [cbar]
218 #DEFINE gaslist_sp_stepsize .10 ; Steps for Setpoint Setup [cbar] 268 #DEFINE gaslist_sp_max .160 ; max. setpoint [cbar]
219 #DEFINE gaslist_sp_max .160 ; Max. Setpoint [cbar] 269 #DEFINE gaslist_sp_min .50 ; min. setpoint [cbar]
220 #DEFINE gaslist_sp_min .50 ; Min. Setpoint [cbar] 270
221 271 ; Compass Display
222 ; Compass display
223 #DEFINE compass_fast_treshold .9 ; show new heading instantly if new and old > compass_fast_treshold 272 #DEFINE compass_fast_treshold .9 ; show new heading instantly if new and old > compass_fast_treshold
224 #DEFINE compass_averaging .10 ; numbers of extra averaging 273 #DEFINE compass_averaging .10 ; numbers of extra averaging
225 274
226 ; Bit Masks for communication with p2_deco.c - char_O_deco_status 275
227 #define DECO_STATUS_MASK .3 276 ; Bit Flags for Communication with p2_deco.c - char_O_main_status
228 277 #DEFINE DECO_COMPLETED_NORM .0 ; the calculation of a normal deco plan has just been completed
229 ; Bit Flags for communication with p2_deco.c - char_O_deco_status 278 #DEFINE DECO_COMPLETED_ALT .1 ; the calculation of an alternative deco plan has just been completed
230 #define DECO_STATUS_0_FLAG .0
231 #define DECO_STATUS_1_FLAG .1
232 #define DECO_MODE_LOOP_FLAG .2
233 #define DECO_MODE_PSCR_FLAG .3
234 #define DECO_PLAN_FLAG .4
235 #define DECO_CNS_FLAG .5
236 #define DECO_VOLUME_FLAG .6
237 #define DECO_ASCENT_FLAG .7
238
239 ; Bit Flags for communication with p2_deco.c - char_O_main_status
240 ; .0 ; unused
241 ; .1 ; unused
242 ; DECO_MODE_LOOP_FLAG .2 ; defined below, also used for char_O_main_status 279 ; DECO_MODE_LOOP_FLAG .2 ; defined below, also used for char_O_main_status
243 ; DECO_MODE_PSCR_FLAG .3 ; defined below, also used for char_O_main_status 280 ; DECO_MODE_PSCR_FLAG .3 ; defined below, also used for char_O_main_status
244 #define DECO_GASCHANGE_OVRD .4 281 #DEFINE DECO_Z_FACTOR_FLAG .4 ; =1: figure in Z factor when converting gas volumes <-> pressures
245 ; .5 ; unused 282 #DEFINE DECO_CAVE_MODE .5 ; =1: compute ascent and gas needs using backtracking data
246 #define DECO_BOTTOM_FLAG .6 283 #DEFINE DECO_BOTTOM_FLAG .6 ; =1: compute with bottom time (deco calculator), =0: with extra time (dive mode)
247 ; .7 ; unused 284 #DEFINE DECO_TR_FUNCTIONS .7 ; =1: compute TR functions (pressure readings)
248 285
249 ; Bit Values for communication with p2_deco.c 286 ; Bit Flags for Communication with p2_deco.c - char_O_deco_status
250 #define DECO_STATUS_INIT .3 287 #DEFINE DECO_STATUS_0_FLAG .0
251 #define DECO_MODE_LOOP .4 288 #DEFINE DECO_STATUS_1_FLAG .1
252 #define DECO_MODE_PSCR .8 289 #DEFINE DECO_MODE_LOOP_FLAG .2
253 #define DECO_PLAN_ALTERNATE .16 290 #DEFINE DECO_MODE_PSCR_FLAG .3
254 #define DECO_CNS_CALCULATE .32 291 #DEFINE DECO_PLAN_FLAG .4
255 #define DECO_VOLUME_CALCULATE .64 292 #DEFINE DECO_BAILOUT_FLAG .5 ; =1: do a bailout calculation, i.e. allow gas switches before first deco stop
256 #define DECO_ASCENT_DELAYED .128 293 #DEFINE DECO_VOLUME_FLAG .6
257 294 #DEFINE DECO_ASCENT_FLAG .7
258 ; Bit Flags for char_O_deco_warnings 295
259 #define IBCD_warning .0 296 ; Bit Flags for Communication with p2_deco.c - char_O_deco_warnings
260 #define IBCD_warning_lock .1 297 #DEFINE IBCD_warning .0
261 #define mbubble_warning .2 298 #DEFINE IBCD_warning_lock .1
262 #define mbubble_warning_lock .3 299 #DEFINE mbubble_warning .2
263 #define outside_warning .4 300 #DEFINE mbubble_warning_lock .3
264 #define outside_warning_lock .5 301 #DEFINE outside_warning .4
265 #define stoptable_overflow .6 302 #DEFINE outside_warning_lock .5
266 #define deco_flag .7 303 #DEFINE outside_attention .6
267 304 #DEFINE stoptable_overflow .7
268 ; Bit Flags for status on CHARs 305
269 #define char_invalid_flag .7 306 ; Bit Flags for Communication with p2_deco.c - char_O_deco_info
270 307 #DEFINE deco_flag .0 ; =1: in deco mode, deco ppO2 levels permitted
271 ; Bit Flags for status on INTs 308 #DEFINE ind_double_switch .1 ; =1: switch to other tank advice active
272 #define int_invalid_flag .2 309 #DEFINE deco_steady .2 ; =1: fTTS is = TTS (not updated when in bailout mode)
273 #define int_not_yet_computed .3 310 #DEFINE deco_decreasing .3 ; =1: fTTS is < TTS (not updated when in bailout mode)
274 #define int_is_zero .3 311 #DEFINE deco_ceiling .4 ; =1: ceiling depth > 0
275 #define int_low_flag .4 312 #DEFINE gas_needs_cave .5 ; =1: indicated gas needs are calculated in cave mode
276 #define int_high_flag .5 313
277 #define int_attention_flag .6 314 ; Bit Flags for Status on Variables of Type char
278 #define int_warning_flag .7 315 #DEFINE char_transmitter_lost .6
316 #DEFINE char_invalid_flag .7
317 #DEFINE char_transmitter_low_bat .7
318
319 ; Bit Flags for Status on Variables of Type int (Flags are placed in the upper byte)
320 #DEFINE int_invalid_flag .2
321 #DEFINE int_not_yet_computed .3
322 #DEFINE int_is_zero .3
323 #DEFINE int_low_flag .4
324 #DEFINE int_not_avail_flag .4
325 #DEFINE int_high_flag .5
326 #DEFINE int_outdated_flag .5
327 #DEFINE int_attention_flag .6
328 #DEFINE int_warning_flag .7
279 329
280 ;----------------------------------------------------------------------------- 330 ;-----------------------------------------------------------------------------
281 ; Flags 331 ; Flags
282 332
283 ; Hardware defines 333 ; Hardware Descriptor 1
284 #DEFINE battery_gauge_available hardware_flag,0 ; =1: OSTC has rechargeable battery with battery management chip 334 #DEFINE battery_gauge_available hardware_flag1,0 ; =1: OSTC has rechargeable battery with battery management chip
285 #DEFINE ambient_sensor hardware_flag,1 ; =1: OSTC has an ambient light sensor 335 #DEFINE ambient_sensor hardware_flag1,1 ; =1: OSTC has an ambient light sensor
286 #DEFINE analog_o2_input hardware_flag,2 ; =1: OSTC has analog inputs and S8 digital 336 #DEFINE analog_o2_input hardware_flag1,2 ; =1: OSTC has analog inputs and S8 digital
287 #DEFINE optical_input hardware_flag,3 ; =1: OSTC has an digital optical input 337 #DEFINE optical_input hardware_flag1,3 ; =1: OSTC has an digital optical input
288 #DEFINE ble_available hardware_flag,4 ; =1: OSTC has an BLE module 338 #DEFINE ble_available hardware_flag1,4 ; =1: OSTC has an BLE module
289 #DEFINE ostc_rx_present hardware_flag,5 ; =1: OSTC RX circuity present 339 #DEFINE ostc_rx_present hardware_flag1,5 ; =1: OSTC has RX circuity
290 ; hardware_flag,6 ; unused 340 ; hardware_flag1,6 ; --- unused
291 ; hardware_flag,7 ; unused 341 ; hardware_flag1,7 ; --- unused
292 342
343 ; Hardware Descriptor 2
344 #DEFINE screen_type hardware_flag2,0 ; =1: display 1, =0; display 0
345 #DEFINE compass_type hardware_flag2,1 ; =1: compass 1, =0: compass 0
346 #DEFINE compass_type2 hardware_flag2,2 ; =1: compass 2, =0: compass 0 or 1
347 #DEFINE analog_switches hardware_flag2,3 ; =1: analog switches available
348 ; hardware_flag2,4 ; --- unused
349 ; hardware_flag2,5 ; --- unused
350 ; hardware_flag2,6 ; --- unused
351 ; hardware_flag2,7 ; --- unused
352
353 ; Control of numerical Output
293 #DEFINE leftbind cvt_flags+0,0 354 #DEFINE leftbind cvt_flags+0,0
294 #DEFINE ignore_digit3 cvt_flags+0,1 355 #DEFINE ignore_digit3 cvt_flags+0,1
295 #DEFINE ignore_digit4 cvt_flags+0,2 356 #DEFINE ignore_digit4 cvt_flags+0,2
296 #DEFINE ignore_digit5 cvt_flags+0,3 357 #DEFINE ignore_digit5 cvt_flags+0,3
297 #DEFINE enable_screen_dumps cvt_flags+0,4 ; =1: Ignore vin_usb, wait for "l" command (Screen dump 358 ; cvt_flags+0,4 ; --- unused
298 #DEFINE screen_type cvt_flags+0,5 ; =1: display1, =0; display0 359 ; cvt_flags+0,5 ; --- unused
299 #DEFINE compass_type cvt_flags+0,6 ; =1: compass1, =0: compass0 360 ; cvt_flags+0,6 ; --- unused
300 #DEFINE analog_switches cvt_flags+0,7 ; =1: Analog switches available 361 ; cvt_flags+0,7 ; --- unused
301 362
302 #define pre_zero_flag cvt_flags+1,0 363 #DEFINE pre_zero_flag cvt_flags+1,0
303 #define all_zeros_flag cvt_flags+1,1 364 #DEFINE all_zeros_flag cvt_flags+1,1
304 #define DP_done cvt_flags+1,2 365 #DEFINE DP_done cvt_flags+1,2
305 #define DP_done2 cvt_flags+1,3 366 #DEFINE DP_done2 cvt_flags+1,3
306 #define show_last3 cvt_flags+1,4 367 #DEFINE show_last3 cvt_flags+1,4
307 #define leading_zeros cvt_flags+1,5 368 #DEFINE leading_zeros cvt_flags+1,5
308 #define show_last4 cvt_flags+1,6 369 #DEFINE show_last4 cvt_flags+1,6
309 #DEFINE compass_type2 cvt_flags+1,7 ; =1: Compass2, =0: Compass1 or compass0 370 ; cvt_flags+1,7 ; --- unused
310
311 371
312 ; HUD Status Byte 372 ; HUD Status Byte
313 #DEFINE hud_connection_ok hud_status_byte,0 ; =1 -> HUD connection ok 373 #DEFINE hud_connection_ok hud_status_byte,0 ; =1 HUD connection ok
314 ; hud_status_byte,1 ; =1 -> HUD is calibrated 374 ; hud_status_byte,1 ; =1 HUD is calibrated
315 ; hud_status_byte,2 ; =1 -> HUD Battery is low (<3000mV) 375 ; hud_status_byte,2 ; =1 HUD battery is low (<3000mV)
316 #DEFINE sensor1_active hud_status_byte,3 ; =1: Sensor1 is active 376 #DEFINE sensor1_active hud_status_byte,3 ; =1: sensor 1 is active
317 #DEFINE sensor2_active hud_status_byte,4 ; =1: Sensor2 is active 377 #DEFINE sensor2_active hud_status_byte,4 ; =1: sensor 2 is active
318 #DEFINE sensor3_active hud_status_byte,5 ; =1: Sensor3 is active 378 #DEFINE sensor3_active hud_status_byte,5 ; =1: sensor 3 is active
319 ; hud_status_byte,6 ; unused in stand-alone HUD 379 ; hud_status_byte,6 ; --- unused in stand-alone HUD
320 ; hud_status_byte,7 ; unused in stand-alone HUD 380 ; hud_status_byte,7 ; --- unused in stand-alone HUD
321 381
382 ; General Flags
322 #DEFINE switch_left flag1,0 ; =1: left button was pressed 383 #DEFINE switch_left flag1,0 ; =1: left button was pressed
323 #DEFINE switch_right flag1,1 ; =1: right button was pressed 384 #DEFINE switch_right flag1,1 ; =1: right button was pressed
324 #DEFINE neg_flag flag1,2 ; e.g. sub16 (sub_c = sub_a - sub_b) 385 #DEFINE neg_flag flag1,2 ; =1: result is negative, e.g. by sub16 (sub_c = sub_a - sub_b)
325 #DEFINE pressure_refresh flag1,3 ; =1: A new pressure/temperature is available 386 #DEFINE pressure_refresh flag1,3 ; =1: s new pressure/temperature is available
326 #DEFINE sleepmode flag1,4 ; =1: in Sleepmode 387 #DEFINE sleepmode flag1,4 ; =1: in sleep mode
327 #DEFINE tft_is_dimming flag1,5 ; =1: the TFT is dimming, ignore light sensor 388 #DEFINE tft_is_dimming flag1,5 ; =1: the TFT is dimming, ignore light sensor
328 #DEFINE display_velocity flag1,6 ; =1: show velocity 389 #DEFINE display_velocity flag1,6 ; =1: show velocity
329 #DEFINE no_sensor_int flag1,7 ; =1: block any further access to pressure sensor 390 #DEFINE no_sensor_int flag1,7 ; =1: block any further access to pressure sensor
330 391
331 #DEFINE rs232_receive_overflow flag2,0 ; =1: a RS232 timeout overflow occoured 392 #DEFINE rs232_receive_overflow flag2,0 ; =1: a RS232 timeout overflow occurred
332 #DEFINE stored_gas_changed flag2,1 ; =1: Stored Gas changed 393 #DEFINE stored_gas_changed flag2,1 ; =1: stored Gas changed
333 #DEFINE high_altitude_mode flag2,2 ; =1: unit was manually turned on with ambient pressure <880mbar 394 #DEFINE high_altitude_mode flag2,2 ; =1: unit was manually turned on with ambient pressure <880mbar
334 #DEFINE FLAG_apnoe_mode flag2,3 ; =1: Apnoe mode selected 395 #DEFINE FLAG_apnoe_mode flag2,3 ; =1: apnoe mode selected
335 #DEFINE restore_deco_data flag2,4 ; =1: restore deco data (After simulation) 396 #DEFINE restore_deco_data flag2,4 ; =1: restore deco data (After simulation)
336 #DEFINE premenu flag2,5 ; =1: Premenu/Divemenu selected 397 #DEFINE premenu flag2,5 ; =1: pre-menu/dive menu selected
337 #DEFINE menubit flag2,6 ; menu 398 #DEFINE menubit flag2,6 ; menu
338 #DEFINE simulatormode_active flag2,7 ; =1: simulator mode active, override pressure sensor readings 399 #DEFINE simulatormode_active flag2,7 ; =1: simulator mode active, override pressure sensor readings
339 400
340 #DEFINE divemode_menu flag3,0 ; =1: divemode menu is shown 401 #DEFINE divemode_menu flag3,0 ; =1: dive mode menu is shown
341 #DEFINE onesecupdate flag3,1 ; =1: after any second 402 #DEFINE onesecupdate flag3,1 ; =1: set any new second
342 #DEFINE twosecupdate flag3,2 ; =1: new two-second update 403 #DEFINE onesectoggle flag3,2 ; used for phasing every-2-seconds tasks
343 #DEFINE toggle_customview flag3,3 ; =1: next customview 404 #DEFINE toggle_customview flag3,3 ; =1: next customview
344 #DEFINE oneminupdate flag3,4 ; =1: after any minute 405 #DEFINE oneminupdate flag3,4 ; =1: set any new minute
345 #DEFINE divemode flag3,5 ; =1: in Divemode 406 #DEFINE divemode flag3,5 ; =1: in dive mode
346 #DEFINE battery_is_36v flag3,6 ; =1: 3,6V Battery is in use 407 #DEFINE battery_is_36v flag3,6 ; =1: a 3.6 Volt battery is in use
347 #DEFINE warning_active flag3,7 ; =1: a warning is active in divemode or surfacemode 408 #DEFINE message_warning flag3,7 ; =1: a warning is active in dive mode or surface mode
348 409
349 #DEFINE better_gas_available flag4,0 ; =1: a better gas is available 410 #DEFINE better_gas_available flag4,0 ; =1: a better gas is available
350 #DEFINE blinking_better_gas flag4,1 ; =1: gas is blinking 411 #DEFINE blinking_better_gas flag4,1 ; =1: gas is blinking
351 #DEFINE menuview flag4,2 ; =1: a menuview is shown in divemode (e.g. "Menu?") 412 #DEFINE menuview flag4,2 ; =1: a menu view is shown in dive mode (e.g. "Menu?")
352 #DEFINE quarter_second_update flag4,3 ; =1: a new 1/4 second has begun 413 #DEFINE quarter_second_update flag4,3 ; =1: a new 1/4 second has begun
353 #DEFINE divemode_gaschange flag4,4 ; =1: the gas will change very soon 414 #DEFINE divemode_gaschange flag4,4 ; =1: the gas will change very soon
354 #DEFINE decostop_active flag4,5 ; =1: decompression stop shown 415 #DEFINE decostop_active flag4,5 ; =1: decompression stop shown
355 #DEFINE depth_greater_100m flag4,6 ; =1: current depth > 100m 416 #DEFINE depth_greater_100m flag4,6 ; =1: current depth > 100 meters
356 #DEFINE realdive flag4,7 ; =1: a real dive during divemode 417 #DEFINE realdive flag4,7 ; =1: a real dive during dive mode
357 418
358 #DEFINE dive_warning_displayed flag5,0 ; =1: the warning sign is shown 419 #DEFINE dive_warning_displayed flag5,0 ; =1: the warning sign is shown
359 #DEFINE reset_average_depth flag5,1 ; =1: reset the average depth 420 #DEFINE reset_average_depth flag5,1 ; =1: reset the average depth
360 #DEFINE store_sample flag5,2 ; =1: store a new sample 421 #DEFINE store_sample flag5,2 ; =1: store a new sample
361 #DEFINE divemode2 flag5,3 ; =1: dive longer than one minute 422 #DEFINE divemode2 flag5,3 ; =1: dive longer than one minute
362 #DEFINE FLAG_active_descent flag5,4 ; used in Apnoe mode 423 #DEFINE FLAG_active_descent flag5,4 ; used in apnoe mode
363 #DEFINE event_occured flag5,5 ; =1: an event occured, store it! 424 #DEFINE event_occured flag5,5 ; =1: an event occurred, store it!
364 #DEFINE divemode_menu_active flag5,6 ; =1: the divemode menu is shown 425 #DEFINE divemode_menu_active flag5,6 ; =1: the dive mode menu is shown
365 #DEFINE temp_changed flag5,7 ; =1: the temperature changed 426 #DEFINE temp_changed flag5,7 ; =1: the temperature changed
366 427
367 #DEFINE gas6_changed flag6,0 ; =1: gas 6 has been selected/changed underwater 428 #DEFINE gas6_changed flag6,0 ; =1: gas 6 has been selected/changed underwater
368 #DEFINE onehourupdate flag6,1 ; =1: a new hour has just begun 429 #DEFINE onehourupdate flag6,1 ; =1: a new hour has just begun
369 #DEFINE settime_setdate flag6,2 ; =1: in the Set Time or Set Date Menu 430 #DEFINE settime_setdate flag6,2 ; =1: in the Set Time or Set Date Menu
370 #DEFINE setpoint_changed flag6,3 ; =1: setpoint has been changed 431 #DEFINE setpoint_changed flag6,3 ; =1: setpoint has been changed
371 #DEFINE second_row_warning flag6,4 ; =1: the second row contains a warning 432 #DEFINE second_row_warning flag6,4 ; =1: the second row contains a warning
372 #DEFINE FLAG_ccr_mode flag6,5 ; =1: CCR mode (fixed ppO2 or sensor) active 433 #DEFINE FLAG_ccr_mode flag6,5 ; =1: CCR mode (fixed ppO2 or sensor) active
373 #DEFINE FLAG_back_to_loop flag6,6 ; =1: a switchback from bailout to loop occured 434 #DEFINE FLAG_back_to_loop flag6,6 ; =1: a switchback from bailout to loop occurred
374 #DEFINE FLAG_set_marker flag6,7 ; =1: set a marker in the logbook 435 #DEFINE FLAG_set_marker flag6,7 ; =1: set a marker in the logbook
375 436
376 ; flag7,0 ; unused 437 #DEFINE better_gas_hint flag7,0 ; =1: mark a gas in yellow when it is a better gas
377 #DEFINE no_more_divesecs flag7,1 ; =1: Do no longer show seconds in divemode 438 #DEFINE no_more_divesecs flag7,1 ; =1: do no longer show seconds in dive mode
378 #DEFINE FLAG_gauge_mode flag7,2 ; =1: In Gauge mode 439 #DEFINE FLAG_gauge_mode flag7,2 ; =1: in Gauge mode
379 #DEFINE ignore_last_edited_gas flag7,3 ; Used in gaslist_cleanup_list 440 #DEFINE ignore_last_edited_gas flag7,3 ; used in gaslist_cleanup_list
380 #DEFINE ccr_diluent_setup flag7,4 ; =1: Setting up Diluents ("Gas6-10") 441 #DEFINE FLAG_diluent_setup flag7,4 ; =1: setting up Diluents ("Gas6-10")
381 #DEFINE space_gas_decriptions flag7,5 ; =1: add a space in front of gas numbers < 9 for alignment 442 IFDEF _rx_functions
382 #DEFINE short_gas_decriptions flag7,6 ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint 443 #DEFINE FLAG_pairing_mode flag7,5 ; =1: in transmitter-to-tank pairing menu
383 #DEFINE max_depth_greater_100m flag7,7 ; =1: Max. Depth > 100m 444 ENDIF
384 445 #DEFINE short_gas_decriptions flag7,6 ; =1: use short versions of gaslist_strcat_gas_cd and gaslist_strcat_setpoint
385 #DEFINE is_bailout flag8,0 ; =1: Bailout 446 #DEFINE max_depth_greater_100m flag7,7 ; =1: max. depth > 100 meters
386 #DEFINE is_bailout_menu flag8,1 ; =1: Bailout 447
387 #DEFINE toggle_gf flag8,2 ; =1: Toggle GF/aGF 448 #DEFINE FLAG_bailout_mode flag8,0 ; =1: in bailout mode
388 #DEFINE use_agf flag8,3 ; =1: Use aGF (instead of GF) 449 #DEFINE is_bailout_menu flag8,1 ; =1: in bailout menu
389 #DEFINE battery_removed_in_usb flag8,4 ; =1: The battery has been removed in USB (probably not used for anything useful) 450 #DEFINE toggle_gf flag8,2 ; =1: toggle GF/aGF
390 #DEFINE adc_running flag8,5 ; =1: The ADC is in use 451 #DEFINE use_agf flag8,3 ; =1: use aGF (instead of GF)
452 #DEFINE battery_removed_in_usb flag8,4 ; =1: the battery has been removed in USB (probably not used for anything useful)
453 #DEFINE adc_running flag8,5 ; =1: the ADC is in use
391 #DEFINE comm_service_enabled flag8,6 ; =1: COMM Service mode unlocked 454 #DEFINE comm_service_enabled flag8,6 ; =1: COMM Service mode unlocked
392 #DEFINE compass_enabled flag8,7 ; =1: The compass and accelerometer chip is active 455 #DEFINE compass_enabled flag8,7 ; =1: the compass and accelerometer chip is active
393 456
394 #DEFINE compass_fast_mode flag9,0 ; =1: The compass is in fast mode 457 #DEFINE compass_fast_mode flag9,0 ; =1: the compass is in fast mode
395 #DEFINE in_color_menu flag9,1 ; =1: In the color scheme menu 458 #DEFINE in_color_menu flag9,1 ; =1: in the color scheme menu
396 #DEFINE bailoutgas_event flag9,2 ; =1: bailout was selected or a gaschange during bailout 459 #DEFINE bailoutgas_event flag9,2 ; =1: bailout was selected or a gas change during bailout
397 #DEFINE win_invert flag9,3 ; =1: Invert font output 460 #DEFINE win_invert flag9,3 ; =1: invert font output
398 #DEFINE show_safety_stop flag9,4 ; =1: Show the safety stop 461 #DEFINE show_safety_stop flag9,4 ; =1: show the safety stop
399 #DEFINE safety_stop_active flag9,5 ; =1: The safety stop is currently displayed 462 #DEFINE safety_stop_active flag9,5 ; =1: the safety stop is currently displayed
400 #DEFINE new_s8_data_available flag9,6 ; =1: New data frame received 463 #DEFINE new_s8_data_available flag9,6 ; =1: new data frame received
401 #DEFINE print_compass_label flag9,7 ; =1: print the graphical comapss label 464 #DEFINE print_compass_label flag9,7 ; =1: print the graphical compass label
402 465
403 #DEFINE s8_digital flag10,0 ; =1: Digital I/O 466 #DEFINE s8_digital flag10,0 ; =1: digital I/O
404 #DEFINE menu_show_sensors2 flag10,1 ; =1: Update mV data in calibration menu 467 #DEFINE menu_update_sensor_mv flag10,1 ; =1: update mV data in calibration menu
405 #DEFINE use_O2_sensor1 flag10,2 ; =1: Use this sensor 468 #DEFINE use_O2_sensor1 flag10,2 ; =1: use this sensor
406 #DEFINE use_O2_sensor2 flag10,3 ; =1: Use this sensor 469 #DEFINE use_O2_sensor2 flag10,3 ; =1: use this sensor
407 #DEFINE use_O2_sensor3 flag10,4 ; =1: Use this sensor 470 #DEFINE use_O2_sensor3 flag10,4 ; =1: use this sensor
408 #DEFINE setpoint_fallback flag10,5 ; =1: Fallback to SP1 due to external O2 sensor failure 471 #DEFINE setpoint_fallback flag10,5 ; =1: fall-back to SP1 due to external O2 sensor failure
409 #DEFINE blinking_setpoint flag10,6 ; =1: SP is blinking 472 IFDEF _screendump
410 #DEFINE flip_screen flag10,7 ; =1: Screen is flipped by 180° 473 #DEFINE enable_screen_dumps flag10,6 ; =1: ignore vin_usb, wait for "l" command (screen dump)
411 474 ELSE
412 #DEFINE sensor1_calibrated_ok flag11,0 ; =1: This sensor has been calibrated ok 475 #DEFINE disable_comm_mode flag10,6 ; =1: ignore vin_usb
413 #DEFINE sensor2_calibrated_ok flag11,1 ; =1: This sensor has been calibrated ok 476 ENDIF
414 #DEFINE sensor3_calibrated_ok flag11,2 ; =1: This sensor has been calibrated ok 477 #DEFINE flip_screen flag10,7 ; =1: screen is flipped by 180°
415 #DEFINE voting_logic_sensor1 flag11,3 ; =1: This sensor is within the voting logic threshold 478
416 #DEFINE voting_logic_sensor2 flag11,4 ; =1: This sensor is within the voting logic threshold 479 ; flag11,* are not cleared on (re-)start
417 #DEFINE voting_logic_sensor3 flag11,5 ; =1: This sensor is within the voting logic threshold 480 #DEFINE sensor1_calibrated_ok flag11,0 ; =1: this sensor has been calibrated ok
418 #DEFINE cc_active flag11,6 ; =1: Constant Current active (cR Hardware) 481 #DEFINE sensor2_calibrated_ok flag11,1 ; =1: this sensor has been calibrated ok
419 #DEFINE cv_active flag11,7 ; =1: Constant Voltage active (cR Hardware) 482 #DEFINE sensor3_calibrated_ok flag11,2 ; =1: this sensor has been calibrated ok
420 483 #DEFINE voting_logic_sensor1 flag11,3 ; =1: this sensor is within the voting logic threshold
421 #DEFINE neg_flag_velocity flag12,0 ; neg_flag backup for velocity logic 484 #DEFINE voting_logic_sensor2 flag11,4 ; =1: this sensor is within the voting logic threshold
422 #DEFINE compass_bearing_eq flag12,1 ; bearing is in direction? do not show << or >> 485 #DEFINE voting_logic_sensor3 flag11,5 ; =1: this sensor is within the voting logic threshold
423 #DEFINE compass_bearing_lft flag12,2 ; bearing is to the left/<< if set, otherwise to the right/>> 486 #DEFINE cc_active flag11,6 ; =1: constant current active (cR hardware)
424 #DEFINE compass_bearing_vis flag12,3 ; bearing is visible? (either ahead or behind/-180°) 487 #DEFINE cv_active flag11,7 ; =1: constant voltage active (cR hardware)
425 #DEFINE compass_bearing_ahd flag12,4 ; bearing is ahead or behind? 488
426 #DEFINE blinking_depth_warning flag12,5 ; set by the color_depth. =1: warning color 489 #DEFINE neg_flag_velocity flag12,0 ; neg_flag backup for velocity logic
427 #DEFINE blinking_depth_prev flag12,6 ; set by the TFT_depth. =1: prev display had warning color 490 #DEFINE compass_bearing_eq flag12,1 ; =1: bearing is in direction, do not show << or >>
428 #DEFINE blinking_depth_toggle flag12,7 ; toggle to blink 491 #DEFINE compass_bearing_lft flag12,2 ; =1: bearing is to the left/<<, =0: to the right/>>
429 492 #DEFINE compass_bearing_vis flag12,3 ; =1: bearing is visible (either ahead or behind/-180°)
430 #DEFINE compass_bearing_set flag13,0 ; bearing set 493 #DEFINE compass_bearing_ahd flag12,4 ; =1: bearing is ahead, =0: behind
431 #DEFINE analog_sw1_pressed flag13,1 ; =1: Analog switch 1 pressed 494 #DEFINE blinking_depth_warning flag12,5 ; =1: warning color, set by the color_depth
432 #DEFINE analog_sw2_pressed flag13,2 ; =1: Analog switch 2 pressed 495 #DEFINE blinking_depth_prev flag12,6 ; =1: prev display had warning color, set by the TFT_depth
433 #DEFINE sp2_switched flag13,3 ; =1: This setpoint has been autoselected already 496 #DEFINE blinking_depth_toggle flag12,7 ; toggle controlling blinking
434 #DEFINE sp3_switched flag13,4 ; =1: This setpoint has been autoselected already 497
435 #DEFINE sp4_switched flag13,5 ; =1: This setpoint has been autoselected already 498 ; flag13,* are not cleared on (re-)start
436 #DEFINE sp5_switched flag13,6 ; =1: This setpoint has been autoselected already 499 #DEFINE compass_bearing_set flag13,0 ; =1: compass bearing is set
500 #DEFINE analog_sw1_pressed flag13,1 ; =1: analog switch 1 pressed
501 #DEFINE analog_sw2_pressed flag13,2 ; =1: analog switch 2 pressed
502 #DEFINE sp2_switched flag13,3 ; =1: this setpoint has been auto-selected already
503 #DEFINE sp3_switched flag13,4 ; =1: this setpoint has been auto-selected already
504 #DEFINE sp4_switched flag13,5 ; =1: this setpoint has been auto-selected already
505 #DEFINE sp5_switched flag13,6 ; =1: this setpoint has been auto-selected already
437 #DEFINE use_old_batt_flag flag13,7 ; =1: load old battery information after power-on reset 506 #DEFINE use_old_batt_flag flag13,7 ; =1: load old battery information after power-on reset
438 507
439 #DEFINE FLAG_pscr_mode flag14,0 ; =1: OSTC is in PSCR mode 508 #DEFINE FLAG_pscr_mode flag14,0 ; =1: OSTC is in pSCR mode
440 #DEFINE deep_sleep flag14,1 ; =1: OSTC is in deep sleep (ignore buttons, etc) 509 #DEFINE deep_sleep flag14,1 ; =1: OSTC is in deep sleep (ignore buttons, etc)
441 #DEFINE sensors_agree flag14,2 ; =1: the ppO2 of all sensors are within the threshold range 510 #DEFINE sensors_agree flag14,2 ; =1: the ppO2 of all sensors are within the threshold range
442 #DEFINE gas_needs_attention flag14,3 ; =1: the gas needs attention has been raised before 511 #DEFINE gas_needs_attention flag14,3 ; =1: the gas needs attention has been raised before
443 #DEFINE gas_needs_warning flag14,4 ; =1: the gas needs warning has been raised before 512 #DEFINE gas_needs_warning flag14,4 ; =1: the gas needs warning has been raised before
444 #DEFINE sensor_warning flag14,5 ; =1: the sensors disagree warning has been raised before 513 #DEFINE sensor_warning flag14,5 ; =1: the sensors disagree warning has been raised before
445 #DEFINE alternative_divelayout flag14,6 ; =1: the alternative divelayout is used (aka Blind Mode) 514 #DEFINE alternative_divelayout flag14,6 ; =1: the alternative dive layout is used (aka "blind mode")
446 #DEFINE i2c_error_flag flag14,7 ; =1: an I2C error occured 515 #DEFINE i2c_error_flag flag14,7 ; =1: an I2C error occurred
447 516
448 #define aa_antialias aa_flags,0 ; used by aa_wordprocessor 517 #DEFINE better_dil_available flag15,0 ; =1: a better diluent is available
449 #define aa_color_quart aa_flags,1 ; used by aa_wordprocessor 518 #DEFINE blinking_better_dil flag15,1 ; =1: diluent is blinking
450 #define aa_color_half aa_flags,2 ; used by aa_wordprocessor 519 #DEFINE FLAG_oc_mode flag15,2 ; =1: OC mode active
451 ; aa_flags,3 ; unused 520 #DEFINE message_attention flag15,3 ; =1: an attention is active in divem ode or surface mode
452 ; aa_flags,4 ; unused 521 #DEFINE message_advice flag15,4 ; =1: an advice is active in divem ode
453 ; aa_flags,5 ; unused 522 #DEFINE blinking_depth_attention flag15,5 ; =1: attention color, set by the color_depth
454 ; aa_flags,6 ; unused 523 #DEFINE aux_flag flag15,6 ; provided for local boolean storage
455 ; aa_flags,7 ; unused 524 #DEFINE FLAG_tr_enabled flag15,7 ; =1: TR (pressure transmitter) functions enabled
456 525
457 526 IFDEF _cave_mode
458 ; Update flags in divemode, =1: Update the screen 527 #DEFINE FLAG_cave_mode flag16,0 ; =1: in cave mode
459 #DEFINE FLAG_TFT_divemode_mask tft_update_flags+0,0 528 #DEFINE FLAG_cave_mode_shutdown flag16,1 ; =1: cave mode has shut down due to bracktrack memory full
460 #DEFINE FLAG_TFT_display_ndl_mask tft_update_flags+0,1 529 #DEFINE FLAG_dive_turned flag16,2 ; =1: dive is turned
461 #DEFINE FLAG_TFT_depth tft_update_flags+0,2 530 #DEFINE toggle_turn_dive flag16,3 ; =1: toggle dive turned status
462 #DEFINE FLAG_TFT_divemins tft_update_flags+0,3 531 #DEFINE gas_needs_mode_last flag16,4 ; =1: last reported gas needs where computed in cave mode
463 #DEFINE FLAG_TFT_show_safety_stop tft_update_flags+0,4 532 ENDIF
464 #DEFINE FLAG_TFT_display_ndl tft_update_flags+0,5 533 IFDEF _rx_functions
465 #DEFINE FLAG_TFT_display_deko_mask tft_update_flags+0,6 534 #DEFINE menu_update_tank_pres flag16,5 ; =1: update tank pressure data in menu mode
466 #DEFINE FLAG_TFT_display_deko tft_update_flags+0,7 535 ENDIF
467 #DEFINE FLAG_TFT_display_tts tft_update_flags+1,0 536 #DEFINE redraw_custview_mask flag16,6 ; =1: request to redraw the custom view mask
468 #DEFINE FLAG_TFT_temp_divemode tft_update_flags+1,1 537 ; flag16,7 ; --- unused
469 #DEFINE FLAG_TFT_divemode_warning tft_update_flags+1,2 538
470 #DEFINE FLAG_TFT_divemode_warning_clear tft_update_flags+1,3 539 IFDEF _rx_functions
471 #DEFINE FLAG_TFT_active_gas_divemode tft_update_flags+1,4 540 #DEFINE transmitter1_lost flag17,0 ; =1: transmitter 1 lost is an old message
472 #DEFINE FLAG_TFT_clear_safety_stop tft_update_flags+1,5 541 #DEFINE transmitter1_battery flag17,1 ; =1: transmitter 1 battery low is an old message
473 #DEFINE FLAG_TFT_max_depth tft_update_flags+1,6 542 #DEFINE transmitter1_pres_warn flag17,2 ; =1: transmitter 1 pressure warning is an old message
474 #DEFINE FLAG_TFT_divemode_mask_alt tft_update_flags+1,7 543 #DEFINE transmitter1_pres_att flag17,3 ; =1: transmitter 1 pressure attention is an old message
475 #DEFINE FLAG_TFT_dive_warning_text_clear tft_update_flags+2,0 544 #DEFINE transmitter2_lost flag17,4 ; =1: transmitter 2 lost is an old message
476 #DEFINE FLAG_TFT_dive_warning_text_clr2 tft_update_flags+2,1 545 #DEFINE transmitter2_battery flag17,5 ; =1: transmitter 2 battery low is an old message
477 #DEFINE FLAG_TFT_max_depth_alt tft_update_flags+2,2 546 #DEFINE transmitter2_pres_warn flag17,6 ; =1: transmitter 2 pressure warning is an old message
478 #DEFINE FLAG_TFT_big_deco_alt tft_update_flags+2,3 547 #DEFINE transmitter2_pres_att flag17,7 ; =1: transmitter 2 pressure attention is an old message
548 ENDIF
549
550 ; Low-Level Display Control
551 #DEFINE aa_antialias aa_flags,0 ; used by aa_wordprocessor
552 #DEFINE aa_color_quart aa_flags,1 ; used by aa_wordprocessor
553 #DEFINE aa_color_half aa_flags,2 ; used by aa_wordprocessor
554 #DEFINE use_custom_colors aa_flags,3 ; =1: override default pixel colors, used by color_image
555 ; aa_flags,4 ; --- unused
556 ; aa_flags,5 ; --- unused
557 ; aa_flags,6 ; --- unused
558 ; aa_flags,7 ; --- unused
559
560
561 ; Display Update Flags in Dive Mode
562 #DEFINE FLAG_TFT_divemode_mask tft_update_flags+0,0 ; =1: update the display
563 #DEFINE FLAG_TFT_display_ndl_mask tft_update_flags+0,1 ; =1: update the display
564 #DEFINE FLAG_TFT_depth tft_update_flags+0,2 ; =1: update the display
565 #DEFINE FLAG_TFT_divemins tft_update_flags+0,3 ; =1: update the display
566 #DEFINE FLAG_TFT_show_safety_stop tft_update_flags+0,4 ; =1: update the display
567 #DEFINE FLAG_TFT_display_ndl tft_update_flags+0,5 ; =1: update the display
568 #DEFINE FLAG_TFT_display_deko_mask tft_update_flags+0,6 ; =1: update the display
569 #DEFINE FLAG_TFT_display_deko tft_update_flags+0,7 ; =1: update the display
570 #DEFINE FLAG_TFT_display_tts tft_update_flags+1,0 ; =1: update the display
571 #DEFINE FLAG_TFT_temp_divemode tft_update_flags+1,1 ; =1: update the display
572 #DEFINE FLAG_TFT_divemode_warning tft_update_flags+1,2 ; =1: update the display
573 #DEFINE FLAG_TFT_divemode_warning_clear tft_update_flags+1,3 ; =1: update the display
574 #DEFINE FLAG_TFT_active_gas_divemode tft_update_flags+1,4 ; =1: update the display
575 #DEFINE FLAG_TFT_clear_safety_stop tft_update_flags+1,5 ; =1: update the display
576 #DEFINE FLAG_TFT_max_depth tft_update_flags+1,6 ; =1: update the display
577 #DEFINE FLAG_TFT_divemode_mask_alt tft_update_flags+1,7 ; =1: update the display
578 #DEFINE FLAG_TFT_dive_warning_text_clear tft_update_flags+2,0 ; =1: update the display
579 #DEFINE FLAG_TFT_dive_warning_text_clr2 tft_update_flags+2,1 ; =1: update the display
580 #DEFINE FLAG_TFT_big_deco_alt tft_update_flags+2,2 ; =1: update the display
581 #DEFINE FLAG_TFT_display_ndl_or_deko tft_update_flags+2,3 ; =1: update the display
479 ; tft_update_flags+2,4 ; unused 582 ; tft_update_flags+2,4 ; unused
480 ; tft_update_flags+2,5 ; unused 583 ; tft_update_flags+2,5 ; unused
481 ; tft_update_flags+2,6 ; unused 584 ; tft_update_flags+2,6 ; unused
482 ; tft_update_flags+2,7 ; unused 585 ; tft_update_flags+2,7 ; unused
483 586
484 587
485 ;---------------------------- Macros ------------------------------------ 588 ;---------------------------- Macros ------------------------------------
486 589
487 TSTOSS macro opt_reg ; TeST Option Skip if not Zero 590 TSTOSS macro opt_reg ; TeST Option Skip if not Zero
488 movff opt_reg,WREG 591 movff opt_reg,WREG ; Attention: destroys WREG!
489 tstfsz WREG,A 592 tstfsz WREG,A ; Attention: the following command must be a
490 bra $+4 593 bra $+4 ; plain machine command, do not let
491 endm 594 endm ; follow a macro!
492 595
493 ;---------------------------- C-code Routines ---------------------------- 596 ;---------------------------- C-Code Routines ----------------------------
494 597
495 extern deco_calc_desaturation_time 598 extern deco_calc_desaturation_time
496 extern deco_calc_hauptroutine 599 extern deco_calc_hauptroutine
600 extern deco_calc_dive_interval
497 extern deco_calc_dive_interval_1min 601 extern deco_calc_dive_interval_1min
498 extern deco_calc_dive_interval_10min 602 extern deco_calc_dive_interval_10min
499 extern deco_calc_dive_interval
500 extern deco_clear_tissue 603 extern deco_clear_tissue
501 extern deco_pull_tissues_from_vault 604 extern deco_pull_tissues_from_vault
502 extern deco_push_tissues_to_vault 605 extern deco_push_tissues_to_vault
503 606
504 607
505 ;---------------------------- Bank0 DATA ------------------------------------ 608 ;---------------------------- Bank0 DATA ------------------------------------
506 isr_backup equ 0x60 609 isr_backup equ 0x60
507 isr_backup udata_ovr isr_backup ; Reserved space for interupt data 610 isr_backup udata_ovr isr_backup ; reserved space for interrupt data
508 611
509 ;---- Backup for general registers 612
613 ;---- Backup for general Registers
510 isr_prod res 2 614 isr_prod res 2
511 615
512 ;---- MS5541 subroutines 616 ;---- MS5541 Subroutines
513 amb_pressure res 2 617 amb_pressure res 2
514 temperature res 2 618 temperature res 2
515 619
516 C1 res 2 ; Decoded calibration data 620 C1 res 2 ; decoded calibration data
517 C2 res 2 621 C2 res 2
518 C3 res 2 622 C3 res 2
519 C4 res 2 ; Here: C4-250 623 C4 res 2 ; here: C4-250
520 C5 res 2 ; Here: Reference Temperature UT1 = 8*C5 + 10000 (u16 range 10.000 .. +42.760) 624 C5 res 2 ; here: Reference Temperature UT1 = 8*C5 + 10000 (u16 range 10.000 .. +42.760)
521 C6 res 2 625 C6 res 2
522 D1 res 2 ; raw pressure 626 D1 res 2 ; raw pressure
523 D2 res 2 ; raw temperature 627 D2 res 2 ; raw temperature
524 xdT res 2 628 xdT res 2
525 xdT2 res 2 629 xdT2 res 2
526 OFF res 2 630 OFF res 2
527 SENS res 2 631 SENS res 2
528 dLSB res 1 ; Pressure sensor interface 632 dLSB res 1 ; pressure sensor interface
529 dMSB res 1 633 dMSB res 1
530 clock_count res 1 634 clock_count res 1
531 sensor_state_counter res 1 ; counts to eight for state maschine 635 sensor_state_counter res 1 ; counts to eight for state machine
532 amb_pressure_avg res 2 636 amb_pressure_avg res 2
533 temperature_avg res 2 637 temperature_avg res 2
534 minimum_temperature res 2 ; minimum temperature 638 minimum_temperature res 2 ; minimum temperature
535 last_temperature res 2 639 last_temperature res 2
536 last_pressure res 2 640 last_pressure res 2
537 last_pressure_velocity res 2 ; For velocity 641 last_pressure_velocity res 2 ; for velocity
538 last_surfpressure res 2 642 last_surfpressure res 2
539 last_surfpressure_15min res 2 643 last_surfpressure_15min res 2
540 last_surfpressure_30min res 2 644 last_surfpressure_30min res 2
541 rel_pressure res 2 645 rel_pressure res 2
542 sim_pressure res 2 ; hold simulated pressure in mbar if in Simulator mode 646 sim_pressure res 2 ; hold simulated pressure in mbar if in Simulator mode
543 max_pressure res 2 647 max_pressure res 2
544 avg_rel_pressure res 2 648 avg_rel_pressure res 2
545 avg_rel_pressure_total res 2 649 avg_rel_pressure_total res 2
546 650
547 ;---- Data for ISR math subroutines 651 ;---- Data for ISR Math Subroutines
548 isr_xC res 4 652 isr_xC res 4
549 isr_xA res 2 653 isr_xA res 2
550 isr_xB res 2 654 isr_xB res 2
551 655
552 ;---- Data for ISR routines 656 ;---- Data for ISR Routines
553 isr1_temp res 1 ; ISR temp variable, used in ms5541.asm, isr_rtcc, isr_battery_gauge 657 isr1_temp res 1 ; ISR temp variable, used in ms5541.asm, isr_rtcc, isr_battery_gauge
554 isr2_temp res 1 ; ISR temp variable, used isr_battery_gauge 658 isr2_temp res 1 ; ISR temp variable, used isr_battery_gauge
555 659
556 ;---- Display brightness 660 ;---- Display Brightness
557 max_CCPR1L res 1 ; Max. brightness value for CCPR1L 661 max_CCPR1L res 1 ; max. brightness value for CCPR1L
558 662
559 ; Battery gauge (nAs, nC) 663 ;---- Battery Gauge (nAs, nC)
560 battery_gauge res 6 ; 48Bit -> 78Ah max... 664 battery_gauge res 6 ; 48 bit -> 78 Ah max
561 665
562 ; IR/S8-Link 666 ;---- IR/S8-Link
563 ir_s8_buffer res .18 ; temporally used in get_calibration_data for the raw (packed) calibration data 667 ir_s8_buffer res .18 ; temporally used in get_calibration_data for the raw (packed) calibration data
564 ir_s8_counter res 1 668 ir_s8_counter res 1
565 ir_s8_timeout res 1 ; Timeout for valid data 669 ir_s8_timeout res 1 ; timeout for valid data
566 670
567 ; Compass raw data 671 ;---- Compass raw Data
568 compass_DX res 2 672 compass_DX res 2
569 compass_DY res 2 673 compass_DY res 2
570 compass_DZ res 2 674 compass_DZ res 2
571 675
572 accel_DX res 2 676 accel_DX res 2
573 accel_DY res 2 677 accel_DY res 2
574 accel_DZ res 2 678 accel_DZ res 2
575 679
576 ; Compass FILTERED data 680 ;---- Compass filtered Data
577 compass_DX_f res 2 681 compass_DX_f res 2
578 compass_DY_f res 2 682 compass_DY_f res 2
579 compass_DZ_f res 2 683 compass_DZ_f res 2
580 684
581 accel_DX_f res 2 685 accel_DX_f res 2
582 accel_DY_f res 2 686 accel_DY_f res 2
583 accel_DZ_f res 2 687 accel_DZ_f res 2
584 688
585 ; Compass calibration data 689 ;---- Compass Calibration Data
586 compass_CX_f res 2 690 compass_CX_f res 2
587 compass_CY_f res 2 691 compass_CY_f res 2
588 compass_CZ_f res 2 692 compass_CZ_f res 2
589 693
590 ; Compass more data 694 ;---- Compass more Data
591 compass_heading res 2 ; Corrected heading (in 1°) : -180 .. 180 695 compass_heading res 2 ; corrected heading (in 1°) : -180 .. 180
592 compass_heading_old res 2 ; Old heading (For smoother display) 696 compass_heading_old res 2 ; old heading (For smoother display)
593 compass_heading_shown res 2 ; Displayed heading 697 compass_heading_shown res 2 ; displayed heading
594 ;compass_roll res 2 ; Rotation around the X axis 698 ;compass_roll res 2 ; rotation around the X axis
595 ;compass_pitch res 2 ; Rotation around the Y axis 699 ;compass_pitch res 2 ; rotation around the Y axis
596 700 compass_a res 2 ; tmp data for Q15 arithmetics
597 compass_a res 2 ; Tmp data for Q15 arithmetics
598 compass_b res 2 701 compass_b res 2
599 compass_r res 3 702 compass_r res 3
600 703
704 ;---- Data for Logging
601 CNS_start res 2 ; CNS value at beginning of dive 705 CNS_start res 2 ; CNS value at beginning of dive
602 GF_start res 1 ; GF value at beginning of dive 706 GF_start res 1 ; GF value at beginning of dive
603 707
604 speed_setting res 1 ; =1: Eco, =2: Normal, =3: Fastest 708 ;---- CPU mode
605 709 speed_setting res 1 ; =1: eco, =2: normal, =3: fastest
606 ;---- Data for graphical compass 710
711 ;---- Data for graphical Compass
607 xRD res 2 ; virtual compass ruler offset 712 xRD res 2 ; virtual compass ruler offset
608 xRDr res 2 ; virtual compass ruler offset - right end 713 xRDr res 2 ; virtual compass ruler offset - right end
609 xRD180 res 2 ; virtual compass ruler offset for the -180 marker 714 xRD180 res 2 ; virtual compass ruler offset for the -180 marker
610 xLO res 1 ; lo backup to prevent trashing 715 xLO res 1 ; lo backup to prevent trashing
611 xHI res 1 ; hi backup to prevent trashing 716 xHI res 1 ; hi backup to prevent trashing
638 flag10 res 1 743 flag10 res 1
639 flag11 res 1 744 flag11 res 1
640 flag12 res 1 745 flag12 res 1
641 flag13 res 1 746 flag13 res 1
642 flag14 res 1 747 flag14 res 1
643 hardware_flag res 1 ; hardware descriptor flag 748 flag15 res 1
749 flag16 res 1
750 flag17 res 1
751 hardware_flag1 res 1 ; hardware descriptor flags 1
752 hardware_flag2 res 1 ; hardware descriptor flags 2
644 tft_update_flags res 3 753 tft_update_flags res 3
645 754
646 ;---- Interface to Data Conversion & 755 ;---- Interface to Data Conversion &
647 ;---- Output Functions, as well as 756 ;---- Output Functions, as well as
648 ;---- General-Purpose Temp Storage 757 ;---- General-Purpose Temp Storage
649 lo res 1 758 lo res 1 ; nickname for "low" | Attention: do not change the
650 hi res 1 759 hi res 1 ; nickname for "high" | relative positioning of these
651 up res 1 760 up res 1 ; nickname for "upper" | variables, lo will also be used
761 ex res 1 ; nickname for "extra" | as base address for a 8, 16 and
762 ul res 1 ; nickname for "ultra" | 32 bit buffer
652 ignore_digits res 1 763 ignore_digits res 1
653 764
654 ;---- Interface to Graphic Functions 765 ;---- Interface to Graphic Functions
655 win_leftx2 res 1 766 win_leftx2 res 1
656 win_top res 1 767 win_top res 1
661 win_color2 res 1 772 win_color2 res 1
662 win_font res 1 773 win_font res 1
663 774
664 ;---- Interface to Math Functions 775 ;---- Interface to Math Functions
665 divA res 2 776 divA res 2
666 divB res 1
667 xC res 4 777 xC res 4
668 xA res 2 778 xA res 2
669 xB res 2 779 xB res 2
670 sub_c res 2 780 sub_c res 2
671 sub_a res 2 781 sub_a res 2
672 sub_b res 2 782 sub_b res 2
783 math_loop res 1 ; internal variable used for loops
673 784
674 ;---- Misc. 785 ;---- Misc.
675 timeout_counter1 res 2 ; timeout for dive operations 786 timeout_counter1 res 2 ; timeout for dive operations
676 timeout_counter2 res 1 ; timeout for menu operations 787 timeout_counter2 res 1 ; timeout for menu operations
677 batt_voltage res 2 ; battery voltage in mV 788 batt_voltage res 2 ; battery voltage in mV
678 batt_percent res 1 ; battery in percent (1-100) 789 batt_percent res 1 ; battery in percent (1-100)
679 warning_counter res 1 ; counts amount of warning in divemode 790 message_counter res 1 ; counts amount of messages
680 warning_page res 1 ; current # of warning page 791 message_page res 1 ; current # of message page
792 pairing_slot res 1 ; slot number, used in transmitter pairing
793
681 794
682 ;---- Dive Mode / General 795 ;---- Dive Mode / General
683 divemins res 2 796 divemins res 2
684 divesecs res 1 797 divesecs res 1
685 total_divetime_seconds res 2 798 total_divetime_seconds res 2
686 average_divesecs res 2 ; for the resettable stopwatch 799 average_divesecs res 2 ; time accumulator for the resettable stopwatch / average depth
800 average_divesecs_total res 2 ; time accumulator for the total average depth
801 curr_depth res 1 ; current depth in meters
802 amb_press_10 res 2 ; ambient pressure divided by 10
687 safety_stop_countdown res 1 ; counts seconds of safety stop 803 safety_stop_countdown res 1 ; counts seconds of safety stop
688 gaslist_gas res 1 ; used for transfer between gaslist.asm and menu_tree.asm 804 gaslist_gas res 1 ; used for transfer between gaslist.asm and menu_tree.asm
689 active_gas res 1 ; the currently breathed gas (1-5) 805 best_gas_number res 1 ; number of the "best gas": 0= none found, 1-5= gases 1-5, 255= not computed
690 ;active_gas_type res 1 ; 0=Disabled, 1=First, 2=Travel, 3=Deco for OC gases and 0=Disabled, 1=First, 2=Normal for diluents 806 best_dil_number res 1 ; number of the "best dil": 0= none found, 1-5= dils 1-5, 255= not computed
807 active_gas res 1 ; the currently used OC/bailout gas (1-5)
808 active_dil res 1 ; the currently used diluent (1-5)
691 809
692 ;---- Dive Mode / Apnoe 810 ;---- Dive Mode / Apnoe
693 apnoe_surface_mins res 1 811 apnoe_surface_mins res 1
694 apnoe_surface_secs res 1 812 apnoe_surface_secs res 1
695 apnoe_mins res 1 813 apnoe_mins res 1
713 831
714 ;---- O2 Sensor Data 832 ;---- O2 Sensor Data
715 o2_mv_sensor1 res 2 ; in 0.1mV steps 833 o2_mv_sensor1 res 2 ; in 0.1mV steps
716 o2_mv_sensor2 res 2 ; in 0.1mV steps 834 o2_mv_sensor2 res 2 ; in 0.1mV steps
717 o2_mv_sensor3 res 2 ; in 0.1mV steps 835 o2_mv_sensor3 res 2 ; in 0.1mV steps
718 o2_ppo2_sensor1 res 1 ; Sensor1 ppO2 (in 0.01bar steps) 836 o2_ppo2_sensor1 res 1 ; sensor 1 ppO2 (in 0.01 bar steps)
719 o2_ppo2_sensor2 res 1 ; Sensor2 ppO2 (in 0.01bar steps) 837 o2_ppo2_sensor2 res 1 ; sensor 2 ppO2 (in 0.01 bar steps)
720 o2_ppo2_sensor3 res 1 ; Sensor3 ppO2 (in 0.01bar steps) 838 o2_ppo2_sensor3 res 1 ; sensor 3 ppO2 (in 0.01 bar steps)
721 hud_status_byte res 1 839 hud_status_byte res 1
722 840
723 841
724 ;========================= privte Variables =================================== 842 ;========================= private Variables ===================================
725 ; do not access from outside of the respective source files! 843 ; do not access from outside of the respective source files!
726 844
727 ;---- aa_wordprocessor.asm 845 ;---- aa_wordprocessor.asm
728 aa_flags res 1 ; various flags for aa_wordprocessor 846 aa_flags res 1 ; various flags for aa_wordprocessor
729 aa_bitlen res 1 ; count of pixels when decoding bitmaps 847 aa_bitlen res 1 ; count of pixels when decoding bitmaps
758 ;---- i2c.asm 876 ;---- i2c.asm
759 i2c_temp1 res 1 ; temporary data 877 i2c_temp1 res 1 ; temporary data
760 i2c_temp2 res 1 ; temporary data 878 i2c_temp2 res 1 ; temporary data
761 879
762 ;---- menu_processor.asm 880 ;---- menu_processor.asm
763 menupos1 res 1 ; logbook and divemode menu 881 menupos1 res 1 ; logbook and dive mode menu
764 menupos2 res 1 ; used for dive mode simulator and pre-menu 882 menupos2 res 1 ; used for dive mode simulator and pre-menu
765 menupos3 res 1 ; used for Customviews 883 menupos3 res 1 ; used for custom views
766 menupos4 res 1 ; used for divemode menu 884 menupos4 res 1 ; used for dive mode menu
767 menu_flags res 1 ; flags for menu entries 885 menu_flags res 1 ; flags for menu entries
768 menu_item res 1 ; index of the current item 886 menu_item res 1 ; index of the current item
769 start_item res 1 ; index of the first item (scrolling) 887 start_item res 1 ; index of the first item (scrolling)
770 item_max res 1 ; number of items in menu 888 item_max res 1 ; number of items in menu
771 selected_item res 1 ; index of the current item 889 selected_item res 1 ; index of the current item
790 ;---- tft.asm 908 ;---- tft.asm
791 save_top res 1 909 save_top res 1
792 save_height res 1 910 save_height res 1
793 save_left res 1 911 save_left res 1
794 save_width res 1 912 save_width res 1
795 ds_line res 1 ; current line (0..239)
796 ds_column res 1 ; current columnx2 (0..159)
797 ds_pixel res 2 ; current pixel color
798 ds_count res 1 ; repetition count
799 tft_temp1 res 1 913 tft_temp1 res 1
800 tft_temp2 res 1 914 tft_temp2 res 1
801 tft_temp3 res 1 915 tft_temp3 res 1
802 tft_temp4 res 1 916 tft_temp4 res 1
803 917
918 IFDEF _screendump
919 ;---- Screendump Function
920 ds_line res 1 ; current line (0..239) (dump screen function)
921 ds_column res 1 ; current columnx2 (0..159) (dump screen function)
922 ds_pixel res 2 ; current pixel color (dump screen function)
923 ds_count res 1 ; repetition count (dump screen function)
924 ENDIF
925
804 ;---- wait.asm 926 ;---- wait.asm
805 wait_counter res 1 927 wait_counter res 1
806 928
807 ; ==> 187 bytes used - 21 bytes free 929 ; ==> 202 bytes used - 6 bytes free
808 930
809 931
810 ;============================ LOCAL DATA ====================================== 932 ;============================ LOCAL DATA ======================================
811 ; Space for various overlayed local data from top-level applications, 933 ; Space for various overlayed local data from top-level applications,
812 ; i.e. applications that never run in parallel to each other 934 ; i.e. applications that never run in parallel to each other
816 ; Mode local1 local2 local3 938 ; Mode local1 local2 local3
817 ; ----------------------------------------------------------------------------- 939 ; -----------------------------------------------------------------------------
818 ; sleepmode sleepmode.asm (unused) (unused) 940 ; sleepmode sleepmode.asm (unused) (unused)
819 ; surfmode surfmode.asm* (unused) (unused) 941 ; surfmode surfmode.asm* (unused) (unused)
820 ; simulator simulator.asm (unused) (unused) 942 ; simulator simulator.asm (unused) (unused)
821 ; divemode divemode.asm ghostwriter.asm (unused) 943 ; divemode divemode.asm divemode.asm ghostwriter.asm
822 ; logbook logboock.asm logbook.asm logbook.asm 944 ; logbook logboock.asm logbook.asm logbook.asm
823 ; 945 ;
824 ; * assigned to this slot, but currently no local memory used 946 ; * assigned to this slot, but currently no local memory used
825 947
826 local1 equ 0x1D0 ; Alias for CBLOCK directive 948 local1 equ 0x1D0 ; Alias for CBLOCK directive
838 960
839 ;---------------------------- Common2 DATA ------------------------------------ 961 ;---------------------------- Common2 DATA ------------------------------------
840 common2 equ 0xA00 ; Alias for "banksel common2" 962 common2 equ 0xA00 ; Alias for "banksel common2"
841 common2 udata_ovr common2 ; Bank 10 general variables 963 common2 udata_ovr common2 ; Bank 10 general variables
842 964
843 s8_rawdata_sensor1 res 3 ; 24bit A/D raw data from S8 HUD sensor 1 965 s8_rawdata_sensor1 res 3 ; 24 bit A/D raw data from S8 HUD sensor 1
844 s8_rawdata_sensor2 res 3 ; 24bit A/D raw data from S8 HUD sensor 2 966 s8_rawdata_sensor2 res 3 ; 24 bit A/D raw data from S8 HUD sensor 2
845 s8_rawdata_sensor3 res 3 ; 24bit A/D raw data from S8 HUD sensor 3 967 s8_rawdata_sensor3 res 3 ; 24 bit A/D raw data from S8 HUD sensor 3
846 hud_battery_mv res 2 ; hud/ppo2 monitor battery voltage in mV 968 hud_battery_mv res 2 ; hud/ppo2 monitor battery voltage in mV
847 969
848 start_day res 1 ; At start of dive (For logbook) 970 start_year res 1 ; at start of dive (for logbook) | ATTENTION: do not change the position of these
849 start_month res 1 ; At start of dive (For logbook) 971 start_month res 1 ; at start of dive (for logbook) | variables relative to each other!
850 start_year res 1 ; At start of dive (For logbook) 972 start_day res 1 ; at start of dive (for logbook) |
851 start_hours res 1 ; At start of dive (For logbook) 973 start_hours res 1 ; at start of dive (for logbook) |
852 start_mins res 1 ; At start of dive (For logbook) 974 start_mins res 1 ; at start of dive (for logbook) |
853 975
854 opt_gas_type_backup res 5 ; 0=Disabled, 1=First, 2=Travel, 3=Deco * need to be in same bank 976 opt_gas_type_backup res 5 ; 0=Disabled, 1=First, 2=Travel, 3=Deco | ATTENTION: do not change the position of these
855 opt_dil_type_backup res 5 ; 0=Disabled, 1=First, 2=Normal + need to be in same bank 977 opt_dil_type_backup res 5 ; 0=Disabled, 1=First, 2=Normal | arrays relative to each other!
856 opt_OC_bail_gas_change_backup res 5 ; Gas change depths OC/Bailout *
857 opt_dil_change_backup res 5 ; Gas change depths Diluents +
858 978
859 internal_battery_capacity res 2 ; For internal battery gauging 979 internal_battery_capacity res 2 ; For internal battery gauging
860 battery_capacity res 2 ; For battery gauge IC 980 battery_capacity res 2 ; For battery gauge IC
861 battery_offset res 2 ; For battery gauge IC 981 battery_offset res 2 ; For battery gauge IC
862 battery_type res 1 ; =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 982 battery_type res 1 ; =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
863 battery_acumulated_charge res 2 ; Raw values in battery gauge IC 983 battery_acumulated_charge res 2 ; Raw values in battery gauge IC
864 gauge_status_byte res 1 ; Gauge IC status byte 984 gauge_status_byte res 1 ; Gauge IC status byte
865 985
866 analog_sw1_raw res 2 ; idle values (average) 986 analog_sw1_raw res 2 ; idle values (average)
867 analog_sw2_raw res 2 ; idle values (average) 987 analog_sw2_raw res 2 ; idle values (average)
868 analog_counter res 1 ; for averaging 988 analog_counter res 1 ; for averaging
869 analog_sw1 res 1 ; analog value for switch 1 989 analog_sw1 res 1 ; analog value for switch 1
870 analog_sw2 res 1 ; analog value for switch 2 990 analog_sw2 res 1 ; analog value for switch 2
871 button_polarity res 1 ; 0xFF (Both normal), 0x00 (Both inverted), 0x01 (Left inverted only), 0x02 (Right inverted only) 991 button_polarity res 1 ; 0xFF (both normal), 0x00 (both inverted), 0x01 (left inverted only), 0x02 (right inverted only)
872 992
873 uptime res 4 ; Uptime [s] 993 uptime res 4 ; Uptime [s]
874 lastdive_time res 4 ; Time since last dive [s] 994 lastdive_time res 4 ; Time since last dive [s]
875 lastdive_duration res 3 ; mins:2 and secs 995 lastdive_duration res 3 ; mins:2 and secs
876 lastdive_maxdepth res 2 ; in mbar 996 lastdive_maxdepth res 2 ; in mbar
877 997
878 rx_buffer res .48 ; Buffer for RX data (Slots 0-7)
879 rx_firmware res 2 ; The RX firmware version xx.yy
880
881 customview_surfmode res 1 ; storage to remember last selected custom view in surface mode 998 customview_surfmode res 1 ; storage to remember last selected custom view in surface mode
882 customview_divemode res 1 ; storage to remember last selected custom view in dive mode 999 customview_divemode res 1 ; storage to remember last selected custom view in dive mode
883 1000
884 ambient_light res 2 ; ambient_light level 1001 ambient_light res 2 ; ambient_light level
885 better_gas_number res 1 ; number (1-5) of the "better gas" in divemode, =0: no better gas available 1002 old_velocity res 4 ; stores the last 4 speeds (8 seconds) in m/min
886 old_velocity res 4 ; Stores the last 4 speeds (8 seconds) in m/min
887 1003
888 menustack res 5 ; menu stack from menu_processor.asm 1004 menustack res 5 ; menu stack from menu_processor.asm
889 1005
890 gas6_O2_ratio res 1 ; gas6 O2 ratio 1006 gas6_O2_ratio res 1 ; gas6 O2 ratio
891 gas6_He_ratio res 1 ; gas6 He ratio 1007 gas6_He_ratio res 1 ; gas6 He ratio
892 gas6_temp res 1 ; temp used in divemenu_tree.asm 1008 gas6_temp res 1 ; temp used in divemenu_tree.asm
893 1009
894 ; ==> 134 bytes used - 122 bytes free 1010 IFDEF _rx_functions
895 1011 ; Data exchange
896 1012 rx_buffer res .48 ; Buffer for RX data (slots 0-7)
897 ;---------------------------- Bank 2 general purpose buffer ------------------- 1013 rx_firmware res 2 ; RX firmware version xx.yy
1014
1015 ; Variables for SAC Calculation on Pressure Readings 1 & 2
1016 pres_accu_1st res 4 ; accumulator for pressure drop in 1/160 bar | ATTENTION: do not
1017 pres_accu_2nd res 4 ; accumulator for pressure drop in 1/160 bar | change the
1018 time_accu_1st res 1 ; accumulator for reading ages in seconds | position
1019 gas__last_1st res 1 ; last gas assignment | of these
1020 time_accu_2nd res 1 ; accumulator for reading ages in seconds | variables
1021 gas__last_2nd res 1 ; last gas assignment | relative
1022 pres_last_1st res 2 ; last pressure reading pressure in 1/160 bar | to each
1023 pres_last_2nd res 2 ; last pressure reading pressure in 1/160 bar | other!
1024 time_last_1st res 2 ; last pressure reading time in seconds |
1025 time_last_2nd res 2 ; last pressure reading time in seconds |
1026 ENDIF
1027
1028 ; ==> 138 bytes used - 118 bytes free
1029
1030
1031 ;----------------------- Bank 2 General Purpose Buffer -------------------------
898 ; Reserved for general purpose buffer (strings, images, etc). 1032 ; Reserved for general purpose buffer (strings, images, etc).
899 ; NOTE: Needs to be aligned with a bank (LOW(buffer)==0). 1033 ; NOTE: Needs to be aligned with a bank (LOW(buffer)==0).
900 1034
901 buffer udata_ovr 0x200 1035 buffer udata_ovr 0x200
902 1036
903 buffer res .256 1037 buffer res .256 ; used for string assembly / display output
904 1038
905 1039
906 ;---------------------------- Bank 14 for options table ----------------------- 1040 ;---------------------- Bank 14 Options Table ---------------------------------
907 opt_table equ 0xE00 1041 opt_table equ 0xE00
908 opt_table udata_ovr opt_table 1042 opt_table udata_ovr opt_table
909 1043
910 ;---- Dive Options 1044 ;---- Dive Options
911 opt_gas_O2_ratio res 5 ; Needed because deco gaslist use N2 1045 opt_gas_O2_ratio res 5 ; O2 ratios of OC/bailout gases | ATTENTION:
912 opt_dil_O2_ratio res 5 ; Must be in line with opt_gas_O2_ratio 1046 opt_dil_O2_ratio res 5 ; O2 ratios of diluents | keep relative
913 opt_gas_He_ratio res 5 ; He ratio Gas1-5 1047 opt_gas_He_ratio res 5 ; He ratios of OC/bailout gases | positioning of
914 opt_dil_He_ratio res 5 ; Must be in line with opt_gas_He_ratio 1048 opt_dil_He_ratio res 5 ; He ratios of diluents | all arrays in
915 opt_gas_type res 5 ; 0=Disabled, 1=First, 2=Travel, 3=Deco 1049 opt_gas_type res 5 ; OC/bailout gas type: O=Disabled, 1=First, 2=Travel, 3=Deco | this block!
916 opt_dil_type res 5 ; 0=Disabled, 1=First, 2=Normal ; Must be in line with opt_gas_type 1050 opt_dil_type res 5 ; dil type: 0=Disabled, 1=First, 2=Normal |
917 opt_dive_mode res 1 ; 0=OC, 1=CC, 2=Gauge, 3=Apnea, 4=PSCR 1051 opt_gas_change res 5 ; change depths for OC/Bailout gases |
918 opt_ccr_mode res 1 ; =0: Fixed SP, =1: Sensor 1052 opt_dil_change res 5 ; change depths for diluents |
919 opt_OC_bail_gas_change res 5 ; Gas change depths OC/Bailout 1053
1054 opt_dive_mode res 1 ; main dive/deco mode: =0: OC, =1: CC, =2: Gauge, =3: Apnea, =4: pSCR
1055 opt_ccr_mode res 1 ; CCR/pSCR sub mode: =0: fixed/calculated SP, =1: sensor, =2: auto SP
920 1056
921 ;---- Managing Settings 1057 ;---- Managing Settings
922 opt_brightness res 1 ; =0: Eco, =1:Medium, =2:Full 1058 opt_brightness res 1 ; =0: Eco, =1:Medium, =2:Full
923 opt_salinity res 1 ; 0-5% 1059 opt_salinity res 1 ; 0-5%
924 #DEFINE opt_name_length .60 ; Custom text string 5 rows with 12 chars 1060 #DEFINE opt_name_length .60 ; custom text string 5 rows with 12 chars
925 opt_name res opt_name_length 1061 opt_name res opt_name_length
926 opt_language res 1 ; Current language. 0=EN, 1=DE, 2=FR, 3=SP 1062 opt_language res 1 ; current language: 0=EN, 1=DE, 2=FR, 3=SP
927 opt_units res 1 ; 0:m/°C, 1:ft/°F 1063 opt_units res 1 ; 0:m/°C, 1:ft/°F
928 opt_dateformat res 1 ; =0:MMDDYY, =1:DDMMYY, =2:YYMMDD 1064 opt_dateformat res 1 ; =0:MMDDYY, =1:DDMMYY, =2:YYMMDD
929 opt_last_stop res 1 ; =3:3m, =4:4m, =5:5m, =6:6m 1065 opt_last_stop res 1 ; =3:3m, =4:4m, =5:5m, =6:6m
930 opt_aGF_high res 1 ; Alternative GF HIGH 1066 opt_aGF_high res 1 ; alternative GF HIGH
931 opt_aGF_low res 1 ; Alternative GF LOW 1067 opt_aGF_low res 1 ; alternative GF LOW
932 opt_GF_high res 1 ; GF HIGH 1068 opt_GF_high res 1 ; GF HIGH
933 opt_GF_low res 1 ; GF LOW 1069 opt_GF_low res 1 ; GF LOW
934 opt_enable_aGF res 1 ; =1: aGF can be selected underwater 1070 opt_enable_aGF res 1 ; =1: aGF can be selected underwater
935 opt_compass_gain res 1 ; 0-7 (230LSB/Gauss to 1370LSB/Gaus) 1071 opt_compass_gain res 1 ; 0-7 (230LSB/Gauss to 1370LSB/Gaus)
936 opt_sampling_rate res 1 ; =1: 10s, =0: 2s 1072 opt_sampling_rate res 1 ; =1: 10s, =0: 2s
937 opt_dive_color_scheme res 1 ; 0-3 1073 opt_dive_color_scheme res 1 ; 0-3
938 opt_pressure_adjust res 1 ; SIGNED char (two's complement), -20/+20mbar max. 1074 opt_pressure_adjust res 1 ; SIGNED char (two's complement), -20/+20mbar max.
939 opt_enable_safetystop res 1 ; =1: A safety stop is shown 1075 opt_enable_safetystop res 1 ; =1: a safety stop is shown
940 opt_calibration_O2_ratio res 1 ; %O2 of calibration gas 1076 opt_calibration_O2_ratio res 1 ; %O2 of calibration gas
941 opt_x_s1 res 2 ; calibration factor (Not stored in EEPROM) 1077 opt_x_s1 res 2 ; calibration factor (Not stored in EEPROM)
942 opt_x_s2 res 2 ; calibration factor (Not stored in EEPROM) 1078 opt_x_s2 res 2 ; calibration factor (Not stored in EEPROM)
943 opt_x_s3 res 2 ; calibration factor (Not stored in EEPROM) 1079 opt_x_s3 res 2 ; calibration factor (Not stored in EEPROM)
944 opt_sensor_fallback res 1 ; NOT USED ANY MORE, KEPT FOR COMPATIBILITY WITH EEPROM IMAGE 1080 opt_sensor_fallback res 1 ; NOT USED ANY MORE, KEPT FOR COMPATIBILITY WITH EEPROM IMAGE
945 opt_flip_screen res 1 ; =1: Flip the screen 1081 opt_flip_screen res 1 ; =1: flip the screen
946 opt_cR_button_left res 1 ; Left button sensitivity (cR hardware) 1082 opt_cR_button_left res 1 ; left button sensitivity (cR hardware)
947 opt_cR_button_right res 1 ; Right button sensitivity (cR hardware) 1083 opt_cR_button_right res 1 ; right button sensitivity (cR hardware)
948 opt_modwarning res 1 ; =1:do a red blinking warning, =0:default behaviour 1084 opt_modwarning res 1 ; =1:do a red blinking warning, =0:default behavior
949 opt_vsitextv2 res 1 ; =1:use the depth dependent ascend rate limits 1085 opt_vsitextv2 res 1 ; =1:use the depth dependent ascend rate limits
950 opt_vsigraph res 1 ; =1:draw the graphical VSI bar 1086 opt_vsigraph res 1 ; =1:draw the graphical VSI bar
951 opt_showppo2 res 1 ; =1:always show the ppO2 value in the warning position 1087 opt_showppo2 res 1 ; =1:always show the ppO2 value in the warning position
952 opt_temperature_adjust res 1 ; SIGNED char (two's complement), -2.0/+2.0 °C max. 1088 opt_temperature_adjust res 1 ; SIGNED char (two's complement), -2.0/+2.0 °C max.
953 opt_safety_stop_length res 1 ; [s] 1089 opt_safety_stop_length res 1 ; [s]
954 opt_safety_stop_start res 1 ; [cbar] 1090 opt_safety_stop_start res 1 ; [cbar]
955 opt_safety_stop_end res 1 ; [cbar] 1091 opt_safety_stop_end res 1 ; [cbar]
956 opt_safety_stop_reset res 1 ; [cbar] 1092 opt_safety_stop_reset res 1 ; [cbar]
957 opt_diveTimeout res 1 ; Timeout for Divemode [min] 1093 opt_diveTimeout res 1 ; timeout for dive mode [min]
958 opt_sim_setpoint_number res 1 ; setpoint to use for deco calculation 1094 opt_sim_setpoint_number res 1 ; setpoint to use for deco calculation
959 opt_calc_asc_gasvolume res 1 ; calculate OC gas volume needs for ascent 1095 opt_calc_asc_gasvolume res 1 ; calculate OC gas volume needs for ascent
960 opt_sim_use_aGF res 1 ; =0: use GF, =1: use aGF for deco calculation 1096 opt_sim_use_aGF res 1 ; =0: use GF, =1: use aGF for deco calculation
961 opt_enable_IBCD res 1 ; enable IBCD warning 1097 opt_enable_IBCD res 1 ; enable IBCD warning
962 opt_sat_multiplier_gf res 1 ; Buhlmann safety factor for GF deco 1098 opt_sat_multiplier_gf res 1 ; Buhlmann safety factor for GF deco
963 opt_desat_multiplier_gf res 1 ; Buhlmann safety factor for GF deco 1099 opt_desat_multiplier_gf res 1 ; Buhlmann safety factor for GF deco
964 opt_sat_multiplier_non_gf res 1 ; Buhlmann safety factor for NON-GF deco 1100 opt_sat_multiplier_non_gf res 1 ; Buhlmann safety factor for NON-GF deco
965 opt_desat_multiplier_non_gf res 1 ; Buhlmann safety factor for NON-GF deco 1101 opt_desat_multiplier_non_gf res 1 ; Buhlmann safety factor for NON-GF deco
1102 opt_ZfactorUse res 1 ; =1: figure in compression factor Z when converting gas volume <-> gas pressure
1103 opt_ZfactorTemp res 1 ; temperature setpoint for compression factor Z
1104 opt_2ndDepthDisp res 1 ; =1: show average depth instead of max depth
1105
1106 ; RX functions - no conditional compilation because used in options_table
1107 opt_transmitter_id_1 res 2 ; 16 bit transmitter ID for Gas 1
1108 opt_transmitter_id_2 res 2 ; 16 bit transmitter ID for Gas 2
1109 opt_transmitter_id_3 res 2 ; 16 bit transmitter ID for Gas 3
1110 opt_transmitter_id_4 res 2 ; 16 bit transmitter ID for Gas 4
1111 opt_transmitter_id_5 res 2 ; 16 bit transmitter ID for Gas 5
1112 opt_transmitter_id_6 res 2 ; 16 bit transmitter ID for Dil 1
1113 opt_transmitter_id_7 res 2 ; 16 bit transmitter ID for Dil 2
1114 opt_transmitter_id_8 res 2 ; 16 bit transmitter ID for Dil 3
1115 opt_transmitter_id_9 res 2 ; 16 bit transmitter ID for Dil 4
1116 opt_transmitter_id_10 res 2 ; 16 bit transmitter ID for Dil 5
1117 opt_TR_mode res 1 ; TR functions - mode
1118 opt_TR_1st_pres res 1 ; TR functions - 1st pressure assignment
1119 opt_TR_2nd_pres res 1 ; TR functions - 2nd pressure assignment
1120 opt_TR_Bail_pres res 1 ; TR functions - bailout pressure assignment
1121
1122 ; ==> 173 bytes used - 85 bytes free
966 1123
967 ;----------------------------------------------------------------------------- 1124 ;-----------------------------------------------------------------------------