annotate src/hwos.inc @ 647:357341239438

Merge
author heinrichs weikamp
date Thu, 14 Oct 2021 12:04:12 +0200
parents 7d8a4c60ec1a 5b7fe7777425
children aeca5717d9eb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
3 ; File hwos.inc * combined next generation V3.12.3
0
heinrichsweikamp
parents:
diff changeset
4 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
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
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
13
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
14 ; ---- Hardware Configuration
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
15 LIST P=18F87K22 ; compiler settings, if changed change also: Configure -> SelectDevice in MPLAB
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
16 #include "p18f87k22.inc" ; processor definitions
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
17 #include "ports.inc" ; port map definitions
0
heinrichsweikamp
parents:
diff changeset
18
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
19
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
20 ; ---- Software Configuration
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
21 #include "configuration.inc" ; OSTC hwOS configuration
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
22
0
heinrichsweikamp
parents:
diff changeset
23
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
24 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
25 ; Settings, Limits, Thresholds, Encodings, etc.
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
26 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
27
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
28 ; ---- Language Codes
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
29 #DEFINE none 0 ; no language selected
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
30 #DEFINE en 1 ; select English
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
31 #DEFINE de 2 ; select German
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
32 #DEFINE fr 3 ; select French
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
33 #DEFINE it 4 ; select Italian
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
34
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
35
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
36 ; ---- Magic Cookie Definition
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
37 #DEFINE comm_service_key 0xABCDEF ; simsalabim to establish comm service mode
0
heinrichsweikamp
parents:
diff changeset
38
heinrichsweikamp
parents:
diff changeset
39
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
40 ; ---- Scrolling Menu Support
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
41 ;#DEFINE scrolling_menu_enabled ; disabled
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
42
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
43
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
44 ; ---- Logo Address Vectors
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
45 #DEFINE hw_logo_block 0x01E000 ; color image data for heinrichsweikamp logo
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
46 #DEFINE comm_logo_1 0x01EEDE ; color image data for USB or BT logo
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
47 #DEFINE comm_logo_2 0x01EA04 ; color image data for BT logo, "+" bootloader
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
48
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
49
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
50 ;-----------------------------EEPROM DATA ------------------------------------
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
51 ; Automatic reset of all options when this is changed:
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
52 #DEFINE eeprom_opt_version .8 ; range: 16 bit
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
53 #DEFINE eeprom_vault_version .1 ; range: 8 bit
0
heinrichsweikamp
parents:
diff changeset
54 ;-----------------------------------------------------------------------------
heinrichsweikamp
parents:
diff changeset
55
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
56
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
57 ; ---- PWM1 for LED dimming
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
58 #DEFINE CCP1CON_VALUE b'00001100'
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
59 #DEFINE T2CON_ECO b'01111110'
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
60 #DEFINE T2CON_NORMAL b'01111110'
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
61 #DEFINE T2CON_FASTEST b'01111110'
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
62
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
63
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
64 ; ---- CPU speeds
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
65 #DEFINE coding_speed_eco .1 ; 1 MHz = eco speed
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
66 #DEFINE coding_speed_normal .2 ; 16 MHz = normal speed
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
67 #DEFINE coding_speed_fastest .4 ; 64 MHz = fastest speed (32 MHz on OSTC Sport BLE)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
68
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
69 #DEFINE speed_is_eco cpu_speed_state,0 ; =1: CPU is running at eco speed
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
70 #DEFINE speed_is_normal cpu_speed_state,1 ; =1: CPU is running at normal speed
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
71 #DEFINE speed_is_fastest cpu_speed_state,2 ; =1: CPU is running at fastest speed
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
72
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
73 ; ---- I2C speed
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
74 #DEFINE i2c_speed_value 0x27 ;0x9C = 100kHz @ 64MHz Fosc, 0x27 = 100kHz @ 16MHz Fosc
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
75
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
76 ; ---- Divemode Custom View Indexes - Attention: these numbers need to be in line with the jump tables in customview.asm!
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
77 #DEFINE index_blank .0 ; blank view
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
78 #DEFINE index_avr_stopwatch .1 ; average depth and stopwatch
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
79 #DEFINE index_compass_dm .2 ; compass
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
80 #DEFINE index_ppo2_sensors .3 ; ppO2 sensors
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
81 #DEFINE index_sensor_check .4 ; sensor check
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
82 #DEFINE index_pscr_info .5 ; pSCR data
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
83 #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
84 #DEFINE index_gas_needs_ascent .7 ; gas needs for ascent / cave return
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
85 #DEFINE index_cave_tts .8 ; cave mode TTS
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
86 #DEFINE index_decoplan .9 ; deco plan
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
87 #DEFINE index_ceiling_GF_tissue .10 ; ceiling, current GF and tissues
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
88 #DEFINE index_CNS .11 ; CNS values
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
89 #DEFINE index_ppo2_ead_end_cns .12 ; ppO2, END/EAD and CNS or gas density
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
90 #DEFINE index_clock_batt_surfpress .13 ; clock, battery and surface pressure
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
91 #DEFINE index_gf_factors .14 ; GF factors
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
92 #DEFINE index_cave_waypoints .15 ; cave waypoints
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
93 #DEFINE index_cv_dm_max .13 ; highest index used in normal custom view rotation
28
heinrichsweikamp
parents: 26
diff changeset
94
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
95
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
96 ; ---- Timing for button hold-down flags
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
97 #DEFINE TMR1H_VALUE_FIRST .255-.128 ; in steps of 7.8125 ms -> 1.00 s
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
98 #DEFINE TMR1H_VALUE_CONT .255-.32 ; in steps of 7.8125 ms -> 0.25 s
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
99 #DEFINE TMR1H_VALUE_CONT_DIVE .255-.64 ; in steps of 7.8125 ms -> 0.50 s
0
heinrichsweikamp
parents:
diff changeset
100
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
101
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
102 ; ---- Font Sizes
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
103 #DEFINE FT_TINY .0 ; aa_font16_block, full character set
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
104 #DEFINE FT_SMALL .1 ; aa_font28_block, full character set
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
105 #DEFINE FT_STANDARD .2 ; aa_font34_block, full character set
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
106 #DEFINE FT_MEDIUM .3 ; aa_font48_block, only digits, /, ., :, ;, <, =, > and ?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
107 #DEFINE FT_LARGE .4 ; aa_font90_block, only digits, / and .
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
108 #DEFINE FT_HUGE .5 ; aa_font92_block, only digits, / and .
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
109
0
heinrichsweikamp
parents:
diff changeset
110
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
111 ; ---- External O2 Sensors
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
112 #DEFINE min_mv .70 ; = 7 mV
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
113 #DEFINE max_mv .2500 ; = 250 mV
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
114 #DEFINE ignore_mv_above .3500 ; = 350 mV (to suppress ghost readings on long open cables)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
115 #DEFINE ignore_mv_below .19 ; = 1.9 mv (to suppress noise readings on open cabled)
0
heinrichsweikamp
parents:
diff changeset
116
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
117
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
118 ; ---- Profile Recording Parameters
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
119 #DEFINE logbook_profile_version 0x40+0x24 ; logbook recording format: internal (2 bit) + external (6 bit)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
120 #DEFINE samplingrate_apnoe .1 ; [seconds]
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
121
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
122
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
123 ; ---- Profile Recording Rates - Attention: all Divisors must be < 16 !
604
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]
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
130 #DEFINE div_tank .12 ; x sampling rate [s]
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
131
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
132
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
133 ; ---- Profile Recording Data - Attention: Information Lengths must be < 16 !
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
134 #DEFINE infolength_temperature .2 ; [byte]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
135 #DEFINE infolength_deco .2 ; [byte]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
136 #DEFINE infolength_gf .1 ; [byte]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
137 #DEFINE infolength_ppo2_sensors .9 ; [byte]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
138 #DEFINE infolength_decoplan .15 ; [byte]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
139 #DEFINE infolength_cns .2 ; [byte]
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
140 #DEFINE infolength_tank .2 ; [byte]
0
heinrichsweikamp
parents:
diff changeset
141
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
142
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
143 ; ---- RX Functions
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
144 #DEFINE rx_packet_overdue_timeout .120 ; [seconds] timeout for pressure measurements becomming declared as outdated (max. 255)
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
145 #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
146 #DEFINE max_pres_diff_max .50 ; [bar] maximum selectable pressure difference for ind.double mode
0
heinrichsweikamp
parents:
diff changeset
147
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
148 IFDEF _ccr_pscr
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
149 #DEFINE tr_pres_options .15 ; number of options for pressure measurement source / with diluents
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
150 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
151 #DEFINE tr_pres_options .6 ; number of options for pressure measurement source / OC gases only
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
152 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
153
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
154
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
155 ; ---- Cave Mode
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
156 IFDEF _cave_mode
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
157 #DEFINE backtrack_waypoint_max .30 ; highest user-available waypoint number (max allowed: 30)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
158 #DEFINE backtrack_almost_full_threshold .240 ; backtrack index position at which the almost full flag will be set
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
159 #DEFINE backtrack_entire_full_threshold .250 ; backtrack index position at which the entirely full flag will be set
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
160 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
161
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
162
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
163 ; ---- Gas Needs Settings
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
164 #DEFINE min_tank_size .1 ; [liter]
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
165 #DEFINE max_tank_size .40 ; [liter]
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
166 #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
167 #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
168
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
169
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
170 ; ---- Timeouts for Menus / Surface Mode
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
171 #DEFINE surfmode_timeout_default .240 ; [s] default timeout for surface mode and surface menus
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
172 #DEFINE surfmode_timeout_aa_15v .90 ; [s] timeout for surface mode and surface menus when on 1.5V battery
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
173 #DEFINE surfmode_timeout_simulator .240 ; [s] special timeout for simulator mode
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
174
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
175
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
176 ; ---- Timeouts for Menus / Dive Mode
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
177 #DEFINE divemode_timeout_premenu .10 ; [s] timeout for dive mode pre-menu
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
178 #DEFINE divemode_timeout_mainmenu .30 ; [s] timeout for dive mode main menu
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
179
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
180
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
181 ; ---- RS232 Timeout
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
182 #DEFINE rx_timeout .400 ; [ms] timeout for RS232 RX, needs to be multiple of 50 ms
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
183
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
184
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
185 ; ---- End-of-Dive Timeouts
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
186 #DEFINE simulator_timeout_normal .90 ; [min] timeout simulator mode
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
187 #DEFINE simulator_timeout_cave .240 ; [min] timeout simulator mode (cave mode)
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
188 #DEFINE apnoe_timeout .15 ; [min] timeout at surface in apnoe mode
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
189 #DEFINE simulator_timeout .15 ; [s] timeout at surface in simulator mode
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
190 #DEFINE divetime_less_1min_timeout .5 ; [s] timeout at surface for very short dives
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
191
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
192
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
193 ; ---- other Timeouts
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
194 #DEFINE deep_sleep_10mins .144 ; [x 10mins] (24h in this example)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
195
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
196
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
197 ; ---- Surface Mode Thresholds and Limits
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
198 #DEFINE high_altitude_threshold .880 ; [mbar] ambient pressure at which to switch into high altitude mode
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
199 #DEFINE max_surfpressure .1060 ; [mbar] maximum value for internal surface pressure
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
200 #DEFINE pressure_noise_threshold .10 ; [mbar] deltaP threshold for start of fast display updating
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
201 #DEFINE pressure_noise_lag_time .6 ; [1/4 secs] lag time of display updating after deltaP < threshold again
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
202
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
203
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
204
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
205 ; ---- Dive Mode Thresholds and Limits
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
206 #DEFINE wake_up_from_sleep .1160 ; [mbar] absolute pressure at which to switch from sleep mode to surface / dive mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
207 #DEFINE dive_threshold_norm_alt_start .125 ; [mbar] relative pressure for normal altitude start-of-dive (equals depth in cm)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
208 #DEFINE dive_threshold_norm_alt_end .75 ; [mbar] relative pressure for normal altitude end-of-dive (equals depth in cm)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
209 #DEFINE dive_threshold_high_alt_start .325 ; [mbar] relative pressure for high altitude start-of-dive (equals depth in cm)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
210 #DEFINE dive_threshold_high_alt_end .75 ; [mbar] relative pressure for high altitude end-of-dive (equals depth in cm)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
211 #DEFINE ostc_depth_max .120 ; [m] maximum allowed operational depth for OSTC 2, 3, cR, TR, Plus & Sport
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
212 #DEFINE deco_region_distance .2 ; [m] distance below first stop for the deco region to begin
192
efe70488a04b voting logic for external monitoring
heinrichsweikamp
parents: 189
diff changeset
213
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
214
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
215 ; ---- Dive Mode Margins
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
216 #DEFINE ppO2_margin_on_max .300 ; [0.1 mbar] extra margin on ppO2 max values to compensate for surface pressures > 1000 hPa
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
217 #DEFINE sensor_voting_logic_threshold .10 ; threshold in 0.01 bar
0
heinrichsweikamp
parents:
diff changeset
218
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
219
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
220 ; ---- Gas and Dil types
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
221 #DEFINE num_gas_types .4 ; Disabled, First, Normal, Deco
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
222 #DEFINE num_dil_types .3 ; Disabled, First, Normal
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
223
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
224
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
225 ; ---- ppO2 Limits
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
226 #DEFINE ppo2_warning_low_lowest .15 ; [cbar] minimum value for minimum ppO2 on OC
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
227 #DEFINE ppo2_warning_low_default .17 ; [cbar] default value for minimum ppO2 on OC
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
228 #DEFINE ppo2_warning_low_highest .21 ; [cbar] maximum value for minimum ppO2 on OC
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
229
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
230 #DEFINE ppo2_warning_loop_lowest .20 ; [cbar] minimum value for minimum ppO2 on loop
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
231 #DEFINE ppo2_warning_loop_default .40 ; [cbar] default value for minimum ppO2 on loop
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
232 #DEFINE ppo2_warning_loop_highest .60 ; [cbar] maximum value for minimum ppO2 on loop
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
233
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
234 #DEFINE ppo2_warning_high_lowest .120 ; [cbar] minimum value for maximum ppO2 in none-deco phase
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
235 #DEFINE ppo2_warning_deco_lowest .120 ; [cbar] minimum value for maximum ppO2 in deco phase
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
236
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
237 #DEFINE ppo2_warning_high_default .140 ; [cbar] default value for maximum ppO2 in none-deco phase
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
238 #DEFINE ppo2_warning_deco_default .160 ; [cbar] default value for maximum ppO2 in deco phase
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
239
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
240 IFDEF _high_ppO2_max
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
241 #DEFINE ppo2_warning_high_highest .200 ; [cbar] maximum value for maximum ppO2 in none-deco phase
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
242 #DEFINE ppo2_warning_deco_highest .200 ; [cbar] maximum value for maximum ppO2 in deco phase
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
243 ELSE
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
244 #DEFINE ppo2_warning_high_highest .160 ; [cbar] maximum value for maximum ppO2 in none-deco phase
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
245 #DEFINE ppo2_warning_deco_highest .160 ; [cbar] maximum value for maximum ppO2 in deco phase
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
246 ENDIF
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
247
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
248
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
249 ; ---- Salinity Limits
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
250 #DEFINE salinity_min .0 ; [%] minimum value for salinity percentage
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
251 #DEFINE salinity_max .4 ; [%] maximum value for salinity percentage
0
heinrichsweikamp
parents:
diff changeset
252
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
253
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
254 ; ---- Color-Code Parameters for the Dive Mode
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
255 #DEFINE color_code_velocity_warn_high .11 ; [m/min]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
256 #DEFINE color_code_velocity_attn_high .10 ; [m/min]
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
257 #DEFINE velocity_display_threshold .3 ; [m/min]
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
258
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
259
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
260 ; ---- Simulator Parameters
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
261 #DEFINE simulator_startdepth .200 ; [mbar] initial depth (relative pressure) when entering simulator mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
262 #DEFINE simulator_descent_threshold .50 ; [mbar] remaining distance to target pressure when to slow down descent
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
263 #DEFINE simulator_ascent_threshold .50 ; [mbar] remaining distance to target pressure when to slow down ascent
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
264 #DEFINE simulator_descent_rate .5 ; [mbar/0.125 sec] normal descent speed, 5 equals 24 m/min
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
265 #DEFINE simulator_ascent_rate .2 ; [mbar/0.125 sec] normal ascent speed, 2 equals 9 m/min
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
266
0
heinrichsweikamp
parents:
diff changeset
267
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
268 ; ---- Battery Thresholds
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
269 #DEFINE max_battery_charge_temp .3231 ; [0.1 Kelvin] max allowed battery temperature during charging (equals 50°C)
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
270 #DEFINE lithium_36v_empty .2400 ; [mV] Saft 3.6 V LS14500 AA - threshold for battery percent display
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
271 #DEFINE lithium_36v_low .2000 ; [mV] Saft 3.6 V LS14500 AA - lowest possible voltage, value must be higher than value of aa_15v_high!
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
272 #DEFINE aa_15v_high .1550 ; [mV] Energizer 1.5 V E2 AA - highest possible voltage, value must be lower than value of lithium_36v_low!
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
273 #DEFINE aa_15v_low .1100 ; [mV] Energizer 1.5 V E2 AA - lowest possible voltage, according to Energizer data sheet EBC-4201R, page 2
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
274 #DEFINE battery_show_level .30 ; [%] threshold when to show battery level
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
275 #DEFINE battery_warn_level_36 .15 ; [%] threshold for 3.6 V battery warning, also acts as threshold for setting display brightness level to ECO when in dive mode
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
276 #DEFINE battery_warn_level_15 .25 ; [%] threshold for 1.5 V battery warning, also acts as threshold for setting display brightness level to ECO when in dive mode
0
heinrichsweikamp
parents:
diff changeset
277
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
278
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
279 ; ---- 3.6 Volt Battery Sensing Data Points at 70 mA Load
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
280 #DEFINE lithium_36v_75 .3000 ; [mV]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
281 #DEFINE lithium_36v_50 .2900 ; [mV]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
282 #DEFINE lithium_36v_25 .2600 ; [mV]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
283 #DEFINE lithium_36v_10 .2500 ; [mV]
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
284
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
285
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
286 ; ---- Capacity for 2.4 Ah Saft LS14500 and 0.8 Ah Panasonic UR14500P
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
287 ; battery_gauge: 6 is nAs
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
288 ; devide through 65536
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
289 ; 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
290 ; 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
291
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
292
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
293 ; ---- internal Battery Gauging
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
294 #DEFINE capacity_saft_internal .364
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
295 #DEFINE capacity_panasonic_internal .121
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
296
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
297
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
298 ; Gauge IC
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
299 #DEFINE capacity_saft .271 ; 2.3Ah/0.085mAh/100 [%]
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
300 #DEFINE offset_saft .38477 ; 65536-(2.3Ah/0.085mAh)
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
301
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
302 #DEFINE capacity_panasonic .94 ; 0.8Ah/0.085mAh/100 [%]
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
303 #DEFINE offset_panasonic .56124 ; 65536-(0.8Ah/0.085mAh)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
304
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
305 #DEFINE capacity_ncr18650 .364 ; 3.1Ah/0.085mAh/100 [%]
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
306 #DEFINE offset_ncr18650 .29065 ; 65536-(3.1Ah/0.085mAh)
448
aadfe9f2edaf work on new battery options
heinrichsweikamp
parents: 445
diff changeset
307
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
308 #DEFINE capacity_ur16650 .235 ; 2.0Ah/0.085mAh/100 [%]
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
309 #DEFINE offset_ur16650 .42006 ; 65536-(2.0Ah/0.085mAh)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
310
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
311
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
312 ; ---- Power Consumption Values
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
313 #DEFINE current_sleepmode .31
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
314 #DEFINE current_backlight_multi .115 ; * CCPR1L + current_backlight_offset (restricted to <= 255)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
315 #DEFINE current_backlight_offset .216
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
316 #DEFINE current_speed_eco .1914
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
317 #DEFINE current_speed_normal .4027
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
318 #DEFINE current_speed_fastest .5050
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
319 #DEFINE current_ir_receiver .139
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
320 #DEFINE current_compass .28
0
heinrichsweikamp
parents:
diff changeset
321
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
322
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
323 ; ---- Brightness Thresholds (between zero (off) and 255 (max. power consumption))
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
324 #DEFINE ambient_light_max_high_36V .170
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
325 #DEFINE ambient_light_max_high_cr .240
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
326 #DEFINE ambient_light_max_high_15V .140
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
327 #DEFINE ambient_light_min_high .35
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
328 #DEFINE ambient_light_max_medium .125
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
329 #DEFINE ambient_light_min_medium .25
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
330 #DEFINE ambient_light_max_eco .70
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
331 #DEFINE ambient_light_min_eco .10 ; must be the lowest value!
0
heinrichsweikamp
parents:
diff changeset
332
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
333
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
334 ; ---- IR Link Timeout
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
335 #DEFINE ir_timeout_value .128 ; in multiples of 62.5 ms
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
336
0
heinrichsweikamp
parents:
diff changeset
337
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
338 ; ---- Setpoint Control
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
339 #DEFINE surface_sp .50 ; in cbar
352
5c6da9fa5cb0 add setpoint change to first sample in CCR mode
heinrichsweikamp
parents: 344
diff changeset
340
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
341
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
342 ; ---- Gaslist hard-coded Limits
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
343 IFDEF _helium
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
344 #DEFINE gaslist_min_o2 .7 ; minimum O2 [%] ( 7% is minimum value to keep MOD < 255 meters / 1 Byte)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
345 #DEFINE gaslist_max_o2 .100 ; maximum O2 [%]
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
346 #DEFINE gaslist_max_He .100-gaslist_min_o2 ; maximum He [%]
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
347 #DEFINE gaslist_max_change_depth .140 ; max. change depth [m]
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
348 #DEFINE tissue_graphics_options .2 ; tissue graphics "Pres+Sat" and "N2+He" available
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
349 ELSE
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
350 #DEFINE gaslist_min_o2 .21 ; minimum O2 [%]
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
351 #DEFINE gaslist_max_o2 .100 ; maximum O2 [%]
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
352 #DEFINE gaslist_max_He .0 ; maximum He [%]
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
353 #DEFINE gaslist_max_change_depth .70 ; max. change depth [m]
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
354 #DEFINE tissue_graphics_options .1 ; tissue graphics "Pres+Sat" only available
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
355 ENDIF
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
356
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
357
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
358 ; ---- Setpoint list hard-coded Limits
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
359 #DEFINE gaslist_sp_max .160 ; max. setpoint [cbar]
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
360 #DEFINE gaslist_sp_min .50 ; min. setpoint [cbar]
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
361 #DEFINE gaslist_sp_max_depth .100 ; max change depth [m]
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
362
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
363
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
364 ; ---- Compass Display
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
365 #DEFINE compass_fast_treshold .9 ; show new heading instantly if angular difference > compass_fast_treshold, else show animated turning of compass rose
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
366 #DEFINE compass_averaging .10 ; number of averaging cycles
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
367
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
368
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
369 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
370 ; Bit Flags
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
371 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
372
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
373 ; ---- Gas / Diluent Type & State
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
374 ; .0 ; | 0: disabled, 1: first, 2: normal/work, 3: deco
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
375 ; .1 ; |
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
376 #DEFINE gas_lost .2 ; =1: gas/diluent is lost (permanently unavailable)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
377 #DEFINE gas_staged .3 ; =1: gas/diluent is staged (temporary unavailable)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
378 ; .4 ; --- unused
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
379 ; .5 ; --- unused
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
380 ; .6 ; --- unused
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
381 ; .7 ; --- unused
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
382
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
383 ; ---- Bit Flags for Communication with p2_deco.c - char_O_main_status
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
384 #DEFINE DECO_VOLUME_FLAG .0 ; =1: calculate gas needs
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
385 #DEFINE DECO_BOTTOM_FLAG .1 ; =1: calculate gas needs for full bottom segment, =0: ...for extra time only
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
386 #DEFINE DECO_CAVE_MODE .2 ; =1: calculate ascent and gas needs using backtracking data
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
387 #DEFINE DECO_GAS_CONTINGENCY .3 ; =1: use a second best gas if best gas is all used up
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
388 #DEFINE DECO_TR_FUNCTIONS .4 ; =1: calculate TR functions (pressure readings)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
389 #DEFINE DECO_EXTENDED_STOPS .5 ; =1: place gas changes also below 1st stop depth
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
390 #DEFINE DECO_MODE_LOOP_FLAG .6 ; =1: calculate real tissues in loop mode (CCR or pSCR)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
391 #DEFINE DECO_MODE_PSCR_FLAG .7 ; =1: calculate real tissues in pSCR mode (loop flag needs to be set, too)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
392
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
393 ; ---- Bit Flags for Communication with p2_deco.c - char_O_deco_status
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
394 #DEFINE DECO_START_NORM .0 ; =1: write: start calculation of a normal deco plan
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
395 #DEFINE DECO_START_ALT .1 ; =1: write: start calculation of an alternative deco plan
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
396 #DEFINE DECO_COMPLETED_NORM .0 ; =1: read: calculation of a normal deco plan has completed
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
397 #DEFINE DECO_COMPLETED_ALT .1 ; =1: read: calculation of an alternative deco plan has completed
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
398 #DEFINE DECO_INITIALIZE .2 ; =1: write: initialize deco engine (to be done only once at the begin of every dive)
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
399 #DEFINE DECO_CALCULATOR_MODE .3 ; =1: deco engone is run from the deco calculator
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
400 #DEFINE DECO_BAILOUT_FLAG .4 ; =1: allow gas switches before first deco stop (used in bailout plans)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
401 #DEFINE DECO_DELAY_FLAG .5 ; =1: figure in a delayed ascent (fTTS)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
402 ; DECO_MODE_LOOP_FLAG .6 ; =1: calculate simulated tissues in loop mode (CCR or pSCR)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
403 ; DECO_MODE_PSCR_FLAG .7 ; =1: calculate simulated tissues in pSCR mode (loop flag needs to be set, too)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
404
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
405 ; ---- Bit Flags for Communication with p2_deco.c - char_O_deco_warnings
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
406 #DEFINE IBCD_warning .0 ; =1: IBCD currently occuring
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
407 #DEFINE IBCD_warning_lock .1 ; =1: IBCD occured durign the dive
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
408 #DEFINE mbubble_warning .2 ; =1: microbubbles potentionally currently occuring
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
409 #DEFINE mbubble_warning_lock .3 ; =1: microbubbles potentionally occured during the dive
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
410 #DEFINE outside_warning .4 ; =1: currently outside the ZHL-16 model
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
411 #DEFINE outside_warning_lock .5 ; =1: was outside the ZHL-16 model during the dive
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
412 #DEFINE outside_attention .6 ; =1: currently near to the limits of the ZHL-16 model
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
413 #DEFINE deco_plan_incomplete .7 ; =1: internal error: deco calculation incomplete
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
414
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
415 ; ---- Bit Flags for Communication with p2_deco.c - char_O_deco_info
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
416 #DEFINE deco_mode .0 ; =1: in deco mode, deco ppO2 levels permitted
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
417 #DEFINE ind_double_switch .1 ; =1: switch to other tank advice active
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
418 #DEFINE gas_needs_fTTS .2 ; =1: indicated gas needs are calculated in fTTS mode
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
419 #DEFINE deco_zone .3 ; =1: fTTS is <= TTS (not updated when in bailout mode)
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
420 #DEFINE deco_ceiling .4 ; =1: ceiling depth > 0
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
421 #DEFINE deco_stops_norm .5 ; =1: deco stops found in normal plan
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
422 #DEFINE deco_stops_alt .6 ; =1: deco stops found in alternative plan
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
423 #DEFINE gas_needs_cave .7 ; =1: indicated gas needs are calculated in cave mode
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
424
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
425 ; ---- Bit Flags for Status on Variables of Type char
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
426 #DEFINE char_transmitter_lost .6
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
427 #DEFINE char_invalid_flag .7
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
428 #DEFINE char_transmitter_low_bat .7
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
429
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
430 ; ---- Bit Flags for Status on Variables of Type int (Flags are placed in the UPPER byte!)
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
431 #DEFINE int_invalid_flag .2
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
432 #DEFINE int_not_yet_computed .3
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
433 #DEFINE int_is_zero .3
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
434 #DEFINE int_low_flag .4
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
435 #DEFINE int_not_avail_flag .4
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
436 #DEFINE int_high_flag .5
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
437 #DEFINE int_outdated_flag .5
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
438 #DEFINE int_attention_flag .6
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
439 #DEFINE int_warning_flag .7
0
heinrichsweikamp
parents:
diff changeset
440
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
441
0
heinrichsweikamp
parents:
diff changeset
442 ;-----------------------------------------------------------------------------
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
443 ; Timebase and Eventbase (stored in access RAM, set by the ISR, trigger flags to be cleared by the application)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
444 ;-----------------------------------------------------------------------------
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
445
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
446 #DEFINE timebase_0sec timebase,0 ; counting timebase, 1/2 sec bit
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
447 #DEFINE timebase_1sec timebase,1 ; counting timebase, 1 sec bit
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
448 #DEFINE timebase_2sec timebase,2 ; counting timebase, 2 sec bit
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
449 #DEFINE trigger_quarter_second timebase,3 ; =1: a new 1/4 second has begun (not synced with the other time flags)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
450 #DEFINE trigger_half_second timebase,4 ; =1: a new 1/2 second has begun
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
451 #DEFINE trigger_full_second timebase,5 ; =1: a new 1/1 second has begun
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
452 #DEFINE trigger_full_minute timebase,6 ; =1: a new minute has begun
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
453 #DEFINE trigger_full_hour timebase,7 ; =1: a new hour has begun
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
454
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
455 #DEFINE trigger_isr_updates eventbase,0 ; =1: the ISR had kicked in (set by ISR, used by ISR-safe copy macros)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
456 #DEFINE trigger_timeout eventbase,1 ; =1: timeout signal by timeout service
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
457 #DEFINE trigger_sample_divedata eventbase,2 ; =1: time to store a new sample
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
458 #DEFINE trigger_S8_data_update eventbase,3 ; =1: new S8 digital data are available
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
459 ; eventbase,4 ; --- unused
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
460 #DEFINE trigger_pres_cur_changed eventbase,5 ; =1: current pressure value has changed
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
461 #DEFINE trigger_pres_max_changed eventbase,6 ; =1: maximum pressure value has changed
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
462 #DEFINE trigger_temp_changed eventbase,7 ; =1: temperature value has changed
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
463
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
464
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
465 ;-----------------------------------------------------------------------------
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
466 ; Flags - stored in access RAM
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
467 ;-----------------------------------------------------------------------------
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
468
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
469 ;---- Hardware - OSTC Model Descriptor (stored in access RAM, cleared & rebuilt in restart, to preserve compatibility with 3rd party tools DO NOT alter bit positions)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
470 #DEFINE battery_gauge_available HW_descriptor,0 ; =1: OSTC has rechargeable battery with battery management chip
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
471 #DEFINE ambient_sensor HW_descriptor,1 ; =1: OSTC has an ambient light sensor
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
472 #DEFINE ext_input_s8_ana HW_descriptor,2 ; =1: OSTC has S8/analog input
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
473 #DEFINE ext_input_optical HW_descriptor,3 ; =1: OSTC has optical input
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
474 #DEFINE ble_available HW_descriptor,4 ; =1: OSTC has an BT module
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
475 #DEFINE ostc_rx_present HW_descriptor,5 ; =1: OSTC has RX module
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
476 #DEFINE lv_core HW_descriptor,6 ; =1: OSTC has low-voltage core (2.7V)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
477 #DEFINE flash_block_write HW_descriptor,7 ; =1: OSTC has FLASH with block-write capability
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
478
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
479 ;---- Hardware - OSTC Model Variants (stored in access RAM, NOT cleared in restart)
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
480 #DEFINE screen_type1 HW_variants,0 ; =1: display type 1, =0; display type 0
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
481 #DEFINE screen_type2 HW_variants,1 ; =1: display type 2, =0: display type 0 or 1
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
482 #DEFINE screen_type3 HW_variants,2 ; =1: display type 3, =0: display type 0 or 1 or 2
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
483 #DEFINE compass_type1 HW_variants,3 ; =1: compass type 1, =0: compass type 0
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
484 #DEFINE compass_type2 HW_variants,4 ; =1: compass type 2, =0: compass type 0 or 1
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
485 #DEFINE compass_type3 HW_variants,5 ; =1: compass type 3, =0: compass type 0 or 1 or 2
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
486 #DEFINE analog_switches HW_variants,6 ; =1: analog switches available
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
487 #DEFINE battery_is_36v HW_variants,7 ; =1: a 3.6 Volt battery is detected
624
7bdcc591196c Support for Compass3 hardware
heinrichsweikamp
parents: 623
diff changeset
488
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
489 ;---- Hardware - OSTC Model Variants2 (stored in access RAM, NOT cleared in restart)
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
490 #DEFINE press_sensor_type HW_variants2,0 ; =1: pressure sensor MS5837, =0: Pressure sensor MS5541
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
491 ; HW_variants2,1 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
492 ; HW_variants2,2 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
493 ; HW_variants2,3 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
494 ; HW_variants2,4 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
495 ; HW_variants2,5 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
496 ; HW_variants2,6 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
497 ; HW_variants2,7 ; --- unused
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
498
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
499 ;---- Hardware - States 1 (stored in access RAM, cleared on restart)
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
500 #DEFINE analog_sw1_pressed HW_flags_state1,0 ; =1: analog switch 1 pressed
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
501 #DEFINE analog_sw2_pressed HW_flags_state1,1 ; =1: analog switch 2 pressed
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
502 #DEFINE switch_left HW_flags_state1,2 ; =1: left button was pressed
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
503 #DEFINE switch_right HW_flags_state1,3 ; =1: right button was pressed
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
504 #DEFINE flip_screen HW_flags_state1,4 ; =1: screen is shown 180° turned
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
505 #DEFINE adc_is_running HW_flags_state1,5 ; =1: the ADC is in use
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
506 #DEFINE tft_is_dimming HW_flags_state1,6 ; =1: the TFT is dimming, ignore light sensor
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
507 #DEFINE compass_enabled HW_flags_state1,7 ; =1: the compass and accelerometer chip is active
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
508
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
509 ;---- Hardware - States 2 (stored in access RAM, NOT cleared on restart)
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
510 #DEFINE cc_active HW_flags_state2,0 ; =1: constant current charging active (cR hardware only)
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
511 #DEFINE cv_active HW_flags_state2,1 ; =1: constant voltage charging active (cR hardware only)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
512 #DEFINE i2c_error_flag HW_flags_state2,2 ; =1: an I2C error occurred
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
513 #DEFINE rs232_rx_timeout HW_flags_state2,3 ; =1: RS232 receive timeout occurred
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
514 #DEFINE battery_low_condition HW_flags_state2,4 ; =1: low battery condition detected
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
515 #DEFINE flash_wrap_around HW_flags_state2,5 ; =1: address wrap-around control / signalling
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
516 #DEFINE flash_wait HW_flags_state2,6 ; =1: wait for flash write operation to complete
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
517 #DEFINE i2c_busy_temperature HW_flags_state2,7 ; =1: Currently updating temperature from MS5837
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
518
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
519 ;---- Hardware - States 3 (stored in access RAM, NOT cleared on restart)
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
520 #DEFINE ms5837_state HW_flags_state3,0 ; =1: result of pressure is in the ADC
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
521 #DEFINE i2c_busy_pressure HW_flags_state3,1 ; =1: Currently updating pressure from MS5837
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
522 ; HW_flags_state3,2 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
523 ; HW_flags_state3,3 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
524 ; HW_flags_state3,4 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
525 ; HW_flags_state3,5 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
526 ; HW_flags_state3,6 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
527 ; HW_flags_state3,7 ; --- unused
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
528
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
529 ;---- Operating System - persistent Settings (stored in access RAM, NOT cleared in restart)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
530 #DEFINE sensor1_calibrated_ok OS_flags_persist,0 ; =1: sensor 1 calibration ok
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
531 #DEFINE sensor2_calibrated_ok OS_flags_persist,1 ; =1: sensor 2 calibration ok
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
532 #DEFINE sensor3_calibrated_ok OS_flags_persist,2 ; =1: sensor 3 calibration ok
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
533 #DEFINE compass_bearing_set OS_flags_persist,3 ; =1: compass bearing is set
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
534 #DEFINE use_old_batt_flag OS_flags_persist,4 ; =1: load old battery data after power-on reset
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
535 #DEFINE option_changed OS_flags_persist,5 ; =1: option values have been changed, EEPROM needs to be updated
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
536 #DEFINE restart_fast OS_flags_persist,6 ; =1: request to skip logos and waits on restart
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
537 #DEFINE battery_overtemp OS_flags_persist,7 ; =1: battery charging temperature limit exceeded
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
538
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
539
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
540 ;---- Operating System - ISR Control 1 (stored in access RAM)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
541 #DEFINE reset_timebase OS_flags_ISR1,0 ; =1: request ISR to reset the timebase for the trigger flags
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
542 #DEFINE restart_timeout OS_flags_ISR1,1 ; =1: request ISR to resart the timeout timer
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
543 #DEFINE reset_max_pressure OS_flags_ISR1,2 ; =1: request ISR to reset the maximum pressure to zero
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
544 #DEFINE reset_surface_interval OS_flags_ISR1,3 ; =1: request ISR to reset the surface interval to zero
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
545 #DEFINE reset_trip_pressure OS_flags_ISR1,4 ; =1: request ISR to reset the resettable min/max pressure
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
546 #DEFINE block_rtc_access OS_flags_ISR1,5 ; =1: suspend the ISR from accessing the RTC
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
547 #DEFINE block_battery_gauge OS_flags_ISR1,6 ; =1: suspend the ISR from updating the battery gauge
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
548 #DEFINE block_sensor_interrupt OS_flags_ISR1,7 ; =1: suspend the ISR from executing sensor interrupts
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
549
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
550 ;---- Operating System - ISR Control 2 (stored in access RAM)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
551 #DEFINE update_surface_pressure OS_flags_ISR2,0 ; =1: request ISR to update the surface pressure
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
552 #DEFINE quit_simulatormode OS_flags_ISR2,1 ; =1: request ISR to quit the simulator mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
553 #DEFINE count_divetime OS_flags_ISR2,2 ; =1: request ISR to count the dive time
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
554 #DEFINE sensor_override_request OS_flags_ISR2,3 ; =1: request ISR to override the pressure sensor with a simulated depth
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
555 #DEFINE tmr5_preemtion_allowed OS_flags_ISR2,4 ; =1: allow preemption of timeout counter
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
556 #DEFINE button_hold_down_allowed OS_flags_ISR2,5 ; =1: OSTC uses mechanical push buttons
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
557 #DEFINE sensor_override_active OS_flags_ISR2,6 ; =1: ISR output: switch to override-mode confirmed
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
558 #DEFINE divetime_longer_1min OS_flags_ISR2,7 ; =1: ISR output: dive time is >= one minute
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
559
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
560
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
561 ;---- Operating Modes (stored in access RAM, persistent)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
562 #DEFINE sleepmode OM_flags_mode,0 ; =1: in sleep mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
563 #DEFINE divemode OM_flags_mode,1 ; =1: in dive mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
564 #DEFINE simulatormode OM_flags_mode,2 ; =1: in simulator mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
565 #DEFINE high_altitude_mode OM_flags_mode,3 ; =1: unit was manually turned on with absolute pressure < 880 mbar
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
566 ; OM_flags_mode,4 ; --- unused
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
567 #DEFINE tr_functions_activated OM_flags_mode,5 ; =1: TR module is available and TR mode is <> off
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
568 #DEFINE cold_start OM_flags_mode,6 ; =1: restart is entered from a cold start
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
569 IFDEF _screendump
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
570 #DEFINE screen_dump_avail OM_flags_mode,7 ; =1: screen dump function is available
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
571 ELSE
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
572 #DEFINE comm_mode_disabled OM_flags_mode,7 ; =1: COMM mode is disabled
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
573 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
574
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
575
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
576 ;---- Dive Modes - Deco Modes (stored in access RAM)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
577 #DEFINE FLAG_oc_mode DM_flags_deco,0 ; =1: in OC mode active
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
578 #DEFINE FLAG_ccr_mode DM_flags_deco,1 ; =1: in CCR mode (fixed ppO2 or sensor) active
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
579 #DEFINE FLAG_gauge_mode DM_flags_deco,2 ; =1: in gauge mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
580 #DEFINE FLAG_apnoe_mode DM_flags_deco,3 ; =1: in apnoe mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
581 #DEFINE FLAG_pscr_mode DM_flags_deco,4 ; =1: in pSCR mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
582 #DEFINE bailout_mode DM_flags_deco,5 ; =1: in bailout mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
583 #DEFINE apnoe_at_surface DM_flags_deco,6 ; =1: at the surface, 0= submerged (apnoe mode only, set/reset by ISR)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
584 #DEFINE apnoe_new_dive DM_flags_deco,7 ; =1: a new dive has begun (apnoe mode only, set by ISR)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
585
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
586
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
587 ;-----------------------------------------------------------------------------
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
588 ; Flags - stored in bank common
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
589 ;-----------------------------------------------------------------------------
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
590
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
591 ;---- Dive Mode - Dive States
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
592 #DEFINE use_aGF DM_flags_state,0 ; =1: use aGF, =0: use GF
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
593 #DEFINE deco_locked DM_flags_state,1 ; =1: in or has been in deco obligation during the dive
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
594 #DEFINE deco_region DM_flags_state,2 ; =1: in or has been in the deco stops region during the dive
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
595 #DEFINE cave_mode DM_flags_state,3 ; =1: cave mode is active (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
596 #DEFINE dive_turned DM_flags_state,4 ; =1: dive is turned (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
597 #DEFINE backtrack_almost_full DM_flags_state,5 ; =1: the backtracking storage is almost full (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
598 #DEFINE backtrack_entire_full DM_flags_state,6 ; =1: the backtracking storage is entirely full (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
599 #DEFINE backtrack_shutdown DM_flags_state,7 ; =1: the backtracking has shut down due to entirely full (cave mode)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
600
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
601 ;---- Dive Mode - O2 Sensors & Setpoint
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
602 #DEFINE use_O2_sensor1 DM_flags_sensor,0 ; =1: sensor 1 shall be used
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
603 #DEFINE use_O2_sensor2 DM_flags_sensor,1 ; =1: sensor 2 shall be used
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
604 #DEFINE use_O2_sensor3 DM_flags_sensor,2 ; =1: sensor 3 shall be used
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
605 #DEFINE voting_logic_sensor1 DM_flags_sensor,3 ; =1: sensor 1 is within the voting logic threshold
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
606 #DEFINE voting_logic_sensor2 DM_flags_sensor,4 ; =1: sensor 2 is within the voting logic threshold
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
607 #DEFINE voting_logic_sensor3 DM_flags_sensor,5 ; =1: sensor 3 is within the voting logic threshold
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
608 ; DM_flags_sensor,6 ; --- unused
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
609 #DEFINE restart_auto_sp DM_flags_sensor,7 ; =1: re-run the auto SP selection from 1st SP
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
610
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
611 ;---- Dive Mode - User Requests / General
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
612 #DEFINE request_gas_change DM_flags_request,0 ; =1: request to change the gas
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
613 #DEFINE request_gas_update DM_flags_request,1 ; =1: request to update the gas
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
614 #DEFINE request_reset_avg DM_flags_request,2 ; =1: request to reset the average depth
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
615 #DEFINE request_next_custview DM_flags_request,3 ; =1: request to show the next custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
616 #DEFINE request_back_to_loop DM_flags_request,4 ; =1: request to switch back from bailout to loop
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
617 #DEFINE request_toggle_GF DM_flags_request,5 ; =1: request to toggle between GF and aGF
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
618 #DEFINE request_set_marker DM_flags_request,6 ; =1: request to set a marker in the logbook
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
619 #DEFINE request_restart_engine DM_flags_request,7 ; =1: request to restart the deco engine
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
620
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
621 ;---- Dive Mode - User Requests / Cave Mode
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
622 #DEFINE request_cave_toggle DM_flags_cavereq,0 ; =1: request to toggle cave mode off/on (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
623 #DEFINE request_cave_off_turned DM_flags_cavereq,1 ; =1: request to switch cave mode off (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
624 #DEFINE request_turn_toggle DM_flags_cavereq,2 ; =1: request to toggle dive turned state (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
625 #DEFINE request_turn_turn DM_flags_cavereq,3 ; =1: request to switch dive turned state to turned (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
626 #DEFINE request_waypoint_set DM_flags_cavereq,4 ; =1: request to set a waypoint (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
627 #DEFINE request_waypoint_out DM_flags_cavereq,5 ; =1: request to go one waypoint out of the cave (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
628 #DEFINE request_waypoint_in DM_flags_cavereq,6 ; =1: request to go one waypoint into the cave (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
629 ; DM_flags_cavereq,7 ; --- unused
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
630
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
631 ;---- Dive Mode - Data Recording Events
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
632 #DEFINE event_occured DM_flags_event,0 ; =1: an event occurred (global indicator flag)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
633 #DEFINE event_gas_change DM_flags_event,1 ; =1: a change to another gas or diluent occurred
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
634 #DEFINE event_gas_change_gas6 DM_flags_event,2 ; =1: a change to or of the gas 6 has occurred
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
635 #DEFINE event_bailout DM_flags_event,3 ; =1: a change to or of the OC gas occurred due to bailout
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
636 #DEFINE event_SP_change DM_flags_event,4 ; =1: a change of the setpoint has occurred
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
637 ; DM_flags_event,5 ; --- unused
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
638 ; DM_flags_event,6 ; --- unused
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
639 ; DM_flags_event,7 ; --- unused
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
640
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
641 ;---- Dive Mode - Display Control / Layout
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
642 #DEFINE safety_stop_enabled DM_flags_layout1,0 ; =1: safety stop is enabled
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
643 #DEFINE safety_stop_active DM_flags_layout1,1 ; =1: safety stop is shown
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
644 #DEFINE decostop_active DM_flags_layout1,2 ; =1: decompression stop is shown
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
645 #DEFINE velocity_active_num DM_flags_layout1,3 ; =1: numerical velocity indicator is shown
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
646 #DEFINE velocity_active_vsi DM_flags_layout1,4 ; =1: graphical velocity indicator is shown
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
647 #DEFINE alt_layout_active DM_flags_layout1,5 ; =1: the alternative dive layout is used (aka "blind mode")
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
648 #DEFINE neg_flag_velocity DM_flags_layout1,6 ; =1: descending, used by velocity logic
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
649 #DEFINE show_only_divemins DM_flags_layout1,7 ; =1: only dive minutes are shown
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
650
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
651 #DEFINE cur_depth_greater_100m DM_flags_layout2,0 ; =1: current depth > 100 meters
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
652 #DEFINE max_depth_greater_100m DM_flags_layout2,1 ; =1: max. depth > 100 meters
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
653 #DEFINE depth_color_attention DM_flags_layout2,2 ; =1: show depth in attention color
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
654 #DEFINE depth_color_warning DM_flags_layout2,3 ; =1: show depth in warning color
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
655 #DEFINE depth_color_last DM_flags_layout2,4 ; =1: last depth was shown in warning or attention color
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
656 #DEFINE depth_inverse_last DM_flags_layout2,5 ; =1: last depth was shown in inverse
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
657 #DEFINE gas_needs_mode_last DM_flags_layout2,6 ; =1: last gas needs were computed for cave mode, =0: vertical ascent
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
658 #DEFINE tts_over_99_last DM_flags_layout2,7 ; =1: last TTS was > 99 minutes
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
659
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
660 #DEFINE tissue_graphic_layout DM_flags_layout3,0 ; =1: show pres+sat, =0: show N2/He pressures
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
661 #DEFINE tissue_graphic_gf DM_flags_layout3,1 ; =1: show GF lines
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
662 #DEFINE tissue_graphic_cns DM_flags_layout3,2 ; =1: shwo CNS value (surface mode graphic only)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
663 #DEFINE tissue_graphic_mode DM_flags_layout3,3 ; =1: logbook mode (surface mode graphic only)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
664 ; DM_flags_layout3,4 ; --- unused
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
665 ; DM_flags_layout3,5 ; --- unused
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
666 ; DM_flags_layout3,6 ; --- unused
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
667 ; DM_flags_layout3,7 ; --- unused
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
668
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
669
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
670 ;---- Dive Mode - Display Control / Gas, Diluent, Depth
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
671 #DEFINE better_gas_hint DM_flags_gas_dil,0 ; =1: mark a gas when it is a better gas
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
672 #DEFINE color_code_gases DM_flags_gas_dil,1 ; =1: color code the gases by ppO2 & current depth
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
673 #DEFINE better_gas_available DM_flags_gas_dil,2 ; =1: a better gas is available
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
674 #DEFINE better_gas_blinking DM_flags_gas_dil,3 ; =1: gas is blinking
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
675 #DEFINE better_dil_available DM_flags_gas_dil,4 ; =1: a better diluent is available
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
676 #DEFINE better_dil_blinking DM_flags_gas_dil,5 ; =1: diluent is blinking
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
677 #DEFINE gas6_or_EXIT DM_flags_gas_dil,6 ; =1: exit menu, =0: provide gas6 option
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
678 ; DM_flags_gas_dil,7 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
679
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
680
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
681 ;---- Dive Mode - Display Control / Messages
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
682 #DEFINE sign_shown DM_flags_message,0 ; =1: the warning/attention/advice sign is shown
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
683 #DEFINE sign_advice DM_flags_message,1 ; =1: the sign shown is an advice sign
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
684 #DEFINE sign_attention DM_flags_message,2 ; =1: the sign shown is an attention sign
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
685 #DEFINE sign_warning DM_flags_message,3 ; =1: the sign shown is a warning sign
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
686 #DEFINE message_2nd_row_used DM_flags_message,4 ; =1: the second row contains a warning/attention/advice
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
687 ; DM_flags_message,5 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
688 ; DM_flags_message,6 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
689 ; DM_flags_message,7 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
690
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
691
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
692 ;---- Dive Mode - Display Control / Advices
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
693 #DEFINE advc_det_change_gas DM_flags_advc_det,0 ; =1: change gas advice
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
694 #DEFINE advc_det_switch_tank DM_flags_advc_det,1 ; =1: change tank advice
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
695 ; DM_flags_advc_det,2 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
696 ; DM_flags_advc_det,3 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
697 ; DM_flags_advc_det,4 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
698 ; DM_flags_advc_det,5 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
699 ; DM_flags_advc_det,6 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
700 ; DM_flags_advc_det,7 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
701
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
702
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
703 ;---- Dive Mode - Display Control / Attentions
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
704 #DEFINE attn_det_gas_needs DM_flags_att1_det,0 ; =1: gas needs attention threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
705 #DEFINE attn_det_ppo2_breathed DM_flags_att1_det,1 ; =1: breathed ppO2 attention threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
706 #DEFINE attn_det_ppo2_diluent DM_flags_att1_det,2 ; =1: diluent ppO2 attention threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
707 #DEFINE attn_det_cns_current DM_flags_att1_det,3 ; =1: current CNS attention threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
708 #DEFINE attn_det_gas_density DM_flags_att1_det,4 ; =1: gas density attention threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
709 #DEFINE attn_det_saturation DM_flags_att1_det,5 ; =1: tissue saturation attention threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
710 #DEFINE attn_det_outside DM_flags_att1_det,6 ; =1: outside model attention issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
711 #DEFINE attn_det_microbubble DM_flags_att1_det,7 ; =1: µ-bubble attention issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
712
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
713 #DEFINE attn_det_sac_rate DM_flags_att2_det,0 ; =1: SAC rate attention threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
714 #DEFINE attn_det_pressure1 DM_flags_att2_det,1 ; =1: tank 1 pressure attention threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
715 #DEFINE attn_det_pressure2 DM_flags_att2_det,2 ; =1: tank 2 pressure attention threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
716 #DEFINE attn_det_ibcd DM_flags_att2_det,3 ; =1: IBCD attention issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
717 #DEFINE attn_det_cave_shut_down DM_flags_att2_det,4 ; =1: cave mode shutdown attention issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
718 #DEFINE attn_det_sensor1_lost DM_flags_att2_det,5 ; =1: sensor 1 lost attention issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
719 #DEFINE attn_det_sensor2_lost DM_flags_att2_det,6 ; =1: sensor 2 lost attention issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
720 #DEFINE attn_det_sensor3_lost DM_flags_att2_det,7 ; =1: sensor 3 lost attention issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
721
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
722 #DEFINE attn_det_xmit1_bat DM_flags_att3_det,0 ; =1: xmitter 1 low batt attention issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
723 #DEFINE attn_det_xmit2_bat DM_flags_att3_det,1 ; =1: xmitter 2 low batt attention issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
724 #DEFINE attn_det_cns_eod DM_flags_att3_det,2 ; =1: end-of-dive CNS attention threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
725 ; DM_flags_att3_det,3 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
726 ; DM_flags_att3_det,4 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
727 ; DM_flags_att3_det,5 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
728 ; DM_flags_att3_det,6 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
729 ; DM_flags_att3_det,7 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
730
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
731 ;---- Dive Mode - Display Control / Warnings
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
732 #DEFINE warn_det_gas_needs DM_flags_war1_det,0 ; =1: gas needs warning threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
733 #DEFINE warn_det_ppO2_breathed DM_flags_war1_det,1 ; =1: breathed ppO2 warning threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
734 #DEFINE warn_det_ppO2_diluent DM_flags_war1_det,2 ; =1: diluent ppO2 warning threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
735 #DEFINE warn_det_cns_current DM_flags_war1_det,3 ; =1: current CNS warning threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
736 #DEFINE warn_det_gas_density DM_flags_war1_det,4 ; =1: gas density warning threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
737 #DEFINE warn_det_saturation DM_flags_war1_det,5 ; =1: tissue saturation warning threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
738 #DEFINE warn_det_outside DM_flags_war1_det,6 ; =1: outside model warning issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
739 #DEFINE warn_det_microbubble DM_flags_war1_det,7 ; =1: µ-bubble warning issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
740
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
741 #DEFINE warn_det_cave_shut_down DM_flags_war2_det,0 ; =1: cave mode shutdown warning issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
742 #DEFINE warn_det_pressure1 DM_flags_war2_det,1 ; =1: tank pressure 1 warning threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
743 #DEFINE warn_det_pressure2 DM_flags_war2_det,2 ; =1: tank pressure 2 warning threshold reached
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
744 #DEFINE warn_det_batt_low DM_flags_war2_det,3 ; =1: battery low warning issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
745 #DEFINE warn_det_depth_limit DM_flags_war2_det,4 ; =1: depth limit warning issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
746 #DEFINE warn_det_sensors_lost DM_flags_war2_det,5 ; =1: sensors lost warning issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
747 #DEFINE warn_det_sensors_div DM_flags_war2_det,6 ; =1: sensors divergence warning issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
748 #DEFINE warn_det_no_bo_gas DM_flags_war2_det,7 ; =1: no B/O gas avail warning issued
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
749
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
750
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
751 ;---- Dive Mode - Display Control / Custom View automatic show-up
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
752 #DEFINE shown_gas_needs_attn DM_flags_shown1,0 ; =1: gas needs attention has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
753 #DEFINE shown_gas_needs_warn DM_flags_shown1,1 ; =1: gas needs warning has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
754 #DEFINE shown_sensors_diverg DM_flags_shown1,2 ; =1: sensor divergence has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
755 #DEFINE shown_sensors_lost DM_flags_shown1,3 ; =1: sensor all lost has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
756 #DEFINE shown_sensor1_fail DM_flags_shown1,4 ; =1: sensor 1 failure has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
757 #DEFINE shown_sensor2_fail DM_flags_shown1,5 ; =1: sensor 2 failure has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
758 #DEFINE shown_sensor3_fail DM_flags_shown1,6 ; =1: sensor 3 failure has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
759 ; DM_flags_shown1,7 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
760
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
761 #DEFINE shown_xmit1_lost DM_flags_shown2,0 ; =1: xmitter 1 lost has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
762 #DEFINE shown_xmit1_battery DM_flags_shown2,1 ; =1: xmitter 1 batt low has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
763 #DEFINE shown_xmit1_pres_warn DM_flags_shown2,2 ; =1: xmitter 1 pres warn has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
764 #DEFINE shown_xmit1_pres_attn DM_flags_shown2,3 ; =1: xmitter 1 pres attn has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
765 #DEFINE shown_xmit2_lost DM_flags_shown2,4 ; =1: xmitter 2 lost has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
766 #DEFINE shown_xmit2_battery DM_flags_shown2,5 ; =1: xmitter 2 batt low has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
767 #DEFINE shown_xmit2_pres_warn DM_flags_shown2,6 ; =1: xmitter 2 pres warn has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
768 #DEFINE shown_xmit2_pres_attn DM_flags_shown2,7 ; =1: xmitter 2 pres attn has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
769
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
770 #DEFINE shown_gas_density_attn DM_flags_shown3,0 ; =1: gas density atten. has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
771 #DEFINE shown_gas_density_warn DM_flags_shown3,1 ; =1: gas density warning has been shown before
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
772 ; DM_flags_shown3,2 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
773 ; DM_flags_shown3,3 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
774 ; DM_flags_shown3,4 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
775 ; DM_flags_shown3,5 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
776 ; DM_flags_shown3,6 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
777 ; DM_flags_shown3,7 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
778
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
779
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
780 ;---- Menu System - Control
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
781 #DEFINE surfmode_menu MS_flags_control,0 ; =1: surface menu is shown (i.e. returning from it)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
782 #DEFINE dive_pre_menu MS_flags_control,1 ; =1: dive pre-menu is shown (e.g. "Menu?")
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
783 #DEFINE dive_main_menu MS_flags_control,2 ; =1: dive main menu is shown (i.e. the "big" menu)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
784 #DEFINE compass_menu MS_flags_control,3 ; =1: "set bearing" is shown
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
785 #DEFINE is_diluent_menu MS_flags_control,4 ; =1: setting up diluents, =0: setting up OC gases
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
786 #DEFINE is_bailout_menu MS_flags_control,5 ; =1: in bailout menu
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
787 #DEFINE custom_view_locked MS_flags_control,6 ; =1: the custom view is locked (defer CV auto-popup)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
788 #DEFINE option_stop_at_max MS_flags_control,7 ; =1: option increment will stop at max value (no wrap around)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
789
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
790 ;---- Menu System - Data Imprinting
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
791 #DEFINE imprint_time_date MS_flags_imprint,0 ; =1: imprint current time & date
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
792 #DEFINE imprint_color_schemes MS_flags_imprint,1 ; =1: imprint color schemes
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
793 #DEFINE imprint_sensor_mv MS_flags_imprint,2 ; =1: imprint O2 sensor mV data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
794 #DEFINE imprint_xmitter_pres MS_flags_imprint,3 ; =1: imprint transmitter pressure data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
795 #DEFINE imprint_xmitter_ID MS_flags_imprint,4 ; =1: in transmitter-to-tank pairing menu
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
796 #DEFINE imprint_surfmode_data MS_flags_imprint,5 ; =1: imprint surface mode data
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
797 #DEFINE block_option_value MS_flags_imprint,6 ; =1: suspend displaying of option values
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
798 #DEFINE short_gas_descriptions MS_flags_imprint,7 ; =1: use short versions of gaslist_strcat_gas_cd and gaslist_strcat_setpoint
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
799
0
heinrichsweikamp
parents:
diff changeset
800
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
801 ;---- Font & Image System
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
802 #DEFINE aa_antialias AA_flags,0 ; used by aa_wordprocessor
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
803 #DEFINE aa_color_quarter AA_flags,1 ; used by aa_wordprocessor
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
804 #DEFINE aa_color_half AA_flags,2 ; used by aa_wordprocessor
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
805 #DEFINE aa_aux_flag AA_flags,3 ; auxiliary flag for various purposes
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
806 #DEFINE use_custom_colors AA_flags,4 ; =1: override default pixel colors, used by color_image
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
807 #DEFINE win_invert AA_flags,5 ; =1: print in inverse video
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
808 ; AA_flags,6 ; --- unused
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
809 ; AA_flags,7 ; --- unused
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
810
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
811
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
812 ;---- Convert Functions (Control of numerical Output)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
813
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
814 #DEFINE hide_digit5 CVT_flags1,0 ; =1: do not print digit 5 (clip output at 9999)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
815 #DEFINE hide_digit4 CVT_flags1,1 ; =1: do not print digits 5-4 (clip output at 999)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
816 #DEFINE hide_digit3 CVT_flags1,2 ; =1: do not print digits 5-3 (clip output at 99)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
817 #DEFINE hide_digit2 CVT_flags1,3 ; =1: do not print digits 5-2 (clip output at 9)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
818 #DEFINE omit_digit_1 CVT_flags1,4 ; =1: do not print digit 1 (show output as xxxx-)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
819 #DEFINE omit_digit_2 CVT_flags1,5 ; =1: do not print digits 2-1 (show output as xxx--)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
820 ; CVT_flags1,6 ; --- unused
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
821 ; CVT_flags1,7 ; --- unused
0
heinrichsweikamp
parents:
diff changeset
822
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
823 #DEFINE decimal_digit1 CVT_flags2,0 ; =1: put a decimal point in front of digit 1
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
824 #DEFINE decimal_digit2 CVT_flags2,1 ; =1: put a decimal point in front of digit 2
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
825 #DEFINE decimal_digit3 CVT_flags2,2 ; =1: put a decimal point in front of digit 3
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
826 ; CVT_flags2,3 ; --- unused
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
827 #DEFINE leftbind CVT_flags2,4 ; =1: align output to the left (no leading spaces)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
828 #DEFINE leading_zeros CVT_flags2,5 ; =1: print leading zeros
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
829 #DEFINE output_overflow CVT_flags2,6 ; =1: the printed number is clipped to 9999/999/99/9
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
830 ; CVT_flags2,7 ; --- unused
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
831
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
832
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
833 ;---- Miscellaneous Flags
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
834 #DEFINE ignore_last_edited_gas misc_flags,0 ; =1: ignore last edited gas while cleaning up gas/dil list
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
835 #DEFINE copying_dil misc_flags,1 ; =1: copying a diluent
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
836 #DEFINE comm_service_mode misc_flags,2 ; =1: service mode (extended command set) is enabled
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
837 #DEFINE waypoint_reached_first misc_flags,3 ; =1: the first (most outside) waypoint is reached (cave mode)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
838 #DEFINE waypoint_reached_last misc_flags,4 ; =1: the last (most inside) waypoint is reached (cave mode)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
839 #DEFINE option_value_ok misc_flags,5 ; =1: option value was checked to be within min/max limits
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
840 #DEFINE aux_flag misc_flags,6 ; local flag, used in various places
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
841 #DEFINE neg_flag misc_flags,7 ; =1: result is negative
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
842
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
843
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
844 ;---- HUD Status Byte (stored in access RAM)
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
845 #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
846 ; hud_status_byte,1 ; =1 HUD is calibrated
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
847 ; hud_status_byte,2 ; =1 HUD battery is low (< 3000 mV)
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
848 #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
849 #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
850 #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
851 ; hud_status_byte,6 ; --- unused in stand-alone HUD
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
852 ; hud_status_byte,7 ; --- unused in stand-alone HUD
0
heinrichsweikamp
parents:
diff changeset
853
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
854
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
855 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
856 ; Macros
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
857 ;-----------------------------------------------------------------------------
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
858
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
859 ; ---- options checking
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
860
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
861 TSTOSS macro opt_reg ; TeST Option Skip next instruction if Set (not zero)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
862 movff opt_reg,EEDATA ; Attention: destroys EEDATA!
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
863 tstfsz EEDATA ; Attention: must be followed by a plain machine
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
864 bra $+4 ; command, do not let follow a macro!
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
865 endm ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
866
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
867 TSTOSC macro opt_reg ; TeST Option Skip next instruction if Clear (zero)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
868 movff opt_reg,EEDATA ; Attention: destroys EEDATA!
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
869 tstfsz EEDATA ; Attention: must be followed by a plain machine
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
870 endm ; command, do not let follow a macro!
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
871
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
872
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
873 ; ---- literal operations
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
874
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
875 CLRI macro address ; CLeaR Integer (version of clrf for 2 byte integers)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
876 clrf address+0 ; Attention: must be in bank where target variable resides!
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
877 clrf address+1 ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
878 endm ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
879
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
880 CLRT macro address ; CLeaR Three byte integer (version of clrf for 3 byte integers)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
881 clrf address+0 ; Attention: must be in bank where target variable resides!
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
882 clrf address+1 ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
883 clrf address+2 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
884 endm ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
885
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
886 CLRR macro address,range ; CLeaR a Range of bytes (version of clrf for 1-256 bytes)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
887 movlw low(range) ; initialize loop counter
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
888 lfsr FSR1,address ; set start address
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
889 extern memory_clear
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
890 call memory_clear
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
891 endm
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
892
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
893 SETI macro address ; SET Integer (version of setf for 2 byte integers)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
894 setf address+0 ; Attention: must be in bank where target variable resides!
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
895 setf address+1 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
896 endm ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
897
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
898 MOVLI macro literal,address ; MOVe Literal to Integer
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
899 movlw LOW (literal) ; Attention: destroys WREG!
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
900 movwf address+0 ; Attention: must be in bank where target variable resides!
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
901 movlw HIGH (literal) ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
902 movwf address+1 ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
903 endm ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
904
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
905
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
906 ; ---- arithetics
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
907
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
908 INCI macro address ; INCrement Integer (version of incf for 2 byte integers)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
909 infsnz address+0,F ; Attention: must be in bank where target variable resides!
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
910 incf address+1,F ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
911 endm ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
912
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
913 DECI macro address ; DECrement Integer (version of decf for 2 byte integers)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
914 movlw .1 ; Attention: destroys WREG!
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
915 subwf address+0,F ; Attention: must be in bank where target variable resides!
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
916 movlw .0 ;
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
917 subwfb address+1,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
918 endm ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
919
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
920 ADDLI macro literal, address ; ADD Literal to Integer
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
921 movlw LOW (literal) ; Attention: destroys WREG!
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
922 addwf address+0,F ; Attention: must be in bank where target variable resides!
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
923 movlw HIGH (literal) ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
924 addwfc address+1,F ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
925 endm ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
926
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
927 SUBLI macro literal, address ; SUBtract Literal from Integer
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
928 movlw LOW (literal) ; Attention: destroys WREG!
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
929 subwf address+0,F ; Attention: must be in bank where target variable resides!
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
930 movlw HIGH (literal) ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
931 subwfb address+1,F ;
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
932 endm ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
933
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
934
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
935 ; ---- moves
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
936
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
937 MOVCC macro from,to ; MOVe 1 byte Char (actually an alias for movff)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
938 movff from,to
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
939 endm
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
940
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
941 MOVII macro from,to ; MOVe 2 byte Integer (version of movff for 2 bytes)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
942 movff from+0,to+0 ; copy 1st byte
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
943 movff from+1,to+1 ; copy 2nd byte
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
944 endm ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
945
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
946 MOVTT macro from,to ; MOVe Three byte Integer (version of movff for 3 bytes)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
947 movff from+0,to+0 ; copy 1st byte
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
948 movff from+1,to+1 ; copy 2nd byte
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
949 movff from+2,to+2 ; copy 3rd byte
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
950 endm ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
951
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
952 MOVRR macro from,to,range ; MOVe a Range of bytes (version of movff for 1-256 bytes)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
953 movlw low(range) ; initialize loop counter
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
954 lfsr FSR1,from ; from
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
955 lfsr FSR2,to ; to
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
956 extern memory_move
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
957 call memory_move
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
958 endm
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
959
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
960
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
961 ; ---- ISR-safe moves
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
962
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
963 SMOVII macro from, to ; isr-Safe MOVe 2 byte Integer (version of MOVII for ISR-safe copying)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
964 local retry ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
965 retry:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
966 bcf trigger_isr_updates ; clear flag, it will be set by the ISR in case it had kicked in
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
967 movff from+0,to+0 ; copy low byte
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
968 movff from+1,to+1 ; copy high byte
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
969 btfsc trigger_isr_updates ; did the ISR kicked in since we cleared the flag?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
970 bra retry ; YES - retry copy
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
971 endm ; NO - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
972
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
973 SMOVTT macro from, to ; isr-Safe MOVe Three byte integer (version of MOVTT for ISR-safe copying)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
974 local retry ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
975 retry:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
976 bcf trigger_isr_updates ; clear flag, it will be set by the ISR in case it had kicked in
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
977 movff from+0,to+0 ; copy low byte
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
978 movff from+1,to+1 ; copy high byte
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
979 movff from+2,to+2 ; copy upper byte
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
980 btfsc trigger_isr_updates ; did the ISR kicked in since we cleared the flag?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
981 bra retry ; YES - retry copy
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
982 endm ; NO - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
983
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
984 SMOVQQ macro from, to ; isr-Safe MOVe Quad byte integer (version of MOVII for ISR-safe copying)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
985 local retry ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
986 retry:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
987 bcf trigger_isr_updates ; clear flag, it will be set by the ISR in case it had kicked in
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
988 movff from+0,to+0 ; copy byte 0 (LSB)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
989 movff from+1,to+1 ; copy byte 1
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
990 movff from+2,to+2 ; copy byte 2
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
991 movff from+3,to+3 ; copy byte 3 (MSB)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
992 btfsc trigger_isr_updates ; did the ISR kicked in since we cleared the flag?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
993 bra retry ; YES - retry copy
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
994 endm ; NO - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
995
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
996 SMOVSS macro from, to ; isr-Safe MOVe Six byte integer to integer (version of MOVII for integers updated in ISR)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
997 local retry ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
998 retry:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
999 bcf trigger_isr_updates ; clear flag, it will be set by the ISR in case it had kicked in
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1000 movff from+0,to+0 ; copy byte 0 (LSB)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1001 movff from+1,to+1 ; copy byte 1
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1002 movff from+2,to+2 ; copy byte 2
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1003 movff from+3,to+3 ; copy byte 3
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1004 movff from+4,to+4 ; copy byte 4
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1005 movff from+5,to+5 ; copy byte 5 (MSB)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1006 btfsc trigger_isr_updates ; did the ISR kicked in since we cleared the flag?
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1007 bra retry ; YES - retry copy
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1008 endm ; NO - done
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1009
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1010
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1011 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1012 ; C-Code Routines
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1013 ;-----------------------------------------------------------------------------
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1014
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1015 extern deco_calc_desaturation_time
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1016 extern deco_calc_hauptroutine
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1017 extern deco_calc_dive_interval
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1018 extern deco_calc_dive_interval_1min
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1019 extern deco_calc_dive_interval_10min
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1020 extern deco_clear_tissue
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1021 extern deco_init_output_vars
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1022 extern deco_pull_tissues_from_vault
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1023 extern deco_push_tissues_to_vault
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
1024
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
1025
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1026 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1027 ; Bank0 ACCESS RAM
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1028 ;-----------------------------------------------------------------------------
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1029
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1030 ; Variables located in the Access Bank are declared in hwos.asm
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1031
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1032 ifndef INSIDE_HWOS_ASM
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1033
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1034 extern HW_descriptor
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1035 extern HW_variants
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1036 extern HW_variants2
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1037
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
1038 extern HW_flags_state1
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
1039 extern HW_flags_state2
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1040 extern HW_flags_state3
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1041
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1042 extern OS_flags_persist
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1043 extern OS_flags_ISR1
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1044 extern OS_flags_ISR2
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1045
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1046 extern OM_flags_mode
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1047
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1048 extern DM_flags_deco
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1049
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1050 extern cpu_speed_request
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1051 extern cpu_speed_state
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1052
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1053 extern timebase
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1054 extern eventbase
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1055
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1056 extern isr_timeout_timer
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1057 extern isr_timeout_reload
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1058
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1059 extern total_divetime_secs
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1060 extern counted_divetime_mins
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1061 extern counted_divetime_secs
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1062
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1063 extern apnoe_surface_secs
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1064 extern apnoe_surface_mins
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1065 extern apnoe_dive_secs
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1066 extern apnoe_dive_mins
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1067
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1068 extern sampling_rate
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1069 extern sampling_timer
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1070
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1071 extern simulatormode_depth
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1072
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1073 extern hud_status_byte
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1074 extern hud_battery_mv
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1075
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1076 extern battery_capacity_internal
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1077 extern battery_capacity
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1078 extern battery_offset
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1079 extern battery_type
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1080 extern battery_accumulated_charge
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1081 extern battery_temperature
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1082 extern gauge_status_byte
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1083
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1084 endif ; ACCESS_RAM_VARS
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1085
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1086 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1087 ; Bank0 NORMAL RAM
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1088 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1089
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1090 isr_backup equ 0x060 ; Alias for "banksel isr_backup"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1091 isr_backup udata_ovr isr_backup ; Bank 0 ISR data
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1092
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1093 ;---- Backup for general Registers, used by ISR Routines
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1094 PROD_backup res 2
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1095 FSR0_backup res 2
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1096 BSR_backup res 1
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1097
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1098 ;---- Multi-Purpose Registers, used by ISR Routines
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1099 isr_mpr res 2 ; used in ms5541.asm and isr.asm
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1100 #DEFINE isr_lo isr_mpr+0 ; ...
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1101 #DEFINE isr_hi isr_mpr+1 ; ...
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1102
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1103 ;---- Multi-Purpose Registers, NOT USED by ISR Routines
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1104 backup_mpr res 2 ; used in rtc.asm
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1105 #DEFINE backup_lo backup_mpr+0
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1106 #DEFINE backup_hi backup_mpr+1
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1107
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1108
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1109 ;---- Time and Date - Real Time Clock
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1110 rtc_year res 1 ; running year | Attention:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1111 rtc_month res 1 ; running month | do not change
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1112 rtc_day res 1 ; running day | the Position of
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1113 rtc_hour res 1 ; running hour | these Variables
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1114 rtc_mins res 1 ; running minute | relative to
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1115 rtc_secs res 1 ; running second | each other!
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1116
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1117 rtc_latched_year res 1 ; latched year | Attention:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1118 rtc_latched_month res 1 ; latched month | do not change
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1119 rtc_latched_day res 1 ; latched day | the Position of
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1120 rtc_latched_hour res 1 ; latched hour | these Variables
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1121 rtc_latched_mins res 1 ; latched minute | relative to
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1122 rtc_latched_secs res 1 ; latched second | each other!
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1123
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1124 ;--- RTC-independent Timebase
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1125 timebase_mins res 1 ; RTC-independent timer for generating the every hour trigger
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1126 timebase_secs res 1 ; RTC-independent timer for generating the every minute trigger
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1127
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1128 ;---- other Timers
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1129 uptime res 4 ; [sec] uptime of the OSTC since last cold start
629
237931377539 3.07 stable release
heinrichsweikamp
parents: 628
diff changeset
1130 surface_interval_secs res 4 ; [sec] surface interval counted in seconds
237931377539 3.07 stable release
heinrichsweikamp
parents: 628
diff changeset
1131 surface_interval_mins res 2 ; [min] surface interval counted in minutes
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1132 simulator_time res 1 ; [min] real runtime of the simulator
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1133
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1134 ;---- Data for Pressure and Temperature Calculation (MS5541)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1135 clock_count res 1 ; I2C clock pulse counter
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1136 sensor_state_counter res 1 ; counter for pressure sensor state machine
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1137 dLSB res 1 ; pressure sensor interface, LSB
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1138 dMSB res 1 ; pressure sensor interface, MSB
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1139 dbuffer res 1 ; pressure sensor interface, RX/TX buffer
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1140
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1141 C1 res 2 ; decoded calibration data
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1142 C2 res 2 ; decoded calibration data
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1143 C3 res 2 ; decoded calibration data
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1144 C4 res 2 ; decoded calibration data, here C4-250
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1145 C5 res 2 ; decoded calibration data, here reference temperature UT1 = 8*C5 + 10000 (u16 range 10.000 .. +42.760)
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1146 C6 res 2 ; decoded calibration data
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1147 D1 res 3 ; raw pressure
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1148 D2 res 3 ; raw temperature
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1149 xdT res 3
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1150 xdT2 res 2
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1151 OFF res 4
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1152 SENS res 4
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1153
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1154 temperature_cur res 2 ; current temperature
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1155 temperature_min res 2 ; minimum temperature (operated by divemode.asm)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1156 temperature_avg res 2 ; internal register used for averaging
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1157 temperature_last res 2 ; internal register used for detecting changes
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1158
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1159 pressure_abs res 2 ; current absolute pressure
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1160 pressure_abs_avg res 3 ; internal register used for averaging
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1161 pressure_abs_last res 2 ; internal register used for detecting pressure changes
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1162
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1163 pressure_abs_sampled res 2 ; sampled surface pressure, sampled in sleep mode every 15 minutes
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1164 pressure_abs_ref res 2 ; reference surface pressure, surface pressure sampled 15 minutes ago
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1165 pressure_surf res 2 ; surface pressure used by ISR to calculate relative pressures
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1166
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1167 pressure_rel_cur res 2 ; current relative pressure
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1168 pressure_rel_max res 2 ; maximum relative pressure
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1169 pressure_rel_sim res 2 ; simulated relative pressure (simulator mode)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1170
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1171 ;---- Data for ISR Math Subroutines
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1172 isr_xA res 4 ; multiplicand 1
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1173 isr_xB res 3 ; multiplicand 2
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1174 isr_xC res 7 ; resulting product
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1175 isr_math_loop res 1 ; loop counter
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1176
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1177 ;---- Display Brightness
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1178 ambient_light res 2 ; ambient light level
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1179 max_CCPR1L res 1 ; max. brightness value for CCPR1L
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1180
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1181 ;---- Battery Gauge (nAs, nC)
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1182 battery_gauge res 6 ; 48 bit -> 78 Ah max
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1183
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1184 ;---- IR/S8-Link
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1185 ir_s8_buffer res .18 ; buffer for data received on IR/S8 interface,
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1186 ; also used to buffer MS5541 raw calibration data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1187
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1188 IFDEF _external_sensor
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1189 ir_s8_counter res 1
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1190 ir_s8_timeout res 1 ; timeout for valid data
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1191 ENDIF
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1192
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1193 ;---- raw O2 Sensor Data received on S8 Link
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1194 IFDEF _external_sensor
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1195 s8_rawdata_sensor1 res 3 ; 24 bit A/D raw data from S8 HUD sensor 1
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1196 s8_rawdata_sensor2 res 3 ; 24 bit A/D raw data from S8 HUD sensor 2
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1197 s8_rawdata_sensor3 res 3 ; 24 bit A/D raw data from S8 HUD sensor 3
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1198 ENDIF
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1199
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1200 ;---- Switch Processing (8 byte, called by ISR and sleep mode)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1201 analog_sw1_raw res 2 ; idle values (average)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1202 analog_sw2_raw res 2 ; idle values (average)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1203 analog_counter res 1 ; for averaging
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1204 analog_sw1 res 1 ; analog value for switch 1
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1205 analog_sw2 res 1 ; analog value for switch 2
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1206 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
1207
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1208
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1209 ;--- resettable min and max Depth Option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1210 IFDEF _min_depth_option
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1211 pressure_rel_min_trip res 2 ; resettable minimum relative pressure
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1212 pressure_rel_max_trip res 2 ; resettable maximum relative pressure
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1213 ENDIF
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
1214
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
1215 debounce_counter res 1 ; multiples of 16ms
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1216 isr_tmr7_helper res 1 ; used for 1/4 second trigger
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1217
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1218 ; 158 byte used, 2 byte free
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
1219
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1220
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1221 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1222 ; Common DATA
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1223 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1224
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1225 common equ 0x100 ; Alias for "banksel common"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1226 common udata_ovr common ; Bank 1 general variables
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1227
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1228 ;---- Multi-Purpose Register for Data Storage and Interface with Conversion and Display Functions (6 byte)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1229 mpr res 6 ; will be used as base address of 1, 2, 3, 4 and 6 byte buffers
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1230 #DEFINE lo mpr+0 ; nickname for "low"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1231 #DEFINE hi mpr+1 ; nickname for "high"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1232 #DEFINE up mpr+2 ; nickname for "upper"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1233 #DEFINE ex mpr+3 ; nickname for "extra"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1234 #DEFINE ul mpr+4 ; nickname for "ultra"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1235 #DEFINE hy mpr+5 ; nickname for "hyper"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1236
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1237
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1238 ;---- Flags - Menu System (2 byte)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1239 MS_flags_control res 1 ; menu system - control
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1240 MS_flags_imprint res 1 ; menu system - data imprinting
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1241
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1242 ;---- Flags - Dive Mode (21 byte)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1243 DM_flags_state res 1 ; dive mode - dive states
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1244 DM_flags_sensor res 1 ; dive mode - O2 sensors
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1245 DM_flags_request res 1 ; dive mode - user requests / general
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1246 DM_flags_event res 1 ; dive mode - data recording events
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1247 DM_flags_layout1 res 1 ; dive mode - display control / layout (1)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1248 DM_flags_layout2 res 1 ; dive mode - display control / layout (2)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1249 DM_flags_layout3 res 1 ; dive mode - display control / layout (3)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1250 DM_flags_message res 1 ; dive mode - display control / messages
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1251 DM_flags_gas_dil res 1 ; dive mode - display control / gas, diluent
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1252 DM_flags_advc_det res 1 ; dive mode - advices detected
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1253 DM_flags_advc_ack res 1 ; dive mode - advices acknowledged
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1254 DM_flags_att1_det res 1 ; dive mode - attentions detected (1)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1255 DM_flags_att2_det res 1 ; dive mode - attentions detected (2)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1256 DM_flags_att3_det res 1 ; dive mode - attentions detected (3)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1257 DM_flags_att1_ack res 1 ; dive mode - attentions acknowledged (1)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1258 DM_flags_att2_ack res 1 ; dive mode - attentions acknowledged (2)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1259 DM_flags_att3_ack res 1 ; dive mode - attentions acknowledged (3)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1260 DM_flags_war1_det res 1 ; dive mode - warnings detected (1)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1261 DM_flags_war2_det res 1 ; dive mode - warnings detected (2)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1262 DM_flags_war1_ack res 1 ; dive mode - warnings acknowledged (1)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1263 DM_flags_war2_ack res 1 ; dive mode - warnings acknowledged (2)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1264 DM_flags_shown1 res 1 ; dive mode - custom views shown (1)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1265 DM_flags_shown2 res 1 ; dive mode - custom views shown (2)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1266 DM_flags_shown3 res 1 ; dive mode - custom views shown (3)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1267
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1268 ;---- Miscellaneous Flags (1 byte)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1269 misc_flags res 1
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1270
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1271 ;---- Interface to Graphic Functions (11 byte)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1272 win_leftx2 res 1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1273 win_top res 1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1274 win_width res 2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1275 win_height res 1
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1276 win_bargraph res 1 ; width of the bargraph bar
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1277 win_color1 res 1 ; 2 byte color
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1278 win_color2 res 1 ; 2 byte color
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1279 win_color3 res 1 ; 3 byte color used for display 2
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1280 win_color4 res 1 ; 3 byte color used for display 2
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1281 win_color5 res 1 ; 3 byte color used for display 2
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
1282
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1283 ;---- Interface to Math Functions (16 byte)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1284 divA res 2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1285 xA res 2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1286 xB res 2
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1287 xC res 4
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1288 sub_a res 2
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1289 sub_b res 2
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1290 sub_c res 2
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1291
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1292 ;---- Menu System and Views (5 byte)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1293 menu_pos_cur res 1 ; current position in main menu
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1294 menu_pos_max res 1 ; highest position in main menu
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1295 active_premenu res 1 ; currently shown pre-menu (0: none)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1296 active_customview res 1 ; currently shown custom view
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1297 backup_customview res 1 ; previously shown custom view
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1298
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1299 ;---- Miscellaneous (6 byte)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1300 batt_voltage res 2 ; battery voltage in mV (no ISR involved)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1301 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
1302 message_counter res 1 ; counts amount of messages
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1303 message_page res 1 ; current message page number
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1304 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
1305
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1306
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1307 ;---- Dive Mode / all modes (26 byte)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1308 divesecs_avg_trip res 2 ; time accumulator for the resettable average depth & stopwatch
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1309 divesecs_avg_total res 2 ; time accumulator for the total dive average depth
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1310 pressure_rel_avg_trip res 2 ; calculated resettable average depth
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1311 pressure_rel_avg_total res 2 ; calculated total dive average depth
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1312 pressure_rel_cur_cached res 2 ; cached current relative pressure
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1313 pressure_rel_max_cached res 2 ; cached maximum relative pressure
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1314 pressure_abs_cached res 2 ; cached current absolute pressure
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1315 pressure_abs_10 res 2 ; cached current absolute pressure divided by 10
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1316 depth_meter res 1 ; current depth in meters
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1317 safety_stop_countdown res 1 ; counter for safety stop
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1318 dive_timeout_timer res 2 ; timeout timer for leaving dive mode after surfacing
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1319 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
1320 best_gas_number res 1 ; number of the "best gas": 0= none found, 1-5= gases 1-5, 255= not computed
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1321 active_gas res 1 ; the currently used OC/bailout gas (1-5)
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
1322 dive_ccr_mode res 1 ; working copy of opt_ccr_mode while the dive
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1323 dive_threshold_debounce res 1 ; Countdown for entering dive mode
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1324
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1325 IFDEF _ccr_pscr
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1326 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
1327 active_dil res 1 ; the currently used diluent (1-5)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1328 ENDIF
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1329
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1330 IFDEF _cave_mode
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1331 DM_flags_cavereq res 1 ; dive mode - user requests / cave mode
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1332 backtrack_deltatime res 1 ; time elapsed since last depth recording in seconds
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1333 backtrack_waypoint_num res 1 ; current waypoint number
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1334 backtrack_waypoint_turn res 1 ; waypoint number of the turn point
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1335 ENDIF
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1336
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1337 ;---- Dive Mode / apnoe mode (2 byte)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1338 apnoe_max_pressure res 2 ; max depth over all dives in the series
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
1339
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1340 ;---- Profile Recording (6 byte)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1341 alarm_type res 1 ; alarm states recording
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1342 event_byte1 res 1 ; events recording
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1343 event_byte2 res 1 ; events recording
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1344 CNS_start res 2 ; CNS value at beginning of dive
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
1345
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1346 ;---- External Flash (14 byte)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1347 ext_flash_address res 3 ; 24 bit address
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1348 ext_flash_length_counter res 3 ; 24 bit length counter
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1349 ext_flash_log_pointer res 3 ; 24 bit address for logbook profile storing
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1350 ext_flash_end_pointer res 3 ; 24 bit address for logbook profile storing
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1351 ext_flash_rw res 1 ; transfer register for data read / write
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1352 ext_flash_address_limit res 1 ; wrap-around threshold while address incrementing
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
1353
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
1354
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1355 ;-------------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1356 ; private Variables - do not access from outside of the respective source files!
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1357 ;-------------------------------------------------------------------------------
560
b7eb98dbd800 bump to 2.96beta (REFACTORED VERSION)
heinrichsweikamp
parents: 559
diff changeset
1358
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1359 ;---- aa_wordprocessor.asm, strings.asm & Co.
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1360 AA_flags res 1 ; various flags for aa_wordprocessor and strings
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1361 aa_bitlen res 1 ; count of pixels when decoding bitmaps
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1362 aa_start res 2 ; PROM pointer to start of encoded bitmap
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1363 aa_end res 2 ; and end of it
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1364 aa_temp res 2 ; current color, divided by 2 or 4
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1365 font_color res 1 ; selected font color
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1366 font_size res 1 ; selected font size
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1367 pallet_color_mask res 1 ; pallet color - mask | Attention:
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1368 pallet_color_disabled res 1 ; pallet color - disabled | do not change
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1369 pallet_color_memo res 1 ; pallet color - memo | the relative
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1370 pallet_color_advice res 1 ; pallet color - advice | position of
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1371 pallet_color_attention res 1 ; pallet color - attention | these vars!
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1372 pallet_color_warning res 1 ; pallet color - warning |
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1373
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1374
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1375 ;--- adc_lightsensor.asm
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1376 get_bat_volt_counter res 1 ; counter for reading the charger chip
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1377
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1378 ;---- convert.asm
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1379 CVT_flags1 res 1
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1380 CVT_flags2 res 1
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1381 bcd_lo res 1
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1382 bcd_hi res 1
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1383 bcd_up res 1
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1384 bin_lo res 1
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1385 bin_hi res 1
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1386
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1387 ;---- color_processor.asm
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1388 overall_pixels res 3 ; used by color_processor.asm
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1389 pixel_count res 2 ; used by color_processor.asm
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1390 encoding_format res 1 ; image encoding format
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1391
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1392 ;---- compass_ops.asm
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1393 compass_flags res 1 ; flags are defined in compass_ops.asm
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1394
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1395 ;---- comm.asm
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1396 comm_timeout_timer res 1 ; timeout for communication
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1397
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1398 ;---- eeprom_rs232.asm
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1399 eeprom_loop res 1 ; loop counter (actually used in flash and serial, too)
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1400 rx_timeout_tmr5h_load res 1 ; TMR5H load value for RS232 RX timeout
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1401
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1402 ;---- i2c.asm
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1403 i2c_temp1 res 1 ; temporary data
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1404 i2c_temp2 res 1 ; temporary data
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1405
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1406 ;---- math.asm
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1407 math_loop res 1 ; loop counter
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1408
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1409 ;---- menu_processor.asm
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1410 menustack_pointer res 1 ; pointer to menu stack
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1411 menu_item_start res 1 ; index of the first menu item (scrolling)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1412 menu_item_curr res 1 ; index of the current menu item (loop counter)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1413 menu_item_count res 1 ; total number of menu items
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1414 selected_item res 1 ; index of the current item
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1415 menu_title_addr res 2 ; address of the multi-lingual menu titel
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1416 menu_item_data_start res 3 ; base address of the menu item data blocks
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1417 menu_vertical_start res 1 ; vertical start position of 1st menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1418 item_type res 1 ; type of the menu item
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1419 item_title_addr res 2 ; address of item title function or title text
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1420 item_funct_addr res 2 ; address of item call function or option definition data
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1421
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1422
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1423 ;---- options.asm
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1424 #DEFINE opt_definition_bytes .12 ; | Attention: do not change the relative position of these vars!
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1425 opt_type res 1 ; | option type
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1426 opt_serial res 1 ; | index used for option read/write via RS232
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1427 opt_inc res 1 ; | increment value, also used for enum low and low (pointer to default string)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1428 opt_min res 1 ; | minimum value, also used for enum high and high(pointer to default string)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1429 opt_max res 1 ; | maximum value, also used for length( default string)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1430 opt_default res 1 ; | default value
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1431 opt_unit res 2 ; | pointer to multi-lingual unit text
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1432 opt_memory res 2 ; | pointer to memory position
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1433 opt_eeprom_index res 1 ; | pointer to EEPROM position (index)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1434 opt_eeprom_bank res 1 ; | pointer to EEPROM position (bank)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1435 opt_end_token res 1 ; | =0xFF: end of table reached (does not count into opt_definiton_bytes)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1436
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1437
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1438 ;---- tft.asm
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1439 tft_save_top res 1
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1440 tft_save_height res 1
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1441 tft_save_left res 1
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1442 tft_save_width res 1
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1443 tft_temp1 res 1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1444 tft_temp2 res 1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1445 tft_temp3 res 1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1446 tft_temp4 res 1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1447
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1448 ;---- dump screen Function
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1449 IFDEF _screendump
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1450 ds_line res 1 ; current line (0..239)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1451 ds_column res 1 ; current columnx2 (0..159)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1452 ds_pixel res 2 ; current pixel color
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1453 ds_count res 1 ; repetition count
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1454 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1455
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1456 ;---- wait.asm
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1457 wait_counter res 1
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1458
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1459 ;---- tft_outputs.asm
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1460 pressure_update_lag_counter res 1 ; lag time counter for fast surface pressure display updating
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1461
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1462
640
8c1f1f334275 3.13 release
heinrichsweikamp
parents: 634
diff changeset
1463 ; 201 byte used, 7 byte free (208 byte total)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1464
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1465
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1466 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1467 ; LOCAL DATA
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1468 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1469
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1470 ; Space for various overlayed local data from top-level applications,
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1471 ; i.e. applications that never run in parallel to each other
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1472
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1473 ; --------------------- local Data Users --------------------------------------
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1474 ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1475 ; -------------- Applications using ----------------------
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1476 ; Mode local1 local2 local3
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1477 ; --------------------------------------------------------------------------
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1478 ; sleepmode sleepmode.asm (unused) (unused)
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1479 ; surfmode surfmode.asm* (unused) (unused)
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
1480 ; simulator divemode.asm divemode.asm simulator.asm
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1481 ; divemode divemode.asm divemode.asm ghostwriter.asm
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1482 ; logbook logbook.asm logbook.asm logbook.asm
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1483 ;
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1484 ; * assigned to this slot, but currently no local memory used
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1485
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1486 local1 equ 0x1D0 ; Alias for CBLOCK directive
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1487 local1 udata_ovr 0x1D0 ; Bank1 shared local space
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1488 res 0x10 ; 16 Byte (0x1D0 ... 0x1DF)
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1489
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1490 local2 equ 0x1E0 ; Alias for CBLOCK directive
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1491 local2 udata_ovr 0x1E0 ; Bank1 shared local space
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1492 res 0x10 ; 16 Byte (0x1E0 ... 0x1EF)
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1493
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1494 local3 equ 0x1F0 ; Alias for CBLOCK directive
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1495 local3 udata_ovr 0x1F0 ; Bank1 shared local space
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1496 res 0x10 ; 16 Byte (0x1F0 ... 0x1FF)
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1497
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1498
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1499 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1500 ; Common2 DATA
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1501 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1502
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1503 common2 equ 0xA00 ; Alias for "banksel common2"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1504 common2 udata_ovr common2 ; Bank 10 general variables
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1505
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1506 ;---- Data for Logging (6 byte), sampled in divemode.asm and used in ghostwriter.asm
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1507 start_year res 1 ; year | ATTENTION:
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1508 start_month res 1 ; month | do not change the
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1509 start_day res 1 ; day | position of these
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1510 start_hour res 1 ; hour | variables relative
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1511 start_mins res 1 ; minute | to each other!
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1512 start_secs res 1 ; second, not used, for code commonality |
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1513
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1514 supersat_start res 1 ; leading tissue supersaturation at beginning of the dive
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1515
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1516 ;---- O2 Sensors (9 byte, updated by ISR when sensors are connected via datalink)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1517 IFDEF _external_sensor
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1518 sensor1_mv res 2 ; sensor 1 voltage in 0.1 mV steps
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1519 sensor2_mv res 2 ; sensor 2 voltage in 0.1 mV steps
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1520 sensor3_mv res 2 ; sensor 3 voltage in 0.1 mV steps
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1521 sensor1_ppO2 res 1 ; sensor 1 ppO2 in 0.01 bar steps
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1522 sensor2_ppO2 res 1 ; sensor 2 ppO2 in 0.01 bar steps
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1523 sensor3_ppO2 res 1 ; sensor 3 ppO2 in 0.01 bar steps
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1524 ENDIF
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1525
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1526 ;---- last Dive Statistics (7 byte)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1527 lastdive_duration res 3 ; byte 0= minutes, low byte, 1= minutes, high byte, 2= seconds
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1528 lastdive_maxdepth res 2 ; in mbar
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1529 lastdive_avgdepth res 2 ; in mbar
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1530
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1531 ;---- Backup of last shown Custom View (2 byte)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1532 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
1533 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
1534
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1535 ;---- Miscellaneous (0 byte)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1536 ;old_velocity res 4 ; stores the last 4 speeds (8 seconds) in m/min
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1537
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1538 ;---- Menu Processor (8 byte)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1539 menustack res 8 ; menu stack
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1540
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
1541 ;---- Graphical Compass (15 byte)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1542 xRD res 2 ; virtual compass ruler offset
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1543 xRDr res 2 ; virtual compass ruler offset - right end
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1544 xRD180 res 2 ; virtual compass ruler offset for the -180 marker
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1545 xLO res 1 ; lo backup to prevent trashing
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1546 xHI res 1 ; hi backup to prevent trashing
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1547 xCM res 1 ; compass bearing relative position
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1548 compass_heading_new res 2 ; corrected heading (in 1°) : -180 .. 180
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1549 compass_heading_shown res 2 ; displayed heading
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1550 compass_bearing res 2 ; displayed bearing
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1551
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1552 ;---- Compass Arithmetics (30 byte)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1553 compass_DX res 2 ; raw data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1554 compass_DY res 2 ; raw data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1555 compass_DZ res 2 ; raw data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1556 accel_DX res 2 ; raw data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1557 accel_DY res 2 ; raw data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1558 accel_DZ res 2 ; raw data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1559 compass_DX_f res 2 ; filtered Data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1560 compass_DY_f res 2 ; filtered Data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1561 compass_DZ_f res 2 ; filtered Data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1562 accel_DX_f res 2 ; filtered Data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1563 accel_DY_f res 2 ; filtered Data
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1564 accel_DZ_f res 2 ; filtered Data
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1565 compass_CX_f res 2 ; calibration data (stored via options system)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1566 compass_CY_f res 2 ; calibration data (stored via options system)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1567 compass_CZ_f res 2 ; calibration data (stored via options system)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1568
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1569 ;---- temporary Data for Q15 Arithmetics (7 byte, compass_ops.asm, called from C)
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1570 compass_a res 2 ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1571 compass_b res 2 ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1572 compass_r res 3 ;
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1573
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1574 ;---- Data Exchange with TR Co-Processor (50 byte)
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1575 IFDEF _rx_functions
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1576 rx_buffer res .48 ; Buffer for RX data (slots 0-7)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1577 rx_firmware_cur_major res 1 ; TR module current firmware, major
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1578 rx_firmware_cur_minor res 1 ; TR module current firmware, minor
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1579 ENDIF
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1580
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
1581 ;---- SAC Calculation on Pressure Readings 1 & 2 (22 byte)
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1582 IFDEF _rx_functions
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1583 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
1584 pres_accu_2nd res 4 ; accumulator for pressure drop in 1/160 bar | change the
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
1585 time_accu_1st res 2 ; accumulator for reading ages in seconds | position
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1586 gas__last_1st res 1 ; last gas assignment | of these
628
cd58f7fc86db 3.05 stable work
heinrichsweikamp
parents: 624
diff changeset
1587 time_accu_2nd res 2 ; accumulator for reading ages in seconds | variables
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1588 gas__last_2nd res 1 ; last gas assignment | relative
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1589 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
1590 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
1591 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
1592 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
1593 ENDIF
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1594
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1595 i2c_error_vault res 2 ; Store last used device ID and data byte
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1596 D1_buffer res 3 ; Buffer of D1 (Sensor raw data)
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1597 D2_buffer res 3 ; Buffer of D2 (Sensor raw data)
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1598
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1599 brightness res 1 ; =0: Eco, =1:Medium, =2:Full
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1600 ; 157 byte used, 92 byte free
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1601
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1602
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1603 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1604 ; Bank 2 General Purpose Buffer 1
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1605 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1606
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1607 ; NOTE: needs to be aligned with a bank (low(buffer)=0)
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1608
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1609 buffer udata_ovr 0x200
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1610 buffer res .256 ; buffer 1 - string buffer, etc.
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1611
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1612
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1613 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1614 ; Bank 11 General Purpose Buffer 2
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1615 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1616
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1617 ; NOTE: needs to be aligned with a bank (low(buffer)=0)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1618 ;
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1619 ; Remark: this memory block is already allocated in shared_definitions.h for
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1620 ; use while in dive mode, so we need to make a hard reference here
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1621
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1622 ;buffer2 udata_ovr 0xB00
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1623 ;buffer2 res .256 ; buffer 2 - backtracking, flash mirror, etc.
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1624
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1625 #DEFINE buffer2 0xB00
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1626
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1627
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1628 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1629 ; Bank 14 Options Table
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1630 ;-----------------------------------------------------------------------------
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1631
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1632 opt_table equ 0xE00 ; Alias for "banksel opt_table"
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1633 opt_table udata_ovr opt_table ; Bank 14 options table
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1634
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1635 ;---- Gas and Diluent Settings
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1636 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
1637 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
1638 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
1639 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
1640 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
1641 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
1642 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
1643 opt_dil_change res 5 ; change depths for diluents |
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1644
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1645 ;---- Gas 6 Settings
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1646 opt_gas6_O2_ratio res 1 ; gas 6 O2 ratio | ATTENTION: keep relative positioning
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1647 opt_gas6_He_ratio res 1 ; gas 6 He ratio | of these two variables!
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1648
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1649 ;---- Setpoints Settings
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1650 opt_setpoint_cbar res 5 ; setpoints in cbar | ATTENTION: keep relative positioning
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1651 opt_setpoint_change res 5 ; change depth for the setpoints in meter | of these two arrays!
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1652
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1653 ;---- Dive Mode Settings
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1654 opt_dive_mode res 1 ; main dive/deco mode: =0: OC, =1: CC, =2: Gauge, =3: Apnea, =4: pSCR
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1655 opt_ccr_mode res 1 ; CCR/pSCR sub mode: =0: fixed/calculated SP, =1: Sensor, =2: Auto SP
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1656
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1657 ;---- custom Text
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1658 #DEFINE opt_name_length .60 ; custom text string 5 rows with 12 chars
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1659 opt_name res opt_name_length
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1660
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1661 ;---- various other Settings
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1662 opt_fw_version_major res 1 ; firmware version, major | use read-only!
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1663 opt_fw_version_minor res 1 ; firmware version, minor |
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1664 opt_fw_version_beta res 1 ; firmware version, beta |
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1665 opt_surface_interval res 1 ; surface interval, used by deco calculator
646
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1666 opt_brightness_divemode res 1 ; =0: Eco, =1:Medium, =2:Full
5b7fe7777425 3.16 release
heinrichs weikamp
parents: 640
diff changeset
1667 opt_brightness_surface res 1 ; =0: Eco, =1:Medium, =2:Full
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1668 opt_salinity res 1 ; 0-5%
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1669 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
1670 opt_units res 1 ; 0:m/°C, 1:ft/°F
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1671 opt_dateformat res 1 ; =0:MMDDYY, =1:DDMMYY, =2:YYMMDD
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1672 opt_dive_color_scheme res 1 ; dive mode color scheme selection
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1673 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
1674 opt_aGF_high res 1 ; alternative GF HIGH
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1675 opt_aGF_low res 1 ; alternative GF LOW
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1676 opt_GF_high res 1 ; GF HIGH
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1677 opt_GF_low res 1 ; GF LOW
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1678 opt_enable_aGF res 1 ; =1: aGF can be selected underwater
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1679 opt_compass_gain res 1 ; 0-7 (230LSB/Gauss to 1370LSB/Gaus)
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1680 opt_sampling_rate res 1 ; =1: 10s, =0: 2s
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1681 opt_pressure_adjust res 1 ; SIGNED char (two's complement), -20/+20mbar max.
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1682 opt_safetystop res 1 ; =1: a safety stop is shown
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1683 opt_calibration_O2_ratio res 1 ; %O2 of calibration gas
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1684 opt_x_s1 res 2 ; calibration factor (not stored in EEPROM) | keep relative
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1685 opt_x_s2 res 2 ; calibration factor (not stored in EEPROM) | position!
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1686 opt_x_s3 res 2 ; calibration factor (not stored in EEPROM) |
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1687 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
1688 opt_flip_screen res 1 ; =1: flip the screen
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1689 opt_cR_button_left res 1 ; left button sensitivity (cR hardware)
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1690 opt_cR_button_right res 1 ; right button sensitivity (cR hardware)
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1691 opt_depth_warn res 1 ; =1:do a red blinking warning, =0:default behavior
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1692 opt_vsitext res 1 ; =1:use the depth dependent ascend rate limits
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1693 opt_vsigraph res 1 ; =1:draw the graphical VSI bar
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1694 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
1695 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
1696 opt_safety_stop_length res 1 ; [s]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1697 opt_safety_stop_start res 1 ; [cbar]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1698 opt_safety_stop_end res 1 ; [cbar]
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1699 opt_safety_stop_reset res 1 ; [cbar]
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1700 opt_diveTimeout res 1 ; timeout for dive mode [min]
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1701 opt_sim_setpoint_number res 1 ; setpoint to use for deco calculation
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1702 opt_calc_gasvolume res 1 ; calculate OC gas volume needs for ascent
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1703 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
1704 opt_enable_IBCD res 1 ; enable IBCD warning
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1705 opt_sat_multiplier_gf res 1 ; Buhlmann safety factor for GF deco
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1706 opt_desat_multiplier_gf res 1 ; Buhlmann safety factor for GF deco
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1707 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
1708 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
1709 opt_2ndDepthDisp res 1 ; =1: show average depth instead of max depth
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1710 opt_max_depth res 1 ; depth at which a warning will be given
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1711 opt_store_apnoe res 1 ; =1: store dives in apnoe mode into logbook
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1712 opt_tissue_graphics res 1 ; =0: show N2 and He pressures, =1: show pressures and saturations
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1713 opt_logoffset_step res 1 ; step size when adjusting log offset
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1714 opt_layout res 1 ; initial layout of dive mode screen
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1715 opt_ext_stops res 1 ; =1: place gas switches also below 1st stop depth
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1716 opt_s8_mode res 1 ; S8 mode - analog / digital
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1717 opt_gas_contingency_sim res 1 ; =1: deco calculator: switch to alternative gas if best gas is used up
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1718 opt_gas_contingency_dive res 1 ; =1: real dive mode: switch to alternative gas if best gas is used up
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1719 opt_cave_mode res 1 ; =1: cave mode switched on
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1720 opt_gas_density_check res 1 ; =1: gas density is checked (effective in CCR / pSCR modes only)
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1721 opt_comm_timeout res 1 ; comm RX timeout in multiples of 10 ms
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1722 opt_fallback res 1 ; unused dummy option for compatibility with 3rd party tools
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1723 opt_conservatism res 1 ; unused dummy option for compatibility with 3rd party tools
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1724
623
c40025d8e750 3.03 beta released
heinrichsweikamp
parents: 621
diff changeset
1725 ;---- RX Function Settings
604
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1726 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
1727 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
1728 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
1729 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
1730 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
1731 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
1732 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
1733 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
1734 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
1735 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
1736 opt_TR_mode res 1 ; TR functions - mode
ca4556fb60b9 bump to 2.99beta, work on 3.00 stable
heinrichsweikamp
parents: 602
diff changeset
1737 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
1738 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
1739 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
1740
634
4050675965ea 3.10 stable release
heinrichsweikamp
parents: 631
diff changeset
1741 ; ==> 193 bytes used - 51 bytes free (244 usable bytes only in bank 14 as the upper 12
631
185ba2f91f59 3.09 beta 1 release
heinrichsweikamp
parents: 629
diff changeset
1742 ; bytes are reserved for special function registers)
582
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1743
b455b31ce022 work on 2.97 stable
heinrichsweikamp
parents: 580
diff changeset
1744 ;-----------------------------------------------------------------------------