0
|
1 ;=============================================================================
|
|
2 ;
|
631
|
3 ; File logbook.inc combined next generation V3.08.8
|
0
|
4 ;
|
|
5 ;
|
654
|
6 ; Copyright (c) 2011, JD Gascuel, heinrichs weikamp gmbh, all right reserved.
|
0
|
7 ;=============================================================================
|
|
8 ; HISTORY
|
|
9 ; 2011-11-12 : [mH] moving from OSTC code
|
|
10
|
631
|
11
|
|
12 #ifndef inside_loogbook
|
0
|
13 extern logbook
|
631
|
14 extern log_header_addr_by_index
|
|
15 #endif
|
0
|
16
|
631
|
17
|
|
18 ; Buffer for Dive Header Data
|
|
19 #DEFINE header_buffer buffer2
|
|
20
|
|
21
|
|
22 ; Dive Header Layout
|
|
23 ;
|
|
24 ; Label Index Size Description
|
|
25 ;-----------------------------------------------------------------------------------------
|
|
26 #DEFINE index_header_start .0 ; 2 header start sequence 0xFAFA
|
|
27 #DEFINE index_profile_start_address .2 ; 3 pointer to profile data start in flash
|
|
28 #DEFINE index_profile_end_address .5 ; 3 pointer to profile data end in flash
|
|
29 #DEFINE index_profile_version .8 ; 1 profile format version
|
|
30 #DEFINE index_profile_byte_count .9 ; 3 number of bytes in profile data
|
|
31 #DEFINE index_date .12 ; 3 date in sequence year, month, day
|
|
32 #DEFINE index_time .15 ; 2 time in sequence hour, minute
|
|
33 #DEFINE index_max_depth .17 ; 2 maximum depth
|
|
34 #DEFINE index_divetime .19 ; 3 dive time in sequence minutes:2, seconds:1
|
|
35 #DEFINE index_min_temp .22 ; 2 minimum temperature during the dive
|
|
36 #DEFINE index_surface_press .24 ; 2 surface pressure during the dive
|
|
37 #DEFINE index_desattime .26 ; 2 desaturation time at end of dive
|
|
38 #DEFINE index_gas1 .28 ; 4 gas 1 in sequence O2%, He%, change depth, type
|
|
39 #DEFINE index_gas2 .32 ; 4 gas 2 ...
|
|
40 #DEFINE index_gas3 .36 ; 4 gas 3 ...
|
|
41 #DEFINE index_gas4 .40 ; 4 gas 4 ...
|
|
42 #DEFINE index_gas5 .44 ; 4 gas 5 ...
|
|
43 #DEFINE index_firmware .48 ; 2 firmware version used in sequence major, minor
|
|
44 #DEFINE index_battery_voltage .50 ; 2 battery voltage at end of dive
|
|
45 #DEFINE index_samplingrate .52 ; 1 sampling rate of profile data
|
|
46 #DEFINE index_cns_start .53 ; 2 CNS % at begin of dive
|
|
47 #DEFINE index_supersat_start .55 ; 1 supersaturation % at begin of dive
|
|
48 #DEFINE index_supersat_end .56 ; 1 supersaturation % at end of dive
|
|
49 #DEFINE index_logoffset .57 ; 2 logbook offset
|
|
50 #DEFINE index_batt_percent .59 ; 1 battery % at end of dive
|
|
51 #DEFINE index_sp1 .60 ; 2 setpoint 1 in sequence setpoint, change depth
|
|
52 #DEFINE index_sp2 .62 ; 2 setpoint 2 ...
|
|
53 #DEFINE index_sp3 .64 ; 2 setpoint 3 ...
|
|
54 #DEFINE index_sp4 .66 ; 2 setpoint 4 ...
|
|
55 #DEFINE index_sp5 .68 ; 2 setpoint 5 ...
|
|
56 #DEFINE index_salinity .70 ; 1 salinity setting %
|
|
57 #DEFINE index_cns_end .71 ; 2 CNS % at end of dive
|
|
58 #DEFINE index_avr_depth .73 ; 2 average depth
|
|
59 #DEFINE index_total_seconds .75 ; 2 total dive time in seconds
|
|
60 #DEFINE index_gf_lo_hi .77 ; 2 GF factors (if using ZH-L16+GF) in sequence lo, hi
|
|
61 #DEFINE index_factor_sat_desat .77 ; 2 multipliers (if using ZH-L16) in sequence saturation, desaturation
|
|
62 #DEFINE index_decomodel .79 ; 1 deco model (ZH-L16, ZH-L16+GF)
|
|
63 #DEFINE index_total_dives .80 ; 2 total number of dives logged on unit
|
|
64 #DEFINE index_divemode .82 ; 1 dive mode (OC, CCR, ...)
|
|
65 #DEFINE index_tissue_pres_total .83 ; 16 total tissue pressures at end of dive (16x uint8) (since FW 3.08, else N2 pressures)
|
|
66 #DEFINE index_tissue_pres_N2 .99 ; 64 Nitrogen tissue pressures at end of dive (16x float)
|
|
67 #DEFINE index_tissue_supersat .163 ; 16 tissue supersaturations at end of dive (16x uint8) (since FW 3.08, else He pressures)
|
|
68 #DEFINE index_tissue_pres_He .179 ; 64 Helium tissue pressures at end of dive (16x float)
|
|
69 #DEFINE index_last_stop .243 ; 1 depth of the last stop
|
|
70 #DEFINE index_decodistance .244 ; 1 assumed deco distance (not used anymore)
|
|
71 #DEFINE index_hud_data .245 ; 3 last HUD data set received
|
|
72 #DEFINE index_battery_gauge .248 ; 6 battery gauge register at end of dive
|
|
73 #DEFINE index_header_stop .254 ; 2 header stop code 0xFBFB
|