annotate src/logbook.inc @ 639:0ff82370991d

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