annotate src/hwos.inc @ 613:8077ee960199

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