annotate src/hwos.inc @ 563:f4faff954816

minor
author heinrichsweikamp
date Sat, 03 Feb 2018 17:02:23 +0100
parents 8b7ea27ea1fa
children 0ba88db66492
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
3 ; File hwos.inc REFACTORED VERSION V2.95a1
0
heinrichsweikamp
parents:
diff changeset
4 ;
275
653a3ab08062 rename into hwOS
heinrichsweikamp
parents: 273
diff changeset
5 ; OSTC Platform definitions
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-05-24 : [jDG] Cleanups from initial Matthias code.
heinrichsweikamp
parents:
diff changeset
11
heinrichsweikamp
parents:
diff changeset
12 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
13
heinrichsweikamp
parents:
diff changeset
14 LIST P=18F87K22 ; change also: Configure->SelectDevice from Mplab
heinrichsweikamp
parents:
diff changeset
15
99
87cc1adfe4da show event "bailout" in the internal logbook
heinrichsweikamp
parents: 98
diff changeset
16 ;#DEFINE __DEBUG
0
heinrichsweikamp
parents:
diff changeset
17
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
18 ;#DEFINE french_italian ; If defined, use french and italian instead of english and german
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
19
0
heinrichsweikamp
parents:
diff changeset
20 #include <p18f87k22.inc>
heinrichsweikamp
parents:
diff changeset
21 #include <ports.inc> ; Portmap
heinrichsweikamp
parents:
diff changeset
22
180
abc429e8b46a 1.60 work...
heinrichsweikamp
parents: 179
diff changeset
23 ; Firmware definition
402
a3a0f1fd7fc4 NEW: Logbook shows markers with small orange boxes in the profile
heinrichsweikamp
parents: 399
diff changeset
24 #DEFINE softwareversion_x d'2' ; Software version XX.YY
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
25 #DEFINE softwareversion_y d'96' ; Software version XX.YY
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
26 #DEFINE softwareversion_beta 1 ; (and 0 for release)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
27
180
abc429e8b46a 1.60 work...
heinrichsweikamp
parents: 179
diff changeset
28 ; Firmware version will appear in "Change Firmware" style
486
1c35fc2e0834 2.15 start...
heinrichsweikamp
parents: 485
diff changeset
29 #DEFINE firmware_expire_year .18
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
30 #DEFINE firmware_expire_month .2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
31 #DEFINE firmware_expire_day .22
0
heinrichsweikamp
parents:
diff changeset
32
heinrichsweikamp
parents:
diff changeset
33 #DEFINE comm_service_key 0xABCDEF
heinrichsweikamp
parents:
diff changeset
34
heinrichsweikamp
parents:
diff changeset
35 ;-----------------------------------------------------------------------------
heinrichsweikamp
parents:
diff changeset
36
heinrichsweikamp
parents:
diff changeset
37 #DEFINE CCP1CON_VALUE b'00001100' ; PWM1 for LED dimming
heinrichsweikamp
parents:
diff changeset
38 #DEFINE T2CON_ECO b'00000100' ; 1:1 Postscaler, 1:1 Prescaler, Timer 2 start -> 980Hz (Good compromise of no-flicker and efficiency)
heinrichsweikamp
parents:
diff changeset
39 #DEFINE T2CON_NORMAL b'00001110'
heinrichsweikamp
parents:
diff changeset
40 #DEFINE T2CON_FASTEST b'00001110' ; 1:2 Postscaler, 1:16 Prescaler, Timer 2 start -> 1960Hz (no-flicker)
heinrichsweikamp
parents:
diff changeset
41
28
heinrichsweikamp
parents: 26
diff changeset
42 #DEFINE TMR0H_VALUE .245 ; RX Timeout (~3ms)
heinrichsweikamp
parents: 26
diff changeset
43
0
heinrichsweikamp
parents:
diff changeset
44 ; Timing for button hold-down flags
heinrichsweikamp
parents:
diff changeset
45 #DEFINE TMR1H_VALUE_FIRST .255-.128 ; in steps of 7,8125ms -> 1s
heinrichsweikamp
parents:
diff changeset
46 #DEFINE TMR1H_VALUE_CONT .255-.32 ; in steps of 7,8125ms -> 0.25s
heinrichsweikamp
parents:
diff changeset
47 #DEFINE TMR1H_VALUE_CONT_DIVE .255-.64 ; in steps of 7,8125ms -> 0.5s
heinrichsweikamp
parents:
diff changeset
48
heinrichsweikamp
parents:
diff changeset
49 ; Color Definitions: 8Bit RGB b'RRRGGGBB'
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
50 #DEFINE color_red b'11100000' ; (7,0,0)
0
heinrichsweikamp
parents:
diff changeset
51 #DEFINE color_dark_red b'10000101' ; (4,1,1)
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
52 #DEFINE color_violet b'11101011' ; (7,2,3)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
53 #DEFINE color_blue b'11000111' ; (6,1,3)
0
heinrichsweikamp
parents:
diff changeset
54 #DEFINE color_green b'00011100' ; (0,7,0)
heinrichsweikamp
parents:
diff changeset
55 #DEFINE color_greenish b'00111110' ; (1,7,2)
heinrichsweikamp
parents:
diff changeset
56 #DEFINE color_dark_green b'00111001' ; (1,6,1)
heinrichsweikamp
parents:
diff changeset
57 #DEFINE color_yellow b'11111101' ; (7,7,1)
heinrichsweikamp
parents:
diff changeset
58 #DEFINE color_white b'11111111' ; (7,7,3)
heinrichsweikamp
parents:
diff changeset
59 #DEFINE color_black b'00000000' ; (0,0,0)
heinrichsweikamp
parents:
diff changeset
60 #DEFINE color_deepblue b'00000010' ; (0,0,2)
heinrichsweikamp
parents:
diff changeset
61 #DEFINE color_grey b'11011111' ; (6,7,3)
heinrichsweikamp
parents:
diff changeset
62 #DEFINE color_cyan b'11011111' ; (6,7,3)
heinrichsweikamp
parents:
diff changeset
63 #DEFINE color_lightblue b'11011011' ; (6,7,3)
heinrichsweikamp
parents:
diff changeset
64 #DEFINE color_orange b'11111000' ; (7,6,0)
heinrichsweikamp
parents:
diff changeset
65 #DEFINE color_pink b'11111010' ; (7,6,2)
heinrichsweikamp
parents:
diff changeset
66
heinrichsweikamp
parents:
diff changeset
67 #DEFINE FT_TINY .0
heinrichsweikamp
parents:
diff changeset
68 #DEFINE FT_SMALL .1
heinrichsweikamp
parents:
diff changeset
69 #DEFINE FT_MEDIUM .2
heinrichsweikamp
parents:
diff changeset
70 #DEFINE FT_LARGE .3
heinrichsweikamp
parents:
diff changeset
71
307
14719662fb95 Merged Screen layout work #4 into VSItextv2
Janos Kovacs <kovjanos@gmail.com>
parents: 303
diff changeset
72 #DEFINE warn_depth .1
14719662fb95 Merged Screen layout work #4 into VSItextv2
Janos Kovacs <kovjanos@gmail.com>
parents: 303
diff changeset
73 #DEFINE warn_cns .2
14719662fb95 Merged Screen layout work #4 into VSItextv2
Janos Kovacs <kovjanos@gmail.com>
parents: 303
diff changeset
74 #DEFINE warn_gf .3
14719662fb95 Merged Screen layout work #4 into VSItextv2
Janos Kovacs <kovjanos@gmail.com>
parents: 303
diff changeset
75 #DEFINE warn_ppo2 .4
14719662fb95 Merged Screen layout work #4 into VSItextv2
Janos Kovacs <kovjanos@gmail.com>
parents: 303
diff changeset
76 #DEFINE warn_ceiling .5
14719662fb95 Merged Screen layout work #4 into VSItextv2
Janos Kovacs <kovjanos@gmail.com>
parents: 303
diff changeset
77 #DEFINE warn_gas_in_gaslist .6
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
78 #DEFINE warn_ppo2_hud .7
307
14719662fb95 Merged Screen layout work #4 into VSItextv2
Janos Kovacs <kovjanos@gmail.com>
parents: 303
diff changeset
79 #DEFINE warn_battery .8
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
80 #DEFINE warn_stop .9
0
heinrichsweikamp
parents:
diff changeset
81
113
heinrichsweikamp
parents: 111
diff changeset
82 ; External O2 cell input parameters
heinrichsweikamp
parents: 111
diff changeset
83 #DEFINE min_mv .80 ; = 8mV
145
e3ac5b2021bc NEW: Setpoint-Fallback option for external O2 sensor failure
heinrichsweikamp
parents: 143
diff changeset
84 #DEFINE max_mv .2500 ; = 250mV
196
a0e0ddfc1b49 suppress ghost readings for long, open cables
heinrichsweikamp
parents: 194
diff changeset
85 #DEFINE ignore_mv .3500 ; = 350mV (To suppress ghost readings for long, open cables)
0
heinrichsweikamp
parents:
diff changeset
86
heinrichsweikamp
parents:
diff changeset
87 ; Profile recording parameters
389
9175429bdeba CHANGE: Logbook now shows end-of-dive date and time for dives made with firmware <1.92 indicated by an icon in the logbook
heinrichsweikamp
parents: 388
diff changeset
88 #DEFINE logbook_profile_version 0x24
0
heinrichsweikamp
parents:
diff changeset
89 #DEFINE samplingrate_apnoe .1 ; [seconds]
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
90
0
heinrichsweikamp
parents:
diff changeset
91 ; Warning: Divisors must be <.16 !
heinrichsweikamp
parents:
diff changeset
92 #DEFINE div_temperature .6 ; x samplingrate [s]
heinrichsweikamp
parents:
diff changeset
93 #DEFINE div_deco .6 ; x samplingrate [s]
heinrichsweikamp
parents:
diff changeset
94 #DEFINE div_gf .12 ; x samplingrate [s]
heinrichsweikamp
parents:
diff changeset
95 #DEFINE div_ppo2_sensors .2 ; x samplingrate [s]
heinrichsweikamp
parents:
diff changeset
96 #DEFINE div_decoplan .12 ; x samplingrate [s]
heinrichsweikamp
parents:
diff changeset
97 #DEFINE div_cns .12 ; x samplingrate [s]
heinrichsweikamp
parents:
diff changeset
98 #DEFINE div_tank .0 ; x samplingrate [s]
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
99
0
heinrichsweikamp
parents:
diff changeset
100 ; Warning: Information lengths must be <.16 !
heinrichsweikamp
parents:
diff changeset
101 #DEFINE infolength_temperature .2 ; [byte]
heinrichsweikamp
parents:
diff changeset
102 #DEFINE infolength_deco .2 ; [byte]
heinrichsweikamp
parents:
diff changeset
103 #DEFINE infolength_gf .1 ; [byte]
heinrichsweikamp
parents:
diff changeset
104 #DEFINE infolength_ppo2_sensors .9 ; [byte]
heinrichsweikamp
parents:
diff changeset
105 #DEFINE infolength_decoplan .15 ; [byte]
heinrichsweikamp
parents:
diff changeset
106 #DEFINE infolength_cns .2 ; [byte]
heinrichsweikamp
parents:
diff changeset
107 #DEFINE infolength_tank .0 ; [byte]
heinrichsweikamp
parents:
diff changeset
108
heinrichsweikamp
parents:
diff changeset
109 ; "Better Gas" behavior
heinrichsweikamp
parents:
diff changeset
110 ; better_gas_window <= minimum_change_depth !
heinrichsweikamp
parents:
diff changeset
111 ; minimum_change_depth >=5 !
heinrichsweikamp
parents:
diff changeset
112 #DEFINE minimum_change_depth .3 ; [m]
69
50697bd41c54 +CHANGE: Some French Translations
heinrichsweikamp
parents: 66
diff changeset
113 #DEFINE better_gas_window_neg .3 ; [m] (Depth above change depth)
50697bd41c54 +CHANGE: Some French Translations
heinrichsweikamp
parents: 66
diff changeset
114 #DEFINE better_gas_window_pos .1 ; [m] (Depth below change depth, if ppO2<opt_ppO2_max)
0
heinrichsweikamp
parents:
diff changeset
115
heinrichsweikamp
parents:
diff changeset
116 ; Dive mode limits and thresholds
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
117 #DEFINE start_dive_threshold .100 ; [cm]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
118 #DEFINE high_altitude_dive_threshold .300 ; [cm]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
119 #DEFINE apnoe_timeout .15 ; [min]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
120 #DEFINE divemode_menuview_timeout .10 ; [s]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
121 #DEFINE divemode_timeout_default .5 ; [min]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
122 #DEFINE divemode_menu_timeout .30 ; [s]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
123
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
124 #DEFINE ppo2_warning_low .19 ; [cbar] (Default value)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
125 #DEFINE ppo2_lowest_setting .16 ; [cbar] (Minimum value)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
126 ;#DEFINE ppo2_display_high .120 ; [cbar] ## V2.94 moved to p2_deco.c
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
127 #DEFINE ppo2_warning_high .160 ; [cbar] (Default value) for bottom/travel gases
507
4e6f5c36f4cc NEW: Two ppO2 max settings. One for travel/bottom and one for deco gases
heinrichsweikamp
parents: 506
diff changeset
128 #DEFINE ppo2_warning_high_deco .160 ; [cbar] (Default value) for deco gases
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
129 #DEFINE ppo2_highest_setting .160 ; [cbar] (Max. Value) for bottom/travel gases
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
130 #DEFINE ppo2_highest_setting_deco .160 ; [cbar] (Max. Value) for deco gases
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
131
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
132 ; NEW ## min ppO2 CC
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
133 #DEFINE ppo2_warning_low_cc .40 ; [cbar] Default value for loop
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
134 #DEFINE ppo2_warning_low_cc_min .20 ; [cbar] Default value for loop
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
135 #DEFINE ppo2_warning_low_cc_max .60 ; [cbar] Default value for loop
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
136
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
137 ;#DEFINE cns_display_high .70 ; [%] ## V2.94 moved to p2_deco.c
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
138 ;#DEFINE cns_warning_high .100 ; [%] ## V2.94 moved to p2_deco.c
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
139 ;#DEFINE gf_display_high .75 ; [%] ## V2.94 moved to p2_deco.c
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
140 ;#DEFINE gf_warning_high .100 ; [%] ## V2.94 moved to p2_deco.c
0
heinrichsweikamp
parents:
diff changeset
141 #DEFINE depth_warn_mbar .13000 ; [mbar]
heinrichsweikamp
parents:
diff changeset
142 #DEFINE wake_up_from_sleep .1160 ; [mbar]
heinrichsweikamp
parents:
diff changeset
143 #DEFINE gf_display_threshold .20 ; [%]
heinrichsweikamp
parents:
diff changeset
144 #DEFINE simulator_timeout .15 ; [s]
192
efe70488a04b voting logic for external monitoring
heinrichsweikamp
parents: 189
diff changeset
145
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
146 #DEFINE sensor_voting_logic_threshold .10 ; Threshold in 0.01bar
0
heinrichsweikamp
parents:
diff changeset
147
heinrichsweikamp
parents:
diff changeset
148 ; Surface mode limits and thresholds
heinrichsweikamp
parents:
diff changeset
149 #DEFINE cns_display_surface_high .70 ; [%]
heinrichsweikamp
parents:
diff changeset
150 #DEFINE high_altitude_threshold .880 ; [mbar]
heinrichsweikamp
parents:
diff changeset
151 #DEFINE max_surfpressure .1080 ; [mbar]
heinrichsweikamp
parents:
diff changeset
152 #DEFINE timeout_surfacemode .90 ; [s]
187
669b5d00706d CHANGE: Longer timeout (4 min) for calibration menu
heinrichsweikamp
parents: 185
diff changeset
153 #DEFINE timeout_calibrate_menu .240 ; [s]
188
ebc28381f17d NEW: Show Bailout Gas List in Surface mode (CCR Modes)
heinrichsweikamp
parents: 187
diff changeset
154 #DEFINE timeout_ccr_surface .240 ; [s]
0
heinrichsweikamp
parents:
diff changeset
155
heinrichsweikamp
parents:
diff changeset
156 ; Decomodel paramters
heinrichsweikamp
parents:
diff changeset
157 #DEFINE deco_distance .10 ; [dm]
heinrichsweikamp
parents:
diff changeset
158
heinrichsweikamp
parents:
diff changeset
159 ; Color-code parameters for the divemode
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
160 ;#DEFINE color_code_cns_high .100 ; [%] ## V2.94 moved to p2_deco.c
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
161 ;#DEFINE color_code_gf_warn_high .101 ; [%] ## V2.94 moved to p2_deco.c
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
162 #DEFINE color_code_velocity_warn_high .11 ;[m/min]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
163 #DEFINE color_code_velocity_attn_high .10 ;[m/min]
0
heinrichsweikamp
parents:
diff changeset
164
heinrichsweikamp
parents:
diff changeset
165 ; Velocity threshold
399
db25f2028074 CHANGE: New segmented speed graph in divemode
heinrichsweikamp
parents: 398
diff changeset
166 #DEFINE velocity_display_threshold_1 .3 ; [m/min]
0
heinrichsweikamp
parents:
diff changeset
167
heinrichsweikamp
parents:
diff changeset
168 ; Battery thresholds
37
0e1723f2761e use four additional data points for the battery monitor
mh@mh-THINK.fritz.box
parents: 35
diff changeset
169 #DEFINE lithium_36v_empty .2400 ; [mV] Saft 3,6V LS14500 AA - threshold for battery percent display
0
heinrichsweikamp
parents:
diff changeset
170 #DEFINE lithium_36v_low .2000 ; [mV] (Must be bigger then aa_15v_high!)
heinrichsweikamp
parents:
diff changeset
171 #DEFINE aa_15v_high .1550 ; [mV] Energizer 1,5V E2 AA
heinrichsweikamp
parents:
diff changeset
172 #DEFINE aa_15v_low .1100 ; [mV] According to Energizer Datasheet EBC-4201R, Page 2
43
83794355f927 .99 release
heinrichsweikamp
parents: 39
diff changeset
173 #DEFINE color_code_battery_low .10 ; [%]
83794355f927 .99 release
heinrichsweikamp
parents: 39
diff changeset
174 #DEFINE battery_show_level .24 ; [%]
0
heinrichsweikamp
parents:
diff changeset
175
92
7ca1105751c7 add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents: 89
diff changeset
176 ; 3,6V battery sensing data points at 70mA load
7ca1105751c7 add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents: 89
diff changeset
177 #DEFINE lithium_36v_75 .3000 ; [mV]
7ca1105751c7 add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents: 89
diff changeset
178 #DEFINE lithium_36v_50 .2900 ; [mV]
7ca1105751c7 add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents: 89
diff changeset
179 #DEFINE lithium_36v_25 .2600 ; [mV]
7ca1105751c7 add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents: 89
diff changeset
180 #DEFINE lithium_36v_10 .2500 ; [mV]
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
181
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
182 ; Capacity for 2.4Ah Saft LS14500 and 0.8Ah Panasonic UR14500P
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
183 ; battery_gauge:6 is nAs
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
184 ; devide through 65536
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
185 ; a) devide through 364 -> Result is in percent of a 2.4Ah Battery
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
186 ; or b) devide through 121 -> Result is in percent of a 0.8Ah Battery
37
0e1723f2761e use four additional data points for the battery monitor
mh@mh-THINK.fritz.box
parents: 35
diff changeset
187
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
188 ; For internal battery gauging
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
189 #DEFINE internal_saft_capacity .364
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
190 #DEFINE internal_panasonic_capacity .121
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
191
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
192 ; For gauge IC
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
193 #DEFINE saft_capacity .281 ; 2.4Ah/0.085mAh/100 [%]
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
194 #DEFINE saft_offset .37300 ; 65536-(2.4Ah/0.085mAh)
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
195
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
196 #DEFINE panasonic_capacity .94 ; 0.8Ah/0.085mAh/100 [%]
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
197 #DEFINE panasonic_offset .56124 ; 65536-(0.8Ah/0.085mAh)
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
198
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
199 #DEFINE ncr18650_capacity .364 ; 3.1Ah/0.085mAh/100 [%]
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
200 #DEFINE ncr18650_offset .29065 ; 65536-(3.1Ah/0.085mAh)
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
201
472
4fdf6886004b CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents: 466
diff changeset
202 #DEFINE ur16650_capacity .271 ; 2.3Ah/0.085mAh/100 [%]
4fdf6886004b CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents: 466
diff changeset
203 #DEFINE ur16650_offset .38477 ; 65536-(2.3Ah/0.085mAh)
4fdf6886004b CHANGE: Show warnings either in Customview (If active) _or_ next to warning sign
heinrichsweikamp
parents: 466
diff changeset
204
381
e32f424223fb BUGFIX: Battery consumption calculation in sleep mode (3,6V battery only)
heinrichsweikamp
parents: 378
diff changeset
205 #DEFINE current_sleepmode .31
0
heinrichsweikamp
parents:
diff changeset
206 #DEFINE current_backlight_multi .115 ; *CCPR1L+current_backlight_offset
heinrichsweikamp
parents:
diff changeset
207 #DEFINE current_backlight_offset .216
heinrichsweikamp
parents:
diff changeset
208 #DEFINE current_speed_eco .1914
heinrichsweikamp
parents:
diff changeset
209 #DEFINE current_speed_normal .4027
heinrichsweikamp
parents:
diff changeset
210 #DEFINE current_speed_fastest .5050
heinrichsweikamp
parents:
diff changeset
211 #DEFINE current_ir_reciever .139
heinrichsweikamp
parents:
diff changeset
212 #DEFINE current_compass .28
heinrichsweikamp
parents:
diff changeset
213
heinrichsweikamp
parents:
diff changeset
214 ; Brightness thresholds (between zero (off) and 255 (max. power))
402
a3a0f1fd7fc4 NEW: Logbook shows markers with small orange boxes in the profile
heinrichsweikamp
parents: 399
diff changeset
215 #DEFINE ambient_light_max_high_36V .170
200
dcd513840c6c cleanup
heinrichsweikamp
parents: 198
diff changeset
216 #DEFINE ambient_light_max_high_cr .240
402
a3a0f1fd7fc4 NEW: Logbook shows markers with small orange boxes in the profile
heinrichsweikamp
parents: 399
diff changeset
217 #DEFINE ambient_light_max_high_15V .140
198
c511dc403d7e (Slightly) reduce current consumption in Eco and sleep mode
heinrichsweikamp
parents: 196
diff changeset
218 #DEFINE ambient_light_min_high .35
402
a3a0f1fd7fc4 NEW: Logbook shows markers with small orange boxes in the profile
heinrichsweikamp
parents: 399
diff changeset
219 #DEFINE ambient_light_max_medium .125
198
c511dc403d7e (Slightly) reduce current consumption in Eco and sleep mode
heinrichsweikamp
parents: 196
diff changeset
220 #DEFINE ambient_light_min_medium .25
402
a3a0f1fd7fc4 NEW: Logbook shows markers with small orange boxes in the profile
heinrichsweikamp
parents: 399
diff changeset
221 #DEFINE ambient_light_max_eco .70
201
82faedf8fd58 lower minimum backlight in eco mode
heinrichsweikamp
parents: 200
diff changeset
222 #DEFINE ambient_light_min_eco .10 ; Must be the lowest value!
0
heinrichsweikamp
parents:
diff changeset
223
heinrichsweikamp
parents:
diff changeset
224 ; IR Link timeout
101
8c471940d989 increase ir-timeout to 4 seconds
heinrichsweikamp
parents: 100
diff changeset
225 #DEFINE ir_timeout_value .64 ; multiples of 62,5ms
0
heinrichsweikamp
parents:
diff changeset
226
352
5c6da9fa5cb0 add setpoint change to first sample in CCR mode
heinrichsweikamp
parents: 344
diff changeset
227 ; Sp control constants
5c6da9fa5cb0 add setpoint change to first sample in CCR mode
heinrichsweikamp
parents: 344
diff changeset
228 #DEFINE surface_sp .50 ; in cbar
5c6da9fa5cb0 add setpoint change to first sample in CCR mode
heinrichsweikamp
parents: 344
diff changeset
229
0
heinrichsweikamp
parents:
diff changeset
230 ; Gaslist hard-coded limits
heinrichsweikamp
parents:
diff changeset
231 #DEFINE gaslist_min_o2 .7 ; Minimum O2 [%]
185
f515712d8cd6 BUGFIX: Check min and max values after PC configuration properly
heinrichsweikamp
parents: 183
diff changeset
232 #DEFINE gaslist_max_change_depth .99 ; Max. change depth [m]
0
heinrichsweikamp
parents:
diff changeset
233 #DEFINE gaslist_sp_stepsize .10 ; Steps for Setpoint Setup [cbar]
heinrichsweikamp
parents:
diff changeset
234 #DEFINE gaslist_sp_max .160 ; Max. Setpoint [cbar]
heinrichsweikamp
parents:
diff changeset
235 #DEFINE gaslist_sp_min .50 ; Min. Setpoint [cbar]
heinrichsweikamp
parents:
diff changeset
236
16
7b06f20881be calm compass reading for minor heading changes
heinrichsweikamp
parents: 15
diff changeset
237 ; Compass display
214
a17359244d93 compass changes
heinrichsweikamp
parents: 207
diff changeset
238 #DEFINE compass_fast_treshold .9 ; show new heading instantly if new and old > compass_fast_treshold
a17359244d93 compass changes
heinrichsweikamp
parents: 207
diff changeset
239 #DEFINE compass_averaging .10 ; numbers of extra averaging
16
7b06f20881be calm compass reading for minor heading changes
heinrichsweikamp
parents: 15
diff changeset
240
235
23311219dacc under construction: new hardware_flag to configure different hardware versions
heinrichsweikamp
parents: 234
diff changeset
241 ; Hardware defines
561
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
242 #DEFINE battery_gauge_available hardware_flag,0 ; OSTC has rechargeable battery with battery management chip
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
243 #DEFINE ambient_sensor hardware_flag,1 ; OSTC has an ambient light sensor
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
244 #DEFINE analog_o2_input hardware_flag,2 ; OSTC has analog inputs and S8 digital
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
245 #DEFINE optical_input hardware_flag,3 ; OSTC has an digital optical input
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
246 #DEFINE ble_available hardware_flag,4 ; OSTC has an BLE module
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
247 #DEFINE ostc_rx_present hardware_flag,5 ; OSTC_RX circuity present
235
23311219dacc under construction: new hardware_flag to configure different hardware versions
heinrichsweikamp
parents: 234
diff changeset
248 ;unused
23311219dacc under construction: new hardware_flag to configure different hardware versions
heinrichsweikamp
parents: 234
diff changeset
249 ;unused
23311219dacc under construction: new hardware_flag to configure different hardware versions
heinrichsweikamp
parents: 234
diff changeset
250
561
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
251 ; Hardware flag byte:
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
252 ; BIT0 = OSTC has rechargeable battery with battery management chip
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
253 ; BIT1 = OSTC has an ambient light sensor
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
254 ; BIT2 = OSTC has analog inputs and S8 digital
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
255 ; BIT3 = OSTC has an digital optical input
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
256 ; BIT4 = OSTC has an BLE module
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
257 ; BIT5 = OSTC_RX circuity present
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
258 ; BIT6 = unused
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
259 ; BIT7 = unused
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
260
9c54849b8d3b Remove routine to fix corrupt dives made with v1.80
heinrichsweikamp
parents: 560
diff changeset
261
0
heinrichsweikamp
parents:
diff changeset
262 ;---------------------------- Macros ------------------------------------
heinrichsweikamp
parents:
diff changeset
263
heinrichsweikamp
parents:
diff changeset
264 TSTOSS macro opt_reg ; TeST Option Skip if not Zero
heinrichsweikamp
parents:
diff changeset
265 movff opt_reg,WREG
heinrichsweikamp
parents:
diff changeset
266 tstfsz WREG,A
heinrichsweikamp
parents:
diff changeset
267 bra $+4
heinrichsweikamp
parents:
diff changeset
268 endm
heinrichsweikamp
parents:
diff changeset
269
heinrichsweikamp
parents:
diff changeset
270 ;---------------------------- Bank0 DATA ------------------------------------
heinrichsweikamp
parents:
diff changeset
271 isr_backup equ 0x60
heinrichsweikamp
parents:
diff changeset
272 isr_backup udata_ovr isr_backup ; Reserved space for interupt data
545
7e6df19264b6 BUGFIX: Simulator in CC mode
heinrichsweikamp
parents: 541
diff changeset
273
0
heinrichsweikamp
parents:
diff changeset
274 ;---- Backup for general registers
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
275 isr_prod res 2
0
heinrichsweikamp
parents:
diff changeset
276
heinrichsweikamp
parents:
diff changeset
277 ;---- MS5541 subroutines
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
278 amb_pressure res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
279 temperature res 2
0
heinrichsweikamp
parents:
diff changeset
280
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
281 C1 res 2 ; Decoded calibration data
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
282 C2 res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
283 C3 res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
284 C4 res 2 ; Here: C4-250
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
285 C5 res 2 ; Here: Reference Temperature UT1 = 8*C5 + 10000 (u16 range 10.000 .. +42.760)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
286 C6 res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
287 D1 res 2 ; raw pressure
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
288 D2 res 2 ; raw temperature
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
289 xdT res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
290 xdT2 res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
291 OFF res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
292 SENS res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
293 dLSB res 1 ; Pressure sensor interface
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
294 dMSB res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
295 clock_count res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
296 sensor_state_counter res 1 ; counts to eight for state maschine
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
297 amb_pressure_avg res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
298 temperature_avg res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
299 minimum_temperature res 2 ; minimum temperature
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
300 last_temperature res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
301 last_pressure res 2
0
heinrichsweikamp
parents:
diff changeset
302 last_pressure_velocity res 2 ; For velocity
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
303 last_surfpressure res 2
0
heinrichsweikamp
parents:
diff changeset
304 last_surfpressure_15min res 2
heinrichsweikamp
parents:
diff changeset
305 last_surfpressure_30min res 2
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
306 rel_pressure res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
307 sim_pressure res 2 ; hold simulated pressure in mbar if in Simulator mode
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
308 max_pressure res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
309 avg_rel_pressure res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
310 avg_rel_pressure_total res 2
0
heinrichsweikamp
parents:
diff changeset
311 ;---- Data for ISR math subroutines
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
312 isr_xC res 4
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
313 isr_xA res 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
314 isr_xB res 2
0
heinrichsweikamp
parents:
diff changeset
315
heinrichsweikamp
parents:
diff changeset
316 ;---- Data for ISR routines
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
317 isr1_temp res 1 ; ISR temp variable, used in ms5541.asm, isr_rtcc, isr_battery_gauge
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
318 isr2_temp res 1 ; ISR temp variable, used isr_battery_gauge
0
heinrichsweikamp
parents:
diff changeset
319
heinrichsweikamp
parents:
diff changeset
320 ;---- Display brightness
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
321 max_CCPR1L res 1 ; Max. brightness value for CCPR1L
0
heinrichsweikamp
parents:
diff changeset
322
heinrichsweikamp
parents:
diff changeset
323 ; Battery gauge (nAs, nC)
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
324 battery_gauge res 6 ; 48Bit -> 78Ah max...
0
heinrichsweikamp
parents:
diff changeset
325
187
669b5d00706d CHANGE: Longer timeout (4 min) for calibration menu
heinrichsweikamp
parents: 185
diff changeset
326 ; IR/S8-Link
255
ad62dff7739a add bearing option to compass
heinrichsweikamp
parents: 254
diff changeset
327 ir_s8_buffer res .18 ; temporally used in get_calibration_data for the raw (packed) calibration data
187
669b5d00706d CHANGE: Longer timeout (4 min) for calibration menu
heinrichsweikamp
parents: 185
diff changeset
328 ir_s8_counter res 1
669b5d00706d CHANGE: Longer timeout (4 min) for calibration menu
heinrichsweikamp
parents: 185
diff changeset
329 ir_S8_timeout res 1 ; Timeout for valid data
0
heinrichsweikamp
parents:
diff changeset
330
heinrichsweikamp
parents:
diff changeset
331 ; Compass raw data
heinrichsweikamp
parents:
diff changeset
332 compass_DX res 2
heinrichsweikamp
parents:
diff changeset
333 compass_DY res 2
heinrichsweikamp
parents:
diff changeset
334 compass_DZ res 2
heinrichsweikamp
parents:
diff changeset
335
heinrichsweikamp
parents:
diff changeset
336 accel_DX res 2
heinrichsweikamp
parents:
diff changeset
337 accel_DY res 2
heinrichsweikamp
parents:
diff changeset
338 accel_DZ res 2
heinrichsweikamp
parents:
diff changeset
339
heinrichsweikamp
parents:
diff changeset
340 ; Compass FILTERED data
heinrichsweikamp
parents:
diff changeset
341 compass_DX_f res 2
heinrichsweikamp
parents:
diff changeset
342 compass_DY_f res 2
heinrichsweikamp
parents:
diff changeset
343 compass_DZ_f res 2
heinrichsweikamp
parents:
diff changeset
344
heinrichsweikamp
parents:
diff changeset
345 accel_DX_f res 2
heinrichsweikamp
parents:
diff changeset
346 accel_DY_f res 2
heinrichsweikamp
parents:
diff changeset
347 accel_DZ_f res 2
heinrichsweikamp
parents:
diff changeset
348
heinrichsweikamp
parents:
diff changeset
349 ; Compass calibration data
heinrichsweikamp
parents:
diff changeset
350 compass_CX_f res 2
heinrichsweikamp
parents:
diff changeset
351 compass_CY_f res 2
heinrichsweikamp
parents:
diff changeset
352 compass_CZ_f res 2
heinrichsweikamp
parents:
diff changeset
353
heinrichsweikamp
parents:
diff changeset
354 ; Compass more data
heinrichsweikamp
parents:
diff changeset
355 compass_heading res 2 ; Corrected heading (in 1°) : -180 .. 180
16
7b06f20881be calm compass reading for minor heading changes
heinrichsweikamp
parents: 15
diff changeset
356 compass_heading_old res 2 ; Old heading (For smoother display)
170
8bcb064b4fb8 CHANGE: Compass readout smoothed
heinrichsweikamp
parents: 164
diff changeset
357 compass_heading_shown res 2 ; Displayed heading
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
358 ;compass_roll res 2 ; Rotation around the X axis
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
359 ;compass_pitch res 2 ; Rotation around the Y axis
0
heinrichsweikamp
parents:
diff changeset
360
heinrichsweikamp
parents:
diff changeset
361 compass_a res 2 ; Tmp data for Q15 arithmetics
heinrichsweikamp
parents:
diff changeset
362 compass_b res 2
heinrichsweikamp
parents:
diff changeset
363 compass_r res 3
heinrichsweikamp
parents:
diff changeset
364
heinrichsweikamp
parents:
diff changeset
365 CNS_start res 2 ; CNS value at beginning of dive
heinrichsweikamp
parents:
diff changeset
366 GF_start res 1 ; GF value at beginning of dive
heinrichsweikamp
parents:
diff changeset
367
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
368 speed_setting res 1 ; =1: Eco, =2: Normal, =3: Fastest
319
cf929551d31c move flag13 into bank common
heinrichsweikamp
parents: 315
diff changeset
369
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 250
diff changeset
370 ;---- Data for graphical compass
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
371 xRD res 2 ; virtual compass ruler offset
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
372 xRDr res 2 ; virtual compass ruler offset - right end
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
373 xRD180 res 2 ; virtual compass ruler offset for the -180 marker
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
374 xLO res 1 ; lo backup to prevent trashing
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
375 xHI res 1 ; hi backup to prevent trashing
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
376 xCM res 1 ; compass bearing relative position
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
377 compass_bearing res 2 ; this is where the bearing menu stores the actual heading for bearing
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 250
diff changeset
378
0
heinrichsweikamp
parents:
diff changeset
379 ;---------------------------- Common DATA ------------------------------------
heinrichsweikamp
parents:
diff changeset
380
heinrichsweikamp
parents:
diff changeset
381 common equ 0x100 ; Alias for "banksel common"
heinrichsweikamp
parents:
diff changeset
382 common udata_ovr common ; Bank1 general variables
heinrichsweikamp
parents:
diff changeset
383
heinrichsweikamp
parents:
diff changeset
384 ;---- Time and Date
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
385 secs res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
386 mins res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
387 hours res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
388 day res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
389 month res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
390 year res 1
0
heinrichsweikamp
parents:
diff changeset
391 surface_interval res 2
heinrichsweikamp
parents:
diff changeset
392
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
393 flag1 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
394 flag2 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
395 flag3 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
396 flag4 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
397 flag5 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
398 flag6 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
399 flag7 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
400 flag8 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
401 flag9 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
402 flag10 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
403 flag11 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
404 flag12 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
405 flag13 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
406 flag14 res 1
0
heinrichsweikamp
parents:
diff changeset
407
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
408 hardware_flag res 1 ; hardware descriptor flag
235
23311219dacc under construction: new hardware_flag to configure different hardware versions
heinrichsweikamp
parents: 234
diff changeset
409
0
heinrichsweikamp
parents:
diff changeset
410 temp1 res 1
heinrichsweikamp
parents:
diff changeset
411 temp2 res 1
heinrichsweikamp
parents:
diff changeset
412
heinrichsweikamp
parents:
diff changeset
413 ;---- Interface to wait macros
heinrichsweikamp
parents:
diff changeset
414 wait_temp res 1
heinrichsweikamp
parents:
diff changeset
415 waitms_temp res 1
heinrichsweikamp
parents:
diff changeset
416
heinrichsweikamp
parents:
diff changeset
417 ;---- Interface to graphic subroutines (aa_wordprocessor, color_processor, ...)
heinrichsweikamp
parents:
diff changeset
418 win_leftx2 res 1
heinrichsweikamp
parents:
diff changeset
419 win_top res 1
heinrichsweikamp
parents:
diff changeset
420 win_width res 2
heinrichsweikamp
parents:
diff changeset
421 win_height res 1
heinrichsweikamp
parents:
diff changeset
422 win_bargraph res 1
heinrichsweikamp
parents:
diff changeset
423 win_color1 res 1
heinrichsweikamp
parents:
diff changeset
424 win_color2 res 1
heinrichsweikamp
parents:
diff changeset
425 win_font res 1
heinrichsweikamp
parents:
diff changeset
426
heinrichsweikamp
parents:
diff changeset
427 ;---- Draw subroutines
heinrichsweikamp
parents:
diff changeset
428 tft_temp4 res 1
heinrichsweikamp
parents:
diff changeset
429 tft_temp3 res 1
heinrichsweikamp
parents:
diff changeset
430 tft_temp2 res 1
heinrichsweikamp
parents:
diff changeset
431 tft_temp1 res 1
heinrichsweikamp
parents:
diff changeset
432
heinrichsweikamp
parents:
diff changeset
433 ;---- data conversion subroutines
heinrichsweikamp
parents:
diff changeset
434 lo res 1
heinrichsweikamp
parents:
diff changeset
435 hi res 1
heinrichsweikamp
parents:
diff changeset
436 up res 1
heinrichsweikamp
parents:
diff changeset
437
heinrichsweikamp
parents:
diff changeset
438 ;---- RS232 temp variables
heinrichsweikamp
parents:
diff changeset
439 uart1_temp res 1
heinrichsweikamp
parents:
diff changeset
440 uart2_temp res 1
378
7faa688db105 BUGFIX: BLE timings for MAC issues
heinrichsweikamp
parents: 376
diff changeset
441 uart3_temp res 1
0
heinrichsweikamp
parents:
diff changeset
442
heinrichsweikamp
parents:
diff changeset
443 ;---- Data for math subroutines
heinrichsweikamp
parents:
diff changeset
444 divA res 2
heinrichsweikamp
parents:
diff changeset
445 divB res 1
heinrichsweikamp
parents:
diff changeset
446 xC res 4
heinrichsweikamp
parents:
diff changeset
447 xA res 2
heinrichsweikamp
parents:
diff changeset
448 xB res 2
heinrichsweikamp
parents:
diff changeset
449 sub_c res 2
heinrichsweikamp
parents:
diff changeset
450 sub_a res 2
heinrichsweikamp
parents:
diff changeset
451 sub_b res 2
heinrichsweikamp
parents:
diff changeset
452
heinrichsweikamp
parents:
diff changeset
453 ;---- Data for conversion subroutines
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
454 cvt_flags res 2
0
heinrichsweikamp
parents:
diff changeset
455 ignore_digits res 1
heinrichsweikamp
parents:
diff changeset
456
heinrichsweikamp
parents:
diff changeset
457 #define leftbind cvt_flags,0
heinrichsweikamp
parents:
diff changeset
458 #define ignore_digit3 cvt_flags,1
heinrichsweikamp
parents:
diff changeset
459 #define ignore_digit4 cvt_flags,2
heinrichsweikamp
parents:
diff changeset
460 #define ignore_digit5 cvt_flags,3
360
5f142cff43f6 hardware support
heinrichsweikamp
parents: 352
diff changeset
461 #DEFINE enable_screen_dumps cvt_flags,4 ; =1: Ignore vin_usb, wait for "l" command (Screen dump
5f142cff43f6 hardware support
heinrichsweikamp
parents: 352
diff changeset
462 #DEFINE screen_type cvt_flags,5 ; =1: display1, =0; display0
427
ceb1b7329dce add code for new compass chip
heinrichsweikamp
parents: 425
diff changeset
463 #DEFINE compass_type cvt_flags,6 ; =1: compass1, =0: compass0
464
0491a84fd0b8 CHANGE: Easier to understand "New Battery" menu (OSTC model dependent)
heinrichsweikamp
parents: 461
diff changeset
464 #DEFINE analog_switches cvt_flags,7 ; =1: Analog switches available
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
465
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
466 #DEFINE compass_type2 cvt_flags+1,0 ; =1: Compass2, =0: Compass1 or compass0
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
467
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
468
0
heinrichsweikamp
parents:
diff changeset
469 ;---- Misc.
heinrichsweikamp
parents:
diff changeset
470 timeout_counter res 1
heinrichsweikamp
parents:
diff changeset
471 timeout_counter2 res 1
heinrichsweikamp
parents:
diff changeset
472 timeout_counter3 res 1
heinrichsweikamp
parents:
diff changeset
473 batt_voltage res 2 ; Battery voltage in mV
heinrichsweikamp
parents:
diff changeset
474 batt_percent res 1 ; Battery in percent (1-100)
heinrichsweikamp
parents:
diff changeset
475 ambient_light res 2 ; ambient_light level
heinrichsweikamp
parents:
diff changeset
476 lo_temp res 1
heinrichsweikamp
parents:
diff changeset
477 hi_temp res 1
97
53a99a2dc6a1 CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents: 96
diff changeset
478 convert_value_temp res 3 ; used in menu_battery_state_convert_date
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
479 active_gas res 1 ; the currently breathed gas (1-5)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
480 active_diluent res 1 ; backup when switching back from bailout to CCR/pSCR loop
0
heinrichsweikamp
parents:
diff changeset
481 warning_counter res 1 ; Counts amount of warning in divemode
heinrichsweikamp
parents:
diff changeset
482 warning_page res 1 ; current # of warning page
heinrichsweikamp
parents:
diff changeset
483
heinrichsweikamp
parents:
diff changeset
484 ; Remind history for menu processor (and such):
heinrichsweikamp
parents:
diff changeset
485 menustack res 5 ; menu stack
heinrichsweikamp
parents:
diff changeset
486 menupos res 1 ; Logbook and divemode menu
heinrichsweikamp
parents:
diff changeset
487 menupos2 res 1 ; For dive mode simulator and pre-menu
heinrichsweikamp
parents:
diff changeset
488 menupos3 res 1 ; For Customviews
heinrichsweikamp
parents:
diff changeset
489 menupos4 res 1 ; For divemode menu
heinrichsweikamp
parents:
diff changeset
490
heinrichsweikamp
parents:
diff changeset
491 ; Apnoe stuff that must be in bank common
heinrichsweikamp
parents:
diff changeset
492 apnoe_mins res 1
heinrichsweikamp
parents:
diff changeset
493 apnoe_secs res 1
heinrichsweikamp
parents:
diff changeset
494 apnoe_max_pressure res 2
heinrichsweikamp
parents:
diff changeset
495
heinrichsweikamp
parents:
diff changeset
496 ; Divemode
heinrichsweikamp
parents:
diff changeset
497 divemins res 2
heinrichsweikamp
parents:
diff changeset
498 divesecs res 1
23
e402813343b6 new option to switch samplingrate between 10s and 2s
heinrichsweikamp
parents: 18
diff changeset
499 samplingrate res 1
0
heinrichsweikamp
parents:
diff changeset
500 samplesecs_value res 1
heinrichsweikamp
parents:
diff changeset
501 divisor_temperature res 1
heinrichsweikamp
parents:
diff changeset
502 divisor_deco res 1
heinrichsweikamp
parents:
diff changeset
503 divisor_gf res 1
heinrichsweikamp
parents:
diff changeset
504 divisor_ppo2_sensors res 1
heinrichsweikamp
parents:
diff changeset
505 divisor_decoplan res 1
heinrichsweikamp
parents:
diff changeset
506 divisor_cns res 1
heinrichsweikamp
parents:
diff changeset
507 divisor_tank res 1
heinrichsweikamp
parents:
diff changeset
508 average_depth_hold res 4
heinrichsweikamp
parents:
diff changeset
509 average_depth_hold_total res 4
heinrichsweikamp
parents:
diff changeset
510 total_divetime_seconds res 2
heinrichsweikamp
parents:
diff changeset
511 average_divesecs res 2 ; For the resettable stopwatch
heinrichsweikamp
parents:
diff changeset
512 decodata res 2
heinrichsweikamp
parents:
diff changeset
513 apnoe_timeout_counter res 1
heinrichsweikamp
parents:
diff changeset
514 apnoe_surface_mins res 1
heinrichsweikamp
parents:
diff changeset
515 apnoe_surface_secs res 1
heinrichsweikamp
parents:
diff changeset
516
heinrichsweikamp
parents:
diff changeset
517 ; Profile storing
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
518 AlarmType res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
519 samplesecs res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
520 EventByte res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
521 EventByte2 res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
522 ProfileFlagByte res 1
0
heinrichsweikamp
parents:
diff changeset
523
heinrichsweikamp
parents:
diff changeset
524 ; External flash
heinrichsweikamp
parents:
diff changeset
525 ext_flash_address res 3 ; 24bit Address
heinrichsweikamp
parents:
diff changeset
526 ext_flash_log_pointer res 3 ; 24bit Address for logbook profile storing
heinrichsweikamp
parents:
diff changeset
527 ext_flash_dive_counter res 3 ; 24bit Counter for dive length (increased in write_byte_ext_flash_plus)
heinrichsweikamp
parents:
diff changeset
528
heinrichsweikamp
parents:
diff changeset
529 ; I2C
113
heinrichsweikamp
parents: 111
diff changeset
530 i2c_temp res 2 ; Temp
0
heinrichsweikamp
parents:
diff changeset
531
heinrichsweikamp
parents:
diff changeset
532 ; O2 Sensor data
heinrichsweikamp
parents:
diff changeset
533 o2_mv_sensor1 res 2 ; in 0.1mV steps
heinrichsweikamp
parents:
diff changeset
534 o2_mv_sensor2 res 2 ; in 0.1mV steps
heinrichsweikamp
parents:
diff changeset
535 o2_mv_sensor3 res 2 ; in 0.1mV steps
heinrichsweikamp
parents:
diff changeset
536 o2_ppo2_sensor1 res 1 ; Sensor1 ppO2 (in 0.01bar steps)
heinrichsweikamp
parents:
diff changeset
537 o2_ppo2_sensor2 res 1 ; Sensor2 ppO2 (in 0.01bar steps)
heinrichsweikamp
parents:
diff changeset
538 o2_ppo2_sensor3 res 1 ; Sensor3 ppO2 (in 0.01bar steps)
heinrichsweikamp
parents:
diff changeset
539 hud_status_byte res 1
heinrichsweikamp
parents:
diff changeset
540 ;Status Byte/
145
e3ac5b2021bc NEW: Setpoint-Fallback option for external O2 sensor failure
heinrichsweikamp
parents: 143
diff changeset
541 #DEFINE hud_connection_ok hud_status_byte,0 ;Bit0 = 1 -> HUD connection ok
0
heinrichsweikamp
parents:
diff changeset
542 ;Bit1 = 1 -> HUD is calibrated
heinrichsweikamp
parents:
diff changeset
543 ;Bit2 = 1 -> HUD Battery is low (<3000mV)
145
e3ac5b2021bc NEW: Setpoint-Fallback option for external O2 sensor failure
heinrichsweikamp
parents: 143
diff changeset
544 #DEFINE sensor1_active hud_status_byte,3 ;=1: Sensor1 is active
e3ac5b2021bc NEW: Setpoint-Fallback option for external O2 sensor failure
heinrichsweikamp
parents: 143
diff changeset
545 #DEFINE sensor2_active hud_status_byte,4 ;=1: Sensor2 is active
113
heinrichsweikamp
parents: 111
diff changeset
546 #DEFINE sensor3_active hud_status_byte,5 ;=1: Sensor3 is active
0
heinrichsweikamp
parents:
diff changeset
547 ;Bit6 unused in stand-alone HUD
heinrichsweikamp
parents:
diff changeset
548 ;Bit7 unused in stand-alone HUD
heinrichsweikamp
parents:
diff changeset
549
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
550 sensor_setpoint res 1 ; sensor ppo2 in 0.01bar for deco routine
0
heinrichsweikamp
parents:
diff changeset
551
heinrichsweikamp
parents:
diff changeset
552 better_gas_number res 1 ; number (1-5) of the "better gas" in divemode, =0: no better gas available
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
553 customview_divemode res 1 ; keeps last custom view
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
554 customview_surfmode res 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
555 safety_stop_countdown res 1 ; counts seconds of safety stop
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
556 tft_update_flags res 3 ; probably more then needed...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
557
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
558 ; bank common 1 Byte left here...
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
559
104
223579e905c3 Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents: 101
diff changeset
560
0
heinrichsweikamp
parents:
diff changeset
561 ;---------------------------- TMP DATA ---------------------------------------
heinrichsweikamp
parents:
diff changeset
562 ; Space for various overlayed data from color, word, menu processors, etc.
heinrichsweikamp
parents:
diff changeset
563 ;
heinrichsweikamp
parents:
diff changeset
564
heinrichsweikamp
parents:
diff changeset
565 tmp udata_ovr 0x1A0 ; Bank1 shared TMP space
heinrichsweikamp
parents:
diff changeset
566 tmp equ 0x1A0 ; Alias for CBLOCK directive.
418
a5fc007634c5 some cleanup
heinrichsweikamp
parents: 416
diff changeset
567 res 0x05F ; RESERVED area.
0
heinrichsweikamp
parents:
diff changeset
568
268
29acdb601548 BUGFIX: Increase timing tolerance for S8 HUD (cR only)
heinrichsweikamp
parents: 266
diff changeset
569 ;---------------------------- Common2 DATA ------------------------------------
29acdb601548 BUGFIX: Increase timing tolerance for S8 HUD (cR only)
heinrichsweikamp
parents: 266
diff changeset
570
29acdb601548 BUGFIX: Increase timing tolerance for S8 HUD (cR only)
heinrichsweikamp
parents: 266
diff changeset
571 common2 equ 0xA00 ; Alias for "banksel common"
29acdb601548 BUGFIX: Increase timing tolerance for S8 HUD (cR only)
heinrichsweikamp
parents: 266
diff changeset
572 common2 udata_ovr common2 ; Bank1 general variables
29acdb601548 BUGFIX: Increase timing tolerance for S8 HUD (cR only)
heinrichsweikamp
parents: 266
diff changeset
573
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
574 s8_rawdata_sensor1 res 3 ; 24bit A/D raw data from S8 HUD sensor 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
575 s8_rawdata_sensor2 res 3 ; 24bit A/D raw data from S8 HUD sensor 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
576 s8_rawdata_sensor3 res 3 ; 24bit A/D raw data from S8 HUD sensor 3
268
29acdb601548 BUGFIX: Increase timing tolerance for S8 HUD (cR only)
heinrichsweikamp
parents: 266
diff changeset
577
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
578 hud_battery_mv res 2 ; hud/ppo2 monitor battery voltage in mV
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
579 start_day res 1 ; At start of dive (For logbook)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
580 start_month res 1 ; At start of dive (For logbook)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
581 start_year res 1 ; At start of dive (For logbook)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
582 start_hours res 1 ; At start of dive (For logbook)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
583 start_mins res 1 ; At start of dive (For logbook)
378
7faa688db105 BUGFIX: BLE timings for MAC issues
heinrichsweikamp
parents: 376
diff changeset
584
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
585 old_velocity res 4 ; Stores the last 4 speeds (8 seconds) in m/min
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
586 opt_gas_type_backup res 5 ; 0=Disabled, 1=First, 2=Travel, 3=Deco
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
587 opt_dil_type_backup res 5 ; 0=Disabled, 1=First, 2=Normal
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
588
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
589 opt_OC_bail_gas_change_backup res 5 ; Gas change depths OC/Bailout
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
590 opt_dil_change_backup res 5 ; Gas change depths Diluents
516
2ef8cf6b320d NEW: ppO2 blinks in sensor mode when min/max boundaries are hit
heinrichsweikamp
parents: 509
diff changeset
591
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
592 internal_battery_capacity res 2 ; For internal battery gauging
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
593 battery_capacity res 2 ; For battery gauge IC
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
594 battery_offset res 2 ; For battery gauge IC
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
595
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
596 analog_sw1_raw res 2 ; idle values (average)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
597 analog_sw2_raw res 2 ; idle values (average)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
598 analog_counter res 1 ; for averaging
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
599 analog_sw1 res 1 ; analog value for switch 1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
600 analog_sw2 res 1 ; analog value for switch 2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
601 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
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
602 uptime res 4 ; Uptime [s]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
603 lastdive_time res 4 ; Time since last dive [s]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
604 lastdive_duration res 3 ; mins:2 and secs
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
605 lastdive_maxdepth res 2 ; in mbar
466
7f4c3b2e6bb7 battery gauge handling
heinrichsweikamp
parents: 464
diff changeset
606 battery_acumulated_charge res 2 ; Raw values in battery gauge IC
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
607 gauge_status_byte res 1 ; Gauge IC status byte
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
608 button_polarity res 1 ; 0xFF (Both normal), 0x00 (Both inverted), 0x01 (Left inverted only), 0x02 (Right inverted only)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
609 gaslist_gas_global res 1 ; for color coding the gas lists
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
610 ;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
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
611 rx_buffer res .48 ; Buffer for RX data (Slots 0-7)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
612 rx_firmware res 2 ; The RX firmware version xx.yy
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
613
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
614 gas6_O2_ratio res 1 ; gas6 O2 ratio
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
615 gas6_He_ratio res 1 ; gas6 He ratio
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
616 gas6_temp res 1 ; temp used in divemenu_tree.asm
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
617
399
db25f2028074 CHANGE: New segmented speed graph in divemode
heinrichsweikamp
parents: 398
diff changeset
618
0
heinrichsweikamp
parents:
diff changeset
619 ;-----------------------------------------------------------------------------
heinrichsweikamp
parents:
diff changeset
620 ; Reserve BANK2 for general purpose buffer (strings, images, etc).
heinrichsweikamp
parents:
diff changeset
621 ; NOTE: Needs to be aligned with a bank (LOW(buffer)==0).
heinrichsweikamp
parents:
diff changeset
622 buffer udata_ovr 0x200
heinrichsweikamp
parents:
diff changeset
623 buffer res .256
heinrichsweikamp
parents:
diff changeset
624
heinrichsweikamp
parents:
diff changeset
625 opt_table equ 0xE00
heinrichsweikamp
parents:
diff changeset
626 opt_table udata_ovr opt_table
heinrichsweikamp
parents:
diff changeset
627
heinrichsweikamp
parents:
diff changeset
628 ;---- Dive Options
heinrichsweikamp
parents:
diff changeset
629 opt_gas_O2_ratio res 5 ; Needed because deco gaslist use N2
heinrichsweikamp
parents:
diff changeset
630 opt_dil_O2_ratio res 5 ; Must be in line with opt_gas_O2_ratio
heinrichsweikamp
parents:
diff changeset
631 opt_gas_He_ratio res 5 ; He ratio Gas1-5
heinrichsweikamp
parents:
diff changeset
632 opt_dil_He_ratio res 5 ; Must be in line with opt_gas_He_ratio
heinrichsweikamp
parents:
diff changeset
633 opt_gas_type res 5 ; 0=Disabled, 1=First, 2=Travel, 3=Deco
507
4e6f5c36f4cc NEW: Two ppO2 max settings. One for travel/bottom and one for deco gases
heinrichsweikamp
parents: 506
diff changeset
634 opt_dil_type res 5 ; 0=Disabled, 1=First, 2=Normal -> ; Must be in line with opt_gas_type
480
ad8acade5567 NEW: PSCR mode (Passive semi-closed rebreather)
heinrichsweikamp
parents: 479
diff changeset
635 opt_dive_mode res 1 ; 0=OC, 1=CC, 2=Gauge, 3=Apnea, 4=PSCR
0
heinrichsweikamp
parents:
diff changeset
636 opt_ccr_mode res 1 ; =0: Fixed SP, =1: Sensor
97
53a99a2dc6a1 CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents: 96
diff changeset
637 opt_OC_bail_gas_change res 5 ; Gas change depths OC/Bailout
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
638
0
heinrichsweikamp
parents:
diff changeset
639 ;---- Managing Settings
heinrichsweikamp
parents:
diff changeset
640 opt_brightness res 1 ; =0: Eco, =1:Medium, =2:Full
heinrichsweikamp
parents:
diff changeset
641 opt_salinity res 1 ; 0-5%
heinrichsweikamp
parents:
diff changeset
642 #DEFINE opt_name_length .60 ; Custom text string 5 rows with 12 chars
heinrichsweikamp
parents:
diff changeset
643 opt_name res opt_name_length
heinrichsweikamp
parents:
diff changeset
644 opt_language res 1 ; Current language. 0=EN, 1=DE, 2=FR, 3=SP
heinrichsweikamp
parents:
diff changeset
645 opt_units res 1 ; 0:m/°C, 1:ft/°F
heinrichsweikamp
parents:
diff changeset
646 opt_dateformat res 1 ; =0:MMDDYY, =1:DDMMYY, =2:YYMMDD
heinrichsweikamp
parents:
diff changeset
647 opt_last_stop res 1 ; =3:3m, =4:4m, =5:5m, =6:6m
heinrichsweikamp
parents:
diff changeset
648 opt_aGF_high res 1 ; Alternative GF HIGH
heinrichsweikamp
parents:
diff changeset
649 opt_aGF_low res 1 ; Alternative GF LOW
heinrichsweikamp
parents:
diff changeset
650 opt_GF_high res 1 ; GF HIGH
heinrichsweikamp
parents:
diff changeset
651 opt_GF_low res 1 ; GF LOW
heinrichsweikamp
parents:
diff changeset
652 opt_enable_aGF res 1 ; =1: aGF can be selected underwater
18
4e3f133dfbf4 add new opt_compass_gain option to work with more magnetic battery types
heinrichsweikamp
parents: 17
diff changeset
653 opt_compass_gain res 1 ; 0-7 (230LSB/Gauss to 1370LSB/Gaus)
24
f51caad821b4 save logbook recording interval
heinrichsweikamp
parents: 23
diff changeset
654 opt_sampling_rate res 1 ; =1: 10s, =0: 2s
50
ec4d8503ec45 NEW: user-selectable color schemes
heinrichsweikamp
parents: 47
diff changeset
655 opt_dive_color_scheme res 1 ; 0-3
92
7ca1105751c7 add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents: 89
diff changeset
656 opt_pressure_adjust res 1 ; SIGNED int (two's complement), -20/+20mbar max.
104
223579e905c3 Show a Safety Stop if enabled (Menu "Deco Parameters")
heinrichsweikamp
parents: 101
diff changeset
657 opt_enable_safetystop res 1 ; =1: A safety stop is shown
113
heinrichsweikamp
parents: 111
diff changeset
658 opt_calibration_O2_ratio res 1 ; %O2 of calibration gas
heinrichsweikamp
parents: 111
diff changeset
659 opt_x_s1 res 2 ; calibration factor (Not stored in EEPROM)
heinrichsweikamp
parents: 111
diff changeset
660 opt_x_s2 res 2 ; calibration factor (Not stored in EEPROM)
heinrichsweikamp
parents: 111
diff changeset
661 opt_x_s3 res 2 ; calibration factor (Not stored in EEPROM)
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
662 opt_sensor_fallback res 1 ; NOT USED ANY MORE, KEPT FOR COMPATIBILITY WITH EEPROM IMAGE
155
5f71e31bd5b3 CHANGE: Re-arranged Settings Menu, add 180? rotate to menu
heinrichsweikamp
parents: 151
diff changeset
663 opt_flip_screen res 1 ; =1: Flip the screen
220
effd7259f5a5 make button sensitivity configurable (cR hardware)
heinrichsweikamp
parents: 218
diff changeset
664 opt_cR_button_left res 1 ; Left button sensitivity (cR hardware)
effd7259f5a5 make button sensitivity configurable (cR hardware)
heinrichsweikamp
parents: 218
diff changeset
665 opt_cR_button_right res 1 ; Right button sensitivity (cR hardware)
307
14719662fb95 Merged Screen layout work #4 into VSItextv2
Janos Kovacs <kovjanos@gmail.com>
parents: 303
diff changeset
666 opt_modwarning res 1 ; =1:do a red blinking warning, =0:default behaviour
14719662fb95 Merged Screen layout work #4 into VSItextv2
Janos Kovacs <kovjanos@gmail.com>
parents: 303
diff changeset
667 opt_vsitextv2 res 1 ; =1:use the depth dependent ascend rate limits
326
d21b172d5a7a VSIbar #4: VSI settings submenu, graph option, logbook offset and compass calib. menu exit fix
Janos Kovacs <kovjanos@gmail.com>
parents: 319
diff changeset
668 opt_vsigraph res 1 ; =1:draw the graphical VSI bar
335
3d43da7acfe1 Always show ppO2 (warning position, standard color) option
janos_kovacs <kovjanos@gmail.com>
parents: 333
diff changeset
669 opt_showppo2 res 1 ; =1:always show the ppO2 value in the warning position
368
57e349960ef4 Additional temperature calibration via PC interface
heinrichsweikamp
parents: 367
diff changeset
670 opt_temperature_adjust res 1 ; SIGNED int (two's complement), -2.0/+2.0 °C max.
399
db25f2028074 CHANGE: New segmented speed graph in divemode
heinrichsweikamp
parents: 398
diff changeset
671 opt_safety_stop_length res 1 ; [s]
db25f2028074 CHANGE: New segmented speed graph in divemode
heinrichsweikamp
parents: 398
diff changeset
672 opt_safety_stop_start res 1 ; [cbar]
db25f2028074 CHANGE: New segmented speed graph in divemode
heinrichsweikamp
parents: 398
diff changeset
673 opt_safety_stop_end res 1 ; [cbar]
db25f2028074 CHANGE: New segmented speed graph in divemode
heinrichsweikamp
parents: 398
diff changeset
674 opt_safety_stop_reset res 1 ; [cbar]
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
675 opt_diveTimeout res 1 ; Timeout for Divemode [min]
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
676 opt_sim_setpoint_number res 1 ; NEW setpoint to use for deco calculation
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
677 opt_calc_asc_gasvolume res 1 ; NEW calculate OC gas volume needs for ascent
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
678 opt_sim_use_aGF res 1 ; NEW use GF (no) or aGF (yes) for deco calculation
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
679 opt_enable_IBCD res 1 ; NEW enable IBCD warning
562
8b7ea27ea1fa seperate desat and sat multipliers for GF and Non-GF modes. Set to 100/100 as default in GF mode
heinrichsweikamp
parents: 561
diff changeset
680 opt_sat_multiplier_gf res 1 ; Bühlmann safety factor for GF deco
8b7ea27ea1fa seperate desat and sat multipliers for GF and Non-GF modes. Set to 100/100 as default in GF mode
heinrichsweikamp
parents: 561
diff changeset
681 opt_desat_multiplier_gf res 1 ; Bühlmann safety factor for GF deco
8b7ea27ea1fa seperate desat and sat multipliers for GF and Non-GF modes. Set to 100/100 as default in GF mode
heinrichsweikamp
parents: 561
diff changeset
682 opt_sat_multiplier_non_gf res 1 ; Bühlmann safety factor for NON-GF deco
8b7ea27ea1fa seperate desat and sat multipliers for GF and Non-GF modes. Set to 100/100 as default in GF mode
heinrichsweikamp
parents: 561
diff changeset
683 opt_desat_multiplier_non_gf res 1 ; Bühlmann safety factor for NON-GF deco
0
heinrichsweikamp
parents:
diff changeset
684
heinrichsweikamp
parents:
diff changeset
685 ;-----------------------------EEPROM DATA ------------------------------------
heinrichsweikamp
parents:
diff changeset
686 ; Automatic reset of all options when this is changed:
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
687 #define eeprom_opt_serial 0x0006 ; Version 0.6
0
heinrichsweikamp
parents:
diff changeset
688
heinrichsweikamp
parents:
diff changeset
689 ;-----------------------------------------------------------------------------
heinrichsweikamp
parents:
diff changeset
690 ; Flags
heinrichsweikamp
parents:
diff changeset
691 #DEFINE switch_left flag1,0
heinrichsweikamp
parents:
diff changeset
692 #DEFINE switch_right flag1,1
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
693 #DEFINE neg_flag flag1,2 ; e.g. sub16 (sub_c = sub_a - sub_b)
0
heinrichsweikamp
parents:
diff changeset
694 #DEFINE pressure_refresh flag1,3 ; =1: A new pressure/temperature is available
heinrichsweikamp
parents:
diff changeset
695 #DEFINE sleepmode flag1,4 ; =1: In Sleepmode
heinrichsweikamp
parents:
diff changeset
696 #DEFINE tft_is_dimming flag1,5 ; =1: The TFT is dimming, ignore light sensor
heinrichsweikamp
parents:
diff changeset
697 #DEFINE display_velocity flag1,6 ; =1: show velocity
heinrichsweikamp
parents:
diff changeset
698 #DEFINE no_sensor_int flag1,7 ; =1: block any further access to pressure sensor
heinrichsweikamp
parents:
diff changeset
699
heinrichsweikamp
parents:
diff changeset
700 #DEFINE rs232_recieve_overflow flag2,0 ; =1: An RS232 timeout overflow occoured
heinrichsweikamp
parents:
diff changeset
701 #DEFINE stored_gas_changed flag2,1 ; =1: Stored Gas changed
heinrichsweikamp
parents:
diff changeset
702 #DEFINE high_altitude_mode flag2,2 ; =1: Unit was manually turned on with ambient pressure <880mbar
heinrichsweikamp
parents:
diff changeset
703 #DEFINE FLAG_apnoe_mode flag2,3 ; =1: Apnoe mode selected
heinrichsweikamp
parents:
diff changeset
704 #DEFINE restore_deco_data flag2,4 ; =1: Restore deco data (After simulation)
heinrichsweikamp
parents:
diff changeset
705 #DEFINE premenu flag2,5 ; =1: Premenu/Divemenu selected
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
706 #DEFINE menubit flag2,6 ; menu
0
heinrichsweikamp
parents:
diff changeset
707 #DEFINE simulatormode_active flag2,7 ; =1: Simulator mode active, override pressure sensor readings
heinrichsweikamp
parents:
diff changeset
708
heinrichsweikamp
parents:
diff changeset
709 #DEFINE divemode_menu flag3,0 ; =1: Divemode menu is shown
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
710 #DEFINE onesecupdate flag3,1 ; =1: after any second
0
heinrichsweikamp
parents:
diff changeset
711 #DEFINE twosecupdate flag3,2 ; =1: New two-second update
heinrichsweikamp
parents:
diff changeset
712 #DEFINE toggle_customview flag3,3 ; =1: Next customview
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
713 #DEFINE oneminupdate flag3,4 ; =1: after any minute
0
heinrichsweikamp
parents:
diff changeset
714 #DEFINE divemode flag3,5 ; =1: in Divemode
heinrichsweikamp
parents:
diff changeset
715 #DEFINE battery_is_36v flag3,6 ; =1: 3,6V Battery is in use
heinrichsweikamp
parents:
diff changeset
716 #DEFINE warning_active flag3,7 ; =1: A warning is active in divemode or surfacemode
heinrichsweikamp
parents:
diff changeset
717
heinrichsweikamp
parents:
diff changeset
718 #DEFINE better_gas_available flag4,0 ; =1: A better gas is available
heinrichsweikamp
parents:
diff changeset
719 #DEFINE blinking_better_gas flag4,1 ; =1: Gas is blinking
heinrichsweikamp
parents:
diff changeset
720 #DEFINE menuview flag4,2 ; =1: A menuview is shown in divemode (e.g. "Menu?")
heinrichsweikamp
parents:
diff changeset
721 #DEFINE quarter_second_update flag4,3 ; =1: A new 1/4 second has begun
heinrichsweikamp
parents:
diff changeset
722 #DEFINE divemode_gaschange flag4,4 ; =1: The gas will change very soon
heinrichsweikamp
parents:
diff changeset
723 #DEFINE decostop_active flag4,5 ; =1: Decompression stop shown
heinrichsweikamp
parents:
diff changeset
724 #DEFINE depth_greater_100m flag4,6 ; =1: Current Depth > 100m
heinrichsweikamp
parents:
diff changeset
725 #DEFINE realdive flag4,7 ; =1: A real dive during divemode
heinrichsweikamp
parents:
diff changeset
726
heinrichsweikamp
parents:
diff changeset
727 #DEFINE dive_warning_displayed flag5,0 ; =1: The warning sign is shown
heinrichsweikamp
parents:
diff changeset
728 #DEFINE reset_average_depth flag5,1 ; =1: Reset the average depth
heinrichsweikamp
parents:
diff changeset
729 #DEFINE store_sample flag5,2 ; =1: Store a new sample
heinrichsweikamp
parents:
diff changeset
730 #DEFINE divemode2 flag5,3 ; =1: Dive longer then one minute
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
731 #DEFINE FLAG_active_descent flag5,4 ; Used in Apnoe mode
0
heinrichsweikamp
parents:
diff changeset
732 #DEFINE event_occured flag5,5 ; =1: An event occured, store it!
heinrichsweikamp
parents:
diff changeset
733 #DEFINE divemode_menu_active flag5,6 ; =1: The divemode menu is shown
heinrichsweikamp
parents:
diff changeset
734 #DEFINE temp_changed flag5,7 ; =1: The temperature changed
heinrichsweikamp
parents:
diff changeset
735
heinrichsweikamp
parents:
diff changeset
736 #DEFINE gas6_changed flag6,0 ; =1: Gas 6 has been selected/changed underwater
heinrichsweikamp
parents:
diff changeset
737 #DEFINE onehourupdate flag6,1 ; =1: A new hour has just begun
heinrichsweikamp
parents:
diff changeset
738 #DEFINE settime_setdate flag6,2 ; =1: In the Set Time or Set Date Menu
heinrichsweikamp
parents:
diff changeset
739 #DEFINE setpoint_changed flag6,3 ; =1: Setpoint has been changed
heinrichsweikamp
parents:
diff changeset
740 #DEFINE second_row_warning flag6,4 ; =1: The second row contains a warning
heinrichsweikamp
parents:
diff changeset
741 #DEFINE FLAG_ccr_mode flag6,5 ; =1: CCR mode (Fixed ppO2 or Sensor) active
heinrichsweikamp
parents:
diff changeset
742 #DEFINE dive_hud1_displayed flag6,6 ; =1: The Sensor1 HUD reading is displayed
heinrichsweikamp
parents:
diff changeset
743 #DEFINE dive_hud2_displayed flag6,7 ; =1: The Sensor2 HUD reading is displayed
heinrichsweikamp
parents:
diff changeset
744
heinrichsweikamp
parents:
diff changeset
745 #DEFINE dive_hud3_displayed flag7,0 ; =1: The Sensor3 HUD reading is displayed
heinrichsweikamp
parents:
diff changeset
746 #DEFINE no_more_divesecs flag7,1 ; =1: Do no longer show seconds in divemode
heinrichsweikamp
parents:
diff changeset
747 #DEFINE FLAG_gauge_mode flag7,2 ; =1: In Gauge mode
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
748 #DEFINE ignore_last_edited_gas flag7,3 ; Used in gaslist_cleanup_list
0
heinrichsweikamp
parents:
diff changeset
749 #DEFINE ccr_diluent_setup flag7,4 ; =1: Setting up Diluents ("Gas6-10")
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
750 #DEFINE menu_show_sensors flag7,5 ; =1: Update HUD data in menu ## NOT USED ANYMORE ##
0
heinrichsweikamp
parents:
diff changeset
751 #DEFINE short_gas_decriptions flag7,6 ; =1: Use short versions of gaslist_strcat_gas_mod and gaslist_strcat_setpoint
11
04794990b619 Show Max. Depth with 0.1m precision
heinrichsweikamp
parents: 7
diff changeset
752 #DEFINE max_depth_greater_100m flag7,7 ; =1: Max. Depth > 100m
0
heinrichsweikamp
parents:
diff changeset
753
heinrichsweikamp
parents:
diff changeset
754 #DEFINE is_bailout flag8,0 ; =1: Bailout
heinrichsweikamp
parents:
diff changeset
755 #DEFINE is_bailout_menu flag8,1 ; =1: Bailout
heinrichsweikamp
parents:
diff changeset
756 #DEFINE toggle_gf flag8,2 ; =1: Toggle GF/aGF
heinrichsweikamp
parents:
diff changeset
757 #DEFINE use_agf flag8,3 ; =1: Use aGF (instead of GF)
heinrichsweikamp
parents:
diff changeset
758 #DEFINE battery_removed_in_usb flag8,4 ; =1: The battery has been removed in USB
heinrichsweikamp
parents:
diff changeset
759 #DEFINE adc_running flag8,5 ; =1: The ADC is in use
heinrichsweikamp
parents:
diff changeset
760 #DEFINE comm_service_enabled flag8,6 ; =1: COMM Service mode unlocked
heinrichsweikamp
parents:
diff changeset
761 #DEFINE compass_enabled flag8,7 ; =1: The compass and accelerometer chip is active
heinrichsweikamp
parents:
diff changeset
762
16
7b06f20881be calm compass reading for minor heading changes
heinrichsweikamp
parents: 15
diff changeset
763 #DEFINE compass_fast_mode flag9,0 ; =1: The compass is in fast mode
50
ec4d8503ec45 NEW: user-selectable color schemes
heinrichsweikamp
parents: 47
diff changeset
764 #DEFINE in_color_menu flag9,1 ; =1: In the color scheme menu
98
24b3fd59e61f add event "bailout" in profile
heinrichsweikamp
parents: 97
diff changeset
765 #DEFINE bailoutgas_event flag9,2 ; =1: bailout was selected or a gaschange during bailout
189
e79bc535ef9e ignore un-calibrated sensors even if they become valid
heinrichsweikamp
parents: 188
diff changeset
766 #DEFINE win_invert flag9,3 ; =1: Invert font output
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
767 #DEFINE show_safety_stop flag9,4 ; =1: Show the safety stop
145
e3ac5b2021bc NEW: Setpoint-Fallback option for external O2 sensor failure
heinrichsweikamp
parents: 143
diff changeset
768 #DEFINE safety_stop_active flag9,5 ; =1: The safety stop is currently displayed
113
heinrichsweikamp
parents: 111
diff changeset
769 #DEFINE new_s8_data_available flag9,6 ; =1: New data frame recieved
254
5fe7aff622f3 preparations to set a course for the compass display
heinrichsweikamp
parents: 250
diff changeset
770 #DEFINE print_compass_label flag9,7 ; =1: print the graphical comapss label
113
heinrichsweikamp
parents: 111
diff changeset
771
heinrichsweikamp
parents: 111
diff changeset
772 #DEFINE s8_digital flag10,0; =1: Digital I/O
145
e3ac5b2021bc NEW: Setpoint-Fallback option for external O2 sensor failure
heinrichsweikamp
parents: 143
diff changeset
773 #DEFINE menu_show_sensors2 flag10,1; =1: Update mV data in calibration menu
192
efe70488a04b voting logic for external monitoring
heinrichsweikamp
parents: 189
diff changeset
774 #DEFINE use_O2_sensor1 flag10,2; =1: Use this sensor for deco
efe70488a04b voting logic for external monitoring
heinrichsweikamp
parents: 189
diff changeset
775 #DEFINE use_O2_sensor2 flag10,3; =1: Use this sensor for deco
efe70488a04b voting logic for external monitoring
heinrichsweikamp
parents: 189
diff changeset
776 #DEFINE use_O2_sensor3 flag10,4; =1: Use this sensor for deco
145
e3ac5b2021bc NEW: Setpoint-Fallback option for external O2 sensor failure
heinrichsweikamp
parents: 143
diff changeset
777 #DEFINE setpoint_fallback flag10,5; =1: Fallback to SP1 due to external O2 sensor failure
e3ac5b2021bc NEW: Setpoint-Fallback option for external O2 sensor failure
heinrichsweikamp
parents: 143
diff changeset
778 #DEFINE blinking_setpoint flag10,6; =1: SP is blinking
151
5cb177f0948a work on flip screen...
heinrichsweikamp
parents: 150
diff changeset
779 #DEFINE flip_screen flag10,7; =1: Screen is flipped by 180°
189
e79bc535ef9e ignore un-calibrated sensors even if they become valid
heinrichsweikamp
parents: 188
diff changeset
780
e79bc535ef9e ignore un-calibrated sensors even if they become valid
heinrichsweikamp
parents: 188
diff changeset
781 #DEFINE sensor1_calibrated_ok flag11,0; =1: This sensor has been calibrated ok
e79bc535ef9e ignore un-calibrated sensors even if they become valid
heinrichsweikamp
parents: 188
diff changeset
782 #DEFINE sensor2_calibrated_ok flag11,1; =1: This sensor has been calibrated ok
e79bc535ef9e ignore un-calibrated sensors even if they become valid
heinrichsweikamp
parents: 188
diff changeset
783 #DEFINE sensor3_calibrated_ok flag11,2; =1: This sensor has been calibrated ok
192
efe70488a04b voting logic for external monitoring
heinrichsweikamp
parents: 189
diff changeset
784 #DEFINE voting_logic_sensor1 flag11,3; =1: This sensor is within the voting logic threshold
efe70488a04b voting logic for external monitoring
heinrichsweikamp
parents: 189
diff changeset
785 #DEFINE voting_logic_sensor2 flag11,4; =1: This sensor is within the voting logic threshold
efe70488a04b voting logic for external monitoring
heinrichsweikamp
parents: 189
diff changeset
786 #DEFINE voting_logic_sensor3 flag11,5; =1: This sensor is within the voting logic threshold
207
f5d909e03f52 charge indicator on surface screen
heinrichsweikamp
parents: 205
diff changeset
787 #DEFINE cc_active flag11,6; =1: Constant Current active (cR Hardware)
f5d909e03f52 charge indicator on surface screen
heinrichsweikamp
parents: 205
diff changeset
788 #DEFINE cv_active flag11,7; =1: Constant Voltage active (cR Hardware)
250
20e3bad0b0f2 Graphical compass from kovacs
heinrichsweikamp
parents: 239
diff changeset
789
255
ad62dff7739a add bearing option to compass
heinrichsweikamp
parents: 254
diff changeset
790 #DEFINE compass_bearing_set flag12,0 ; bearing set
ad62dff7739a add bearing option to compass
heinrichsweikamp
parents: 254
diff changeset
791 #DEFINE compass_bearing_eq flag12,1 ; bearing is in direction? do not show << or >>
ad62dff7739a add bearing option to compass
heinrichsweikamp
parents: 254
diff changeset
792 #DEFINE compass_bearing_lft flag12,2 ; bearing is to the left/<< if set, otherwise to the right/>>
ad62dff7739a add bearing option to compass
heinrichsweikamp
parents: 254
diff changeset
793 #DEFINE compass_bearing_vis flag12,3 ; bearing is visible? (either ahead or behind/-180°)
ad62dff7739a add bearing option to compass
heinrichsweikamp
parents: 254
diff changeset
794 #DEFINE compass_bearing_ahd flag12,4 ; bearing is ahead or behind?
300
5ad479f2a868 Merged Screen layout mod #1 into Screen layout work #3
Janos Kovacs <kovjanos@gmail.com>
parents: 283
diff changeset
795 #DEFINE blinking_depth_warning flag12,5 ; set by the color_depth. =1: warning color
5ad479f2a868 Merged Screen layout mod #1 into Screen layout work #3
Janos Kovacs <kovjanos@gmail.com>
parents: 283
diff changeset
796 #DEFINE blinking_depth_prev flag12,6 ; set by the TFT_depth. =1: prev display had warning color
5ad479f2a868 Merged Screen layout mod #1 into Screen layout work #3
Janos Kovacs <kovjanos@gmail.com>
parents: 283
diff changeset
797 #DEFINE blinking_depth_toggle flag12,7 ; toggle to blink
255
ad62dff7739a add bearing option to compass
heinrichsweikamp
parents: 254
diff changeset
798
315
4f83470dcece VSIbar #3: remaining changes for the split style bar
Janos Kovacs <kovjanos@gmail.com>
parents: 310
diff changeset
799 #DEFINE neg_flag_velocity flag13,0 ; neg_flag backup for velocity logic
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
800 #DEFINE analog_sw1_pressed flag13,1 ; =1: Analog switch 1 pressed
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
801 #DEFINE analog_sw2_pressed flag13,2 ; =1: Analog switch 2 pressed
338
2811932b4e99 NEW: Mode Auto SP: Automatically switches the SP during descent (CC Mode)
heinrichsweikamp
parents: 337
diff changeset
802 #DEFINE sp2_switched flag13,3 ; =1: This setpoint has been autoselected already
2811932b4e99 NEW: Mode Auto SP: Automatically switches the SP during descent (CC Mode)
heinrichsweikamp
parents: 337
diff changeset
803 #DEFINE sp3_switched flag13,4 ; =1: This setpoint has been autoselected already
2811932b4e99 NEW: Mode Auto SP: Automatically switches the SP during descent (CC Mode)
heinrichsweikamp
parents: 337
diff changeset
804 #DEFINE sp4_switched flag13,5 ; =1: This setpoint has been autoselected already
2811932b4e99 NEW: Mode Auto SP: Automatically switches the SP during descent (CC Mode)
heinrichsweikamp
parents: 337
diff changeset
805 #DEFINE sp5_switched flag13,6 ; =1: This setpoint has been autoselected already
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
806 #DEFINE use_old_batt_flag flag13,7 ; =1: load old battery information after power-on reset
480
ad8acade5567 NEW: PSCR mode (Passive semi-closed rebreather)
heinrichsweikamp
parents: 479
diff changeset
807
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
808 #DEFINE FLAG_pscr_mode flag14,0 ; =1: OSTC is in PSCR mode
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
809 #DEFINE deep_sleep flag14,1 ; OSTC is in deep sleep (ignore buttons, etc)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
810 #DEFINE sensors_agree flag14,2 ; =1: the ppO2 of all sensors are within the threshold range
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
811 #DEFINE gas_needs_attention flag14,3 ; =1: the gas needs attention has been raised before
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
812 #DEFINE gas_needs_warning flag14,4 ; =1: the gas needs warning has been raised before
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
813 #DEFINE sensor_warning flag14,5 ; =1: the sensors disagree warning has been raised before
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
814 #DEFINE alternative_divelayout flag14,6 ; =1: the alternative divelayout is used (aka Blind Mode)
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
815 #DEFINE i2c_error_flag flag14,7 ; =1: An I2C error occured
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
816
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
817
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
818 ; Update flags in divemode, =1: Update the screen
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
819 #DEFINE FLAG_TFT_divemode_mask tft_update_flags+0,0
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
820 #DEFINE FLAG_TFT_display_ndl_mask tft_update_flags+0,1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
821 #DEFINE FLAG_TFT_depth tft_update_flags+0,2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
822 #DEFINE FLAG_TFT_divemins tft_update_flags+0,3
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
823 #DEFINE FLAG_TFT_show_safety_stop tft_update_flags+0,4
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
824 #DEFINE FLAG_TFT_display_ndl tft_update_flags+0,5
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
825 #DEFINE FLAG_TFT_display_deko_mask tft_update_flags+0,6
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
826 #DEFINE FLAG_TFT_display_deko tft_update_flags+0,7
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
827 #DEFINE FLAG_TFT_display_tts tft_update_flags+1,0
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
828 #DEFINE FLAG_TFT_temp_divemode tft_update_flags+1,1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
829 #DEFINE FLAG_TFT_divemode_warning tft_update_flags+1,2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
830 #DEFINE FLAG_TFT_divemode_warning_clear tft_update_flags+1,3
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
831 #DEFINE FLAG_TFT_active_gas_divemode tft_update_flags+1,4
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
832 #DEFINE FLAG_TFT_clear_safety_stop tft_update_flags+1,5
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
833 #DEFINE FLAG_TFT_max_depth tft_update_flags+1,6
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
834 #DEFINE FLAG_TFT_divemode_mask_alt tft_update_flags+1,7
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
835 #DEFINE FLAG_TFT_dive_warning_text_clear tft_update_flags+2,0
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
836 #DEFINE FLAG_TFT_dive_warning_text_clr2 tft_update_flags+2,1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
837 #DEFINE FLAG_TFT_max_depth_alt tft_update_flags+2,2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
838 #DEFINE FLAG_TFT_big_deco_alt tft_update_flags+2,3
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
839 #define FLAG_TFT_not_defined_yet tft_update_flags+2,7 ; last usable flag within tft_update_flags memory space
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
840
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
841
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
842 ; Bit Masks for communication with p2_deco.c
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
843 #define DECO_STATUS_MASK .3
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
844
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
845 ; Bit Flags for communication with p2_deco.c - char_O_deco_status
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
846 #define DECO_STATUS_0_FLAG .0
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
847 #define DECO_STATUS_1_FLAG .1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
848 #define DECO_MODE_LOOP_FLAG .2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
849 #define DECO_MODE_PSCR_FLAG .3
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
850 #define DECO_PLAN_FLAG .4
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
851 #define DECO_CNS_FLAG .5
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
852 #define DECO_VOLUME_FLAG .6
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
853 #define DECO_ASCENT_FLAG .7
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
854
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
855 ; Bit Flags for communication with p2_deco.c - char_O_main_status
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
856 ;#define DECO_MODE_LOOP_FLAG .2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
857 ;#define DECO_MODE_PSCR_FLAG .3
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
858 #define DECO_GASCHANGE_OVRD .4
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
859 #define DECO_BOTTOM_FLAG .6
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
860
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
861 ; Bit Values for communication with p2_deco.c
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
862 #define DECO_STATUS_INIT .3
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
863 #define DECO_MODE_LOOP .4
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
864 #define DECO_MODE_PSCR .8
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
865 #define DECO_PLAN_ALTERNATE .16
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
866 #define DECO_CNS_CALCULATE .32
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
867 #define DECO_VOLUME_CALCULATE .64
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
868 #define DECO_ASCENT_DELAYED .128
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
869
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
870 ; Bit Flags for char_O_deco_warnings
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
871 #define IBCD_warning .0
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
872 #define IBCD_warning_lock .1
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
873 #define mbubble_warning .2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
874 #define mbubble_warning_lock .3
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
875 #define outside_warning .4
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
876 #define outside_warning_lock .5
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
877 #define stoptable_overflow .6
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
878 #define deco_flag .7
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
879
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
880 #define char_invalid_flag .7
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
881
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
882 #define int_invalid_flag .2
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
883 #define int_not_yet_computed .3
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
884 #define int_is_zero .3
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
885 #define int_low_flag .4
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
886 #define int_high_flag .5
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
887 #define int_prewarning_flag .6
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
888 #define int_warning_flag .7
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
889
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
890
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
891
0
heinrichsweikamp
parents:
diff changeset
892 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
893 ; C-code Routines
heinrichsweikamp
parents:
diff changeset
894 ; PART 2
heinrichsweikamp
parents:
diff changeset
895 extern deco_calc_CNS_decrease_15min
heinrichsweikamp
parents:
diff changeset
896 extern deco_calc_desaturation_time
heinrichsweikamp
parents:
diff changeset
897 extern deco_calc_hauptroutine
heinrichsweikamp
parents:
diff changeset
898 extern deco_calc_wo_deco_step_1_min
heinrichsweikamp
parents:
diff changeset
899 extern deco_calc_dive_interval
heinrichsweikamp
parents:
diff changeset
900 extern deco_clear_tissue
heinrichsweikamp
parents:
diff changeset
901 extern deco_pull_tissues_from_vault
heinrichsweikamp
parents:
diff changeset
902 extern deco_push_tissues_to_vault
heinrichsweikamp
parents:
diff changeset
903