Compare commits
775 Commits
bstoeger-c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b126fccb1b | ||
|
|
10fc3bfd47 | ||
|
|
a8c9781205 | ||
|
|
291ed9d7e3 | ||
|
|
a39f0e2891 | ||
|
|
d9f50bb8e0 | ||
|
|
d1db85005b | ||
|
|
e2d3a12555 | ||
|
|
568aeb7bce | ||
|
|
ca5f28206b | ||
|
|
adaa52bf9b | ||
|
|
692ec9ee5c | ||
|
|
c2c5faeaad | ||
|
|
88acef7f0f | ||
|
|
32cd52869b | ||
|
|
3d96642b8d | ||
|
|
c5546fb52f | ||
|
|
f65afaf5d2 | ||
|
|
9243921cbb | ||
|
|
d27451979d | ||
|
|
e7d486982f | ||
|
|
5b941ea34e | ||
|
|
56f1e7027f | ||
|
|
64d4de4a1b | ||
|
|
e39b42df53 | ||
|
|
398cc2b639 | ||
|
|
2776a2fe48 | ||
|
|
1aa5438b2d | ||
|
|
ecc6f64d10 | ||
|
|
8c14fb971c | ||
|
|
6bdfee080d | ||
|
|
21269183bf | ||
|
|
245f8002a8 | ||
|
|
c3d807802d | ||
|
|
a66bdb1bf5 | ||
|
|
b579342639 | ||
|
|
888704e816 | ||
|
|
6880937838 | ||
|
|
d018b72dab | ||
|
|
b3d6920de4 | ||
|
|
912badadd4 | ||
|
|
1c0fe2fa1f | ||
|
|
48ef4b3a01 | ||
|
|
22082bd60a | ||
|
|
be1b80ea8a | ||
|
|
e81b42d533 | ||
|
|
dd50ab0106 | ||
|
|
0d6b572a9f | ||
|
|
21f64134b7 | ||
|
|
7bf40d659c | ||
|
|
6ae2844f24 | ||
|
|
447f9709f7 | ||
|
|
4ae6c0bbc4 | ||
|
|
6fc8310705 | ||
|
|
e20ec9248c | ||
|
|
8769b1232e | ||
|
|
d061a54e3d | ||
|
|
306dad575c | ||
|
|
331d6712c6 | ||
|
|
f4e61aa5dc | ||
|
|
528532572f | ||
|
|
a83349015a | ||
|
|
8627f6fc4a | ||
|
|
5bad522390 | ||
|
|
edb771e8e6 | ||
|
|
17d83acdab | ||
|
|
133354d51d | ||
|
|
46cf2fc086 | ||
|
|
5ac1922d84 | ||
|
|
3153a139b3 | ||
|
|
e65c7cedc8 | ||
|
|
32a08735c3 | ||
|
|
af6caa6fa2 | ||
|
|
f3c7dcf9c9 | ||
|
|
bb00a9728f | ||
|
|
a2cd621819 | ||
|
|
d92777a3ff | ||
|
|
e09a134a3f | ||
|
|
aecb4f5005 | ||
|
|
358b9186bf | ||
|
|
12ae3d4e96 | ||
|
|
34926f1325 | ||
|
|
da8509d29b | ||
|
|
9deef235e2 | ||
|
|
e7a6de3894 | ||
|
|
177a1a6706 | ||
|
|
556ecd5a9b | ||
|
|
b320942343 | ||
|
|
8867edffe8 | ||
|
|
991b72d4ff | ||
|
|
47254d91e0 | ||
|
|
9923d49624 | ||
|
|
9febfdd084 | ||
|
|
8677d1f325 | ||
|
|
6dd5ec296d | ||
|
|
4de109bbf1 | ||
|
|
d83da05f8d | ||
|
|
b6439e0420 | ||
|
|
ab7218d543 | ||
|
|
2c2ad1e5c9 | ||
|
|
4af2ec88bd | ||
|
|
c6cd10a43f | ||
|
|
8e106b0449 | ||
|
|
da7ea17b66 | ||
|
|
b097c0a44f | ||
|
|
ec0bc2d06c | ||
|
|
b89029353f | ||
|
|
14cfb17c1a | ||
|
|
157b52aa6e | ||
|
|
322c3b55e6 | ||
|
|
a123589efb | ||
|
|
ae299d5e66 | ||
|
|
422f693f5b | ||
|
|
84b7ffafd2 | ||
|
|
e65ba50c1a | ||
|
|
82ba236859 | ||
|
|
177b03958c | ||
|
|
bd3f9b107e | ||
|
|
15b17a0aca | ||
|
|
b542a39a00 | ||
|
|
9a052cd089 | ||
|
|
4db19d6284 | ||
|
|
8b51ff7ded | ||
|
|
fe68870079 | ||
|
|
f69686d429 | ||
|
|
77e8c3655e | ||
|
|
bd31efa821 | ||
|
|
80eff1d6e2 | ||
|
|
74b1648fcc | ||
|
|
7fb0e9e59e | ||
|
|
d59bd1831a | ||
|
|
f05808fded | ||
|
|
1692e48163 | ||
|
|
375b08857c | ||
|
|
d49092ac70 | ||
|
|
ee8b37cc6e | ||
|
|
77281f8bfe | ||
|
|
6b11457ddd | ||
|
|
8a20509861 | ||
|
|
334a357c19 | ||
|
|
1973d7c881 | ||
|
|
a5575f43a3 | ||
|
|
ffce4bc097 | ||
|
|
5980db073a | ||
|
|
4dcc9210a9 | ||
|
|
f4b35f67f6 | ||
|
|
0d011231e6 | ||
|
|
de313bd01a | ||
|
|
2172e18298 | ||
|
|
dd466d2d48 | ||
|
|
916c88ded9 | ||
|
|
176ee1ac9c | ||
|
|
83fa38b3b4 | ||
|
|
2bf7432a94 | ||
|
|
c53cdf039b | ||
|
|
29d71eb85e | ||
|
|
2c490fcbbb | ||
|
|
6aca76c342 | ||
|
|
92c3837f6e | ||
|
|
5ac64ab2cd | ||
|
|
41cb916060 | ||
|
|
37f2207f94 | ||
|
|
3a1122048b | ||
|
|
64419f2b19 | ||
|
|
981352646c | ||
|
|
2e067c89dd | ||
|
|
8733828380 | ||
|
|
322c1b56b2 | ||
|
|
8b0b3cba3c | ||
|
|
2533909337 | ||
|
|
1508d305b8 | ||
|
|
8a5009786e | ||
|
|
153bcdec42 | ||
|
|
e6ff3f7537 | ||
|
|
3229d1e3a1 | ||
|
|
857148efd6 | ||
|
|
8980d61786 | ||
|
|
bfbf4934dd | ||
|
|
fcf0bda042 | ||
|
|
d653cec7a4 | ||
|
|
8f50c9c1b3 | ||
|
|
c7a929a8a8 | ||
|
|
8b5812bc2c | ||
|
|
cf990b0f39 | ||
|
|
889ca23999 | ||
|
|
6bf8cbfe46 | ||
|
|
885ff44c56 | ||
|
|
6b054318e0 | ||
|
|
cca4c8cae5 | ||
|
|
203ff8b2e6 | ||
|
|
ad7530f7bb | ||
|
|
affcbddbb0 | ||
|
|
e6321a1305 | ||
|
|
92a1a08b21 | ||
|
|
cf7c54bd56 | ||
|
|
2f4dbf1848 | ||
|
|
2f3d8d83f5 | ||
|
|
119fe908c7 | ||
|
|
2e1d852e36 | ||
|
|
898ecd2df5 | ||
|
|
8d96b7557d | ||
|
|
5e466d91f0 | ||
|
|
83b0c1da40 | ||
|
|
a133c6c4db | ||
|
|
9509eb6876 | ||
|
|
43ec3fc1d9 | ||
|
|
114513493b | ||
|
|
a1826f77da | ||
|
|
c05be40bfd | ||
|
|
d803e42314 | ||
|
|
a032d9c979 | ||
|
|
76c2069fa8 | ||
|
|
f1012283a0 | ||
|
|
924b23ed56 | ||
|
|
b0438ad1dd | ||
|
|
371b155922 | ||
|
|
148775f418 | ||
|
|
c27e093ebd | ||
|
|
52e6a098aa | ||
|
|
096e49e15b | ||
|
|
0ea287cc2c | ||
|
|
8c861f749f | ||
|
|
f1bd5dc051 | ||
|
|
d64986415c | ||
|
|
649ed8a9ae | ||
|
|
569c5520af | ||
|
|
5dc4c5855b | ||
|
|
af8f67ed5f | ||
|
|
9d2bd425e1 | ||
|
|
4b1a6f8824 | ||
|
|
6c2b126c8e | ||
|
|
805cd550f2 | ||
|
|
a4091189b0 | ||
|
|
ef5859437a | ||
|
|
96470227d5 | ||
|
|
cb3e21c443 | ||
|
|
9d3498f01e | ||
|
|
afcff5da2b | ||
|
|
10d95531ff | ||
|
|
cedccbc340 | ||
|
|
3ccd7e4bc7 | ||
|
|
f495c4f002 | ||
|
|
4642f12e29 | ||
|
|
c3aa505f2b | ||
|
|
bf5510e5a6 | ||
|
|
8e023717f7 | ||
|
|
0cb5273766 | ||
|
|
bca8eabcec | ||
|
|
5ab5bc51cd | ||
|
|
36a76e015f | ||
|
|
4b0fe3bc38 | ||
|
|
fac006148f | ||
|
|
4783e85b59 | ||
|
|
4422dbb52b | ||
|
|
6ad7e577f1 | ||
|
|
d3c9cb14bf | ||
|
|
7a74a6c426 | ||
|
|
4877c5d99a | ||
|
|
2ba04c71f1 | ||
|
|
9416d9e684 | ||
|
|
aa975d2d2c | ||
|
|
8d353beecf | ||
|
|
3df5a5f16d | ||
|
|
aa96ab452b | ||
|
|
a946dc323b | ||
|
|
704b26ff1e | ||
|
|
31d1755efd | ||
|
|
1309064873 | ||
|
|
8181048611 | ||
|
|
618e38151a | ||
|
|
4197faf1b7 | ||
|
|
5250a86277 | ||
|
|
fbbbbb997e | ||
|
|
02055ba067 | ||
|
|
129cbf8d95 | ||
|
|
345f0570a5 | ||
|
|
df1974a244 | ||
|
|
2036c68972 | ||
|
|
34011b4fb1 | ||
|
|
2413821080 | ||
|
|
19f329a76e | ||
|
|
cf30c685a6 | ||
|
|
63f4761a13 | ||
|
|
aad0063c46 | ||
|
|
1ce385b363 | ||
|
|
323dda672c | ||
|
|
5ae6972a80 | ||
|
|
e234f16073 | ||
|
|
ddfc676a92 | ||
|
|
a57c26ccd4 | ||
|
|
eb555b25d5 | ||
|
|
d4a4ecfa99 | ||
|
|
a6ac4f4599 | ||
|
|
b9cf51bfad | ||
|
|
e2ca662502 | ||
|
|
d04c9785b6 | ||
|
|
9cdb9f7989 | ||
|
|
94a7ba9097 | ||
|
|
6318a983eb | ||
|
|
330fd2309b | ||
|
|
1952d1c187 | ||
|
|
0ee5c8f03a | ||
|
|
caf2f8c102 | ||
|
|
fb41999c73 | ||
|
|
a59d033278 | ||
|
|
21095b18fc | ||
|
|
4fdaf3e8de | ||
|
|
301059c6c9 | ||
|
|
a0b8574beb | ||
|
|
129a7fbf59 | ||
|
|
3cc5ec5c50 | ||
|
|
3b20cda602 | ||
|
|
9779ac3661 | ||
|
|
62cc7ad69b | ||
|
|
3eb5ea9adf | ||
|
|
84e8937787 | ||
|
|
e794efaba6 | ||
|
|
e00e1bb9f7 | ||
|
|
05ef933ff7 | ||
|
|
89506d9782 | ||
|
|
bd1763680e | ||
|
|
c1bfded4a7 | ||
|
|
eea75fc1c4 | ||
|
|
24c1cb5b09 | ||
|
|
9e2f7571f9 | ||
|
|
6dd5922d15 | ||
|
|
bef21ff5eb | ||
|
|
429230ced1 | ||
|
|
91e4fb4769 | ||
|
|
35ff6eea35 | ||
|
|
bdade9e499 | ||
|
|
13b894a756 | ||
|
|
4bab38b8df | ||
|
|
2db8b51eed | ||
|
|
6c8afabedf | ||
|
|
249b82f6dc | ||
|
|
8a3a0edb83 | ||
|
|
ac0d44bccf | ||
|
|
c92ebd1f3b | ||
|
|
798e426926 | ||
|
|
1b7daeee22 | ||
|
|
4aafc304a1 | ||
|
|
fb567fe00b | ||
|
|
8173ebaf36 | ||
|
|
6d120cde59 | ||
|
|
bbd810367a | ||
|
|
55c751e219 | ||
|
|
f4186dc076 | ||
|
|
e81a2b480f | ||
|
|
21b5a58eda | ||
|
|
ff82441946 | ||
|
|
2450080725 | ||
|
|
bdf40f02f3 | ||
|
|
8c60657ec8 | ||
|
|
d6d65fa673 | ||
|
|
c6f3a5bd47 | ||
|
|
ef47d03478 | ||
|
|
5bae033f07 | ||
|
|
7d918aeef1 | ||
|
|
9bf79c460a | ||
|
|
eb4f3121bc | ||
|
|
2f464c114d | ||
|
|
8fb504941e | ||
|
|
c2acdafcdf | ||
|
|
506a96f1f6 | ||
|
|
53f6d1d606 | ||
|
|
5b2d1a4506 | ||
|
|
ca5f7fa4bf | ||
|
|
744257149f | ||
|
|
9aa9bec914 | ||
|
|
c0c447a5b6 | ||
|
|
30efede730 | ||
|
|
c33e05c1d4 | ||
|
|
14e715be6e | ||
|
|
867d31bcbc | ||
|
|
deab622c3e | ||
|
|
13603a0878 | ||
|
|
4f077ef00e | ||
|
|
7286a76233 | ||
|
|
f1ac55d322 | ||
|
|
4527abe936 | ||
|
|
2f587bb9a8 | ||
|
|
e247d4cb3c | ||
|
|
b5efaf661c | ||
|
|
ec83e157e9 | ||
|
|
d867701233 | ||
|
|
1eed75c599 | ||
|
|
6f260bdfaf | ||
|
|
d066241ad8 | ||
|
|
5fcfe5298a | ||
|
|
61169151a0 | ||
|
|
0a46068501 | ||
|
|
ef35c3e8cb | ||
|
|
7d751a8160 | ||
|
|
8e8c69f749 | ||
|
|
e8dd3389a7 | ||
|
|
62ca2d5b85 | ||
|
|
2a7628483e | ||
|
|
c4cb913426 | ||
|
|
5075e7f127 | ||
|
|
de8dc87ecf | ||
|
|
aea2f36de2 | ||
|
|
7b59749bcb | ||
|
|
62477d8c65 | ||
|
|
8a2dd8db74 | ||
|
|
fe4c602117 | ||
|
|
504a9b6efe | ||
|
|
fa8db5f3f7 | ||
|
|
58fb49f243 | ||
|
|
60f1deb116 | ||
|
|
b67aebd462 | ||
|
|
de5311033c | ||
|
|
8992ca629d | ||
|
|
3e82973361 | ||
|
|
f4cac010ae | ||
|
|
7792e227da | ||
|
|
b3d2a8cdcb | ||
|
|
733ffb787a | ||
|
|
a8e3cd97cd | ||
|
|
e3a32f7e92 | ||
|
|
3d902864ed | ||
|
|
fa609a9e9b | ||
|
|
0edb1c71d8 | ||
|
|
57b355b314 | ||
|
|
94c47f64ac | ||
|
|
b63b286f2e | ||
|
|
a38d83af24 | ||
|
|
b84e06ae42 | ||
|
|
5ad75e81c3 | ||
|
|
3da943dc8a | ||
|
|
d76354c48c | ||
|
|
841c100a1e | ||
|
|
dee49979d1 | ||
|
|
d2f2f22dc1 | ||
|
|
3a98b8a722 | ||
|
|
b070b32e93 | ||
|
|
f5c1f7204a | ||
|
|
2ffba35d45 | ||
|
|
c572148ab6 | ||
|
|
19dd25c71c | ||
|
|
e26dd30165 | ||
|
|
1d150b106d | ||
|
|
6bbade9845 | ||
|
|
f0ef8b51fc | ||
|
|
e95fbb7279 | ||
|
|
f252af1dd1 | ||
|
|
c609bc9446 | ||
|
|
c0c361f40f | ||
|
|
2d63591ab8 | ||
|
|
9cfe656342 | ||
|
|
2463b315bb | ||
|
|
cc5a5a22bd | ||
|
|
b0228b51ed | ||
|
|
b05d15933f | ||
|
|
41b5bbb226 | ||
|
|
243d6bfd2b | ||
|
|
8e212c0858 | ||
|
|
8bf8f18962 | ||
|
|
8192379a84 | ||
|
|
c612641517 | ||
|
|
4842344bc1 | ||
|
|
d0b95f9401 | ||
|
|
c7171179b3 | ||
|
|
5c2e4c395b | ||
|
|
ede732418b | ||
|
|
1abf400c63 | ||
|
|
2a3c0d981f | ||
|
|
0d69758cac | ||
|
|
07a028b14d | ||
|
|
8d3f2e4ca6 | ||
|
|
94164bb8fa | ||
|
|
5444a6b65d | ||
|
|
a681ff3410 | ||
|
|
bba0da589b | ||
|
|
725b70e64c | ||
|
|
8f4b6cfcb9 | ||
|
|
fea074986a | ||
|
|
b6111714b3 | ||
|
|
bfe61b2dff | ||
|
|
c7b7c3f691 | ||
|
|
3c5f22ac25 | ||
|
|
c5feae126b | ||
|
|
947c2e704f | ||
|
|
7165660a45 | ||
|
|
aa9f3843eb | ||
|
|
c78c91fb66 | ||
|
|
70aefd4db4 | ||
|
|
97a76a6615 | ||
|
|
81f35c1ecf | ||
|
|
83e7f537fb | ||
|
|
fae68b7a68 | ||
|
|
26f20b805d | ||
|
|
b324849d0c | ||
|
|
8f0380fd05 | ||
|
|
5fae7ce7a0 | ||
|
|
cb6f768865 | ||
|
|
5e293689fd | ||
|
|
8f8f901aa8 | ||
|
|
5511cd13d7 | ||
|
|
4ac27e3c71 | ||
|
|
695c37499a | ||
|
|
1e082affdd | ||
|
|
90e5de8357 | ||
|
|
e260780c9d | ||
|
|
5d708c0d92 | ||
|
|
ce67c8b902 | ||
|
|
b5007bde67 | ||
|
|
bceb367dc3 | ||
|
|
b0d5b23227 | ||
|
|
a0cb6ad6d7 | ||
|
|
700bba7e30 | ||
|
|
35d88fa6ce | ||
|
|
3939cc8da2 | ||
|
|
81cd91f78b | ||
|
|
a3f540fe34 | ||
|
|
540cba07f3 | ||
|
|
7771b444a1 | ||
|
|
4c193d7bdf | ||
|
|
a127c4ac63 | ||
|
|
50438b0456 | ||
|
|
5d7f294407 | ||
|
|
6002387d7b | ||
|
|
62c2e9f07c | ||
|
|
7ee5b10810 | ||
|
|
2ef6cd89cc | ||
|
|
9e95746797 | ||
|
|
7217506072 | ||
|
|
a7889d1f4e | ||
|
|
9e059be4ca | ||
|
|
2aa13ea9d7 | ||
|
|
84d9d0abe7 | ||
|
|
d7bfb9d61e | ||
|
|
361baeda01 | ||
|
|
1bd7806dcf | ||
|
|
cf95c3bd82 | ||
|
|
15bf145f14 | ||
|
|
e60baff940 | ||
|
|
a8d2b2ff70 | ||
|
|
a38ea971a0 | ||
|
|
cb410fe1ba | ||
|
|
e70e3082c9 | ||
|
|
1fb9d6236b | ||
|
|
4c02d1c279 | ||
|
|
b5682369f8 | ||
|
|
3dd09b31e3 | ||
|
|
d51589b9a7 | ||
|
|
80df790efc | ||
|
|
d65f2f422c | ||
|
|
c5d6e0f44f | ||
|
|
5b1557ccb1 | ||
|
|
cad80e5a53 | ||
|
|
19baae449d | ||
|
|
32de8a1387 | ||
|
|
6f03fc9689 | ||
|
|
8cd191c271 | ||
|
|
cded7ef5fe | ||
|
|
908da77863 | ||
|
|
de2c4d93e0 | ||
|
|
72a15c46d9 | ||
|
|
616dbd9671 | ||
|
|
018be753c3 | ||
|
|
8581e213ed | ||
|
|
9ccb940a1b | ||
|
|
832398180c | ||
|
|
d057af43b4 | ||
|
|
297befc6f8 | ||
|
|
996f85771a | ||
|
|
1f453094a9 | ||
|
|
487974ea91 | ||
|
|
6df1c62dfc | ||
|
|
9f455b1457 | ||
|
|
b56b7abcf5 | ||
|
|
a2845ece82 | ||
|
|
b61732da42 | ||
|
|
aa34afc3f7 | ||
|
|
59d678b5b1 | ||
|
|
7d5c6be188 | ||
|
|
40275ea56b | ||
|
|
8cd451fc33 | ||
|
|
9c253ee6c5 | ||
|
|
eebb47ec22 | ||
|
|
ad8aa988f0 | ||
|
|
1e3427c7cd | ||
|
|
e27653374d | ||
|
|
2f4b415e91 | ||
|
|
9da7ec4828 | ||
|
|
31cf991afe | ||
|
|
264adacba1 | ||
|
|
468c1d8d61 | ||
|
|
f05ec222ff | ||
|
|
4946a112b3 | ||
|
|
35f0a6af3b | ||
|
|
e130add0c5 | ||
|
|
b59b18bfff | ||
|
|
7e74dcccca | ||
|
|
4e1206d975 | ||
|
|
324fbfa685 | ||
|
|
5b263a8f4e | ||
|
|
d44787a0b3 | ||
|
|
ffc9502535 | ||
|
|
b9b47092c1 | ||
|
|
c47e28fa29 | ||
|
|
9aed18451a | ||
|
|
cb5bc68c59 | ||
|
|
576595bb11 | ||
|
|
3330f9001c | ||
|
|
43da660220 | ||
|
|
a85abbedf6 | ||
|
|
df6ec04e48 | ||
|
|
c438bce468 | ||
|
|
12e6f219c9 | ||
|
|
fc1eab3fc8 | ||
|
|
4192cf2737 | ||
|
|
e11c196a6a | ||
|
|
ddb96efa87 | ||
|
|
7ffe4c67ef | ||
|
|
30ca55be12 | ||
|
|
5aaafd1728 | ||
|
|
5069cda05a | ||
|
|
8766827c17 | ||
|
|
9867ff1ec5 | ||
|
|
6b272ac3aa | ||
|
|
2f29380ae2 | ||
|
|
867ef10736 | ||
|
|
8a56896c4b | ||
|
|
32c63f57ab | ||
|
|
3f2e4e8b16 | ||
|
|
4128fec1ea | ||
|
|
0d3c9954f4 | ||
|
|
ab7b9329c0 | ||
|
|
ec0c6833a0 | ||
|
|
eb5d4f2a15 | ||
|
|
b4af03751d | ||
|
|
a1a834568a | ||
|
|
40fc037aa4 | ||
|
|
8fe5564059 | ||
|
|
7b44689c8e | ||
|
|
1e3d378ad9 | ||
|
|
1ed995aa7a | ||
|
|
3c771e2ee2 | ||
|
|
de4cad22b6 | ||
|
|
a92ee1e05d | ||
|
|
72c40a18c2 | ||
|
|
321c8d92dc | ||
|
|
ada32f999e | ||
|
|
7ecc4c7034 | ||
|
|
0ccb762a09 | ||
|
|
a21cddc69a | ||
|
|
e335c7a20d | ||
|
|
76c4b76027 | ||
|
|
1b5de2d33b | ||
|
|
30c5dfce00 | ||
|
|
02f4eb6904 | ||
|
|
d7ca0c7253 | ||
|
|
687f65bf77 | ||
|
|
063a20a406 | ||
|
|
f45379e97c | ||
|
|
a8eaa3e391 | ||
|
|
5de9c2b30b | ||
|
|
4996d90d53 | ||
|
|
43cdcd0c4b | ||
|
|
1cc6981b62 | ||
|
|
8f7abb2581 | ||
|
|
bec625eb01 | ||
|
|
b607140a2a | ||
|
|
be1c5b574b | ||
|
|
4899a04505 | ||
|
|
062533d0ac | ||
|
|
763ce015ff | ||
|
|
31277daa71 | ||
|
|
7e43943541 | ||
|
|
d537e16cb1 | ||
|
|
520be78fa8 | ||
|
|
f27ff65970 | ||
|
|
c62b837b12 | ||
|
|
5bd5ff2c2d | ||
|
|
cf70a25be4 | ||
|
|
5525344594 | ||
|
|
2112bd8e08 | ||
|
|
741099bdbb | ||
|
|
46365b3199 | ||
|
|
01a25edf82 | ||
|
|
4bbe5646a5 | ||
|
|
691d9e86de | ||
|
|
d3867af1b9 | ||
|
|
e0e21cab3d | ||
|
|
9bca38afcf | ||
|
|
df5bf728f9 | ||
|
|
b63073e203 | ||
|
|
727d519046 | ||
|
|
f407f5269a | ||
|
|
e2338fe7e9 | ||
|
|
cea171ffd4 | ||
|
|
94641c510f | ||
|
|
261f07dfa4 | ||
|
|
f687e51d4b | ||
|
|
9ced3a3a4d | ||
|
|
56c91a46b6 | ||
|
|
48659c3f7d | ||
|
|
7d366b9afe | ||
|
|
7b5381b6de | ||
|
|
c88d22462d | ||
|
|
cca21cf07f | ||
|
|
6c9c59a2e0 | ||
|
|
98f1f670c4 | ||
|
|
f2a96db687 | ||
|
|
bcbbda401e | ||
|
|
7c8dc016b5 | ||
|
|
d66376a8f3 | ||
|
|
eb101aab1f | ||
|
|
884dbc9d5e | ||
|
|
eb59d426d1 | ||
|
|
99e6e11c8c | ||
|
|
621a0a4e3a | ||
|
|
17033d0d83 | ||
|
|
86e3ceb0e9 | ||
|
|
02f158b0c2 | ||
|
|
aa50be9cd5 | ||
|
|
b5889f0f3c | ||
|
|
13482a961d | ||
|
|
bb3ddf521b | ||
|
|
724af75722 | ||
|
|
24926f6031 | ||
|
|
3abb82bfd5 | ||
|
|
fbb737e85b | ||
|
|
3446dd5125 | ||
|
|
77a5ca4234 | ||
|
|
d306ba9b38 | ||
|
|
50d83ab188 | ||
|
|
edf2a2f4f4 | ||
|
|
0d92ef2835 | ||
|
|
4a7ee872f3 | ||
|
|
1047937197 | ||
|
|
a39e69c497 | ||
|
|
70e43d13a0 | ||
|
|
34e169aace | ||
|
|
42da08df20 | ||
|
|
f144fa0a1b | ||
|
|
ead15f622a | ||
|
|
173093d314 | ||
|
|
6d77d814a8 | ||
|
|
aa4b48f440 | ||
|
|
61701509b0 | ||
|
|
5db4a95a26 | ||
|
|
2ae7f3cf6c | ||
|
|
87387b7e7e | ||
|
|
8164ca56ec | ||
|
|
0af410d6ce | ||
|
|
7801b0c28a | ||
|
|
0a4689c2e6 | ||
|
|
8c644547fb | ||
|
|
d257a623fa | ||
|
|
7d87815c69 | ||
|
|
f3221c6965 | ||
|
|
6a2b7cc924 | ||
|
|
1b539af4ca | ||
|
|
7e9043a4ac | ||
|
|
5be01b04ed | ||
|
|
70fbce46c7 | ||
|
|
acd385048a | ||
|
|
1c00f9f233 | ||
|
|
252761498a | ||
|
|
cfa0c9c735 | ||
|
|
9455ca7061 | ||
|
|
881a9cac4e | ||
|
|
efb1832db8 | ||
|
|
3dbba5ae69 | ||
|
|
c897edc13e | ||
|
|
32bc034f41 | ||
|
|
941aaf5b65 | ||
|
|
803727395b | ||
|
|
21eb108cfd | ||
|
|
05e1294be9 | ||
|
|
d68fd2922c | ||
|
|
c554b57859 |
@ -10,7 +10,7 @@ ColumnLimit: 0
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerIndentWidth: 8
|
||||
ContinuationIndentWidth: 8
|
||||
ForEachMacros: [ 'foreach', 'for_each_dc', 'for_each_dive', 'for_each_line', 'Q_FOREACH', 'BOOST_FOREACH' ]
|
||||
ForEachMacros: [ 'for_each_dc', 'for_each_relevant_dc', 'for_each_dive', 'for_each_line' ]
|
||||
IndentFunctionDeclarationAfterType: false #personal taste, good for long methods
|
||||
IndentWidth: 8
|
||||
MaxEmptyLinesToKeep: 2
|
||||
|
||||
2
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
github: subsurface
|
||||
ko_fi: dirkhh
|
||||
56
.github/actions/manage-version/action.yml
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
name: Manage the Subsurface CICD versioning
|
||||
|
||||
inputs:
|
||||
no-increment:
|
||||
description: 'Only get the current version, do not increment it even for push events (Caution: not actually a boolean)'
|
||||
default: false
|
||||
nightly-builds-secret:
|
||||
description: The secret to access the nightly builds repository
|
||||
default: ''
|
||||
|
||||
outputs:
|
||||
version:
|
||||
description: The long form version number
|
||||
value: ${{ steps.version_number.outputs.version }}
|
||||
buildnr:
|
||||
description: The build number
|
||||
value: ${{ steps.version_number.outputs.buildnr }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: atomically create or retrieve the build number and assemble release notes for a push (i.e. merging of a pull request)
|
||||
if: github.event_name == 'push' && inputs.no-increment == 'false'
|
||||
env:
|
||||
NIGHTLY_BUILDS_SECRET: ${{ inputs.nightly-builds-secret }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -z "$NIGHTLY_BUILDS_SECRET" ]; then
|
||||
echo "Need to supply the secret for the nightly-builds repository to increment the version number, aborting."
|
||||
exit 1
|
||||
fi
|
||||
scripts/get-atomic-buildnr.sh $GITHUB_SHA $NIGHTLY_BUILDS_SECRET "CICD-release"
|
||||
|
||||
- name: retrieve the current version number in all other cases
|
||||
if: github.event_name != 'push' || inputs.no-increment != 'false'
|
||||
env:
|
||||
PULL_REQUEST_BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||
shell: bash
|
||||
run: |
|
||||
echo "pull-request-$PULL_REQUEST_BRANCH" > latest-subsurface-buildnumber-extension
|
||||
|
||||
- name: store version number for the build
|
||||
id: version_number
|
||||
env:
|
||||
PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
# For a pull request we need the information from the pull request branch
|
||||
# and not from the merge branch on the pull request
|
||||
git checkout $PULL_REQUEST_HEAD_SHA
|
||||
version=$(scripts/get-version.sh)
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
buildnr=$(scripts/get-version.sh 1)
|
||||
echo "buildnr=$buildnr" >> $GITHUB_OUTPUT
|
||||
git checkout $GITHUB_SHA
|
||||
49
.github/workflows/android-dockerimage.disabled
vendored
@ -1,49 +0,0 @@
|
||||
name: Android Docker Image CI
|
||||
|
||||
# -- disabled for now, as the resulting image is HUGE and causes our
|
||||
# Android builds to fail
|
||||
#on:
|
||||
# push:
|
||||
# paths:
|
||||
# - scripts/docker/android-build-container/Dockerfile
|
||||
# - .github/workflows/android-docker*
|
||||
|
||||
# this is here to prevent errors about not having an on: clause
|
||||
on:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- unused
|
||||
|
||||
jobs:
|
||||
android-build-container:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
VERSION: ${{ '5.13.10' }} # the version numbers here is based on the Qt version, the third digit is the rev of the docker image
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Get our pre-reqs
|
||||
run: |
|
||||
cd scripts/docker/android-build-container
|
||||
bash download.sh
|
||||
sed -ie 's/^sudo/#sudo/' setup-docker.sh
|
||||
bash setup-docker.sh
|
||||
|
||||
- name: set env
|
||||
run: |
|
||||
v=${{ env.VERSION }}
|
||||
b=${{ github.ref }} # -BRANCH suffix, unless the branch is master
|
||||
b=${b/refs\/heads\//}
|
||||
b=${b,,} # the name needs to be all lower case
|
||||
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
|
||||
echo "::set-env name=NAME::subsurface/android-build-container${b}:${v}"
|
||||
|
||||
- name: Build and Publish Linux Docker image to Dockerhub
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
with:
|
||||
name: ${{ env.NAME }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
dockerfile: 'Dockerfile'
|
||||
workdir: './scripts/docker/android-build-container/'
|
||||
37
.github/workflows/android-dockerimage.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
name: Android Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- scripts/docker/android-build-container/**
|
||||
- .github/workflows/android-dockerimage.yml
|
||||
|
||||
jobs:
|
||||
android-build-container:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
VERSION: ${{ '5.15.2' }} # the version numbers here is based on the Qt version, the third digit is the rev of the docker image
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build the name for the docker image
|
||||
id: build_name
|
||||
run: |
|
||||
v=$VERSION
|
||||
b=$GITHUB_REF # -BRANCH suffix, unless the branch is master
|
||||
b=${b/refs\/heads\//}
|
||||
b=${b,,} # the name needs to be all lower case
|
||||
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
|
||||
echo "NAME=$GITHUB_REPOSITORY_OWNER/android-build${b}:${v}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and Publish Linux Docker image to Dockerhub
|
||||
uses: elgohr/Publish-Docker-Github-Action@v5
|
||||
with:
|
||||
name: ${{ steps.build_name.outputs.NAME }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
dockerfile: 'Dockerfile'
|
||||
workdir: './scripts/docker/android-build-container/'
|
||||
72
.github/workflows/android.yml
vendored
@ -1,29 +1,55 @@
|
||||
name: Android
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
buildAndroid:
|
||||
build:
|
||||
env:
|
||||
KEYSTORE_FILE: ${{ github.workspace }}/../subsurface.keystore
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker://subsurface/android-build-container:5.15.1
|
||||
image: docker://subsurface/android-build:5.15.2
|
||||
|
||||
steps:
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v1
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: set the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
|
||||
- name: set up the keystore
|
||||
if: github.event_name == 'push'
|
||||
env:
|
||||
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
run: |
|
||||
echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > $KEYSTORE_FILE
|
||||
|
||||
- name: run build
|
||||
id: build
|
||||
env:
|
||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||
KEYSTORE_PASSWORD: pass:${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||
KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
|
||||
BUILDNR: ${{ steps.version_number.outputs.buildnr }}
|
||||
run: |
|
||||
# this is rather awkward, but it allows us to use the preinstalled
|
||||
# Android and Qt versions with relative paths
|
||||
cd $GITHUB_WORKSPACE/..
|
||||
cd ..
|
||||
ln -s /android/5.15.* .
|
||||
ln -s /android/build-tools .
|
||||
ln -s /android/cmdline-tools .
|
||||
@ -31,13 +57,35 @@ jobs:
|
||||
ln -s /android/platform-tools .
|
||||
ln -s /android/platforms .
|
||||
ln -s /android/tools .
|
||||
ls -l
|
||||
git config --global user.email "ci@subsurface-divelog.org"
|
||||
git config --global user.name "Subsurface CI"
|
||||
# it turns out our build container doesn't have a native compiler
|
||||
# yet ECM needs that
|
||||
apt-get install --reinstall cpp-7 gcc-7-base libgcc-7-dev libcc1-0 gcc-7
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||
bash -x ./subsurface/packaging/android/qmake-build.sh
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
||||
# get the build number via curl so this works both for a pull request as well as a push
|
||||
export OUTPUT_DIR="$GITHUB_WORKSPACE"
|
||||
bash -x ./subsurface/packaging/android/qmake-build.sh -buildnr $BUILDNR
|
||||
|
||||
- name: delete the keystore
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
rm $KEYSTORE_FILE
|
||||
|
||||
- name: publish pull request artifacts
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Subsurface-Android-${{ steps.version_number.outputs.version }}
|
||||
path: Subsurface-mobile-*.apk
|
||||
|
||||
# only publish a 'release' on push events (those include merging a PR)
|
||||
- name: upload binaries
|
||||
if: github.event_name == 'push'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: v${{ steps.version_number.outputs.version }}
|
||||
repository: ${{ github.repository_owner }}/nightly-builds
|
||||
token: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
prerelease: false
|
||||
fail_on_unmatched_files: true
|
||||
files: |
|
||||
Subsurface-mobile-${{ steps.version_number.outputs.version }}.apk
|
||||
|
||||
24
.github/workflows/artifact-links.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: Add artifact links to pull request
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Ubuntu 16.04 / Qt 5.15-- for AppImage", "Mac", "Windows", "Android", "iOS"]
|
||||
types: [completed]
|
||||
|
||||
jobs:
|
||||
artifacts-url-comments:
|
||||
name: Add artifact links to PR and issues
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Add artifact links to PR and issues
|
||||
if: github.event.workflow_run.event == 'pull_request'
|
||||
uses: tonyhallett/artifacts-url-comments@v1.1.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
prefix: "**Artifacts:**"
|
||||
suffix: "_**WARNING:** Use at your own risk._"
|
||||
format: name
|
||||
addTo: pull
|
||||
errorNoArtifacts: false
|
||||
23
.github/workflows/codeql-analysis.yml
vendored
@ -25,33 +25,32 @@ jobs:
|
||||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['cpp', 'javascript']
|
||||
language: ['c-cpp', 'javascript-typescript']
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: get container ready for build
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y -q --force-yes \
|
||||
sudo apt-get install -y -q \
|
||||
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
|
||||
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
|
||||
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
|
||||
pkg-config qml-module-qtlocation qml-module-qtpositioning \
|
||||
qml-module-qtquick2 qt5-default qt5-qmake qtchooser qtconnectivity5-dev \
|
||||
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
||||
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
||||
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
||||
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
@ -60,13 +59,11 @@ jobs:
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||
run: |
|
||||
cd ..
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
||||
bash -e -x subsurface/scripts/build.sh -desktop -build-with-webkit
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
||||
70
.github/workflows/coverity-scan.yml
vendored
@ -1,62 +1,56 @@
|
||||
name: Coverity Scan Linux Qt 5.9
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 18 * * *' # Daily at 18:00 UTC
|
||||
|
||||
jobs:
|
||||
CoverityScanBuildOnBionic:
|
||||
runs-on: ubuntu-18.04
|
||||
CoverityScanBuildOnUbuntu:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:18.04 # yes, this looks redundant, but something is messed up with their Ubuntu image that causes our builds to fail
|
||||
image: ubuntu:22.04
|
||||
|
||||
steps:
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: add build dependencies
|
||||
run: |
|
||||
apt update
|
||||
apt install -y \
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
||||
wget curl \
|
||||
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
|
||||
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
|
||||
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
|
||||
pkg-config qml-module-qtlocation qml-module-qtpositioning \
|
||||
qml-module-qtquick2 qt5-default qt5-qmake qtchooser qtconnectivity5-dev \
|
||||
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
||||
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
||||
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
||||
qtquickcontrols2-5-dev libbluetooth-dev libmtp-dev
|
||||
|
||||
- name: Download Coverity Build Tool
|
||||
run: |
|
||||
cd ..
|
||||
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=Subsurface-divelog%2Fsubsurface" -O cov-analysis-linux64.tar.gz
|
||||
mkdir cov-analysis-linux64
|
||||
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
|
||||
env:
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: run build
|
||||
env:
|
||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||
- name: configure environment
|
||||
run: |
|
||||
cd ..
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
|
||||
cov-build --dir cov-int bash -x subsurface/scripts/build.sh -desktop -build-with-webkit
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
||||
|
||||
- name: Submit the result to Coverity Scan
|
||||
run: |
|
||||
cd ..
|
||||
tar czvf subsurface.tgz cov-int
|
||||
curl \
|
||||
--form token=$TOKEN \
|
||||
--form email=glance@acc.umu.se \
|
||||
--form file=@subsurface.tgz \
|
||||
--form version=$(/scripts/get-version linux) \
|
||||
--form description="Automatic scan on github actions" \
|
||||
https://scan.coverity.com/builds?project=Subsurface-divelog%2Fsubsurface
|
||||
env:
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
- name: get the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
no-increment: true
|
||||
|
||||
- name: run coverity scan
|
||||
uses: vapier/coverity-scan-action@v1
|
||||
with:
|
||||
project: Subsurface-divelog/subsurface
|
||||
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
email: glance@acc.umu.se
|
||||
command: subsurface/scripts/build.sh -desktop -build-with-webkit
|
||||
working-directory: ${{ github.workspace }}/..
|
||||
version: ${{ steps.version_number.outputs.version }}
|
||||
description: Automatic scan on github actions
|
||||
|
||||
36
.github/workflows/documentation.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- Documentation
|
||||
- .github/workflows/documentation.yml
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- Documentation
|
||||
- .github/workflows/documentation.yml
|
||||
|
||||
jobs:
|
||||
documentation:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Install Packages
|
||||
run: |
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install asciidoc docbook-xml w3m
|
||||
|
||||
- name: Checkout Sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Process the Documentation
|
||||
id: process_documentation
|
||||
working-directory: Documentation
|
||||
run: make
|
||||
59
.github/workflows/fedora-copr-build.yml
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
name: Fedora Copr Build
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
- current
|
||||
|
||||
jobs:
|
||||
setup-build:
|
||||
name: Submit build to Fedora COPR
|
||||
# this seems backwards, but we want to run under Fedora, but Github doesn' support that
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: fedora:latest
|
||||
|
||||
steps:
|
||||
- name: Setup build dependencies in the Fedora container
|
||||
run: |
|
||||
dnf -y install @development-tools @rpm-development-tools
|
||||
dnf -y install copr-cli make
|
||||
|
||||
- name: Check out sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: setup git
|
||||
run: |
|
||||
git config --global --add safe.directory /__w/subsurface/subsurface
|
||||
git config --global --add safe.directory /__w/subsurface/subsurface/libdivecomputer
|
||||
|
||||
- name: set the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
|
||||
- name: Setup API token for copr-cli
|
||||
env:
|
||||
API_TOKEN: ${{ secrets.COPR_TOKEN }}
|
||||
API_LOGIN: ${{ secrets.COPR_LOGIN }}
|
||||
run: |
|
||||
mkdir -p "$HOME/.config"
|
||||
cp packaging/copr/config.copr "$HOME/.config/copr"
|
||||
sed -i "s/API_TOKEN/$API_TOKEN/;s/API_LOGIN/$API_LOGIN/" "$HOME/.config/copr"
|
||||
|
||||
- name: Checkout googlemaps
|
||||
run: |
|
||||
cd ..
|
||||
git clone https://github.com/subsurface/googlemaps
|
||||
|
||||
- name: run the copr build script
|
||||
run: |
|
||||
cd ..
|
||||
bash -x subsurface/packaging/copr/make-package.sh $GITHUB_REF_NAME
|
||||
|
||||
54
.github/workflows/ios.yml
vendored
@ -1,35 +1,61 @@
|
||||
name: iOS
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
iOSBuild:
|
||||
runs-on: macOS-10.15
|
||||
build:
|
||||
runs-on: macOS-11
|
||||
steps:
|
||||
- name: switch to Xcode 11
|
||||
run: sudo xcode-select -s "/Applications/Xcode_11.7.app"
|
||||
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v1
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: setup Homebrew
|
||||
run: brew install autoconf automake libtool pkg-config
|
||||
- name: set our Qt build
|
||||
run: |
|
||||
env
|
||||
curl -L --output Qt-5.14.1-ios.tar.xz https://f002.backblazeb2.com/file/Subsurface-Travis/Qt-5.14.1-ios.tar.xz
|
||||
mkdir -p $HOME/Qt
|
||||
xzcat Qt-5.14.1-ios.tar.xz | tar -x -C $HOME/Qt -f -
|
||||
|
||||
- name: checkout Qt resources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: subsurface/qt-ios
|
||||
ref: main
|
||||
path: qt-ios
|
||||
|
||||
- name: set the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
|
||||
- name: build Subsurface-mobile for iOS
|
||||
env:
|
||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||
VERSION: ${{ steps.version_number.outputs.version }}
|
||||
run: |
|
||||
cd ${SUBSURFACE_REPO_PATH}/..
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||
ln -s $HOME/Qt Qt
|
||||
cd ..
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
||||
export IOS_QT=$GITHUB_WORKSPACE/qt-ios
|
||||
echo "build for simulator"
|
||||
bash -x $GITHUB_WORKSPACE/packaging/ios/build.sh -simulator
|
||||
# We need this in order to be able to access the file and publish it
|
||||
mv build-Subsurface-mobile-Qt_5_14_1_for_iOS-Release/Release-iphonesimulator/Subsurface-mobile.app $GITHUB_WORKSPACE/Subsurface-mobile-$VERSION.app
|
||||
|
||||
- name: publish artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Subsurface-iOS-${{ steps.version_number.outputs.version }}
|
||||
path: Subsurface-mobile-*.app
|
||||
|
||||
50
.github/workflows/linux-bionic-5.9.yml
vendored
@ -1,50 +0,0 @@
|
||||
name: Ubuntu 18.04 / Qt 5.9--
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
buildOnBionic:
|
||||
runs-on: ubuntu-18.04
|
||||
container:
|
||||
image: ubuntu:18.04 # yes, this looks redundant, but something is messed up with their Ubuntu image that causes our builds to fail
|
||||
|
||||
steps:
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: add build dependencies
|
||||
run: |
|
||||
apt update
|
||||
apt install -y \
|
||||
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
|
||||
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
|
||||
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
|
||||
pkg-config qml-module-qtlocation qml-module-qtpositioning \
|
||||
qml-module-qtquick2 qt5-default qt5-qmake qtchooser qtconnectivity5-dev \
|
||||
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
||||
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
||||
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev
|
||||
|
||||
- name: build Subsurface
|
||||
env:
|
||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||
run: |
|
||||
cd ..
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||
bash -x subsurface/scripts/build.sh -desktop -build-with-webkit
|
||||
|
||||
- name: test desktop build
|
||||
run: |
|
||||
# and now run the tests - with Qt 5.9 we can only run the desktop flavor
|
||||
echo "------------------------------------"
|
||||
echo "run tests"
|
||||
cd build/tests
|
||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
||||
xvfb-run --auto-servernum make check
|
||||
@ -1,30 +1,27 @@
|
||||
name: Ubuntu 20.04 / Qt 5.12--
|
||||
name: Generic workflow for Debian and derivatives
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_call:
|
||||
inputs:
|
||||
container-image:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
buildUbuntuFocal:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:20.04
|
||||
image: ${{ inputs.container-image }}
|
||||
|
||||
steps:
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: get container ready for build
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "update distro and install dependencies"
|
||||
|
||||
apt-get update
|
||||
apt-get upgrade -y
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q --force-yes \
|
||||
apt-get dist-upgrade -y
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
||||
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
|
||||
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
|
||||
@ -33,18 +30,30 @@ jobs:
|
||||
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
||||
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
||||
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
||||
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev
|
||||
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev \
|
||||
mdbtools-dev
|
||||
|
||||
- name: build Subsurface-mobile
|
||||
env:
|
||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||
git config --global user.email "ci@subsurface-divelog.org"
|
||||
git config --global user.name "Subsurface CI"
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
||||
# needs git from the previous step
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: set the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
no-increment: true
|
||||
|
||||
- name: build subsurface-mobile
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "building mobile"
|
||||
git config --global user.email "ci@subsurface-divelog.org"
|
||||
git config --global user.name "Subsurface CI"
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||
cd ..
|
||||
bash -e -x subsurface/scripts/build.sh -mobile
|
||||
|
||||
@ -57,7 +66,7 @@ jobs:
|
||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
||||
xvfb-run --auto-servernum make check
|
||||
|
||||
- name: build Subsurface
|
||||
- name: build subsurface
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "building desktop"
|
||||
@ -74,3 +83,18 @@ jobs:
|
||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
||||
xvfb-run --auto-servernum make check
|
||||
|
||||
- name: build subsurface-downloader
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "building downloader"
|
||||
cd ..
|
||||
bash -e -x subsurface/scripts/build.sh -downloader
|
||||
|
||||
- name: build smtk2ssrf
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "building smtk2ssrf"
|
||||
|
||||
# build smtk2ssrf (needs the artefacts generated by the subsurface build
|
||||
cd ..
|
||||
bash -e -x subsurface/scripts/smtk2ssrf-build.sh -y
|
||||
19
.github/workflows/linux-debian-trixie-5.15.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: Debian trixie / Qt 5.15--
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
do-build-test:
|
||||
uses: ./.github/workflows/linux-debian-generic.yml
|
||||
with:
|
||||
container-image: debian:trixie
|
||||
39
.github/workflows/linux-dockerimage.disabled
vendored
@ -1,39 +0,0 @@
|
||||
name: Linux Qt 5.12 Docker Image CI
|
||||
|
||||
#on:
|
||||
# push:
|
||||
# paths:
|
||||
# - scripts/docker/trusty-qt512/Dockerfile
|
||||
# - .github/workflows/linux-docker*
|
||||
|
||||
jobs:
|
||||
trusty-qt512:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
VERSION: ${{ '1.0' }} # 'official' images should have a dot-zero version
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Get our pre-reqs
|
||||
run: |
|
||||
cd scripts/docker/trusty-qt512
|
||||
bash getpackages.sh
|
||||
|
||||
- name: set env
|
||||
run: |
|
||||
v=${{ env.VERSION }}
|
||||
b=${{ github.ref }} # -BRANCH suffix, unless the branch is master
|
||||
b=${b/refs\/heads\//}
|
||||
b=${b,,} # the name needs to be all lower case
|
||||
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
|
||||
echo "::set-env name=NAME::subsurface/trusty-qt512${b}:${v}"
|
||||
|
||||
- name: Build and Publish Linux Docker image to Dockerhub
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
with:
|
||||
name: ${{ env.NAME }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
dockerfile: 'Dockerfile'
|
||||
workdir: './scripts/docker/trusty-qt512/'
|
||||
@ -1,22 +1,24 @@
|
||||
name: Fedora 35 / Qt 6--
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
buildFedoraQt6:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: fedora:35
|
||||
|
||||
steps:
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: get container ready for build
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
@ -33,17 +35,27 @@ jobs:
|
||||
bluez-libs-devel libgit2-devel libzip-devel libmtp-devel \
|
||||
xorg-x11-server-Xvfb
|
||||
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: set the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
no-increment: true
|
||||
|
||||
- name: build Subsurface
|
||||
env:
|
||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "building desktop"
|
||||
|
||||
# now build for the desktop version (without WebKit)
|
||||
cd ..
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
||||
git config --global --get-all safe.directory
|
||||
bash -e -x subsurface/scripts/build.sh -desktop -build-with-qt6
|
||||
|
||||
76
.github/workflows/linux-jammy-5.15.yml
vendored
@ -1,76 +0,0 @@
|
||||
name: Ubuntu 22.04 / Qt 5.15--
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
buildUbuntuJammy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:22.04
|
||||
|
||||
steps:
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: get container ready for build
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "update distro and install dependencies"
|
||||
|
||||
apt-get update
|
||||
apt-get upgrade -y
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q --force-yes \
|
||||
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
|
||||
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
|
||||
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
|
||||
pkg-config qml-module-qtlocation qml-module-qtpositioning \
|
||||
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
||||
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
||||
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
||||
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev
|
||||
|
||||
- name: build Subsurface-mobile
|
||||
env:
|
||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "building mobile"
|
||||
git config --global user.email "ci@subsurface-divelog.org"
|
||||
git config --global user.name "Subsurface CI"
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||
cd ..
|
||||
bash -e -x subsurface/scripts/build.sh -mobile
|
||||
|
||||
- name: test mobile build
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "running tests for mobile"
|
||||
|
||||
cd build-mobile/tests
|
||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
||||
xvfb-run --auto-servernum make check
|
||||
|
||||
- name: build Subsurface
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "building desktop"
|
||||
|
||||
# now build for the desktop version (including WebKit)
|
||||
cd ..
|
||||
bash -e -x subsurface/scripts/build.sh -desktop -build-with-webkit
|
||||
|
||||
- name: test desktop build
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "running tests for desktop"
|
||||
cd build/tests
|
||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
||||
xvfb-run --auto-servernum make check
|
||||
|
||||
70
.github/workflows/linux-snap.yml
vendored
@ -1,10 +1,14 @@
|
||||
name: Linux Snap
|
||||
name: Snap
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
@ -12,69 +16,65 @@ jobs:
|
||||
Snap:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
SNAPCRAFT_BUILD_INFO: 1
|
||||
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- name: Install Snapcraft
|
||||
uses: samuelmeuli/action-snapcraft@v1
|
||||
|
||||
- name: Setup LXD
|
||||
uses: whywaita/setup-lxd@v1
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# Needed for version determination to work
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: set the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
|
||||
- name: store dummy version and build number for pull request
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo "100" > latest-subsurface-buildnumber
|
||||
echo "CICD-pull-request" > latest-subsurface-buildnumber-extension
|
||||
|
||||
- name: Set up LXD
|
||||
uses: canonical/setup-lxd@main
|
||||
|
||||
- name: Set up CCache
|
||||
id: setup-ccache
|
||||
run: |
|
||||
sudo apt-get install ccache
|
||||
mkdir -p ${HOME}/.ccache
|
||||
ccache --max-size=2G
|
||||
/snap/bin/lxc profile device add default ccache disk source=${HOME}/.ccache/ path=/root/.ccache
|
||||
|
||||
# Patch snapcraft.yaml to enable ccache
|
||||
patch -p1 < .github/workflows/linux-snap.patch
|
||||
patch -p1 < .github/workflows/scripts/linux-snap.patch
|
||||
|
||||
# Find common base between master and HEAD to use as cache key.
|
||||
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules origin master
|
||||
echo "::set-output name=key::$( git merge-base origin/master ${{ github.sha }} )"
|
||||
echo "key=$( git merge-base origin/master $GITHUB_SHA )" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: CCache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ccache-${{ runner.os }}-${{ steps.setup-ccache.outputs.key }}
|
||||
restore-keys: |
|
||||
ccache-${{ runner.os }}-
|
||||
path: ~/.ccache/**
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
# Build the `subsurface` part.
|
||||
/snap/bin/snapcraft build --use-lxd subsurface
|
||||
- name: Build and verify the snap
|
||||
uses: canonical/actions/build-snap@release
|
||||
id: build-snap
|
||||
with:
|
||||
setup-lxd: false
|
||||
|
||||
- name: Clear CCache stats
|
||||
run: ccache --show-stats --zero-stats
|
||||
|
||||
- name: Build and verify the snap
|
||||
id: build-snap
|
||||
env:
|
||||
SNAP_ENFORCE_RESQUASHFS: 0
|
||||
run: |
|
||||
# Actually build the snap.
|
||||
/snap/bin/snapcraft --use-lxd
|
||||
|
||||
sudo snap install review-tools
|
||||
/snap/bin/review-tools.snap-review *.snap
|
||||
|
||||
echo "::set-output name=snap-file::$( ls *.snap )"
|
||||
|
||||
- name: Upload the snap
|
||||
uses: actions/upload-artifact@v2
|
||||
if: github.event_name == 'push'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.build-snap.outputs.snap-file }}
|
||||
path: ${{ steps.build-snap.outputs.snap-file }}
|
||||
name: ${{ steps.build-snap.outputs.snap-name }}
|
||||
path: ${{ steps.build-snap.outputs.snap-path }}
|
||||
if-no-files-found: error
|
||||
|
||||
41
.github/workflows/linux-trusty-5.12.yml
vendored
@ -1,41 +0,0 @@
|
||||
name: Ubuntu 14.04 / Qt 5.12 for AppImage--
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
buildAppImage:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker://subsurface/trusty-qt512:1.1
|
||||
|
||||
steps:
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: run build
|
||||
env:
|
||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||
run: |
|
||||
cd ..
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||
rm -rf /install-root/include/libdivecomputer
|
||||
bash -x subsurface/.github/workflows/scripts/linux-in-container-build.sh
|
||||
|
||||
- name: prepare PR artifacts
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
mkdir -p Linux-artifacts
|
||||
mv Subsurface.AppImage Linux-artifacts
|
||||
|
||||
- name: PR artifacts
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: Linux-artifacts
|
||||
path: Linux-artifacts
|
||||
149
.github/workflows/linux-ubuntu-16.04-5.12-appimage.yml
vendored
Normal file
@ -0,0 +1,149 @@
|
||||
name: Ubuntu 16.04 / Qt 5.15-- for AppImage
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ubuntu:16.04
|
||||
|
||||
steps:
|
||||
- name: get container ready for build
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "update distro and install dependencies"
|
||||
|
||||
apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
||||
software-properties-common
|
||||
|
||||
add-apt-repository -y ppa:savoury1/qt-5-15
|
||||
add-apt-repository -y ppa:savoury1/kde-5-80
|
||||
add-apt-repository -y ppa:savoury1/gpg
|
||||
add-apt-repository -y ppa:savoury1/ffmpeg4
|
||||
add-apt-repository -y ppa:savoury1/vlc3
|
||||
add-apt-repository -y ppa:savoury1/gcc-9
|
||||
add-apt-repository -y ppa:savoury1/display
|
||||
add-apt-repository -y ppa:savoury1/apt-xenial
|
||||
add-apt-repository -y ppa:savoury1/gtk-xenial
|
||||
add-apt-repository -y ppa:savoury1/qt-xenial
|
||||
add-apt-repository -y ppa:savoury1/kde-xenial
|
||||
add-apt-repository -y ppa:savoury1/backports
|
||||
add-apt-repository -y ppa:savoury1/build-tools
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
||||
autoconf automake cmake g++ g++-9 git libcrypto++-dev libcurl4-gnutls-dev \
|
||||
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
|
||||
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
|
||||
pkg-config qml-module-qtlocation qml-module-qtpositioning \
|
||||
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
||||
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
||||
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
||||
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev liblzma-dev \
|
||||
curl
|
||||
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-9
|
||||
|
||||
- name: checkout sources
|
||||
# We cannot update this as glibc on 16.04 is too old for node 20.
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: set the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
|
||||
- name: build Subsurface
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "building desktop"
|
||||
|
||||
# now build the appimage
|
||||
cd ..
|
||||
bash -e -x subsurface/scripts/build.sh -desktop -create-appdir -build-with-webkit
|
||||
|
||||
- name: test desktop build
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "running tests for desktop"
|
||||
cd build/tests
|
||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
||||
xvfb-run --auto-servernum make check
|
||||
|
||||
- name: build appimage
|
||||
env:
|
||||
VERSION: ${{ steps.version_number.outputs.version }}
|
||||
run: |
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "assembling AppImage"
|
||||
|
||||
export QT_PLUGIN_PATH=$QT_ROOT/plugins
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
|
||||
export QT_DEBUG_PLUGINS=1
|
||||
|
||||
cd ..
|
||||
|
||||
# set up the appdir
|
||||
mkdir -p appdir/usr/plugins/
|
||||
|
||||
# mv googlemaps plugins into place
|
||||
mv appdir/usr/usr/lib/x86_64-linux-gnu/qt5/plugins/* appdir/usr/plugins # the usr/usr is not a typo, that's where it ends up
|
||||
rm -rf appdir/usr/home/ appdir/usr/include/ appdir/usr/share/man/ # No need to ship developer and man files as part of the AppImage
|
||||
rm -rf appdir/usr/usr appdir/usr/lib/x86_64-linux-gnu/cmake appdir/usr/lib/pkgconfig
|
||||
cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 appdir/usr/lib/
|
||||
cp /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 appdir/usr/lib/
|
||||
|
||||
# get the linuxdeployqt tool and run it to collect the libraries
|
||||
curl -L -O "https://github.com/probonopd/linuxdeployqt/releases/download/7/linuxdeployqt-7-x86_64.AppImage"
|
||||
chmod a+x linuxdeployqt*.AppImage
|
||||
unset QTDIR
|
||||
unset QT_PLUGIN_PATH
|
||||
unset LD_LIBRARY_PATH
|
||||
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -exclude-libs=libdbus-1.so.3 -bundle-non-qt-libs -qmldir=./subsurface/stats -qmldir=./subsurface/map-widget/ -verbose=2
|
||||
|
||||
# create the AppImage
|
||||
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -exclude-libs=libdbus-1.so.3 -appimage -qmldir=./subsurface/stats -qmldir=./subsurface/map-widget/ -verbose=2
|
||||
|
||||
# copy AppImage to the calling VM
|
||||
# with GitHub Actions the $GITHUB_WORKSPACE directory is the current working directory at the start of a step
|
||||
cp Subsurface*.AppImage* $GITHUB_WORKSPACE/Subsurface-$VERSION.AppImage
|
||||
|
||||
- name: PR artifacts
|
||||
if: github.event_name == 'pull_request'
|
||||
# We cannot update this as glibc on 16.04 is too old for node 20.
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Subsurface-Linux-AppImage-${{ steps.version_number.outputs.version }}
|
||||
path: Subsurface-*.AppImage
|
||||
compression-level: 0
|
||||
|
||||
# only publish a 'release' on push events (those include merging a PR)
|
||||
- name: upload binaries
|
||||
if: github.event_name == 'push'
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: v${{ steps.version_number.outputs.version }}
|
||||
repository: ${{ github.repository_owner }}/nightly-builds
|
||||
token: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
prerelease: false
|
||||
fail_on_unmatched_files: true
|
||||
files: |
|
||||
./Subsurface-*.AppImage
|
||||
19
.github/workflows/linux-ubuntu-20.04-5.15.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: Ubuntu 20.04 / Qt 5.12--
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
do-build-test:
|
||||
uses: ./.github/workflows/linux-debian-generic.yml
|
||||
with:
|
||||
container-image: ubuntu:20.04
|
||||
19
.github/workflows/linux-ubuntu-22.04-5.15.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: Ubuntu 22.04 / Qt 5.15--
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
do-build-test:
|
||||
uses: ./.github/workflows/linux-debian-generic.yml
|
||||
with:
|
||||
container-image: ubuntu:22.04
|
||||
19
.github/workflows/linux-ubuntu-24.04-5.15.yml
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
name: Ubuntu 24.04 / Qt 5.15--
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
do-build-test:
|
||||
uses: ./.github/workflows/linux-debian-generic.yml
|
||||
with:
|
||||
container-image: ubuntu:24.04
|
||||
108
.github/workflows/mac.yml
vendored
@ -1,76 +1,80 @@
|
||||
name: Mac
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
|
||||
jobs:
|
||||
buildMac:
|
||||
runs-on: macOS-latest
|
||||
build:
|
||||
runs-on: macOS-11
|
||||
steps:
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v1
|
||||
- name: setup Homebrew
|
||||
run: brew install autoconf automake libtool xz hidapi libusb libxml2 libxslt libzip openssl pkg-config libgit2 libssh2 libjpg libpng libmtp
|
||||
- name: set our Qt build
|
||||
run: |
|
||||
mkdir -p Qt/5.13.0
|
||||
curl --output Qt-5.13.0-mac.tar.xz https://f002.backblazeb2.com/file/Subsurface-Travis/Qt-5.13.0-mac.tar.xz
|
||||
tar -xJ -C Qt/5.13.0 -f Qt-5.13.0-mac.tar.xz
|
||||
- name: build Subsurface-mobile
|
||||
env:
|
||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||
run: |
|
||||
cd ${GITHUB_WORKSPACE}/..
|
||||
export QT_ROOT=${GITHUB_WORKSPACE}/Qt/5.13.0/clang_64
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
|
||||
export PATH=$QT_ROOT/bin:$PATH
|
||||
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
|
||||
DIR=$(pwd)
|
||||
git config --global user.email "ci@subsurface-divelog.org"
|
||||
git config --global user.name "Subsurface CI"
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||
# first build Subsurface-mobile to ensure this didn't get broken
|
||||
bash -e -x ./subsurface/scripts/build.sh -mobile
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: test mobile build
|
||||
run: |
|
||||
echo "------------------------------------"
|
||||
echo "run tests for mobile build"
|
||||
export QT_ROOT=${GITHUB_WORKSPACE}/Qt/5.13.0/clang_64
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
|
||||
cd ${GITHUB_WORKSPACE}/build-mobile/tests
|
||||
# ./TestGitStorage -v2
|
||||
make check
|
||||
- name: setup Homebrew
|
||||
run: brew install hidapi libxslt libjpg libmtp create-dmg confuse
|
||||
|
||||
- name: checkout Qt resources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: subsurface/qt-mac
|
||||
ref: main
|
||||
path: qt-mac
|
||||
|
||||
- name: set the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
|
||||
- name: build Subsurface
|
||||
id: build
|
||||
run: |
|
||||
cd ${GITHUB_WORKSPACE}/..
|
||||
export QT_ROOT=${GITHUB_WORKSPACE}/Qt/5.13.0/clang_64
|
||||
export QT_ROOT=${GITHUB_WORKSPACE}/qt-mac/Qt5.15.13
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
|
||||
export PATH=$QT_ROOT/bin:$PATH
|
||||
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
|
||||
DIR=$(pwd)
|
||||
|
||||
# now Subsurface with WebKit
|
||||
bash -e -x ./subsurface/scripts/build.sh -desktop -build-with-webkit -release
|
||||
# now setup Subsurface with WebKit and build the dependencies, using the generic build script
|
||||
bash -e -x ./subsurface/scripts/build.sh -desktop -build-with-webkit -release -build-deps -ftdi -prep-only
|
||||
|
||||
cd ${GITHUB_WORKSPACE}/build
|
||||
echo "finished initial cmake setup of Subsurface - next build the package"
|
||||
cd subsurface/build
|
||||
echo "run the packaging script"
|
||||
bash -e -x ../packaging/macosx/make-package.sh | tee mp.log 2>&1
|
||||
IMG=$(grep ^created: mp.log | tail -1 | cut -b10-)
|
||||
echo "Created $IMG"
|
||||
echo "dmg=$IMG" >> $GITHUB_OUTPUT
|
||||
|
||||
# build export-html to make sure that didn't get broken
|
||||
make export-html
|
||||
|
||||
- name: test desktop build
|
||||
run: |
|
||||
echo "------------------------------------"
|
||||
echo "run tests for desktop build"
|
||||
export QT_ROOT=${GITHUB_WORKSPACE}/Qt/5.13.0/clang_64
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
|
||||
cd ${GITHUB_WORKSPACE}/build/tests
|
||||
# ./TestGitStorage -v2
|
||||
make check
|
||||
- name: publish pull request artifacts
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Subsurface-MacOS-${{ steps.version_number.outputs.version }}
|
||||
path: ${{ steps.build.outputs.dmg }}
|
||||
compression-level: 0
|
||||
|
||||
# only publish a 'release' on push events (those include merging a PR)
|
||||
- name: upload binaries
|
||||
if: github.event_name == 'push'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: v${{ steps.version_number.outputs.version }}
|
||||
repository: ${{ github.repository_owner }}/nightly-builds
|
||||
token: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
prerelease: false
|
||||
fail_on_unmatched_files: true
|
||||
files: ${{ steps.build.outputs.dmg }}
|
||||
|
||||
45
.github/workflows/post-releasenotes.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
name: Post Release Notes
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
postRelease:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: set the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
|
||||
# since we are running this step on a pull request, we will skip build numbers in releases
|
||||
- name: assemble release notes
|
||||
env:
|
||||
EVENT_HEAD_COMMIT_ID: ${{ github.event.head_commit.id }}
|
||||
# Required because we are using the GitHub CLI in 'create-releasenotes.sh'
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
scripts/create-releasenotes.sh $EVENT_HEAD_COMMIT_ID
|
||||
|
||||
# add a file containing the release title so it can be picked up and listed on the release page on our web server
|
||||
- name: publish release
|
||||
if: github.event_name == 'push'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: v${{ steps.version_number.outputs.version }}
|
||||
repository: ${{ github.repository_owner }}/nightly-builds
|
||||
token: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
prerelease: false
|
||||
files: release_content_title.txt
|
||||
body_path: gh_release_notes.md
|
||||
8
.github/workflows/scripts/check_usns.py
vendored
@ -23,17 +23,19 @@ logger.setLevel(logging.INFO)
|
||||
|
||||
APPLICATION = "subsurface-ci"
|
||||
LAUNCHPAD = "production"
|
||||
RELEASE = "bionic"
|
||||
TEAM = "subsurface"
|
||||
SOURCE_NAME = "subsurface"
|
||||
SNAPS = {
|
||||
"subsurface": {"stable": {"recipe": "subsurface-stable"}},
|
||||
"subsurface": {
|
||||
"stable": {"recipe": "subsurface-stable"},
|
||||
},
|
||||
}
|
||||
|
||||
STORE_URL = "https://api.snapcraft.io/api/v1/snaps" "/details/{snap}?channel={channel}"
|
||||
STORE_HEADERS = {"X-Ubuntu-Series": "16", "X-Ubuntu-Architecture": "{arch}"}
|
||||
|
||||
CHECK_NOTICES_PATH = "/snap/bin/review-tools.check-notices"
|
||||
CHECK_NOTICES_ARGS = ["--ignore-pockets", "esm-apps"]
|
||||
|
||||
|
||||
def get_store_snap(processor, snap, channel):
|
||||
@ -76,7 +78,7 @@ def check_snap_notices(store_snaps):
|
||||
)
|
||||
|
||||
try:
|
||||
notices = subprocess.check_output([CHECK_NOTICES_PATH] + snaps, encoding="UTF-8")
|
||||
notices = subprocess.check_output([CHECK_NOTICES_PATH] + CHECK_NOTICES_ARGS + snaps, encoding="UTF-8")
|
||||
logger.debug("Got check_notices output:\n%s", notices)
|
||||
except subprocess.CalledProcessError as e:
|
||||
logger.error("Failed to check notices:\n%s", e.output)
|
||||
|
||||
@ -1,58 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
# this gets executed by the GitHub Action when building an AppImage for Linux
|
||||
# inside of the trusty-qt512 container
|
||||
|
||||
export PATH=$QT_ROOT/bin:$PATH # Make sure correct qmake is found on the $PATH for linuxdeployqt
|
||||
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
|
||||
|
||||
# echo "--------------------------------------------------------------"
|
||||
# echo "install missing packages"
|
||||
# apt install -y libbluetooth-dev libmtp-dev
|
||||
|
||||
# the container currently has things under / that need to be under /__w/subsurface/subsurface instead
|
||||
cp -a /appdir /__w/subsurface/
|
||||
cp -a /install-root /__w/subsurface/
|
||||
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "building desktop"
|
||||
|
||||
# now build our AppImage
|
||||
bash -e -x subsurface/scripts/build.sh -desktop -create-appdir -build-with-webkit -quick
|
||||
|
||||
echo "--------------------------------------------------------------"
|
||||
echo "assembling AppImage"
|
||||
|
||||
export QT_PLUGIN_PATH=$QT_ROOT/plugins
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
|
||||
export QT_DEBUG_PLUGINS=1
|
||||
|
||||
# set up the appdir
|
||||
mkdir -p appdir/usr/plugins/
|
||||
|
||||
# mv googlemaps plugins into place
|
||||
mv appdir/usr/usr/local/Qt/5.*/gcc_64/plugins/* appdir/usr/plugins # the usr/usr is not a typo, that's where it ends up
|
||||
rm -rf appdir/usr/home/ appdir/usr/include/ appdir/usr/share/man/ # No need to ship developer and man files as part of the AppImage
|
||||
rm -rf appdir/usr/usr appdir/usr/lib/cmake appdir/usr/lib/pkgconfig
|
||||
cp /ssllibs/libssl.so appdir/usr/lib/libssl.so.1.1
|
||||
cp /ssllibs/libcrypto.so appdir/usr/lib/libcrypto.so.1.1
|
||||
|
||||
# get the linuxdeployqt tool and run it to collect the libraries
|
||||
curl -L -O "https://github.com/probonopd/linuxdeployqt/releases/download/7/linuxdeployqt-7-x86_64.AppImage"
|
||||
chmod a+x linuxdeployqt*.AppImage
|
||||
unset QTDIR
|
||||
unset QT_PLUGIN_PATH
|
||||
unset LD_LIBRARY_PATH
|
||||
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -exclude-libs=libdbus-1.so.3 -bundle-non-qt-libs -qmldir=./subsurface/stats -qmldir=./subsurface/map-widget/ -verbose=2
|
||||
|
||||
# create the AppImage
|
||||
export VERSION=$(cd subsurface/scripts ; ./get-version linux) # linuxdeployqt uses this for naming the file
|
||||
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -exclude-libs=libdbus-1.so.3 -appimage -qmldir=./subsurface/stats -qmldir=./subsurface/map-widget/ -verbose=2
|
||||
|
||||
# copy AppImage to the calling VM
|
||||
# with GitHub Actions the /${GITHUB_WORKSPACE} directory is the current working directory at the start of a step
|
||||
cp Subsurface*.AppImage* /${GITHUB_WORKSPACE}/Subsurface.AppImage
|
||||
ls -l /${GITHUB_WORKSPACE}/Subsurface.AppImage
|
||||
@ -1,22 +1,24 @@
|
||||
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
|
||||
index 9f34d0169..0d5a89fd9 100644
|
||||
--- a/snap/snapcraft.yaml
|
||||
+++ b/snap/snapcraft.yaml
|
||||
@@ -35,6 +35,7 @@ parts:
|
||||
googlemaps:
|
||||
source: https://github.com/Subsurface/googlemaps.git
|
||||
plugin: make
|
||||
build-packages:
|
||||
+ - ccache
|
||||
- qtbase5-dev
|
||||
- wget
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
@@ -78,6 +79,7 @@ parts:
|
||||
plugin: qmake
|
||||
qmake-parameters:
|
||||
- INCLUDEPATH+=QtHeaders
|
||||
+ - CONFIG+=ccache
|
||||
@@ -79,6 +80,7 @@ parts:
|
||||
override-build: |
|
||||
qmake \
|
||||
INCLUDEPATH+=${CRAFT_PART_SRC}/QtHeaders \
|
||||
+ CONFIG+=ccache \
|
||||
${CRAFT_PART_SRC}
|
||||
craftctl default
|
||||
|
||||
desktop-qt5:
|
||||
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
|
||||
@@ -108,7 +110,11 @@ parts:
|
||||
@@ -111,7 +113,11 @@ parts:
|
||||
source: .
|
||||
source-type: git
|
||||
source-subdir: libdivecomputer
|
||||
@ -28,13 +30,12 @@
|
||||
- libbluetooth-dev
|
||||
- libhidapi-dev
|
||||
- libusb-dev
|
||||
@@ -131,9 +137,12 @@ parts:
|
||||
@@ -134,8 +140,11 @@ parts:
|
||||
- -DFTDISUPPORT=ON
|
||||
- -DLIBDIVECOMPUTER_LIBRARIES=../../../stage/usr/local/lib/libdivecomputer.so
|
||||
- -DLIBDIVECOMPUTER_INCLUDE_DIR=../../../stage/usr/local/include
|
||||
+ - -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||
+ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
source-type: git
|
||||
build-packages:
|
||||
- build-essential
|
||||
+ - ccache
|
||||
15
.github/workflows/snap_usns.yml
vendored
@ -1,33 +1,34 @@
|
||||
name: SnapUSNs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 5 * * *'
|
||||
|
||||
jobs:
|
||||
CheckUSNs:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install Python dependencies
|
||||
uses: BSFishy/pip-action@v1
|
||||
uses: insightsengineering/pip-action@v2.0.0
|
||||
with:
|
||||
requirements: .github/workflows/scripts/requirements.txt
|
||||
|
||||
- name: Install Snap dependencies
|
||||
run: |
|
||||
sudo snap install review-tools
|
||||
sudo snap install review-tools --edge
|
||||
|
||||
- name: Set up Launchpad credentials
|
||||
uses: DamianReeves/write-file-action@v1.0
|
||||
uses: DamianReeves/write-file-action@v1.2
|
||||
with:
|
||||
path: lp_credentials
|
||||
contents: ${{ secrets.LAUNCHPAD_CREDENTIALS }}
|
||||
|
||||
55
.github/workflows/ubuntu-launchpad-build.yml
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
name: Ubuntu Launchpad Build
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
- current
|
||||
|
||||
jobs:
|
||||
push-to-ppa:
|
||||
|
||||
name: Submit build to Ubuntu Launchpad
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: set the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
|
||||
- name: Setup build dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y devscripts dput gpg debhelper qt5-qmake cmake
|
||||
|
||||
- name: Setup gpg key token for launchpad
|
||||
env:
|
||||
GPG_PRIVATE_KEY: ${{ secrets.PPA_SECRET_KEY }}
|
||||
run: |
|
||||
echo "$GPG_PRIVATE_KEY" > ~/.key
|
||||
gpg --import ~/.key
|
||||
|
||||
- name: setup git
|
||||
run: |
|
||||
git config --global --add safe.directory /__w/subsurface/subsurface
|
||||
git config --global --add safe.directory /__w/subsurface/subsurface/libdivecomputer
|
||||
|
||||
- name: Checkout googlemaps
|
||||
run: |
|
||||
cd ..
|
||||
git clone https://github.com/subsurface/googlemaps
|
||||
|
||||
- name: run the launchpad make-package script
|
||||
run: |
|
||||
cd ..
|
||||
bash -x subsurface/packaging/ubuntu/make-package.sh $GITHUB_REF_NAME
|
||||
|
||||
38
.github/workflows/windows-mxe-dockerimage.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: Windows (MXE) Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- scripts/docker/mxe-build-container/**
|
||||
- .github/workflows/windows-mxe-dockerimage.yml
|
||||
|
||||
jobs:
|
||||
windows-mxe:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
VERSION: ${{ '3.1.0' }} # 'official' images should have a dot-zero version
|
||||
mxe_sha: 'c0bfefc57a00fdf6cb5278263e21a478e47b0bf5'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build the name for the docker image
|
||||
id: build_name
|
||||
run: |
|
||||
v=$VERSION
|
||||
b=$GITHUB_REF # -BRANCH suffix, unless the branch is master
|
||||
b=${b/refs\/heads\//}
|
||||
b=${b,,} # the name needs to be all lower case
|
||||
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
|
||||
echo "NAME=$GITHUB_REPOSITORY_OWNER/mxe-build${b}:${v}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and Publish Linux Docker image to Dockerhub
|
||||
uses: elgohr/Publish-Docker-Github-Action@v5
|
||||
with:
|
||||
name: ${{ steps.build_name.outputs.NAME }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
workdir: './scripts/docker/mxe-build-container/'
|
||||
buildargs: mxe_sha
|
||||
56
.github/workflows/windows.yml
vendored
@ -1,21 +1,35 @@
|
||||
name: Windows
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- scripts/docker/**
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
buildWindows:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker://subsurface/mxe-build-container:2.2
|
||||
image: docker://subsurface/mxe-build:3.1.0
|
||||
|
||||
steps:
|
||||
- name: checkout sources
|
||||
uses: actions/checkout@v1
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: set the version information
|
||||
id: version_number
|
||||
uses: ./.github/actions/manage-version
|
||||
with:
|
||||
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
|
||||
- name: get other dependencies
|
||||
env:
|
||||
@ -26,22 +40,34 @@ jobs:
|
||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||
cd /win
|
||||
ln -s /__w/subsurface/subsurface .
|
||||
bash -x subsurface/.github/workflows/scripts/windows-container-prep.sh 2>&1 | tee pre-build.log
|
||||
bash -x subsurface/packaging/windows/container-prep.sh 2>&1 | tee pre-build.log
|
||||
|
||||
- name: run build
|
||||
run: |
|
||||
export OUTPUT_DIR="$GITHUB_WORKSPACE"
|
||||
cd /win
|
||||
bash -x subsurface/.github/workflows/scripts/windows-in-container-build.sh 2>&1 | tee build.log
|
||||
bash -x subsurface/packaging/windows/in-container-build.sh 2>&1 | tee build.log
|
||||
grep "Built target installer" build.log
|
||||
|
||||
- name: prepare PR artifacts
|
||||
- name: publish pull request artifacts
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
mkdir -p Windows-artifacts
|
||||
mv ./subsurface-installer.exe ./subsurface.exe ./subsurface.exe.debug ./smtk2ssrf-installer.exe ./smtk2ssrf.exe Windows-artifacts
|
||||
|
||||
- name: PR artifacts
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/upload-artifact@master
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Windows-artifacts
|
||||
path: Windows-artifacts
|
||||
name: Subsurface-Windows-${{ steps.version_number.outputs.version }}
|
||||
path: |
|
||||
subsurface*.exe*
|
||||
smtk2ssrf*.exe
|
||||
|
||||
# only publish a 'release' on push events (those include merging a PR)
|
||||
- name: upload binaries
|
||||
if: github.event_name == 'push'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: v${{ steps.version_number.outputs.version }}
|
||||
repository: ${{ github.repository_owner }}/nightly-builds
|
||||
token: ${{ secrets.NIGHTLY_BUILDS }}
|
||||
prerelease: false
|
||||
fail_on_unmatched_files: true
|
||||
files: |
|
||||
./subsurface*.exe*
|
||||
./smtk2ssrf*.exe
|
||||
|
||||
9
.gitignore
vendored
@ -35,9 +35,18 @@ Subsurface.app
|
||||
.DS_Store
|
||||
!android/**/*.xml
|
||||
build*
|
||||
nightly-builds/
|
||||
mobile-widgets/qml/kirigami
|
||||
mobile-widgets/3rdparty/ECM/
|
||||
mobile-widgets/3rdparty/breeze-icons/
|
||||
mobile-widgets/3rdparty/extra-cmake-modules/
|
||||
mobile-widgets/3rdparty/kirigami/
|
||||
packaging/ios/install-root
|
||||
packaging/ios/Info.plist
|
||||
packaging/ios/Qt
|
||||
packaging/ios/asset_catalog_compiler.Info.plist
|
||||
appdata/subsurface.appdata.xml
|
||||
android-mobile/Roboto-Regular.ttf
|
||||
gh_release_notes.md
|
||||
release_content_title.txt
|
||||
/output/
|
||||
|
||||
43
CHANGELOG.md
@ -1,3 +1,46 @@
|
||||
statistics: show proper dates in January
|
||||
desktop: add country to the fields indexed for full text search
|
||||
import: update libdivecomputer version, add support for the Scubapro G3 / Luna and Shearwater Tern
|
||||
desktop: add a button linking to the 'Contribute' page
|
||||
mobile: fix configuration of decompression ceiling and gradient factors
|
||||
desktop: fix gas switches in UDDF exports
|
||||
core: allow of up to 6 O2 sensors (and corresponding voting logic)
|
||||
desktop: add divemode as a possible dive list column
|
||||
profile-widget: Now zomed in profiles can be panned with horizontal scroll.
|
||||
desktop: hide only events with the same severity when 'Hide similar events' is used
|
||||
equipment: mark gas mixes reported by the dive computer as 'inactive' as 'not used'
|
||||
equipment: include unused cylinders in merged dive if the preference is enabled
|
||||
equipment: fix bug showing the first diluent in the gas list as 'used' for CCR dives
|
||||
desktop: added button to hide the infobox in the dive profile
|
||||
desktop: use persisted device information for the dive computer configuration
|
||||
core: fix bug using salinity and pressure values in mbar <-> depth conversion
|
||||
export: fix bug resulting in invalid CSV for '""' in 'CSV summary dive details'
|
||||
desktop: add support for multiple tanks to the profile ruler
|
||||
export: change format produced by 'CSV summary dive details' from TSV (tab separated) to CSV
|
||||
desktop: add function to merge dive site into site selected in list
|
||||
import: add option to synchronise dive computer time when downloading dives
|
||||
desktop: fix salinity combo/icon when DC doesnt have salinity info
|
||||
core: fix bug when save sea water salinity given by DC
|
||||
desktop: add option to force firmware update on OSTC4
|
||||
desktop: add column for dive notes to the dive list table
|
||||
desktop: Add an option for printing in landscape mode
|
||||
desktop: fix bug when printing a dive plan with multiple segments
|
||||
desktop: fix remembering of bluetooth address for remembered dive computers (not MacOS)
|
||||
desktop: fix bug in bailout gas selection for CCR dives
|
||||
desktop: fix crash on cylinder update of multiple dives
|
||||
desktop: use dynamic tank use drop down in equipment tab and planner
|
||||
desktop: fix brightness configuration for OSTC4
|
||||
equipment: Use 'diluent' as default gas use type if the dive mode is 'CCR'
|
||||
htmlexport: fix search in HTML export
|
||||
htmlexport: fix diveguide display
|
||||
statistics: fix value axis for degenerate value ranges
|
||||
profile: Show correct gas density when in CCR mode
|
||||
statistics: show correct color of selected scatter items when switching to unbinned mode
|
||||
statistics: fix display of month number in continuous date axis
|
||||
statistics: fix range of continuous date axis
|
||||
desktop: fix dive time display in time shift dialog
|
||||
libdivecomputer: garmin: relax string parsing sanity checks
|
||||
libdivecomputer: add Cressi Donatello, Scubapro G2 TEK, Oceanic Geo Air, Scorpena Alpha
|
||||
|
||||
---
|
||||
* Always add new entries at the very top of this file above other existing entries and this note.
|
||||
|
||||
@ -124,8 +124,8 @@ if (SUBSURFACE_ASAN_BUILD)
|
||||
endif()
|
||||
|
||||
# every compiler understands -Wall
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror=format")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=format")
|
||||
|
||||
# by detault optimize with -O2 even for debug builds
|
||||
set (GCC_OPTIMIZATION_FLAGS "-O2" CACHE STRING "GCC optimization flags")
|
||||
@ -320,7 +320,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
execute_process(
|
||||
COMMAND sh scripts/get-version linux
|
||||
COMMAND bash scripts/get-version.sh
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE SSRF_VERSION_STRING
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
@ -493,7 +493,6 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
|
||||
subsurface_generated_ui
|
||||
subsurface_interface
|
||||
subsurface_profile
|
||||
subsurface_statistics
|
||||
${SUBSURFACE_MAPWIDGET}
|
||||
subsurface_backend_shared
|
||||
subsurface_models_desktop
|
||||
@ -503,7 +502,6 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DesktopExecutable")
|
||||
${SUBSURFACE_LINK_LIBRARIES}
|
||||
)
|
||||
add_dependencies(subsurface_desktop_preferences subsurface_generated_ui)
|
||||
add_dependencies(subsurface_statistics subsurface_generated_ui)
|
||||
add_dependencies(subsurface_interface subsurface_generated_ui)
|
||||
add_dependencies(subsurface_profile subsurface_generated_ui)
|
||||
add_dependencies(subsurface_models_desktop subsurface_generated_ui)
|
||||
@ -547,7 +545,6 @@ set(DOCFILES
|
||||
${CMAKE_BINARY_DIR}/Documentation/user-manual.html
|
||||
${CMAKE_BINARY_DIR}/Documentation/user-manual_es.html
|
||||
${CMAKE_BINARY_DIR}/Documentation/user-manual_fr.html
|
||||
${CMAKE_BINARY_DIR}/Documentation/user-manual_ru.html
|
||||
)
|
||||
|
||||
# add all the translations that we may need
|
||||
@ -723,8 +720,8 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
endif()
|
||||
install(FILES subsurface.debug DESTINATION bin)
|
||||
install(FILES subsurface.desktop DESTINATION share/applications)
|
||||
install(CODE "execute_process(COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/add-version-to-appdata.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})")
|
||||
install(FILES appdata/subsurface.appdata.xml DESTINATION share/metainfo)
|
||||
install(CODE "execute_process(COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/add-version-to-metainfo.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})")
|
||||
install(FILES metainfo/subsurface.metainfo.xml DESTINATION share/metainfo)
|
||||
install(FILES icons/subsurface-icon.svg DESTINATION share/icons/hicolor/scalable/apps)
|
||||
install(DIRECTORY Documentation/images DESTINATION share/subsurface/Documentation)
|
||||
install(FILES ${DOCFILES} DESTINATION share/subsurface/Documentation)
|
||||
|
||||
224
CODINGSTYLE.md
@ -6,11 +6,11 @@ not yet fully consistent to these rules, but following these rules will make
|
||||
sure that no one yells at you about your patches.
|
||||
|
||||
We have a script that can be used to reformat code to be reasonably close
|
||||
to these rules; it's in scripts/whitespace.pl - this script requires
|
||||
to these rules; it's in `scripts/whitespace.pl` – this script requires
|
||||
clang-format to be installed (which sadly isn't installed by default on
|
||||
any of our platforms; even on Mac where clang is the default compiler).
|
||||
|
||||
At the end of this file are some ideas for your .emacs file (if that's
|
||||
At the end of this file are some ideas for your `.emacs` file (if that's
|
||||
your editor of choice) as well as for QtCreator. If you have settings for
|
||||
other editors that implement this coding style, please add them here.
|
||||
|
||||
@ -21,14 +21,14 @@ other editors that implement this coding style, please add them here.
|
||||
|
||||
* all keywords followed by a '(' have a space in between
|
||||
```
|
||||
if (condition)
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
if (condition)
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
```
|
||||
|
||||
* function calls do NOT have a space between their name and argument
|
||||
```
|
||||
i = some_function(argument);
|
||||
i = some_function(argument);
|
||||
```
|
||||
|
||||
* usually there is no space on the inside of parenthesis (see examples
|
||||
@ -40,63 +40,64 @@ other editors that implement this coding style, please add them here.
|
||||
* all other opening curly braces follow at the end of the line, with a
|
||||
space separating them:
|
||||
```
|
||||
if (condition) {
|
||||
dosomething();
|
||||
dosomethingelse();
|
||||
}
|
||||
if (condition) {
|
||||
dosomething();
|
||||
dosomethingelse();
|
||||
}
|
||||
```
|
||||
|
||||
* both sides of an if / else clause either use or do not use curly braces:
|
||||
* both sides of an `if` / `else` clause either use or do not use curly braces:
|
||||
```
|
||||
if (condition)
|
||||
i = 4;
|
||||
else
|
||||
j = 6;
|
||||
|
||||
if (condition) {
|
||||
i = 6;
|
||||
} else {
|
||||
i = 4;
|
||||
j = 6;
|
||||
}
|
||||
if (condition)
|
||||
i = 4;
|
||||
else
|
||||
j = 6;
|
||||
|
||||
if (condition) {
|
||||
i = 6;
|
||||
} else {
|
||||
i = 4;
|
||||
j = 6;
|
||||
}
|
||||
```
|
||||
|
||||
* use space to make visual separation easier
|
||||
```
|
||||
a = b + 3 + e / 4;
|
||||
a = b + 3 + e / 4;
|
||||
```
|
||||
|
||||
* continuation lines have the operator / comma at the end
|
||||
```
|
||||
if (very_long_condition_1 ||
|
||||
condition_2)
|
||||
|
||||
b = a + (c + d +
|
||||
f + z);
|
||||
if (very_long_condition_1 ||
|
||||
condition_2)
|
||||
|
||||
b = a + (c + d +
|
||||
f + z);
|
||||
```
|
||||
|
||||
* in a C++ constructor initialization list, the colon is on the same line and
|
||||
continuation lines are aligned as the rule above:
|
||||
```
|
||||
ClassName::ClassName() : x(1),
|
||||
y(2),
|
||||
z(3)
|
||||
{
|
||||
}
|
||||
ClassName::ClassName() : x(1),
|
||||
y(2),
|
||||
z(3)
|
||||
{
|
||||
}
|
||||
```
|
||||
|
||||
* unfortunate inconsistency
|
||||
|
||||
- C code usually uses underscores to structure names
|
||||
```
|
||||
variable_in_C
|
||||
variable_in_C
|
||||
```
|
||||
- In contrast, C++ code usually uses camelCase
|
||||
```
|
||||
variableInCPlusPlus
|
||||
variableInCPlusPlus
|
||||
```
|
||||
for variable names and PascalCase
|
||||
```
|
||||
ClassInCPlusPlus
|
||||
ClassInCPlusPlus
|
||||
```
|
||||
for names of classes and other types
|
||||
|
||||
@ -124,33 +125,34 @@ other editors that implement this coding style, please add them here.
|
||||
case. Where it seems appropriate, multiple, closely related classes can be
|
||||
in a single file with a more generic name.
|
||||
|
||||
* switch statements with blocks are a little bit special (to avoid indenting
|
||||
* `switch` statements with blocks are a little bit special (to avoid indenting
|
||||
too far)
|
||||
```
|
||||
switch (foo) {
|
||||
case FIRST:
|
||||
whatever();
|
||||
break;
|
||||
case SECOND: {
|
||||
int i;
|
||||
for (i = 0; i < 5; i++)
|
||||
do_something(i);
|
||||
}
|
||||
}
|
||||
switch (foo) {
|
||||
case FIRST:
|
||||
whatever();
|
||||
break;
|
||||
case SECOND: {
|
||||
int i;
|
||||
for (i = 0; i < 5; i++)
|
||||
do_something(i);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Coding conventions
|
||||
|
||||
* variable declarations
|
||||
|
||||
In C code we really like them to be at the beginning of a code block,
|
||||
not interspersed in the middle.
|
||||
in C++ we are a bit less strict about this - but still, try not to go
|
||||
in C++ we are a bit less strict about this – but still, try not to go
|
||||
crazy. Notably, in C++ the lifetime of a variable often coincides with the
|
||||
lifetime of a resource (e.g. file) and therefore the variable is defined
|
||||
at the place where the resource is needed.
|
||||
|
||||
* The `*`, `&` and `&&` declarators are grouped with the name, not the type
|
||||
(classical C-style) as in `char *string` instead of `char* string`. This
|
||||
(classical C-style) as in `char *string` instead of `char* string`. This
|
||||
reflects the precedence rules of the language: `int &i` means that the name
|
||||
`i` stands for a reference [to an object with type `int`], not that
|
||||
`i` stands for an object of the type [reference to `int`].
|
||||
@ -158,84 +160,85 @@ other editors that implement this coding style, please add them here.
|
||||
have the same effect) it is crucial in the
|
||||
definition of multiple variables, such
|
||||
as
|
||||
```
|
||||
struct dive *next, **pprev;
|
||||
```
|
||||
```
|
||||
struct dive *next, **pprev;
|
||||
```
|
||||
|
||||
* In C++ code, we generally use explicit types in variable declarations for clarity.
|
||||
Use `auto` sparingly and only in cases where code readability improves.
|
||||
Two classical examples are:
|
||||
- Iterators, whose type names often are verbose:
|
||||
```
|
||||
auto it = m_trackers.find(when);
|
||||
```
|
||||
is not only distinctly shorter than
|
||||
```
|
||||
QMap<qint64, gpsTracker>::iterator it = m_trackers.find(when);
|
||||
```
|
||||
it will also continue working if a different data structure is chosen.
|
||||
```
|
||||
auto it = m_trackers.find(when);
|
||||
```
|
||||
is not only distinctly shorter than
|
||||
```
|
||||
QMap<qint64, gpsTracker>::iterator it = m_trackers.find(when);
|
||||
```
|
||||
it will also continue working if a different data structure is chosen.
|
||||
- If the type is given in the same line anyway. Thus,
|
||||
```
|
||||
auto service = qobject_cast<QLowEnergyService*>(sender());
|
||||
```
|
||||
is easier to read than and conveys the same information as
|
||||
```
|
||||
QLowEnergyService *service = qobject_cast<QLowEnergyService*>(sender());
|
||||
```
|
||||
```
|
||||
auto service = qobject_cast<QLowEnergyService*>(sender());
|
||||
```
|
||||
is easier to read than and conveys the same information as
|
||||
```
|
||||
QLowEnergyService *service = qobject_cast<QLowEnergyService*>(sender());
|
||||
```
|
||||
- If the variable is a container that is only assigned to a local variable to
|
||||
be able to use it in a range-based for loop
|
||||
```
|
||||
const auto l = device.serviceUuids();
|
||||
for (QBluetoothUuid id: serviceUuids) {
|
||||
```
|
||||
The variable has also to be const to avoid that Qt containers will do a
|
||||
deep copy when the range bases for loop will call the begin() method
|
||||
internally.
|
||||
be able to use it in a range-based `for` loop
|
||||
```
|
||||
const auto serviceUuids = device.serviceUuids();
|
||||
for (QBluetoothUuid id: serviceUuids) {
|
||||
```
|
||||
The variable has also to be const to avoid that Qt containers will do a
|
||||
deep copy when the range bases `for` loop will call the `begin()` method
|
||||
internally.
|
||||
|
||||
* text strings
|
||||
|
||||
The default language of subsurface is US English so please use US English
|
||||
spelling and terminology.
|
||||
User-visible strings should be passed to the tr() function to enable
|
||||
User-visible strings should be passed to the `tr()` function to enable
|
||||
translation into other languages.
|
||||
- like this
|
||||
```
|
||||
QString msgTitle = tr("Check for updates.");
|
||||
QString msgTitle = tr("Check for updates.");
|
||||
```
|
||||
- rather than
|
||||
```
|
||||
QString msgTitle = "Check for updates.";
|
||||
QString msgTitle = "Check for updates.";
|
||||
```
|
||||
|
||||
This works by default in classes (indirectly) derived from QObject. Each
|
||||
This works by default in classes (indirectly) derived from `QObject`. Each
|
||||
string to be translated is associated with a context, which corresponds
|
||||
to the class name. Classes that are not derived from QObject can generate
|
||||
the tr() functions by using the `Q_DECLARE_TR_FUNCTIONS` macro:
|
||||
to the class name. Classes that are not derived from `QObject` can generate
|
||||
the `tr()` functions by using the `Q_DECLARE_TR_FUNCTIONS` macro:
|
||||
```
|
||||
#include <QCoreApplication>
|
||||
|
||||
class myClass {
|
||||
Q_DECLARE_TR_FUNCTIONS(gettextfromC)
|
||||
...
|
||||
};
|
||||
#include <QCoreApplication>
|
||||
|
||||
class myClass {
|
||||
Q_DECLARE_TR_FUNCTIONS(gettextfromC)
|
||||
...
|
||||
};
|
||||
```
|
||||
|
||||
As an alternative, which also works outside of class context, the tr()
|
||||
As an alternative, which also works outside of class context, the `tr()`
|
||||
function of a different class can be called. This avoids creating multiple
|
||||
translations for the same string:
|
||||
```
|
||||
gettextFromC::tr("%1km")
|
||||
gettextFromC::tr("%1km")
|
||||
```
|
||||
|
||||
The gettextFromC class in the above example was created as a catch-all
|
||||
The `gettextFromC` class in the above example was created as a catch-all
|
||||
context for translations accessed in C code. But it can also be used
|
||||
from C++ helper functions. To use it from C, include the "core/gettext.h"
|
||||
header and invoke the translate() macro:
|
||||
from C++ helper functions. To use it from C, include the `"core/gettext.h"`
|
||||
header and invoke the `translate()` macro:
|
||||
```
|
||||
#include "core/gettext.h"
|
||||
|
||||
report_error(translate("gettextFromC", "Remote storage and local data diverged"));
|
||||
#include "core/gettext.h"
|
||||
|
||||
report_error(translate("gettextFromC", "Remote storage and local data diverged"));
|
||||
```
|
||||
It is crucial to pass "gettextFromC" as a first macro argument so that Qt
|
||||
It is crucial to pass `"gettextFromC"` as a first macro argument so that Qt
|
||||
is able to associate the string with the correct context.
|
||||
The translate macro returns a cached C-style string, which is generated at runtime
|
||||
when the particular translation string is encountered for the first time.
|
||||
@ -244,19 +247,20 @@ other editors that implement this coding style, please add them here.
|
||||
Outside of function context, the `QT_TRANSLATE_NOOP` macro can be used as in
|
||||
```
|
||||
struct ws_info_t ws_info[100] = {
|
||||
{ QT_TRANSLATE_NOOP("gettextFromC", "integrated"), 0 },
|
||||
{ QT_TRANSLATE_NOOP("gettextFromC", "belt"), 0 },
|
||||
{ QT_TRANSLATE_NOOP("gettextFromC", "ankle"), 0 },
|
||||
{ QT_TRANSLATE_NOOP("gettextFromC", "backplate"), 0 },
|
||||
{ QT_TRANSLATE_NOOP("gettextFromC", "clip-on"), 0 },
|
||||
{ QT_TRANSLATE_NOOP("gettextFromC", "integrated"), 0 },
|
||||
{ QT_TRANSLATE_NOOP("gettextFromC", "belt"), 0 },
|
||||
{ QT_TRANSLATE_NOOP("gettextFromC", "ankle"), 0 },
|
||||
{ QT_TRANSLATE_NOOP("gettextFromC", "backplate"), 0 },
|
||||
{ QT_TRANSLATE_NOOP("gettextFromC", "clip-on"), 0 },
|
||||
};
|
||||
```
|
||||
Note that here, the texts will be scheduled for translation with the "gettextFromC"
|
||||
Note that here, the texts will be scheduled for translation with the `"gettextFromC"`
|
||||
context, but the array is only initialized with the original text. The actual
|
||||
translation has to be performed later in code. For C-code, the `QT_TRANSLATE_NOOP`
|
||||
macro is defined in the "core/gettext.h" header.
|
||||
macro is defined in the `"core/gettext.h"` header.
|
||||
|
||||
* UI text style
|
||||
|
||||
These guidelines are designed to ensure consistency in presentation within
|
||||
Subsurface.
|
||||
Only the first word of multi-word text strings should be capitalized unless
|
||||
@ -275,10 +279,14 @@ other editors that implement this coding style, please add them here.
|
||||
|
||||
|
||||
* string manipulation
|
||||
|
||||
* user interface
|
||||
In UI part of the code use of QString methods is preferred, see this pretty
|
||||
good guide in [QString documentation][1]
|
||||
|
||||
In UI part of the code use of `QString` methods is preferred, see this pretty
|
||||
good guide in [`QString` documentation][1]
|
||||
|
||||
* core components
|
||||
|
||||
In the core part of the code, C-string should be used.
|
||||
C-string manipulation is not always straightforward specifically when
|
||||
it comes to memory allocation, a set of helper functions has been developed
|
||||
@ -289,8 +297,8 @@ other editors that implement this coding style, please add them here.
|
||||
|
||||
### Emacs
|
||||
|
||||
These lines in your .emacs file should get you fairly close when it comes
|
||||
to indentation - many of the other rules you have to follow manually
|
||||
These lines in your `.emacs` file should get you fairly close when it comes
|
||||
to indentation – many of the other rules you have to follow manually
|
||||
|
||||
```
|
||||
;; indentation
|
||||
@ -385,7 +393,7 @@ style that you can select which should work well for our coding style.
|
||||
### Vim
|
||||
|
||||
As everybody knows vim is a way better editor than emacs and thus needs to be
|
||||
in this file too. Put this into your .vimrc and this should produce something
|
||||
in this file too. Put this into your `.vimrc` and this should produce something
|
||||
close to our coding standards.
|
||||
|
||||
```
|
||||
|
||||
131
CONTRIBUTING.md
@ -1,68 +1,96 @@
|
||||
[Source](https://subsurface-divelog.org/documentation/contributing/ "Permalink to Contributing | Subsurface")
|
||||
# Contributing to Subsurface
|
||||
|
||||
# Contributing | Subsurface
|
||||
## Ways to Contribute
|
||||
|
||||
It might be a good idea to join our [mailing list][1]. Conversation there is in English -- even though this site (and Subsurface itself) are available in many languages, the shared language we all communicate in is English. Actually "Broken English" is just fine… :-)
|
||||
There are many ways in which you can contribute. We are always looking for testers who are willing to test the code while it is being developed. We especially need people running Windows and Mac (as the majority of the active developers are Linux people). We are also always looking for volunteers who help reviewing and improving the documentation. And very importantly we are looking for translators willing to translate the software into different languages. Our translations are centrally handled at [Transifex][4] – please sign up for an account there and then request to join the [Subsurface Team][5].
|
||||
|
||||
We also tend to have some developers hanging out in the `#subsurface` channel on [Freenode][2].
|
||||
If you would like to contribute financially to help us cover the cost of running a free cloud synchronisation service for dive logs, you can do so by sponsoring this project.
|
||||
|
||||
There are many ways in which you can contribute. We are always looking for testers who are willing to test the code while it is being developed. We especially need people running Windows and Mac (as the majority of the active developers are Linux people). We are also always looking for volunteers who help reviewing and improving the documentation. And very importantly we are looking for translators willing to translate the software into different languages. Our translations are centrally handled at [Transifex][3] \-- please sign up for an account there and then request to join the [Subsurface Team][4].
|
||||
|
||||
If you would like to contribute patches that fix bugs or add new features, that is of course especially welcome. If you are looking for places to start, look at the open bugs in our [bug tracker][5].
|
||||
## Joining the Subsurface Contributors' Community
|
||||
|
||||
Here is a very brief introduction on creating commits that you can either send as [pull requests][6] on our main GitHub repository or send as emails to the mailing list. Much more details on how to use git can be found at the [git user manual][7].
|
||||
To get 'into the loop' for what is going on in Subsurface you should join our [mailing list][1], and start watching the [subsurface/subsurface repository on GitHub][2]. Conversation in the mailing list is in English – even though Subsurface itself and the website and documentation are available in many languages, the shared language the contributors communicate in is English. Actually "Broken English" is just fine… :-)
|
||||
|
||||
Start with getting the latest source.
|
||||
`cd subsurface`
|
||||
`git checkout master`
|
||||
`git pull`
|
||||
ok, now we know you're on the latest version. Create a working branch to keep your development in:
|
||||
`git checkout -b devel`
|
||||
Edit the code (or documentation), compile, test… then create a commit:
|
||||
`git commit -s -a`
|
||||
Depending on your OS this will open a default editor -- usually you can define which by setting the environment variable `GIT_EDITOR`. Here you enter your commit message. The first line is the title of your commit. Keep it brief and to the point. Then a longer explanation (more on this and the fact that we insist on all contributions containing a Signed-off-by: line below).
|
||||
If you want to change the commit message, "git commit --amend" is the way to go. Feel free to break your changes into multiple smaller commits. Then, when you are done there are two directions to go, which one you find easier depends a bit on how familiar you are with GitHub. You can either push your branch to GitHub and create a [pull requests on GitHub][6], or you run
|
||||
`git format-patch master..devel`
|
||||
Which creates a number of files that have names like 0001-Commit-title.patch, which you can then send to our developer mailing list.
|
||||
Of course it is also a good idea to join our [User Forum][3], to be able to see feedback and bug reports from our users.
|
||||
|
||||
|
||||
## Tips for Code Contributions
|
||||
|
||||
### Code Change Submissions
|
||||
|
||||
If you would like to contribute patches that fix bugs or add new features, that is of course especially welcome. If you are looking for places to start, look at the open bugs in our [bug tracker][6].
|
||||
|
||||
Here is a very brief introduction on creating commits that you can either send as [pull requests][7] on our main GitHub repository or send as emails to the mailing list. Much more details on how to use Git can be found at the [Git user manual][8].
|
||||
|
||||
Start with getting the latest source.
|
||||
|
||||
cd subsurface
|
||||
git checkout master
|
||||
git pull
|
||||
|
||||
ok, now we know you're on the latest version. Create a working branch to keep your development in:
|
||||
|
||||
git checkout -b devel
|
||||
|
||||
Edit the code (or documentation), compile, test… then create a commit:
|
||||
|
||||
git commit -s -a
|
||||
|
||||
Depending on your OS this will open a default editor – usually you can define which by setting the environment variable `GIT_EDITOR`. Here you enter your commit message. The first line is the title of your commit. Keep it brief and to the point. Then a longer explanation (more on this and the fact that we insist on all contributions containing a Signed-off-by: line below).
|
||||
|
||||
If you want to change the commit message, `git commit --amend` is the way to go. Feel free to break your changes into multiple smaller commits. Then, when you are done there are two directions to go, which one you find easier depends a bit on how familiar you are with GitHub. You can either push your branch to GitHub and create a [pull requests on GitHub][7], or you run:
|
||||
|
||||
git format-patch master..devel
|
||||
|
||||
Which creates a number of files that have names like `0001-Commit-title.patch`, which you can then send to our developer mailing list.
|
||||
|
||||
|
||||
### Developer Certificate of Origin (DCO)
|
||||
|
||||
When sending code, please either send signed-off patches or a pull request with signed-off commits. If you don't sign off on them, we will not accept them. This means adding a line that says "Signed-off-by: Name \<Email\>" at the end of each commit, indicating that you wrote the code and have the right to pass it on as an open source patch.
|
||||
|
||||
See: [Signed-off-by Lines][8]
|
||||
See: [Signed-off-by Lines][9]
|
||||
|
||||
Also, please write good git commit messages. A good commit message looks like this:
|
||||
|
||||
Header line: explaining the commit in one line
|
||||
### Commit Messages
|
||||
|
||||
Body of commit message is a few lines of text, explaining things
|
||||
in more detail, possibly giving some background about the issue
|
||||
being fixed, etc etc.
|
||||
Also, please write good Git commit messages. A good commit message looks like this:
|
||||
|
||||
The body of the commit message can be several paragraphs, and
|
||||
please do proper word-wrap and keep columns shorter than about
|
||||
74 characters or so. That way "git log" will show things
|
||||
nicely even when it's indented.
|
||||
|
||||
Reported-by: whoever-reported-it
|
||||
Signed-off-by: Your Name \<you@example.com\>
|
||||
Header line: explaining the commit in one line
|
||||
|
||||
Body of commit message is a few lines of text, explaining things
|
||||
in more detail, possibly giving some background about the issue
|
||||
being fixed, etc etc.
|
||||
|
||||
The body of the commit message can be several paragraphs, and
|
||||
please do proper word-wrap and keep columns shorter than about
|
||||
74 characters or so. That way "git log" will show things
|
||||
nicely even when it's indented.
|
||||
|
||||
Reported-by: whoever-reported-it
|
||||
Signed-off-by: Your Name <you@example.com>
|
||||
|
||||
That header line really should be meaningful, and really should be just one line. The header line is what is shown by tools like gitk and shortlog, and should summarize the change in one readable line of text, independently of the longer explanation.
|
||||
|
||||
The preferred way to write a commit message is using imperative mood, e.g. "Make foo do xyz" instead of "This patch makes foo do xyz" or "I made foo do xyz", as if you are giving commands or requests to the code base.
|
||||
https://en.wikipedia.org/wiki/Imperative_mood
|
||||
The preferred way to write a commit message is using [imperative mood][12], e.g. "Make foo do xyz" instead of "This patch makes foo do xyz" or "I made foo do xyz", as if you are giving commands or requests to the code base.
|
||||
|
||||
![gitk sample][9]
|
||||
![gitk sample][10]
|
||||
|
||||
Example with gitk
|
||||
_Example with gitk_
|
||||
|
||||
Additionally when important changes to behaviors, fixes or new feature are introduced an entry must be added to CHANGELOG.md file. Always add new entries at the very top of the file above other existing entries. Use this layout for new entries:
|
||||
|
||||
Area: Details about the change [reference thread / issue]
|
||||
### Changelog
|
||||
|
||||
Additionally when important changes to behaviors, fixes or new feature are introduced an entry must be added to `CHANGELOG.md` file. Always add new entries at the very top of the file above other existing entries. Use this layout for new entries:
|
||||
|
||||
Area: Details about the change [reference thread / issue]
|
||||
|
||||
When multiple areas are affected list the areas separated with a /:
|
||||
|
||||
Area1/Area2: Detail about the change [reference thread / issue]
|
||||
Area1/Area2: Detail about the change [reference thread / issue]
|
||||
|
||||
Here is a (non exhaustive) list of Areas that can be used:
|
||||
|
||||
* Bluetooth
|
||||
* Cloud-storage
|
||||
* Desktop
|
||||
@ -75,15 +103,20 @@ Here is a (non exhaustive) list of Areas that can be used:
|
||||
* Printing
|
||||
* Profile
|
||||
|
||||
In order to make reviews simpler and have contributions merged faster in the code base, please follow Subsurface project's coding style and coding conventions described in the [CodingStyle][10] file.
|
||||
|
||||
### Coding Style
|
||||
|
||||
In order to make reviews simpler and have contributions merged faster in the code base, please follow Subsurface project's coding style and coding conventions described in the [CodingStyle][11] file.
|
||||
|
||||
[1]: http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
|
||||
[2]: http://freenode.net/
|
||||
[3]: https://www.transifex.com/
|
||||
[4]: https://www.transifex.com/projects/p/subsurface/
|
||||
[5]: https://github.com/Subsurface/subsurface/issues
|
||||
[6]: https://github.com/Subsurface/subsurface/pulls
|
||||
[7]: https://www.kernel.org/pub/software/scm/git/docs/user-manual.html
|
||||
[8]: https://gerrit-review.googlesource.com/Documentation/user-signedoffby.html
|
||||
[9]: https://subsurface-divelog.org/wp-content/uploads/2011/10/Screenshot-gitk-subsurface-1.png "Example with gitk"
|
||||
[10]: https://github.com/Subsurface/subsurface/blob/master/CodingStyle
|
||||
[2]: https://github.com/subsurface/subsurface
|
||||
[3]: https://groups.google.com/g/subsurface-divelog
|
||||
[4]: https://www.transifex.com/
|
||||
[5]: https://explore.transifex.com/subsurface/subsurface/
|
||||
[6]: https://github.com/Subsurface/subsurface/issues
|
||||
[7]: https://github.com/Subsurface/subsurface/pulls
|
||||
[8]: https://www.kernel.org/pub/software/scm/git/docs/user-manual.html
|
||||
[9]: https://gerrit-review.googlesource.com/Documentation/user-signedoffby.html
|
||||
[10]: https://github.com/subsurface/subsurface/Documentation/images/Screenshot-gitk-subsurface-1.png "Example with gitk"
|
||||
[11]: https://github.com/Subsurface/subsurface/blob/master/CODINGSTYLE.md
|
||||
[12]: https://en.wikipedia.org/wiki/Imperative_mood
|
||||
|
||||
@ -135,7 +135,7 @@ msgid ""
|
||||
"mailto:subsurface@subsurface-divelog.org[our mailing list] and report bugs "
|
||||
"at https://github.com/Subsurface/subsurface/issues[our bugtracker]. "
|
||||
"For instructions on how to build the software and (if needed) its "
|
||||
"dependencies please consult the INSTALL file included with the source code."
|
||||
"dependencies please consult the INSTALL.md file included with the source code."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
|
||||
@ -1,163 +0,0 @@
|
||||
<!-- when editing please don't break the formatting... WordPress is a bit silly about this
|
||||
- I need the empty lines after the [expand...] and before the [/expand]
|
||||
- Every paragraph is a single line (how stupid is that!) with an empty line in between -->
|
||||
<h2>Here are some Frequently Asked Questions by our users</h2>
|
||||
<span class="expandall">Expand All</span> --- <span class="collapseall">Collapse All</span>
|
||||
[expand title="Which operating system does Subsurface support?"]
|
||||
|
||||
Subsurface runs on Windows (32 and 64bit, Windows XP and newer), MacOS (Intel, 10.7 and newer) and many flavors of Linux. We provide Linux packages for Ubuntu, Linux Mint, Debian, openSUSE and Fedora. Details on where to find Subsurface for your OS are on our <a title="Downloads" href="http://subsurface-divelog.org/download/">Downloads</a> page.
|
||||
|
||||
[/expand]
|
||||
[expand title="How do I install Subsurface on Windows?"]
|
||||
|
||||
<a href="http://subsurface-divelog.org/download/">Download the installer</a> and double-click on it. You will get a warning that the installer is from an unknown publisher. Please click Yes to allow installation. Next you are presented with the license for Subsurface, after that you can choose where you would like to install Subsurface (the default should be reasonable in most cases) and the <em>Start Menu Folder</em> where a shortcut to call Subsurface and an entry to uninstall Subsurface will be installed.
|
||||
|
||||
[/expand]
|
||||
[expand title="How do I install Subsurface on MacOS?"]
|
||||
|
||||
<a href="http://subsurface-divelog.org/download/">Download the installer DMG</a> and open it. Drag the Subsurface icon on to the Applications icon.
|
||||
|
||||
[/expand]
|
||||
[expand title="How do I install Subsurface on Ubuntu?"]
|
||||
|
||||
Simply add the following PPA to your system:
|
||||
<pre><code style="font-size: 8pt;">ppa:subsurface/subsurface</code></pre>
|
||||
[/expand]
|
||||
[expand title="How do I install Subsurface on Debian?"]
|
||||
|
||||
We currently only support Debian Jessie; you need to add the Ubuntu repository:
|
||||
<pre><code style="font-size: 8pt;">echo "deb http://ppa.launchpad.net/subsurface/subsurface/ubuntu trusty main" \
|
||||
| sudo tee /etc/apt/sources.lists.d/subsurface.list
|
||||
gpg --keyserver subkeys.pgp.net --recv-keys A8BC9756EE61D9C6
|
||||
gpg -a --export A8BC9756EE61D9C6 | sudo apt-key add -
|
||||
sudo apt-get update</code></pre>
|
||||
Now you can install Subsurface from that repository:
|
||||
<pre><code style="font-size: 8pt;">sudo apt-get install subsurface</code></pre>
|
||||
Make sure you are getting a current version with all its Qt5 dependencies.
|
||||
|
||||
[/expand]
|
||||
[expand title="How do I install Subsurface on openSUSE?"]
|
||||
|
||||
Go to <a href="http://software.opensuse.org/download.html?project=home:Subsurface-Divelog&package=subsurface">our build service project page</a> and follow the simple instructions there -- it’s as easy as two clicks.
|
||||
|
||||
[/expand]
|
||||
[expand title="The shortcut keys don't work on Ubuntu"]
|
||||
|
||||
Please uninstall <code style="font-size: 9pt;">appmenu-qt5</code> and the shortcuts will work.
|
||||
|
||||
[/expand]
|
||||
[expand title="How can I post my dive on Facebook?"]
|
||||
|
||||
Go to the preferences and select the Facebook section. There you can log in to your Facebook account. You have to do this every time you want to post to Facebook, for privacy reasons Subsurface does not stay logged in to Facebook between sessions.
|
||||
|
||||
Once you are logged into Facebook you can close the preferences. You will now see a Facebook button next to the Notes section towards the center of the Subsurface window. Clicking on that opens a dialog that allows you to control which parts of the current dive are posted to your timeline. The post is always "private" - you need to connect to Facebook and change the audience for that post in order for others to see it (we do this so you get to review what is posted before it becomes public).
|
||||
|
||||
[/expand]
|
||||
[expand title="How can I post my dives on the web?"]
|
||||
|
||||
Currently Subsurface integrates with two different online logbooks: <a href="http://divelogs.de">divelogs.de</a> and <a href="http://dive-share.appspot.com/">DiveShare</a>. You can export dives to either of those two services from the File➝Export menu.
|
||||
|
||||
[/expand]
|
||||
[expand title="How do I use the companion apps?"]
|
||||
|
||||
There are companion apps available for both Android and IOS. You can find them in the respective stores. Once you install them on your mobile device you can either mark dive sites and name them (e.g., right before or after a dive), or you can run a "service" in the background that periodically records your position. Don't forget to turn the service off when you are done as it may increase your battery consumption.
|
||||
|
||||
Once you have uploaded the dive site data from the companion app to our web service, you can then download the data from within Subsurface. Do this <em>after</em> you have downloaded the dives from that day from your divecomputer (or manually added the dives) so that Subsurface can match the dive data (and their time stamps) with the data stored by the companion app. Subsurface will then add GPS data to those dives that didn't have GPS information and are reasonably close in time to to markers saved by the companion app.
|
||||
|
||||
Please note that the companion apps by themselves do <em>not</em> add dives to your dive list. The dive needs to exist before GPS data is added to it.
|
||||
|
||||
[/expand]
|
||||
[expand title="How can I use more than one tank with the same gas?"]
|
||||
|
||||
This is a typical question for side mount divers or some tec divers. Subsurface supports having more than one tank with the same gas, even if some dive computers don't. Simply add a gas change to your second tank of the same gas as both tanks will be included in the gas use calculations. In order to add gas changes simply right-click on the profile at the appropriate spot and you will be offered to add such an event.
|
||||
|
||||
[/expand]
|
||||
[expand title="Why is Subsurface not able to download my dives?"]
|
||||
|
||||
Clean the contacts. Clean the contacts again. Make sure the connector is firmly connected. Wiggle it. Seriously. Make sure the dive computer is in transfer mode (this isn't necessary for all dive computers but for many common ones). Check with other software that the download works in general. Try another cable. See our user manual for pairing with BT and the general use case.
|
||||
|
||||
[/expand]
|
||||
[expand title="Why is the CSV import failing?"]
|
||||
|
||||
The CSV import has a couple of caveats. You should avoid some special characters like ampersand (&), less than (<), greater than (>) and double quotes ("), the latter if quoting text cells. The file should use UTF-8 character set, if having non-ASCII characters. Also the size of the CSV file might cause problems. Importing 100 dives at a time (without dive profile) has worked previously, but larger files might exceed limits of the parser used. When having problems with CSV imports, try first with a smaller sample to make sure everything works.
|
||||
|
||||
[/expand]
|
||||
[expand title="How can I use Subsurface for multiple users?"]
|
||||
|
||||
Store logs of different users to separate log files. From Subsurface, you can open individual files for different divers and multiple users are supported quite well.
|
||||
|
||||
[/expand]
|
||||
[expand title="How can I load pictures and associate them with my dive?"]
|
||||
|
||||
Select the dives you want to load and associate the pictures with. Then right click on one of the selected dives and select "Load images" from the
|
||||
popup menu. This will bring in a file selection dialog where you can select one or multiple pictures. When the selection is done and you hit Open, you get a new dialog where you can shift the times of the images. This is described in more detail in our user manual.
|
||||
|
||||
If you are having trouble with loading the images, check that you have at least one of the following tags in the Exif headers DateTimeOriginal or
|
||||
DateTime. We take the time from these fields to detect if the image was shot during the dive or not. If the picture is edited, you should store the original Exif information on the new/edited image for it to be loaded properly.
|
||||
|
||||
[/expand]
|
||||
[expand title="Can I import my dives from my old log software?"]
|
||||
|
||||
Many common programs are already supported and we are always happy to try to add new ones. If your old log software supports exporting the log book, we might well be able to import that (for example via CSV files or UDDF). However, usually support for importing the native format will help you to get more complete information into Subsurface. To implement support for the log format, we will need a sample log file. It would be great to have also a screenshot from the original log software or description of the dive that is shown on the sample log. Preferably we would like to have a reasonably simple dive to get basic support and another dive that has as many features enabled as possible (e.g. gas changes during the dive). Please post this information to the user forum or send it to the developer mailing list subsurface@subsurface-divelog.org. Unfortunately some of the log formats we have not been able to decipher (as some vendors have decided to encrypt their log files to increase the degree of lock-in of their customers), so there are no guarantees that this will bring support for your old log software, but it is worth a try.
|
||||
|
||||
[/expand]
|
||||
[expand title="Can you add support for dive computer X?"]
|
||||
|
||||
We support a large number of dive computers already and are always happy to add support for more. Please contact us via the user forums so we can try to help. Some vendors have actively helped us in our work and adding support for new models from those vendors is usually easy. Other vendors are more neutral, some are actively hostile. Without help from the vendor it can be rather challenging to reverse engineer the transfer protocol and the dive encoding, but with sufficient help from you it is often possible to do so.
|
||||
|
||||
A good starting point is often to send us a libdivecomputer log and dump (you can pick those in the dive computer download dialog) when connecting to the dive computer using a similar existing model (if possible).
|
||||
|
||||
[/expand]
|
||||
[expand title="Is there a virus in the Subsurface installer?"]
|
||||
|
||||
If you get a warning message or if Subsurface is blocked by your anti virus software, that is almost certainly a false positive. Subsurface is not built on a Windows machine, it is cross built from source on Linux on a well maintained and clean server.
|
||||
|
||||
Most/all Windows AV software packages support an "add exception" feature, which skips an executable from being scanned. Try adding Subsurface to the list of non-harmful software. If the Subsurface installer download is detected as malware, please temporary disable your AV software until Subsurface is installed
|
||||
|
||||
In either case, please inform your AV software vendor of a "false positive" as we assure your that Subsurface is not malware
|
||||
|
||||
[/expand]
|
||||
[expand title="I cannot download all my dives, only the most recent ones even though my dive computer's manual states that it records history of e.g. 999 dives."]
|
||||
|
||||
Dive history is different than the dive profiles on the log. The history only keeps track of the total number of dives and total amount of time spent below surface. The logs, on the other hand, store the dive profile, but they have limited amount of memory to do so. The exact amount of dive profiles that can be stored on the device depend on sample interval and duration of the dives. Once the memory is full the oldest dives get overwritten with new dives. Thus we are only able to download the last 13, 30 or 199 dives.
|
||||
|
||||
If you have downloaded your dives to different dive logging software before they were overwritten, there is a high change that Subsurface can import these. However, if the logs are only on your dive computer, they cannot be salvaged after being over written by new dives.
|
||||
|
||||
[/expand]
|
||||
[expand title="How do I download dives from my Bluetooth dive computer (e.g. Shearwater, OSTC) on Linux?"]
|
||||
|
||||
Downloading dives over Bluetooth on all platforms is done using the "Choose Bluetooth download mode" option when downloading dives, and pairing with the detected dive computer. This is further explained in the <a href="https://subsurface-divelog.org/documentation/subsurface-4-user-manual/">Subsurface User Manual</a>.
|
||||
|
||||
Previous versions of Subsurface required setting up an RFCOMM connection from the command line before downloading dives from a Bluetooth enabled dive computer. This is no longer the case.
|
||||
|
||||
[/expand]
|
||||
[expand title="How do I fix permission errors when trying to download from my Atomics Aquatics Cobalt under Linux?"]
|
||||
|
||||
Sadly this is a somewhat difficult process on some versions of Linux. By default new devices are sometimes given permissions that prevent a regular user from accessing them. If you get a permission error when trying to download from a Cobalt or Cobalt 2 under Linux, please try these steps.
|
||||
|
||||
This should work on most Linux flavors. We'd appreciate feedback if this doesn't work for you. Open a terminal window and cut and paste the following command. It may ask you to enter your password in order to allow access as super user (which is required to set up the udev rule that changes the device permissions as you plug in your Cobalt).
|
||||
|
||||
<pre><code style="font-size: 8pt;">(MYGRP=$(id | sed "s/^.*gid=.*(\(.*\)) .*$/\1/") ; \
|
||||
echo -n 'SUBSYSTEM=="usb", ATTR{idVendor}=="0471", ATTR{idProduct}=="0888", MODE="0660", GROUP="' ; \
|
||||
echo -n $MYGRP ; echo '"') | sudo tee /etc/udev/rules.d/99-cobalt.rules </code></pre>
|
||||
|
||||
If you disconnect and reconnect your Cobalt it should now get the correct access permissions.
|
||||
|
||||
[/expand]
|
||||
[expand title="How do I fix permission errors when trying to download from my Suunto EON Steel under Linux?"]
|
||||
|
||||
By default new devices are sometimes given permissions that prevent a regular user from accessing them. If you get a permission error when trying to download from an EON Steel under Linux, please try these steps.
|
||||
|
||||
This should work on most Linux flavors. We'd appreciate feedback if this doesn't work for you. Open a terminal window and cut and paste the following command. It may ask you to enter your password in order to allow access as super user (which is required to set up the udev rule that changes the device permissions as you plug in your EON Steel).
|
||||
|
||||
<pre><code style="font-size: 8pt;">echo 'SUBSYSTEM=="usb",ATTR{idVendor}=="1493",ATTR{idProduct}=="0030", MODE="0666"' |
|
||||
sudo tee /etc/udev/rules.d/99-cobalt.rules </code></pre>
|
||||
|
||||
If you disconnect and reconnect your DC it should now get the correct access permissions.
|
||||
|
||||
[/expand]
|
||||
[expand title="Why is my IRDA based dive computer not working on a MAC?"]
|
||||
|
||||
Subsurface on the Mac does not currently support IRDA based dive computers. This is an issue of missing support libraries for us to use - other dive log software may have implemented their own IRDA stack on the Mac, we have not. Subsurface on Windows and Linux does support IRDA based dive computers just fine.
|
||||
|
||||
[/expand]
|
||||
@ -7,7 +7,7 @@
|
||||
# submitting patches to the user manual, only submit the changes to the .txt
|
||||
# file - the maintainer will recreate the .html.git file
|
||||
|
||||
DOCNAMES = user-manual user-manual_es user-manual_fr user-manual_ru user-manual_nl mobile-manual-v2 mobile-manual-v3
|
||||
DOCNAMES = user-manual user-manual_es user-manual_fr user-manual_nl mobile-manual-v3
|
||||
|
||||
HTMLDOCS = $(patsubst %,$(OUT)%.html,$(DOCNAMES))
|
||||
TEXTDOCS = $(patsubst %,$(OUT)%.text,$(DOCNAMES))
|
||||
@ -19,7 +19,7 @@ BROWSER = firefox
|
||||
THEME = compact_subsurface
|
||||
PWD = $(realpath .)
|
||||
|
||||
all: $(HTMLEDOCS) $(TEXTDOCS) $(PDFDOCS)
|
||||
all: $(HTMLDOCS) $(TEXTDOCS) $(PDFDOCS)
|
||||
|
||||
doc: $(HTMLDOCS)
|
||||
|
||||
@ -30,7 +30,7 @@ $(OUT)%.pdf: %.txt
|
||||
-$(A2X) --dblatex-opts "-P latex.output.revhistory=0" -f pdf $<
|
||||
|
||||
$(OUT)%.html: %.txt
|
||||
@echo "if asciidoc isn't found the html file included in the sources is copied"
|
||||
$(ASCIIDOC) --version > /dev/null 2>&1 || echo "if asciidoc isn't found the html file included in the sources is copied"
|
||||
$(ASCIIDOC) -a toc -a toclevels=3 -a themedir=$(PWD) -a theme=$(THEME) -o $@ $< || \
|
||||
cp $(<:%.txt=%.html.git) $@
|
||||
|
||||
|
||||
@ -175,7 +175,7 @@ msgid ""
|
||||
"an email to mailto:subsurface@subsurface-divelog.org[our mailing list] and "
|
||||
"report bugs at https://github.com/Subsurface-divelog/subsurface/issues[our "
|
||||
"bugtracker]. For instructions on how to build the software and (if needed) "
|
||||
"its dependencies please consult the INSTALL file included with the source "
|
||||
"its dependencies please consult the INSTALL.md file included with the source "
|
||||
"code."
|
||||
msgstr ""
|
||||
"Ce manuel explique comment utiliser le programme _Subsurface_. Pour "
|
||||
@ -184,7 +184,7 @@ msgstr ""
|
||||
"pouvez envoyer un e-mail sur mailto:subsurface@subsurface-divelog.org[notre "
|
||||
"liste de diffusion] et rapportez les bogues sur http://trac.hohndel."
|
||||
"org[notre bugtracker]. Pour des instructions de compilation du logiciel et "
|
||||
"(si besoin) de ses dépendances, merci de consulter le fichier INSTALL inclus "
|
||||
"(si besoin) de ses dépendances, merci de consulter le fichier INSTALL.md inclus "
|
||||
"dans les sources logicielles."
|
||||
|
||||
#. type: Plain text
|
||||
|
||||
BIN
Documentation/images/Screenshot-gitk-subsurface-1.png
Normal file
|
After Width: | Height: | Size: 121 KiB |
BIN
Documentation/images/icons/InfoBox.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 45 KiB |
@ -4,7 +4,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
|
||||
<meta name="generator" content="AsciiDoc" />
|
||||
<meta name="generator" content="AsciiDoc 10.1.2" />
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
/*
|
||||
@ -539,7 +539,6 @@ the lower right corner and that can be opened by tapping and holding a dive or t
|
||||
actions on that screen (see image on the left). Some screens have only
|
||||
the round central button, others have one or two additional
|
||||
actions on either side of the central button.</p></div>
|
||||
<div style="clear:both;"></div>
|
||||
<div class="paragraph"><p>On Android devices, use the Android Back
|
||||
button for "cancel", "discard" or "back" actions. For example, when
|
||||
editing dive information, tapping the action button saves the changes while the
|
||||
@ -726,7 +725,6 @@ type, e.g. those at a particular dive site or those with a specific buddy or div
|
||||
Filter to achieve this. The filter mechanism searches through all the information for each dive,
|
||||
looking for one or more key words. Only the dives containing these key words are listed in the dive
|
||||
list. To Filter the dive list, tap the Filter action button:</p></div>
|
||||
<div style="clear:both;"></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="mobile-images/FilterButton.jpg" alt="FIGURE: Filter button" />
|
||||
@ -803,7 +801,7 @@ computers that you do not use any more. Achieve this by selecting the option
|
||||
<div class="tableblock">
|
||||
<table rules="all"
|
||||
width="100%"
|
||||
frame=""
|
||||
frame="border"
|
||||
cellspacing="0" cellpadding="4">
|
||||
<col width="50%" />
|
||||
<col width="50%" />
|
||||
@ -982,7 +980,7 @@ and the dives during the last six months.</p></div>
|
||||
<div class="tableblock">
|
||||
<table rules="all"
|
||||
width="100%"
|
||||
frame=""
|
||||
frame="border"
|
||||
cellspacing="0" cellpadding="4">
|
||||
<col width="40%" />
|
||||
<col width="60%" />
|
||||
@ -1169,7 +1167,7 @@ similar to image B, below, is produced. Here the subdivision within each gas typ
|
||||
<div class="tableblock">
|
||||
<table rules="all"
|
||||
width="100%"
|
||||
frame=""
|
||||
frame="border"
|
||||
cellspacing="0" cellpadding="4">
|
||||
<col width="40%" />
|
||||
<col width="60%" />
|
||||
@ -1284,7 +1282,7 @@ buttons on the <em>Download from dive computer</em> page.</p></div>
|
||||
<div class="tableblock">
|
||||
<table rules="all"
|
||||
width="100%"
|
||||
frame=""
|
||||
frame="border"
|
||||
cellspacing="0" cellpadding="4">
|
||||
<col width="50%" />
|
||||
<col width="50%" />
|
||||
@ -1380,7 +1378,7 @@ you to reset the password for your <em>Subsurface Cloud</em> account.</p></div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated
|
||||
2021-10-30 08:48:42 PDT
|
||||
2024-02-08 09:34:56 PST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@ -103,8 +103,6 @@ actions on that screen (see image on the left). Some screens have only
|
||||
the round central button, others have one or two additional
|
||||
actions on either side of the central button.
|
||||
|
||||
unfloat::[]
|
||||
|
||||
On Android devices, use the Android Back
|
||||
button for "cancel", "discard" or "back" actions. For example, when
|
||||
editing dive information, tapping the action button saves the changes while the
|
||||
@ -269,8 +267,6 @@ Filter to achieve this. The filter mechanism searches through all the informatio
|
||||
looking for one or more key words. Only the dives containing these key words are listed in the dive
|
||||
list. To Filter the dive list, tap the Filter action button:
|
||||
|
||||
unfloat::[]
|
||||
|
||||
image::mobile-images/FilterButton.jpg["FIGURE: Filter button",align="center"]
|
||||
|
||||
at the bottom of the dive list. A text box appears at the top of the screen (image below). Type the
|
||||
@ -341,9 +337,9 @@ _Forget remembered dive computers_ in the xref:S_Settings[_Settings_] menu.
|
||||
==== Download from USB serial dive computers
|
||||
This feature is not supported on iOS.
|
||||
|
||||
[width="100%", frame="None"]
|
||||
[width="100%"]
|
||||
|=======
|
||||
a|image::mobile-images/USB-OTG.jpg["FIGURE: USB-OTG cable",align="center"] |
|
||||
a|image:mobile-images/USB-OTG.jpg["FIGURE: USB-OTG cable",align="center"] |
|
||||
Most current Android devices now have a USB
|
||||
Type C port and come with a simple A-to-C adapter plug, which lets you plug in
|
||||
the dive computer cable into the phone or tablet.
|
||||
@ -494,9 +490,9 @@ and the dives during the last six months.
|
||||
[[S_Stats]]
|
||||
== Dive Statistics
|
||||
|
||||
[width="100%", frame="None", cols="2,3"]
|
||||
[width="100%", cols="2,3"]
|
||||
|===
|
||||
a|image::mobile-images/StatsPanel.jpg["Image: Statistics panel",float="left"] |
|
||||
a|image:mobile-images/StatsPanel.jpg["Image: Statistics panel",float="left"] |
|
||||
Creating meaningful statistics that convey the information you are looking for is surprisingly hard.
|
||||
Different users have very different needs and very different expectations. Subsurface-Mobile provides
|
||||
a rather detailed set of statistics features to summarize information from the dive log in a graphical
|
||||
@ -661,9 +657,9 @@ image::mobile-images/StatsBarchartSubdivided.jpg["Stats subdivided barchart",ali
|
||||
|
||||
=== Scattergraphs
|
||||
|
||||
[width="100%", cols="2,3", frame="None"]
|
||||
[width="100%", cols="2,3"]
|
||||
|=======
|
||||
a|image::mobile-images/StatsRegression.jpg["Regression data example",align="center"] |
|
||||
a|image:mobile-images/StatsRegression.jpg["Regression data example",align="center"] |
|
||||
Sometimes you might wish to investigate the relationship between two dive variables. Has my SAC rate decreased over
|
||||
the years? Is the water temperature colder at greater dive depth? One of the ways of investigating these questions
|
||||
is to draw a scattergraph where the values of one variable is plotted against the other variable (see image on the left).
|
||||
@ -760,9 +756,9 @@ buttons on the _Download from dive computer_ page.
|
||||
|
||||
==== Color theme
|
||||
|
||||
[width="100%", frame="None"]
|
||||
[width="100%"]
|
||||
|=======
|
||||
a|image::mobile-images/ThemeSettings.jpg["FIGURE: Theme Settings",align="center"] |
|
||||
a|image:mobile-images/ThemeSettings.jpg["FIGURE: Theme Settings",align="center"] |
|
||||
Besides the default blue color scheme, _Subsurface-mobile_ supports two additional color schemes
|
||||
for users with different tastes (see image on left). All screenshots shown in this user manual are
|
||||
based on the blue default color scheme. You can pick the _pink_ or _dark_ color theme from
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
|
||||
<meta name="generator" content="AsciiDoc" />
|
||||
<meta name="generator" content="AsciiDoc 10.1.2" />
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
/*
|
||||
@ -460,7 +460,7 @@ the software, consult the <em>Downloads</em> page on the
|
||||
Please discuss issues with this program by sending an email to
|
||||
<a href="mailto:subsurface@subsurface-divelog.org">our mailing list</a> and report bugs at
|
||||
<a href="https://github.com/Subsurface/subsurface/issues">our bugtracker</a>. For instructions on how to build the
|
||||
software and (if needed) its dependencies please consult the INSTALL file
|
||||
software and (if needed) its dependencies please consult the INSTALL.md file
|
||||
included with the source code.</p></div>
|
||||
<div class="paragraph"><p><strong>Audience</strong>: Recreational Scuba Divers, Free Divers, Tec Divers, Professional
|
||||
Divers</p></div>
|
||||
@ -882,6 +882,15 @@ Do <strong>not</strong> check the checkboxes labelled <em>Save libdivecomputer l
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
With some dive computers it is possible to adjust the clock on the dive
|
||||
computer based on the PC clock. This can be very helpful when dealing with
|
||||
daylight savings time changes, or when travelling between different time
|
||||
zones. In order to synchronise the dive computer clock with the PC clock
|
||||
every time dives are imported, check <em>Sync dive computer time</em>.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
Then select the <em>Download</em> button.
|
||||
With communication established, you can see how the data are
|
||||
retrieved from the dive computer.
|
||||
@ -1334,11 +1343,6 @@ data here are the geographic coordinates of the dive location.</p></div>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<a href="#S_Subsurface_mobile">Dive site coordinates from the Subsurface-Mobile phone app</a>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<a href="#S_GPS">Dive site coordinates from a GPS track</a>
|
||||
</p>
|
||||
</li>
|
||||
@ -1394,13 +1398,7 @@ dive site name in the <strong>Notes tab</strong>.</p></div>
|
||||
</div>
|
||||
<div class="paragraph"><p>Once the dive location data have been saved, the dive on the Dive List has
|
||||
a globe icon immediately to the left of the location name of a particular dive.</p></div>
|
||||
<div class="paragraph" id="S_Using_mobile"><p><strong>(3): Dive coordinates from a mobile device with GPS using Subsurface-Mobile.</strong>
|
||||
Most smartphones have an integrated GPS, useful for collecting the coordinates of dive sites.
|
||||
The <a href="https://subsurface-divelog.org/documentation/subsurface-mobile-user-manual">user manual for <em>Subsurface-mobile</em></a> (accessible from within that app)
|
||||
contains detailed instructions for
|
||||
performing the collection of GPS data and for managing, uploading and
|
||||
synchronising the coordinates with a dive log.</p></div>
|
||||
<div class="paragraph" id="S_GPS"><p><strong>(4): Import coordinates from GPS equipment.</strong> Some divers prefer to take a GPS
|
||||
<div class="paragraph" id="S_GPS"><p><strong>(3): Import coordinates from GPS equipment.</strong> Some divers prefer to take a GPS
|
||||
onto the boat and record a GPS track while diving. Subsurface can extract the
|
||||
dive site from this track and store the dive site coordinates as part of the dive log.
|
||||
Follow the next steps:</p></div>
|
||||
@ -2446,6 +2444,7 @@ A list of sites within this range is presented (see image below).</p></div>
|
||||
<div class="paragraph"><p>Select the dive site to be merged by right-clicking it. A confirmation
|
||||
message is presented (see image above). Clicking the confirmation message merges the selected dive with
|
||||
the dive named at the top of the panel and returns you to the dive sites management panel.</p></div>
|
||||
<div class="paragraph"><p>Alternatively, if exactly one dive site is selected in the <em>Near dive sites</em> list, there is an additional function <em>Merge current site into this site</em> available in the context menu. This can be helpful if the name of the destination dive site is not known, e.g. when importing dive sites from a third party source.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_add_a_dive_site">4.4.4. Add a dive site</h4>
|
||||
@ -2827,7 +2826,36 @@ logging of cylinder pressures during sidemount involves three steps, exactly as
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="S_sSCR_dives">4.6.3. Passive semi-closed circuit rebreather (pSCR) dives</h4>
|
||||
<h4 id="_fixing_sensor_being_attached_to_wrong_cylinder">4.6.3. Fixing sensor being attached to wrong cylinder</h4>
|
||||
<div class="paragraph"><p>When importing a dive <em>Subsurface</em> generally has to make some assumptions when importing dives. One
|
||||
of these assumptions is which cylinder a pressure sensor is attached to. The following dive is a sidemount
|
||||
dive with two deco cylinders. Each of the main cylinders has a pressure sensor attached to them. In this
|
||||
case <em>Subsurface</em> only knows about 3 gasses and 2 sensors so it makes the assumption that the sensors
|
||||
are attached to the first two cylinders, one bottom gas and one with deco gas. For the cylinders with
|
||||
attached sensors the cylinder index will be shown in the sensors column.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/sensors-import.png" alt="FIGURE: Imported cylinders and sensors" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>To fix this, you can add a new cylinder with bottom gas and pick the index for the deco cylinder in
|
||||
the sensors drop down.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/sensors-newcylinder.png" alt="FIGURE: New cylinder added for sensor move" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>After this change the second sensor will be attached to the fourth cylinder and the two deco cylinders
|
||||
won’t have any cylinders attached.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/sensors-moved.png" alt="FIGURE: Sensor moved to new cylinder" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>The profile graph will also be updated to reflect this change.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="S_sSCR_dives">4.6.4. Passive semi-closed circuit rebreather (pSCR) dives</h4>
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
@ -2909,7 +2937,7 @@ differs from the OC-pO<sub>2</sub> (orange line).</td>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="S_CCR_dives">4.6.4. Closed circuit rebreather (CCR) dives</h4>
|
||||
<h4 id="S_CCR_dives">4.6.5. Closed circuit rebreather (CCR) dives</h4>
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
@ -3311,6 +3339,14 @@ buttons on the left of the profile panel. These are:</p></div>
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
<img src="images/icons/InfoBox.png" alt="Note" />
|
||||
</td>
|
||||
<td class="content">Show or hide the <strong>Information Box</strong>. This allows the Information Box to be hidden in order to see the entire dive profile without any obstructions.</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
<img src="images/icons/MOD.jpg" alt="Note" />
|
||||
</td>
|
||||
<td class="content">Show the <strong>Maximum Operating Depth (MOD)</strong> of the dive, given the
|
||||
@ -5094,6 +5130,8 @@ the log.</p></div>
|
||||
<p>
|
||||
<strong>Show unused cylinders</strong>: Checking this checkbox allows showing all cylinders entered for a dive
|
||||
in the Cylinder Table of the <strong>Equipment</strong> tab, even if one or more cylinders were actually not used.
|
||||
This will also include unused cylinders in data exports and when dives are cloned for the planner
|
||||
or merged into one dive.
|
||||
</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
@ -5128,12 +5166,12 @@ the log.</p></div>
|
||||
<div class="sect2">
|
||||
<h3 id="_tech_setup">12.8. Tech setup</h3>
|
||||
<div class="paragraph"><p>This tab sets common variables used for decompression calculations pertaining to technical diving.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="imageblock" id="S_CCR_options" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/Pref_tech.jpg" alt="FIGURE: Preferences: Tech setup" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="ulist" id="S_GradientFactors"><ul>
|
||||
<div class="ulist"><ul>
|
||||
<li>
|
||||
<p>
|
||||
<strong>Gas pressure display setup</strong>. Even though nitrogen and helium pressures are also included here,
|
||||
@ -5665,7 +5703,7 @@ A very low GFLow value brings on decompression stops early during the dive.</p><
|
||||
<div class="ulist"><ul>
|
||||
<li>
|
||||
<p>
|
||||
For more information about Gradient factors, see the section on <a href="#S_GradientFactors">Gradient Factor Preference settings</a>.
|
||||
For more information about Gradient factors, see the section on <a href="#S_CCR_options">Gradient Factor Preference settings</a>.
|
||||
</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
@ -8189,7 +8227,7 @@ cannot be salvaged after being overwritten by new dives.</p></div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated
|
||||
2022-03-04 12:02:35 PST
|
||||
2024-02-08 08:33:02 PST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@ -34,7 +34,7 @@ https://subsurface-divelog.org/[_Subsurface_ web site].
|
||||
Please discuss issues with this program by sending an email to
|
||||
mailto:subsurface@subsurface-divelog.org[our mailing list] and report bugs at
|
||||
https://github.com/Subsurface/subsurface/issues[our bugtracker]. For instructions on how to build the
|
||||
software and (if needed) its dependencies please consult the INSTALL file
|
||||
software and (if needed) its dependencies please consult the INSTALL.md file
|
||||
included with the source code.
|
||||
|
||||
*Audience*: Recreational Scuba Divers, Free Divers, Tec Divers, Professional
|
||||
@ -374,6 +374,13 @@ of the dive computer (at least for those not charging while connected via USB).
|
||||
- Do *not* check the checkboxes labelled _Save libdivecomputer logfile_ and
|
||||
_Save libdivecomputer dumpfile_. These are only used as diagnostic tools
|
||||
when there are problems with downloads(see below).
|
||||
|
||||
- With some dive computers it is possible to adjust the clock on the dive
|
||||
computer based on the PC clock. This can be very helpful when dealing with
|
||||
daylight savings time changes, or when travelling between different time
|
||||
zones. In order to synchronise the dive computer clock with the PC clock
|
||||
every time dives are imported, check _Sync dive computer time_.
|
||||
|
||||
- Then select the _Download_ button.
|
||||
With communication established, you can see how the data are
|
||||
retrieved from the dive computer.
|
||||
@ -398,6 +405,7 @@ of the dive computer (at least for those not charging while connected via USB).
|
||||
(Puck Pro)". Refer to the text in the box below.
|
||||
|
||||
|
||||
|
||||
****
|
||||
*PROBLEMS WITH DATA DOWNLOAD FROM A DIVE COMPUTER?*
|
||||
[icon="images/icons/important.png"]
|
||||
@ -734,8 +742,7 @@ New dive locations can be recorded in one of four ways:
|
||||
|
||||
1. xref:S_existing_locations[Typing in known coordinates by hand]
|
||||
2. xref:S_dive_map_location[Positioning the dive site flag on the dive map]
|
||||
3. xref:S_Subsurface_mobile[Dive site coordinates from the Subsurface-Mobile phone app]
|
||||
4. xref:S_GPS[Dive site coordinates from a GPS track]
|
||||
3. xref:S_GPS[Dive site coordinates from a GPS track]
|
||||
|
||||
[[S_existing_locations]]
|
||||
*(1): Enter coordinates by hand* if they are known, using one of
|
||||
@ -785,18 +792,9 @@ image::images/Globe_image3.jpg["FIGURE:Location creation panel",align="center"]
|
||||
Once the dive location data have been saved, the dive on the Dive List has
|
||||
a globe icon immediately to the left of the location name of a particular dive.
|
||||
|
||||
[[S_Subsurface_mobile]]
|
||||
|
||||
[[S_Using_mobile]]
|
||||
*(3): Dive coordinates from a mobile device with GPS using Subsurface-Mobile.*
|
||||
Most smartphones have an integrated GPS, useful for collecting the coordinates of dive sites.
|
||||
The https://subsurface-divelog.org/documentation/subsurface-mobile-user-manual[user manual for _Subsurface-mobile_] (accessible from within that app)
|
||||
contains detailed instructions for
|
||||
performing the collection of GPS data and for managing, uploading and
|
||||
synchronising the coordinates with a dive log.
|
||||
|
||||
[[S_GPS]]
|
||||
*(4): Import coordinates from GPS equipment.* Some divers prefer to take a GPS
|
||||
*(3): Import coordinates from GPS equipment.* Some divers prefer to take a GPS
|
||||
onto the boat and record a GPS track while diving. Subsurface can extract the
|
||||
dive site from this track and store the dive site coordinates as part of the dive log.
|
||||
Follow the next steps:
|
||||
@ -1642,6 +1640,8 @@ Select the dive site to be merged by right-clicking it. A confirmation
|
||||
message is presented (see image above). Clicking the confirmation message merges the selected dive with
|
||||
the dive named at the top of the panel and returns you to the dive sites management panel.
|
||||
|
||||
Alternatively, if exactly one dive site is selected in the 'Near dive sites' list, there is an additional function 'Merge current site into this site' available in the context menu. This can be helpful if the name of the destination dive site is not known, e.g. when importing dive sites from a third party source.
|
||||
|
||||
==== Add a dive site
|
||||
|
||||
At the top right of the dive sites management table is a round button with a "+". Clicking that button inserts a
|
||||
@ -1949,21 +1949,22 @@ When importing a dive _Subsurface_ generally has to make some assumptions when i
|
||||
of these assumptions is which cylinder a pressure sensor is attached to. The following dive is a sidemount
|
||||
dive with two deco cylinders. Each of the main cylinders has a pressure sensor attached to them. In this
|
||||
case _Subsurface_ only knows about 3 gasses and 2 sensors so it makes the assumption that the sensors
|
||||
are attached to the first two cylinders, one bottom gas and one with deco gas.
|
||||
are attached to the first two cylinders, one bottom gas and one with deco gas. For the cylinders with
|
||||
attached sensors the cylinder index will be shown in the sensors column.
|
||||
|
||||
image::images/sensors-import.png["FIGURE: Imported cylinders and sensors",align="center"]
|
||||
|
||||
To fix this, you can add a new unused bottom gas cylinder.
|
||||
To fix this, you can add a new cylinder with bottom gas and pick the index for the deco cylinder in
|
||||
the sensors drop down.
|
||||
|
||||
image::images/sensors-newcylinder.png["FIGURE: New cylinder added for sensor move",align="center"]
|
||||
|
||||
To then move the sensor from the 2nd cylinder to the newly added one replace the text *Select one of these cylinders: 0,1*
|
||||
with *1* and press Enter.
|
||||
After this change the second sensor will be attached to the fourth cylinder and the two deco cylinders
|
||||
won't have any cylinders attached.
|
||||
|
||||
image::images/sensors-moved.png["FIGURE: Sensor moved to new cylinder",align="center"]
|
||||
|
||||
The sensor will then be associated with this new cylinder and the profile graph will be updated to
|
||||
reflect this change.
|
||||
The profile graph will also be updated to reflect this change.
|
||||
|
||||
[[S_sSCR_dives]]
|
||||
==== Passive semi-closed circuit rebreather (pSCR) dives
|
||||
@ -2320,6 +2321,10 @@ M-value, corresponds to 100%), the time to surface (TTS), the calculated ceiling
|
||||
as of the statistics in the Information Box, shown as four
|
||||
buttons on the left of the profile panel. These are:
|
||||
|
||||
[icon="images/icons/InfoBox.png"]
|
||||
[NOTE]
|
||||
Show or hide the *Information Box*. This allows the Information Box to be hidden in order to see the entire dive profile without any obstructions.
|
||||
|
||||
[icon="images/icons/MOD.jpg"]
|
||||
[NOTE]
|
||||
Show the *Maximum Operating Depth (MOD)* of the dive, given the
|
||||
@ -3639,6 +3644,8 @@ image::images/Pref_eqpmnt.jpg["FIGURE: Preferences: equipment",align="center"]
|
||||
|
||||
** *Show unused cylinders*: Checking this checkbox allows showing all cylinders entered for a dive
|
||||
in the Cylinder Table of the *Equipment* tab, even if one or more cylinders were actually not used.
|
||||
This will also include unused cylinders in data exports and when dives are cloned for the planner
|
||||
or merged into one dive.
|
||||
|
||||
=== Media
|
||||
|
||||
@ -3660,10 +3667,8 @@ image::images/Pref_media.jpg["FIGURE: Preferences: media",align="center"]
|
||||
|
||||
This tab sets common variables used for decompression calculations pertaining to technical diving.
|
||||
|
||||
image::images/Pref_tech.jpg["FIGURE: Preferences: Tech setup",align="center"]
|
||||
|
||||
[[S_CCR_options]]
|
||||
[[S_GradientFactors]]
|
||||
image::images/Pref_tech.jpg["FIGURE: Preferences: Tech setup",align="center"]
|
||||
|
||||
* *Gas pressure display setup*. Even though nitrogen and helium pressures are also included here,
|
||||
these items mainly pertain to oxygen management:
|
||||
@ -3989,7 +3994,7 @@ used without changing the original values in the _Preferences_.
|
||||
Gradient Factor settings strongly affect the calculated ceilings and their depths.
|
||||
A very low GFLow value brings on decompression stops early during the dive.
|
||||
|
||||
** For more information about Gradient factors, see the section on xref:S_GradientFactors[Gradient Factor Preference settings].
|
||||
** For more information about Gradient factors, see the section on xref:S_CCR_options[Gradient Factor Preference settings].
|
||||
|
||||
If the VPM-B model is selected, the Conservatism_level needs to be specified on a scale of 0 (least conservative) to 4 (most conservative).
|
||||
This model tends to give deco stops at deeper levels than the Bühlmann model and often results in slightly shorter
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
|
||||
<meta name="generator" content="AsciiDoc 8.6.10" />
|
||||
<meta name="generator" content="AsciiDoc 10.1.2" />
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
/*
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
* { padding: 0; margin: 0; }
|
||||
img { border: 0; }
|
||||
img { border: 0; margin: 15px; max-width:90% }
|
||||
|
||||
/*** Layout ***/
|
||||
|
||||
@ -78,12 +78,12 @@ body { font-family: Verdana, sans-serif; }
|
||||
#footer { font-size: 0.8em; }
|
||||
|
||||
h2, h3, h4, h5, .title { font-family: Arial, sans-serif; }
|
||||
h2 { font-size: 1.5em; }
|
||||
h2 { font-size: 160%; }
|
||||
.sectionbody { font-size: 0.85em; }
|
||||
.sectionbody .sectionbody { font-size: inherit; }
|
||||
h3 { font-size: 159%; } /* 1.35em */
|
||||
h4 { font-size: 141%; } /* 1.2em */
|
||||
h5 { font-size: 118%; } /* 1em */
|
||||
h3 { font-size: 150%; } /* 1.35em */
|
||||
h4 { font-size: 140%; } /* 1.2em */
|
||||
h5 { font-size: 130%; } /* 1em */
|
||||
.title { font-size: 106%; /* 0.9em */
|
||||
font-weight: bold;
|
||||
}
|
||||
@ -446,7 +446,7 @@ asciidoc.install(3);
|
||||
<div class="paragraph"><p><strong>Autores</strong>: Willem Ferguson, Jacco van Koll, Dirk Hohndel, Reinout Hoornweg,
|
||||
Linus Torvalds, Miika Turkia, Amit Chaudhuri, Jan Schubert, Salvador Cuñat,
|
||||
Pedro Neves, Stefan Fuchs</p></div>
|
||||
<div class="paragraph"><p><span class="BLUE"><em>Versión 4.8, Septiembre 2018</em></span></p></div>
|
||||
<div class="paragraph"><p><span class="BLUE"><em>Versión 4.9, Febrero 2019</em></span></p></div>
|
||||
<div class="paragraph"><p>Bienvenido como usuario de <em>Subsurface</em>, un avanzado programa de registro de
|
||||
inmersiones con extensa infraestructura para describir, organizar e
|
||||
interpretar buceos en apnea o con botella. <em>Subsurface</em> ofrece muchas ventajas
|
||||
@ -515,9 +515,9 @@ y libdivecomputer.</p></div>
|
||||
el software, consulta la página Descargas en <a href="https://subsurface-divelog.org/">la
|
||||
web</a>. Por favor, comenta los problemas que tengas con este programa enviando un
|
||||
mail a <a href="mailto:subsurface@subsurface-divelog.org">nuestra lista de correo</a> e informa de
|
||||
fallos en <a href="https://github.com/Subsurface-divelog/subsurface/issues">nuestro bugtracker</a>.
|
||||
fallos en <a href="https://github.com/Subsurface/subsurface/issues">nuestro bugtracker</a>.
|
||||
Para instrucciones acerca de como compilar el software y (en caso necesario)
|
||||
sus dependencias, por favor, consulta el archivo INSTALL incluido con el código
|
||||
sus dependencias, por favor, consulta el archivo INSTALL.md incluido con el código
|
||||
fuente.</p></div>
|
||||
<div class="paragraph"><p><strong>Audiencia</strong>: Buceadores recreativos, Buceadores en apnea, Buceadores técnicos,
|
||||
Buceadores profesionales.</p></div>
|
||||
@ -591,7 +591,7 @@ se puede hacer lanzando <em>Subsurface</em> desde la línea de comandos con la o
|
||||
<h2 id="S_StartUsing">3. Empezar a usar el programa</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph"><p>La ventana <em>Subsurface</em> está, habitualmente, dividida en cuatro paneles con un
|
||||
<strong>Menú principal</strong> (Archivo Importar Registro Vista Compartir Ayuda) en la parte
|
||||
<strong>Menú principal</strong> (Archivo Importar Registro Vista Ayuda) en la parte
|
||||
superior (en Windows y Linux) o en la parte superior de la pantalla (en Mac y
|
||||
Ubuntu Unity). Los cuatro paneles son:</p></div>
|
||||
<div class="olist arabic"><ol class="arabic">
|
||||
@ -642,7 +642,7 @@ temperaturas del agua, consumos de gases; el tiempo total y el número de
|
||||
inmersiones seleccionadas).</p></div>
|
||||
<div class="imageblock" id="S_ViewPanels" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/main_window_f22.jpg" alt="La ventana principal" />
|
||||
<img src="images/MainWindow.jpg" alt="La ventana principal" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>El usuario puede elegir cual de los cuatro paneles se mostrará seleccionando la
|
||||
@ -906,6 +906,19 @@ El desplegable <strong>Dispositivo o punto de montaje</strong> contiene el nombr
|
||||
para detalles técnicos de como encontrar la información apropiada sobre
|
||||
puertos, para un ordenador en concreto y, en algunos casos, como hacer los
|
||||
ajustes correctos al Sistema Operativo del ordenador que ejecuta <em>Subsurface</em>.
|
||||
Algunos ordenadores de buceo desactivan este desplegable ya que usan otras
|
||||
formas de conectar con el dispositivo. Para algunos ordenadores, el dato
|
||||
introducido aquí es en realidad el punto de montaje del dispositivo de
|
||||
almacenamiento USB con el que el ordenador de buceo se identifica a sí
|
||||
mismo.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
Bajo los desplegables hay hasta cuatro botones que te permiten cambiar
|
||||
fácilmente entre varios ordenadores desde los que descargues
|
||||
frecuentemente. Estos botones solo aparecen después de que hayas descargado
|
||||
desde diferentes ordenadores de buceo.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
@ -1207,6 +1220,19 @@ de descarga _Bluetooth</em>.</p></div>
|
||||
<td class="icon">
|
||||
<img src="images/icons/important.png" alt="Important" />
|
||||
</td>
|
||||
<td class="content">El soporte de Subsurface en Windows para ordenadores de buceo BTLE es
|
||||
<strong>EXPERIMENTAL</strong> y solo está soportado en Windows10.
|
||||
Por favor, asegúrate de tener la última versión de Windows10.
|
||||
<a href="https://en.wikipedia.org/wiki/Windows_10_version_history#Version_1803_(April_2018_Update)">La
|
||||
versión 1803</a> is el requerimiento mínimo. Asegúrate también de tener
|
||||
instalados los últimos drivers para tu placa base o receptor BTLE.</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
<img src="images/icons/important.png" alt="Important" />
|
||||
</td>
|
||||
<td class="content"><strong>EN CASO DE PROBLEMAS</strong>: Si el adaptador Bluetooth del ordenador con <em>Subsurface</em>
|
||||
se cuelga y el proceso de descarga falla repetidamente, <em>desempareja</em> los
|
||||
dispositivos y repite los pasos indicados anteriormente. Si a pesar de ello
|
||||
@ -1289,13 +1315,14 @@ aire ya que el cambio en la lectura del sensor de temperatura es bastante lento
|
||||
para seguir los cambios en el entorno. Si fuera necesario, no hay que teclear
|
||||
las unidades de temperatura: <em>Subsurface</em> las suministra automáticamente de
|
||||
acuerdo con las <em>Preferencias</em> (métricas o imperiales).</p></div>
|
||||
<div class="paragraph"><p><strong>Ubicación</strong>:</p></div>
|
||||
<div class="paragraph" id="S_locations"><p><strong>Ubicación</strong>:</p></div>
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
<img src="images/icons/warning2.png" alt="Warning" />
|
||||
</td>
|
||||
<td class="content">Las localizaciones de buceo se gestionan como una parte <strong>separada</strong> del divelog.
|
||||
<td class="content">Las localizaciones de buceo se gestionan como una parte <strong>separada</strong> del divelog
|
||||
(Visita la sección llamada <a href="#S_DiveSiteManagement">Manipular información de puntos de buceo</a>).
|
||||
La información de buceo de las pestañas <strong>Notas</strong> y <strong>Equipo</strong> no se puede editar
|
||||
al mismo tiempo que la información de los puntos de buceo. Guarda toda la otra
|
||||
información (p.e. divemaster, compañero, equipo, etc) seleccionando <em>Aplicar
|
||||
@ -1746,9 +1773,24 @@ diarios de CCR APD.
|
||||
</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
<div class="paragraph"><p>Seleccionar el archivo correspondiente en la lista del diálogo abre el archivo
|
||||
importado directamente en la <strong>Lista de Inmersiones</strong> de <em>Subsurface</em>. También
|
||||
están soportados algunos otros formatos, no accesibles desde el diálogo
|
||||
<div class="paragraph"><p>Selecciona el formato correspondiente en la lista del diálogo y el archivo de
|
||||
la lista de la ventana principal. Luego haz clic en el botón _Abrir_abajo a la
|
||||
derecha.</p></div>
|
||||
<div class="paragraph"><p>Si el archivo que se está importando está en formato CSV, se da al usuario la
|
||||
ocasión de efectuar ediciones manuales en las cabeceras de las columnas antes
|
||||
de importarlas a <em>Subsurface</em> (ver imagen a continuación).</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/Import_csv.jpg" alt="FIGURA: Diálogo de importación: paso 2" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>Para más información sobre como configurar la importación CSV, visita
|
||||
<a href="#S_ImportingCSVDives">Importar datos en formato CSV</a>.
|
||||
En muchos casos no se requiere hacer cambios en las cabeceras de las columnas
|
||||
porque están pre configuradas para el tipo de importación en concreto y la
|
||||
pantalla de importación CSV se puede saltar pulsando el botón <em>OK</em>.
|
||||
Esto abrirá el divelog importado en la <strong>Lista de inmersiones</strong> de <em>Subsurface</em>.</p></div>
|
||||
<div class="paragraph"><p>También están soportados algunos otros formatos, no accesibles desde el diálogo
|
||||
Importar, como se explica a continuación.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
@ -2144,7 +2186,126 @@ asegurarse de que el resto funciona.</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_importar_coordenadas_de_buceo_desde_un_dispositivo_movil_con_gps">5.4. Importar coordenadas de buceo desde un dispositivo movil con GPS</h3>
|
||||
<h3 id="S_DiveSiteManagement">5.4. Manipular la información de puntos de buceo</h3>
|
||||
<div class="paragraph"><p>La información de los puntos de buceo se gestiona como una entidad separada de
|
||||
la información de la inmersión.
|
||||
Al seleccionar la pestaña llamada "Puntos de buceo" en el panel <strong>Notas</strong>,
|
||||
aparecerá el <em>panel de gestión de puntos de inmersión</em> (ver imagen a
|
||||
continuación). Asignar un punto de buceo a una inmersión se hace desde la
|
||||
pestaña Notas que muestra la información de la inmersión (visita la sección
|
||||
<a href="#S_locations">Ubicaciones</a>). Por otra parte, el panel de gestión de puntos
|
||||
de buceo permite manejar datos independientes de las inmersiones. Un punto de
|
||||
buceo nuevo se puede crear mientras se edita una inmersión o bien desde el
|
||||
panel de gestión de puntos de buceo (ver imagen a continuación).</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/DiveSitesTab.jpg" alt="FIGURE: Pestaña puntos de buceo" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>Si se ha creado previamente la descripción de un punto de buceo, este se
|
||||
mostrará en el panel, así como el número de inmersiones en cada punto. La
|
||||
lista de puntos puede ordenarse haciendo clic en cualquiera de los
|
||||
encabezamientos. A la derecha de cada punto de buceo hay un icono de papelera
|
||||
y otro de edición, Se pueden efectuar las siguientes acciones para gestionar
|
||||
la colección de puntos de buceo:</p></div>
|
||||
<div class="sect3">
|
||||
<h4 id="_filtrar_la_lista_de_puntos_de_inmersion">5.4.1. Filtrar la lista de puntos de inmersión</h4>
|
||||
<div class="paragraph"><p>Arriba a la derecha en el panel hay una casilla de texto (ver imanterior). Si
|
||||
solo quieres visualizar inmersiones de un punto en concreto, teclea un nombre
|
||||
parcial como "Genova", así se mostrarán solo los nombres que contengan la
|
||||
palabra "Genova" en el nombre o la descripción.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_editar_un_punto_de_buceo">5.4.2. Editar un punto de buceo</h4>
|
||||
<div class="paragraph"><p>La información de cada punto de buceo puede editarse, bien desde la pestaña
|
||||
<strong>Notas</strong>, bien desde la pestaña <strong>Puntos de buceo</strong>. Para editar la información,
|
||||
selecciona el icono Editar de la izquierda del nombre del punto de buceo (ver
|
||||
imagen anterior). La edición desde la pestaña <strong>Notas</strong> se comenta en la sección
|
||||
<a href="#S_locations">Ubicaciones</a> donde se explica cada uno de los campos del
|
||||
panel de edición.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/DiveSiteEdit.jpg" alt="FIGURA: Edición de puntos de buceo" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>Añade cualquier información que desees en la pestaña. Como editar las
|
||||
coordenadas se explica en la sección sobre <a href="#S_locations">Ubicaciones</a>.
|
||||
Cuando termines de editar la información del punto de inmersión, selecciona el
|
||||
botón <strong>Terminado</strong> en la parte de arriba. Esto te devolverá al panel de gestión
|
||||
de puntos de buceo.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_mezclar_puntos_de_inmersion">5.4.3. Mezclar puntos de inmersión</h4>
|
||||
<div class="paragraph"><p>Mezclar dos o más puntos de inmersión se consigue desde el panel de edición de
|
||||
puntos de buceo (ver imagen anterior). Asumimos que los puntos que se están
|
||||
mezclando no están a mucha distancia. La mezcla se efectúa seleccionando un
|
||||
punto y luego mezclando otros con este primero. En la parte superior del panel
|
||||
de edición, selecciona la casilla de texto etiquetada "Mostrar los puntos de
|
||||
buceo en el rango:" e introduce la distancia que consideres oportuna para
|
||||
considerar que los diversos puntos son el mismo.
|
||||
Se te presentará una lista con los puntos en el radio que hayas introducido
|
||||
(ver imaden a continuación).</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/DiveSiteMerge.jpg" alt="FIGURA: Mezcla de puntos de buceo" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>Selecciona el punto a mezclar haciendo clic derecho sobre él. Se mostrará un
|
||||
mensaje de confirmación (ver imagen anterior). Al aceptar el mensaje de
|
||||
confirmación se mezcla la inmersión seleccionada con la de arriba del panel y
|
||||
se regresa al panel de gestión de puntos de buceo.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_anadir_un_punto_de_buceo">5.4.4. Añadir un punto de buceo</h4>
|
||||
<div class="paragraph"><p>En la parte alta de la tabla de gestión de puntos de buceo hay un botón
|
||||
redondo con un "+". Haciendo clic en este botón se inserta un nuevo punto de
|
||||
buceo llamado "Nuevo punto de buceo" (imagen a continuación). El nuevo punto
|
||||
puede borrarse si nos hubiéramos equivocado seleccionando <em>Editar → Deshacer</em>
|
||||
en el menú principal o tecleando Ctrl-Z mientras mantenemos enfocada la tabla
|
||||
de gestión de puntos de buceo. El punto nuevo se edita seleccionando su botón
|
||||
de edición y proporcionando un nombre, coordenadas y, si se desea, una
|
||||
descripción. Al pulsar el botón "Terminado" en el panel de edición se regresa
|
||||
a al panel de gestión de puntos de buceo.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/DiveSiteInsert.jpg" alt="FIGURA: Añadir un punto de buceo" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_borrar_un_punto_de_inmersion">5.4.5. Borrar un punto de inmersión</h4>
|
||||
<div class="paragraph"><p>A la izquierda de cada punto de buceo hay una papelera. Pulsar este icono
|
||||
borrará el punto de buceo asociado. Si hay varias inmersiones asociadas a este
|
||||
punto, se mostrará un mensaje de aviso (ver imagen a continuación). Si el
|
||||
punto se borra, será necesario crear ubicaciones para las inmersiones que
|
||||
estuvieran asociadas al punto borrado.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/DiveSiteDelete.jpg" alt="FIGURA: Borrar un punto de buceo" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_aproximacion_general_al_uso_de_la_lista_de_puntos_de_buceo">5.4.6. Aproximación general al uso de la lista de puntos de buceo</h4>
|
||||
<div class="paragraph"><p>Ya que la lista de puntos de buceo se gestiona separadamente de la lista de
|
||||
inmersiones, es posible añadir puntos de buceo aunque no se hayan utilizado en
|
||||
ninguna inmersión. En este caso, la columna etiquetada "# de buceos" muestra
|
||||
un cero.
|
||||
Esto posibilita que los buceadores que comparten puntos de buceo puedan
|
||||
crearlos antes de haberlos buceado. Además, un punto puede crearse con
|
||||
mucha información en la descripción, de esta forma la lista de puntos de buceo
|
||||
se convierte en un útil repositorio de información fuera de la lista de
|
||||
inmersiones.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_borrar_puntos_de_buceo_no_utilizados">5.4.7. Borrar puntos de buceo no utilizados</h4>
|
||||
<div class="paragraph"><p>Arriba a la izquierda en el panel de gestión de inmersiones hay un botón
|
||||
"Purgar puntos de buceo no usados". Al pulsar este botón se borran todos los
|
||||
puntos de buceo que no tengan inmersiones asociadas.</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_importar_coordenadas_de_buceo_desde_un_dispositivo_movil_con_gps">5.5. Importar coordenadas de buceo desde un dispositivo movil con GPS</h3>
|
||||
<div class="paragraph"><p>Un smartphone con GPS incorporado puede utilizarse para guardar las
|
||||
ubicaciones de las inmersiones. Esto se hace como sigue:</p></div>
|
||||
<div class="paragraph"><p>1) Llevar el dispositivo móvil en el barco de buceo o vida abordo, para
|
||||
@ -2161,7 +2322,7 @@ El antiguo servicio de posiciones GPS en internet se cerrará a finales de 2018
|
||||
y a partir de ese momento, la app <em>Companion</em> ya no se podrá utilizar. Por
|
||||
favor, usa la app <em>Subsurface-mobile</em> en su lugar.</p></div>
|
||||
<div class="sect3">
|
||||
<h4 id="_guardar_y_utilizar_coordenadas_gps_utilizando_em_subsurface_mobile_em">5.4.1. Guardar y utilizar coordenadas GPS utilizando <em>Subsurface-mobile</em></h4>
|
||||
<h4 id="_guardar_y_utilizar_coordenadas_gps_utilizando_em_subsurface_mobile_em">5.5.1. Guardar y utilizar coordenadas GPS utilizando <em>Subsurface-mobile</em></h4>
|
||||
<div class="sect4">
|
||||
<h5 id="_instalar_em_subsurface_mobile_em">Instalar <em>Subsurface-mobile</em></h5>
|
||||
<div class="paragraph"><p>Busca <em>Subsurface-mobile</em> en Google Play e instálala en el dispositivo
|
||||
@ -2245,7 +2406,7 @@ recogida, subida, gestión y sincronizado de estas información.</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="S_LoadImage">5.5. Añadir fotografías o vídeos a las inmersiones</h3>
|
||||
<h3 id="S_LoadImage">5.6. Añadir fotografías o vídeos a las inmersiones</h3>
|
||||
<div class="paragraph"><p>Muchos buceadores (si no la mayoría) toman fotografías o vídeos durante sus
|
||||
inmersiones. LLamaremos a estos archivos "medios" refiriendonos a fotos o
|
||||
vídeos.
|
||||
@ -2255,7 +2416,7 @@ donde se tomaron. Los medios pueden visualizarse desde el perfil o desde la
|
||||
pestaña <em>Medios</em> en el <strong>Panel de Notas</strong>. <em>Subsurface</em> permite visualizar las
|
||||
fotos o vídeos en un interfaz unificado.</p></div>
|
||||
<div class="sect3">
|
||||
<h4 id="_cargar_medios_y_sincronizar_la_camara_con_el_ordenador_de_buceo">5.5.1. Cargar medios y sincronizar la cámara con el ordenador de buceo</h4>
|
||||
<h4 id="_cargar_medios_y_sincronizar_la_camara_con_el_ordenador_de_buceo">5.6.1. Cargar medios y sincronizar la cámara con el ordenador de buceo</h4>
|
||||
<div class="paragraph"><p>Se selecciona una inmersión o un grupo de ellas en la lista. Luego se hace
|
||||
clic-derecho en la selección lo que nos mostrará el <a href="#S_DiveListContextMenu">Menú contextual de la lista de inmersiones</a>.
|
||||
Hacemos click-izquierdo en la opción apropiada para cargar los medios desde
|
||||
@ -2342,7 +2503,7 @@ que todas las fotos o videos asociados con un buceo puedan visualizarse,
|
||||
incluidos los que se hayan tomado antes o despues de la inmersión.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="S_ViewMedia">5.5.2. Visualizar los medios</h4>
|
||||
<h4 id="S_ViewMedia">5.6.2. Visualizar los medios</h4>
|
||||
<div class="sidebarblock">
|
||||
<div class="content">
|
||||
<div class="paragraph"><p><strong>Asegurarse de que se crean las miniaturas para los archivos de vídeo</strong></p></div>
|
||||
@ -2422,7 +2583,7 @@ sobre las imágenes. Las imágenes también puede borrase desde la pestaña
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_la_pestana_em_medios_em">5.5.3. La pestaña <em>Medios</em></h4>
|
||||
<h4 id="_la_pestana_em_medios_em">5.6.3. La pestaña <em>Medios</em></h4>
|
||||
<div class="paragraph"><p>Los medios asociados a una inmersión se muestran como miniaturas en la
|
||||
pestaña <em>Medios</em> del <em>Panel de Notas</em>. Se puede acceder con facilidad a las
|
||||
fotos hechas en rápida sucesión durante la inmersión, desde la pestaña <em>Medios</em>.
|
||||
@ -2437,9 +2598,22 @@ video superpuesto a la ventana de <em>Subsurface</em>. Podemos borrar un medio d
|
||||
la pestaña <em>Medios</em> seleccionándolo (un solo clic) y pulsando a continuación la
|
||||
tecla <em>Supr</em> en el teclado. Esto eliminará el medio tanto de la pestaña
|
||||
<em>Medios</em> como del <em>Perfil de la inmersión</em>.</p></div>
|
||||
<div class="paragraph"><p>Haciendo clic derecho en un vídeo y seleccionando "Guardar datos como
|
||||
subtitulos", se creará un archivo con el mismo nombre que el vídeo y con
|
||||
extensión ".ass" que contendrá datos de la inmersión en función del tiempo
|
||||
(tiempo transcurrido, profundidad, temperatura, LND, TTS, y GF) que se
|
||||
superpondrán al vídeo. El reproductor de medios VLC encuentra automáticamente
|
||||
este archivo y lo utiliza al reproducir un vídeo. Como alternativa, puede
|
||||
utilizarse el codificador de vídeo ffmpeg para crear un nuevo archivo de vídeo
|
||||
con los datos codificados en él. Para ello, ejecuta</p></div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre><code>ffmpeg -v video.mp4 -vf "ass=video.ass" video_with_data.mp4</code></pre>
|
||||
</div></div>
|
||||
<div class="paragraph"><p>desde la línea de comandos. Es necesario tener instalada la librería libass,</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_fotos_en_disco_duro_externo">5.5.4. Fotos en disco duro externo</h4>
|
||||
<h4 id="_fotos_en_disco_duro_externo">5.6.4. Fotos en disco duro externo</h4>
|
||||
<div class="paragraph"><p>La mayoría de fotosubs guardan sus fotografías en un disco duro externo. Si este
|
||||
disco puede mapearse (como es casi siempre el caso) <em>Subsurface</em> puede acceder
|
||||
directamente a los medios. Esto facilita la interacción entre <em>Subsurface</em> y un
|
||||
@ -2454,7 +2628,7 @@ Si, posteriormente, el disco externo con los medios se vuelve a conectar, los
|
||||
medios podrán visualizarse normalmente.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_averiguar_que_inmersiones_tienen_medios_asociados">5.5.5. Averiguar que inmersiones tienen medios asociados</h4>
|
||||
<h4 id="_averiguar_que_inmersiones_tienen_medios_asociados">5.6.5. Averiguar que inmersiones tienen medios asociados</h4>
|
||||
<div class="paragraph"><p>Inspeccionar cada inmersión individual para saber si tiene asociados medios
|
||||
puede llevarnos mucho tiempo. Hay una forma rápida de saber que inmersiones
|
||||
tiene asociados medios y cuales no: activa la casilla <em>Medios</em> en la lista
|
||||
@ -2465,7 +2639,7 @@ después o todo ello. Hay más información en la sección del manual que cubre
|
||||
los <a href="#S_Divelist_columns">iconos de fotos en la <strong>Lista de Inmersiones</strong></a>.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="S_FindMovedImages">5.5.6. Mover medios entre directorios, discos duros u ordenadores</h4>
|
||||
<h4 id="S_FindMovedImages">5.6.6. Mover medios entre directorios, discos duros u ordenadores</h4>
|
||||
<div class="paragraph"><p>Tras haber cargado un medio en <em>subsurface</em> y haberlo asociado a un buceo
|
||||
determinado, se archiva el directorio donde el archivo permanece guardado, para poder
|
||||
encontrarlo cuando se vuelva a abrir la inmersión. Si la foto, la colección
|
||||
@ -2498,11 +2672,11 @@ sus posiciones conocidas. Los cambios propuestos pueden aplicarse clicando en
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_registrar_tipos_de_inmersion_especiales">5.6. Registrar tipos de inmersión especiales</h3>
|
||||
<h3 id="_registrar_tipos_de_inmersion_especiales">5.7. Registrar tipos de inmersión especiales</h3>
|
||||
<div class="paragraph"><p>Esta sección da ejemplos de la verstilidad de <em>Subsurface</em> como herramienta de
|
||||
registro de inmersiones.</p></div>
|
||||
<div class="sect3">
|
||||
<h4 id="S_MulticylinderDives">5.6.1. Inmersiones multi botella</h4>
|
||||
<h4 id="S_MulticylinderDives">5.7.1. Inmersiones multi botella</h4>
|
||||
<div class="paragraph"><p><em>Subsurface</em> maneja fácilmente inmersiones que requieren más de una botella. El
|
||||
buceo multi botella se produce habitualmente cuando (a) un buceador no tiene
|
||||
bastante gas para completar una inmersión con una sola botella o (b) cuando el
|
||||
@ -2572,7 +2746,7 @@ en lateral (en las que utilicen dos botellas). Visita el link
|
||||
de ordenadores de buceo soportados</a>.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_inmersiones_en_montaje_lateral_sidemount">5.6.2. Inmersiones en montaje lateral (sidemount)</h4>
|
||||
<h4 id="_inmersiones_en_montaje_lateral_sidemount">5.7.2. Inmersiones en montaje lateral (sidemount)</h4>
|
||||
<div class="paragraph"><p>El buceo en montaje lateral es solo otra forma de buceo multi botella, a menudo
|
||||
con ambas o todas las botellas conteniendo la misma mezcla. Aunque es una
|
||||
configuración popular entre los espeleo buceadores, el buceo en lateral se
|
||||
@ -2628,7 +2802,7 @@ exactamente como con las inmersiones multi botella anteriores:</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="S_sSCR_dives">5.6.3. Inmersiones con rebreather pasivo de circuito semi cerrado (pSCR)</h4>
|
||||
<h4 id="S_sSCR_dives">5.7.3. Inmersiones con rebreather pasivo de circuito semi cerrado (pSCR)</h4>
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
@ -2727,7 +2901,7 @@ naranja).</td>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="S_CCR_dives">5.6.4. Inmersiones con rebreather de circuito cerrado (CCR)</h4>
|
||||
<h4 id="S_CCR_dives">5.7.4. Inmersiones con rebreather de circuito cerrado (CCR)</h4>
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
@ -3138,10 +3312,13 @@ Entre ellas se incluyen: Momento de tiempo en la inmersión (indicado por un
|
||||
ascenso y descenso, el Consumo de aire en superficie (CAS), la presión
|
||||
parcial de oxigeno, la profundidad máxima operativa de la mezcla (POM o MOD),
|
||||
la profundidad equivalente a aire (PEA o EAD), la profundidad narcótica equivalente
|
||||
(PNE o END), la profundidad equivalenta a la densidad del aire (EADD), los
|
||||
requisitos descompresivos en ese instante de tiempo (Deco), el Tiempo hasta la
|
||||
superficie (TTS), el techo calculado así como el techo calculado para varios
|
||||
compartimentos de tejidos de Bühlmann.</p></div>
|
||||
(PNE o END), la profundidad equivalente a la densidad del aire (EADD), los
|
||||
requisitos descompresivos en ese instante de tiempo (Deco), el GF en
|
||||
superficie (una medida de la carga de gas inerte en el cuerpo del buzo
|
||||
definida como el exceso sobre la presión en superficie normalizada tal que la
|
||||
la presión máxima permitida en superficie, el valor M, corresponde al 100%), el
|
||||
Tiempo hasta la superficie (TTS), el techo calculado así como el techo
|
||||
calculado para varios compartimentos de tejidos de Bühlmann.</p></div>
|
||||
<div class="paragraph"><p>El usuario tiene control sobre varios de los datos que se muestran en la Caja
|
||||
de Información, mostrados como cuatro de los botones en la columna a la
|
||||
izquierda del panel del perfil. Estos son:</p></div>
|
||||
@ -3182,6 +3359,19 @@ Los TTS mayores a 2 horas resultan muy imprecisos y Subsurface solo indicará
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
<img src="images/icons/GFLow.jpg" alt="Note" />
|
||||
</td>
|
||||
<td class="content">Muestra información de deco. Si está activado, la caja de información muestra
|
||||
el GF en superficie y los techos para los compartimentos de tejidos
|
||||
individuales. El GF en superficie es un indicador de hasta que punto la
|
||||
presión parcial de nitrógeno en la sangre excede la presión parcial que se
|
||||
necesita para llegar a superficie con seguridad. Un GF en superficie superior
|
||||
al 100% significa que emerger no es seguro.</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
<img src="images/icons/SAC.jpg" alt="Note" />
|
||||
</td>
|
||||
<td class="content">Pulsar en este botón hace que se muestre en la Caja de Información el
|
||||
@ -3481,6 +3671,13 @@ ha eliminado a través de la respiración por lo que, aunque el buceador
|
||||
técnicamente encontrara un techo, la inmersión aún no requiere explícitamente
|
||||
una parada de descompresión. Esta característica permite a los ordenadores de
|
||||
buceo ofrecer tiempos de fondo más largos.</p></div>
|
||||
<div class="paragraph"><p>Estríctamente hablando, el techo verde calculado es solo una representación directa
|
||||
de las cargas de gas inerte de los tejidos simulados y es independiente de
|
||||
cualquier velocidad de ascenso asumida. Indica la profundidad mínima permitida
|
||||
por el modelo de descompresión en ese instante de tiempo para unas cargas de
|
||||
gas determinadas y no es una afirmación acerca de una posible tabla de ascenso
|
||||
para el resto de la inmersión. Para obtener esta última utiliza la opción
|
||||
"Editar inmersión en el Planificador_" en el menú Registro.</p></div>
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
@ -3712,6 +3909,87 @@ un marcador preexistente, el menú se extiende añadiendo opciones para permitir
|
||||
el borrado del marcador o permitir ocultar todos los marcadores de ese tipo.</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="S_Filter">6.5. Filtrar la lista de inmersiones</h3>
|
||||
<div class="paragraph"><p>Los buceos de la <strong>Lista de Inmersiones</strong> se pueden filtrar seleccionando solo
|
||||
algunos de ellos basándonos en atributos como etiquetas, puntos de buceo,
|
||||
compañero o divemaster. Por ejemplo, el filtrado nos permite ver las
|
||||
inmersiones de un año en concreto en cierto punto de buceo, o, por otro lado,
|
||||
las inmersiones en cuevas con determinado compañero. El filtrado puede hacerse
|
||||
en base a cualquier dato del <em>Panel de Información</em>.</p></div>
|
||||
<div class="paragraph"><p>Para abrir el filtro, seleccionamos <em>Registro → Filtrar lista de inmersiones</em>
|
||||
desde el menú principal. Esto reemplazará el <em>Panel Mapa</em> por el <em>Panel
|
||||
Filtro</em>. La barra superior contiene el número de buceos que satisfacen las
|
||||
selecciones efectuadas en el filtro (ver imagen a continuación).</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/FilterWindowBar.jpg" alt="Figura: Barra de la ventana de filtrado" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>Al abrirse, el filtro contiene valores por defecto que incluyen todas los
|
||||
buceos de la <em>Lista de Inmersiones</em>. Fíltrala cambiando algunos de los valores
|
||||
por defecto del panel o tecleando valores concretos o palabras en cualquiera
|
||||
de los campos de texto. Por ejemplo, en la imagen a continuación se muestran
|
||||
inmersiones en circuito abierto, con traje seco, en una ubicación específica
|
||||
(Simonstad). No hay botón para activar la acción de filtrado: el hecho de
|
||||
teclear en uno de los campos de texto o especificar un rango en cualquiera de
|
||||
los campos, efectúa automáticamente el filtrado.</p></div>
|
||||
<div class="paragraph"><p>Durante el filtrado, el modo de buceo (Circuito abierto, CCR, pSCR, Apnea) se
|
||||
añade a la lista de etiquetas de una inmersión, lo que permite seleccionar
|
||||
solo determinados tipos de buceo (p.e. CCR) en el filtro. Esto resulta útil
|
||||
para buceadores con reciclador o apneistas que también buceen en circuito
|
||||
abierto.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/FilterPanel.jpg" alt="Figura: Panel de filtrado" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>El criterio de filtrado puede ser cualquiera de los siguientes:</p></div>
|
||||
<div class="paragraph"><p>1) Usar varios campos de texto en el panel de filtrado produce una operación
|
||||
"AND" en los atributos. Por ejemplo, al teclear "Peter" en el atributo
|
||||
Personas y "Sipadan" en el atributo Ubicación se obtiene una lista de
|
||||
inmersiones que contienen a Peter y a Sipadan.</p></div>
|
||||
<div class="paragraph"><p>2) En un atributo único, el criterio "All of" implementa un operador "AND". En
|
||||
la imagen a continuación, para el atributo <em>Personas</em>, la lista de inmersiones
|
||||
contiene los buceos en los que aparecen Bob Smith Y Stephan Schultz como
|
||||
compañeros/divemaster en base a la información de personas del <em>Panel
|
||||
Información</em>.</p></div>
|
||||
<div class="paragraph"><p>3) El criterio "Any of" implementa una operación "OR". Para el atributo
|
||||
<em>Ubicación</em> de la imagen a continuación, la lista filtrada contiene las
|
||||
inmersiones efectuadas en Simonstad "O" en Hout Bay.</p></div>
|
||||
<div class="paragraph"><p>4) El criterio "None of" implementa una operación "NOT". Para el atributo
|
||||
<em>Traje</em> en la imagen a continuación, la lista de inmersiones EXCLUYE todas
|
||||
las inmersiones en las que se usó traje seco,</p></div>
|
||||
<div class="paragraph"><p>5) Campo vacío. El resultado de los campos vacíos para <em>Notas</em> y <em>Etiquetas</em>
|
||||
en la imagen a continuación, es que estos atributos no se tienen en cuenta
|
||||
durante el filtrado.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/FilterOptions.jpg" alt="Figura: Opciones de filtrado" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>En la parte superior del <em>Panel de Filtrado</em>, la <strong>flecha amarilla hacia
|
||||
arriba</strong> se usa para reiniciar el filtro y mostrar todos los buceos. El botón
|
||||
rojo con el aspa blanca se usa para cerrar el panel.</p></div>
|
||||
<div class="admonitionblock">
|
||||
<table><tr>
|
||||
<td class="icon">
|
||||
<img src="./images/icons/important.png" alt="Important" />
|
||||
</td>
|
||||
<td class="content">La acción de filtrado solo se puede detener usando el botón "flecha
|
||||
amarilla hacia arriba" o limpiando manualmente todos los campos de texto.
|
||||
Cerrar el <em>Panel de filtrado</em> no acaba con la acción de filtrado: la lista
|
||||
permanece sin cambios. Esto resulta obvio al indicar la barra superior de
|
||||
<em>Subsurface</em> que solo se están mostrando parte de las inmersiones. Cerrar el
|
||||
<em>Panel de filtrado</em> reabre el <em>Panel Mapa</em>, permitiendo visualizar las
|
||||
posiciones de la lista filtrada. Por ejemplo, podemos querer filtrar a Bob
|
||||
Smith como compañero. Al cerrar el <em>Panel de filtrado</em> se visualizan las
|
||||
ubicaciones en las que hemos buceado con este compañero. Para reabrir el
|
||||
<em>Panel de filtrado</em>, en este caso, seleccionamos <em>Registro → Filtrar lista de
|
||||
inmersiones</em> desde el <em>Menú Principal</em>.</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
@ -3941,117 +4219,11 @@ selecciona <em>Editar</em> desde el <strong>Menú Principal</strong>, lo que pre
|
||||
con las posibilidades <em>Deshacer</em> y <em>Rehacer</em>.</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="S_Filter">7.5. Filtrar la Lista de Inmersiones</h3>
|
||||
<div class="paragraph"><p>Los buceos del panel <strong>Lista de inmersiones</strong> pueden filtrarse, esto es, se pueden
|
||||
seleccionar únicamente algunos de los buceos basándose en sus atributos, p.e.
|
||||
las etiquetas, el lugar de buceo, el divemaster, compañeros o traje protector.
|
||||
El filtrado permite, por ejemplo, listar las inmersiones profundas en un punto
|
||||
determinado o, por el contrario, las inmersiones en cuevas con cierto
|
||||
compañero.</p></div>
|
||||
<div class="paragraph"><p>Para abrir el filtrado, seleccionar <em>Registro → Filtrar la lista de inmersiones</em>
|
||||
desde el menú principal. Esto abrirá el <em>Panel de filtrado</em> en la parte de arriba
|
||||
de la ventana de <em>Subsurface</em>. Arriba a la derecha del panel se ubican tres
|
||||
iconos (ver imagen a continuación).
|
||||
El <em>Panel de filtrado</em> puede reiniciarse (p.e. limpiar todos los filtros
|
||||
actuales) seleccionando la flecha amarilla. El <em>Panel de filtrado</em> también puede
|
||||
minimizarse seleccionando la <strong>flecha verde</strong>. Cuando está minimizado solo se
|
||||
muestran los tres iconos. El panel puede maximizarse clicando el icono que lo
|
||||
minimizó. El filtro se cierra y reinicia seleccionando el <strong>botón rojo</strong> con la
|
||||
cruz blanca.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/Filterpanel.jpg" alt="Figura: Panel de filtrado" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>Se pueden utilizar cuatro criterios para filtrar la lista de inmersiones:
|
||||
las etiquetas, las personas (compañeros/divemasters), punto de inmersión y traje
|
||||
de buceo, cada uno de los cuales viene representado por una lista seleccionable.
|
||||
Sobre cada lista hay un segundo nivel de filtrado. Por ejemplo, tecleando "<em>Ba</em>"
|
||||
en la casilla de texto sobre las ubicaciones, la lista podría quedar reducida a
|
||||
"<em>Bajo Piles I</em>", "<em>Bajo Piles II</em>" y "<em>Bajo de Testa</em>". Filtrar la lista
|
||||
permite encontrar rápidamente términos de búsqueda para filtrar la lista de
|
||||
inmersiones.</p></div>
|
||||
<div class="paragraph"><p>Para activar el filtrado de la lista de inmersiones, se necesita seleccionar
|
||||
al menos una casilla en una de las cuatro listas. La lista de inmersiones se
|
||||
reduce para mostrar solo los buceos que cumplen los criterios seleccionados en
|
||||
las listas. Las cuatro listas funcionan como un filtro con operadores <em>Y</em>,
|
||||
<em>Subsurface</em> filtraría, pues, para "<em>cueva</em>" como etiqueta y "<em>José García</em>"
|
||||
como compañero; pero los filtros dentro de una categoría son inclusivos, esto
|
||||
es, filtrar por etiquetas con "cueva" y "barco" mostraría todas las inmersiones
|
||||
en las que aparezcan las etiquetas "cueva" <em>O</em> "barco", solas o conjuntamente.</p></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="S_ExportLog">8. Exportar el registro de inmersiones o parte del mismo</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph"><p>Hay dos posibilidades de exportar información de buceo desde <em>Subsurface</em>:</p></div>
|
||||
<div class="ulist"><ul>
|
||||
<li>
|
||||
<p>
|
||||
Exportar información de buceo a <em>Facebook</em>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<a href="#S_Export_other">Exportar información de buceo a otros destinos o formatos</a>
|
||||
</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
<div class="sect2">
|
||||
<h3 id="S_Facebook">8.1. Exportar información de buceo a <em>Facebook</em></h3>
|
||||
<div class="paragraph"><p>La exportación de inmersiones a <em>Facebook</em> se maneja de forma diferente a otros
|
||||
tipos de exportación porque se requiere una
|
||||
conexión a esta red social y se necesita un usuario de <em>Facebook</em> y su password.
|
||||
Si, desde el menú principal, seleccionamos <em>Compartir → Conectar a →
|
||||
Facebook</em> (imagen <strong>A</strong> siguiente), se nos presentará una pantalla de acceso
|
||||
(imagen <strong>B</strong> a continuación). Introducimos nuestro usuario y password de
|
||||
<em>Facebook</em>.
|
||||
Desde la ventana de <em>Subsurface</em> es fácil saber si se tiene una conexión válida
|
||||
con <em>Facebook</em>. Desde el <strong>Menú principal</strong>, selecciona <em>Compartir</em>
|
||||
(ver imagen <strong>A</strong> a continuación). Normalmente la opción <em>Facebook</em> está
|
||||
desactivada, pero, si hay una conexión establecida, la opción está activa y
|
||||
puede ser seleccionada.
|
||||
Tras haber establecido una conexión con <em>Facebook</em>, se mostrará un panel con
|
||||
un mensaje: "<em>Para desconectar Subsurface de tu cuenta de Facebook, utiliza la
|
||||
entrada del menú 'Compartir'</em>."
|
||||
Cierra este panel.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/facebook1.jpg" alt="Figure: Facebook login" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>Habiendo establecido una conexión a <em>Facebook</em>, transferir un perfil al
|
||||
historial es fácil.
|
||||
Selecciona en la <strong>Lista de Inmersiones</strong> de <em>Subsurface</em> el buceo que quieras
|
||||
transferir; entonces, desde el <strong>Menú</strong> selecciona <em>Compartir → Facebook</em>,
|
||||
aparecerá un diálogo en el que se definirá la cantidad de información
|
||||
adicional que se desea compartir en el historial junto con el perfil (ver imagen
|
||||
<strong>A</strong>, a continuación). Se necesita proporcionar el nombre de un álbum de <em>Facebook</em>
|
||||
para poder enviar el perfil de inmersión. Las casillas seleccionables de la
|
||||
izquierda nos permiten seleccionar la información que vamos a enviar. Esta
|
||||
información se muestra en la ventana de texto de la derecha (ver imagen <strong>A</strong>
|
||||
a continuación). El mensaje que se va a enviar se puede editar directamente en
|
||||
esta ventana de texto. Tras haber elegido la información y verificado lo que se va
|
||||
a subir, se selecciona el botón <em>OK</em> lo que inicia la transferencia a <em>Facebook</em>.
|
||||
Unos momentos después aparecerá un mensaje indicando una transferencia correcta.</p></div>
|
||||
<div class="paragraph"><p>El álbum creado y el post al historial se marcarán como privados. Para que
|
||||
los amigos puedan ver el post habrá que cambiar los permisos desde un acceso
|
||||
normal a <em>Facebook</em> desde un navegador o desde la app de <em>Facebook</em>. Aunque
|
||||
esto suponga un paso de más, los desarrolladores entienden que esta es la mejor
|
||||
solución para evitar subidas no deseadas en el historial público.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/facebook2.jpg" alt="Figure: Facebook data submission" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>Si se considera necesario, cierra la conexión a <em>Facebook</em>, seleccionando
|
||||
desde el <strong>Menú principal</strong>, <em>Compartir → Desconectar de → Facebook</em> (imagen
|
||||
<strong>B</strong> anterior).</p></div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="S_Export_other">8.2. Exportar información de buceo a otros destinos o formatos</h3>
|
||||
<div class="paragraph"><p>Para exportar a otros destinos,
|
||||
se llega a la función de exportación seleccionando <em>Archivo → Exportar</em> lo que
|
||||
despliega el diálogo de exportación. Este diálogo siempre ofrece dos opciones:
|
||||
@ -4109,6 +4281,20 @@ Universal Dive Data format (UDDF). Ver <a href="http://uddf.org">http://uddf.org
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<em>Perfil de Inmersión</em>, que permite compartir facilmente el perfil usando
|
||||
redes sociales. Esta opción escribe la imagen del perfil de buceo en un
|
||||
archivo en formato gráfico <em>.PNG</em> en la carpeta indicada en el diálogo
|
||||
<em>Guardar Archivo</em>. La imagen guardada es exactamente la que se puede ver en
|
||||
el perfil en la pantalla, así que comprueba que tienes activadas las
|
||||
opciones correctas de la caja de herramientas del perfil. Si se seleccionan
|
||||
varias inmersiones las imagenes se escriben en archivos separados. Al
|
||||
seleccionar la opción <em>Perfil de Inmersión</em> se abre una ventana para elegir
|
||||
el nombre que queremos asignar a los archivos a los que escribir los
|
||||
perfiles. Pulsa <em>Guardar</em> tras haber escrito el nombre.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
Formato <em>HTML</em>, en el cual los buceos se guardan en archivos HTML,
|
||||
visualizables con un navegador de internet.Se soportan la mayoría de navegadores
|
||||
modernos, pero debe estar activado Javascript. Este archivo <strong>NO</strong> es editable. El
|
||||
@ -4157,6 +4343,12 @@ Formato <em>TeX</em>, un archivo para imprimir usando el software tipográfico T
|
||||
<div class="ulist"><ul>
|
||||
<li>
|
||||
<p>
|
||||
<em>LaTeX</em>. Escribe la inmersión a un documento Latex, en el que los ajustes
|
||||
tipográficos se efectuan automáticamente usando TeX.
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<em>Profundidad de imágenes</em>, que crea un fichero de texto que contiene los
|
||||
nombres de todos los archivos de imagen o vídeo añadidos a cualquiera de los buceos
|
||||
seleccionados del la <em>Lista de inmersiones</em>, junto con la profundidad a la
|
||||
@ -4208,7 +4400,6 @@ Solo exportar lista: Solo se exportará una lista de inmersiones. No se
|
||||
</ul></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="S_Cloud_access">9. Guardar un diario de <em>Subsurface</em> en la Nube</h2>
|
||||
<div class="sectionbody">
|
||||
@ -4558,7 +4749,7 @@ el nombre de dispositivo asignado al ordenador por el sistema operativo.
|
||||
Ver el <a href="#_apendice_a_informacion_especifica_del_sistema_operativo_para_importar_inmersiones_desde_un_ordenador_de_buceo">APÉNDICE A</a>
|
||||
para información sobre como hacerlo.</p></div>
|
||||
<div class="paragraph"><p>Una vez que el ordenador de buceo está al PC con <em>Subsurface</em>, se selecciona
|
||||
<em>Archivo → Configurar ordenador de buceo</em> en el menú principal. Si se ha
|
||||
<em>Archivo → Cambiar ajustes del ordenador de buceo</em> en el menú principal. Si se ha
|
||||
indicado el nombre de dispositivo correcto en el campo de texto de la parte
|
||||
superior, esto abrirá y seleccionará el modelo correcto en el panel de la
|
||||
izquierda (ver imagen a continuación).</p></div>
|
||||
@ -5666,7 +5857,15 @@ circuito por la caída de oxígeno en la boquilla del equipo pSCR.</p></div>
|
||||
<td class="content">Bucear en circuito abierto forma parte amenudo de las inmersiones con pSCR,
|
||||
porque a pequeñas profundidades la pO<sub>2</sub> en el circuito es demasiado baja. El
|
||||
cambio de rebreather a circuito abierto y viceversa se indica usando eventos
|
||||
de "bailout". La imagen a la izquierda muestra un plan con pSCR (utilizando
|
||||
de "bailout". Hay dos formas de planificar bailouts en inmersiones con
|
||||
reciclador: 1) Seleccionar la casilla <em>Bailout</em> en la sección <em>Modo de
|
||||
Inmersión</em> del planificador; en este caso, las necesidades del bailout se
|
||||
calcularán empezando por el último segmento especificado en la tabla del
|
||||
planificador. 2) Si el bailout tiene lugar en otro punto de la inmersión (ver
|
||||
el ejemplo de buceo en cuevas a continuación), el bailout se planifica
|
||||
manipulando la columna <em>Modo de Inmersión</em> en la tabla <strong>Puntos del
|
||||
Planificador</strong>.
|
||||
La imagen a la izquierda muestra un plan con pSCR (utilizando
|
||||
tres botellas) en el que las partes más superficiales se llevan a cabo usando
|
||||
EAN50 para poder tener una pO<sub>2</sub> suficiente. La parte profunda se lleva a cabo
|
||||
usando con EAN31 (bot. 2 en la tabla de gases disponibles, también indicada en
|
||||
@ -5690,7 +5889,7 @@ la botella en la tabla <strong>Puntos del Planificador de inmersiones</strong> c
|
||||
en la imagen de la derecha (<strong>B</strong>). El icono del perfil mostrará ahora un evento
|
||||
de bailout superpuesto con un cambio de botella. Como en el gráfico de la
|
||||
izquierda, los valores apropiados de pO<sub>2</sub> se muestran en el perfil. Los
|
||||
volumenes de gas necesarios se encuentran al final del panel <strong>Detalles del
|
||||
volúmenes de gas necesarios se encuentran al final del panel <strong>Detalles del
|
||||
Plan de Buceo</strong>.</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
@ -5700,12 +5899,13 @@ Plan de Buceo</strong>.</td>
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>En el caso de un plan de inmersión en aguas abiertas con pSCR, el "peor
|
||||
escenacio" es, probablemente, una emergencia al final de la parte más profunda
|
||||
de la inmersión. Crea un segmento de 1 minuto al final de la parte más
|
||||
profunda del plan. Luego manipula el segmento utilizando las columnas <strong>Modo de
|
||||
buceo</strong> y <strong>Gas usado</strong>, como en el ejemplo anterior de la cueva. Visita el
|
||||
ejemplo de emergencia para una inmersión con CCR, a continuación, que utiliza
|
||||
esta aproximación.</p></div>
|
||||
escenario" es, probablemente, una emergencia al final de la parte más profunda
|
||||
de la inmersión y esto puede simularse usando la casilla <em>Bailout</em> del
|
||||
planificador. Como alternativa, se puede crear un segmento de 1 minuto al final
|
||||
de la parte más profunda del plan. Luego manipula el segmento utilizando las
|
||||
columnas <strong>Modo de buceo</strong> y <strong>Gas usado</strong>, como en el ejemplo anterior de la cueva.
|
||||
Visita el ejemplo de emergencia para una inmersión con CCR, a continuación, que
|
||||
utiliza esta aproximación.</p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
@ -5743,12 +5943,15 @@ gas para un segmento en CCR, por tanto, lo normal es obtener valores de 0 l.</p>
|
||||
<td class="icon">
|
||||
<img src="images/CCR_b1.jpg" alt="Note" />
|
||||
</td>
|
||||
<td class="content">A menudo es necerario planificar casos de "peor escenario" para asegurarnos de
|
||||
<td class="content">A menudo es necesario planificar casos de "peor escenario" para asegurarnos de
|
||||
que dispondremos de gas suficiente, en caso de emergencia, para alcanzar la
|
||||
superficie, teniendo en cuenta la descompresión. Esto se hace definiendo
|
||||
segmentos de 1 minuto al final de la parte de fondo de la inmersión, como se
|
||||
muestra en la imagen de la izquierda donde se planifica una inmersión a 40m
|
||||
durante 21 minutos.</td>
|
||||
superficie, teniendo en cuenta la descompresión. Esto se hace: 1)
|
||||
seleccionando la casilla <em>Bailout</em> del planificador (el bailout se calculará
|
||||
empezando en el último segmento de inmersión definido en la tabla); 2)
|
||||
Definiendo segmentos de 1 minuto al final de la parte de fondo de la inmersión,
|
||||
como se muestra en la imagen de la izquierda donde se planifica una inmersión a
|
||||
40m durante 21 minutos; 3) Cambiando a un gas en circuito abierto en cualquier
|
||||
segmento de la tabla de <em>Puntos del Planificador</em>.</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
<div class="admonitionblock">
|
||||
@ -7876,7 +8079,7 @@ sido sobrescritos.</p></div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated
|
||||
2018-09-23 17:52:40 PDT
|
||||
2024-02-08 08:36:54 PST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@ -61,7 +61,7 @@ web]. Por favor, comenta los problemas que tengas con este programa enviando un
|
||||
mail a mailto:subsurface@subsurface-divelog.org[nuestra lista de correo] e informa de
|
||||
fallos en https://github.com/Subsurface/subsurface/issues[nuestro bugtracker].
|
||||
Para instrucciones acerca de como compilar el software y (en caso necesario)
|
||||
sus dependencias, por favor, consulta el archivo INSTALL incluido con el código
|
||||
sus dependencias, por favor, consulta el archivo INSTALL.md incluido con el código
|
||||
fuente.
|
||||
|
||||
*Audiencia*: Buceadores recreativos, Buceadores en apnea, Buceadores técnicos,
|
||||
@ -727,6 +727,7 @@ para seguir los cambios en el entorno. Si fuera necesario, no hay que teclear
|
||||
las unidades de temperatura: _Subsurface_ las suministra automáticamente de
|
||||
acuerdo con las _Preferencias_ (métricas o imperiales).
|
||||
|
||||
[[S_locations]]
|
||||
*Ubicación*:
|
||||
[icon="images/icons/warning2.png"]
|
||||
[WARNING]
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
|
||||
<meta name="generator" content="AsciiDoc 8.6.9" />
|
||||
<meta name="generator" content="AsciiDoc 10.1.2" />
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
/*
|
||||
@ -16,7 +17,7 @@
|
||||
*/
|
||||
|
||||
* { padding: 0; margin: 0; }
|
||||
img { border: 0; }
|
||||
img { border: 0; margin: 15px; max-width:90% }
|
||||
|
||||
/*** Layout ***/
|
||||
|
||||
@ -77,12 +78,12 @@ body { font-family: Verdana, sans-serif; }
|
||||
#footer { font-size: 0.8em; }
|
||||
|
||||
h2, h3, h4, h5, .title { font-family: Arial, sans-serif; }
|
||||
h2 { font-size: 1.5em; }
|
||||
h2 { font-size: 160%; }
|
||||
.sectionbody { font-size: 0.85em; }
|
||||
.sectionbody .sectionbody { font-size: inherit; }
|
||||
h3 { font-size: 159%; } /* 1.35em */
|
||||
h4 { font-size: 141%; } /* 1.2em */
|
||||
h5 { font-size: 118%; } /* 1em */
|
||||
h3 { font-size: 150%; } /* 1.35em */
|
||||
h4 { font-size: 140%; } /* 1.2em */
|
||||
h5 { font-size: 130%; } /* 1em */
|
||||
.title { font-size: 106%; /* 0.9em */
|
||||
font-weight: bold;
|
||||
}
|
||||
@ -525,7 +526,7 @@ problème, vous pouvez envoyer un e-mail sur
|
||||
<a href="mailto:subsurface@subsurface-divelog.org">notre liste de diffusion</a> et
|
||||
rapportez les bogues sur <a href="http://trac.hohndel.org">notre bugtracker</a>. Pour
|
||||
des instructions de compilation du logiciel et (si besoin) de ses
|
||||
dépendances, merci de consulter le fichier INSTALL inclus dans les sources
|
||||
dépendances, merci de consulter le fichier INSTALL.md inclus dans les sources
|
||||
logicielles.</p></div>
|
||||
<div class="paragraph"><p><strong>Public</strong> : Plongeurs loisirs, apnéistes, plongeurs Tek et plongeurs
|
||||
professionnels</p></div>
|
||||
@ -576,7 +577,7 @@ meilleur manière qui soit, il est important d’avoir des informations sur
|
||||
utilisateurs. À l’ouverture de <em>Subsurface</em> après avoir utilisé le logiciel
|
||||
pendant une semaine environ, une fenêtre de sondage apparait. Cela est
|
||||
complètement optionnel et l’utilisateur contrôle quelles informations sont
|
||||
envoyées ou non à l'équipe de développement de <em>Subsurface</em>. Toutes les
|
||||
envoyées ou non à l’équipe de développement de <em>Subsurface</em>. Toutes les
|
||||
données que l’utilisateur envoie sont utiles et ne seront utilisées que pour
|
||||
les futurs développements et modifications du logiciel pour coller au mieux
|
||||
aux besoins des utilisateurs de <em>Subsurface</em>. Si vous complétez le sondage
|
||||
@ -592,7 +593,7 @@ envoyer un nouveau sondage en démarrant <em>Subsurface</em> avec l’option
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph"><p>La fenêtre <em>Subsurface</em> est généralement divisée en 4 panneaux avec un <strong>Menu
|
||||
principal</strong> (Fichier Édition Importer Journal Vue Partager Aide) en haut de
|
||||
la fenêtre (pour Windows et Linux) ou en haut de l'écran (pour Mac et Ubuntu
|
||||
la fenêtre (pour Windows et Linux) ou en haut de l’écran (pour Mac et Ubuntu
|
||||
Unity). Les quatre panneaux sont :</p></div>
|
||||
<div class="paragraph"><p>La <strong>liste des plongées</strong> en bas à gauche, affichant toutes les plongées du
|
||||
journal (carnet) de plongées de l’utilisateur. Une plongée peut être
|
||||
@ -602,7 +603,7 @@ d’une plongée à l’autre. La <strong>liste des plongées</strong> e
|
||||
manipuler un journal (carnet) de plongée.</p></div>
|
||||
<div class="paragraph"><p>La <strong>carte de plongée</strong> en bas à droite, affiche les sites de plongées de
|
||||
l’utilisateur, sur une carte mondiale et centrée sur le site de la dernière
|
||||
plongée sélectionnée dans la <strong>liste des plongées</strong>. L'échelle de la carte
|
||||
plongée sélectionnée dans la <strong>liste des plongées</strong>. L’échelle de la carte
|
||||
peut être augmentée ou réduite.</p></div>
|
||||
<div class="paragraph"><p>Les <strong>informations</strong> en haut à gauche, fournissent des informations détaillées
|
||||
sur la plongée sélectionnée dans la <strong>liste des plongées</strong>, dont des
|
||||
@ -632,7 +633,7 @@ plongées sélectionnées).</p></div>
|
||||
<div class="paragraph"><p>Décider quels panneaux sont affichés, parmi les 4, en sélectionnant l’option
|
||||
<strong>Vue</strong> dans le menu principal. Cette fonctionnalité permet plusieurs choix
|
||||
d’affichage :</p></div>
|
||||
<div class="paragraph"><p><strong>Tout</strong> : affiche les quatre panneaux tels que sur la capture d'écran ci-dessus.</p></div>
|
||||
<div class="paragraph"><p><strong>Tout</strong> : affiche les quatre panneaux tels que sur la capture d’écran ci-dessus.</p></div>
|
||||
<div class="paragraph"><p><strong>Liste des plongées</strong> : affiche uniquement la liste des plongées.</p></div>
|
||||
<div class="paragraph"><p><strong>Profil</strong> : affiche uniquement le profile de plongée de la plongée sélectionnée.</p></div>
|
||||
<div class="paragraph"><p><strong>Info</strong> : affiche uniquement les notes de plongées de la dernière plongée sélectionnée et les statistiques pour
|
||||
@ -761,7 +762,7 @@ doit être enregistré sur le disque ou non.</p></div>
|
||||
<div class="paragraph"><p>Le <strong>Profil de plongée</strong> (une représentation graphique de la profondeur d’une
|
||||
plongée en fonction du temps) est affiché dans le panneau en haut à droite
|
||||
de la fenêtre de <em>Subsurface</em>. Lorsqu’il est ajouté manuellement au carnet,
|
||||
<em>Subsurface</em> affiche un profil de plongée par défaut qui nécessite d'être
|
||||
<em>Subsurface</em> affiche un profil de plongée par défaut qui nécessite d’être
|
||||
modifié pour représenter au mieux la plongée décrite:</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
@ -777,7 +778,7 @@ en haut de la boîte noire d’information (@ et D). Les unités
|
||||
ligne séparés par des points de passage (les points blancs sur le profil,
|
||||
voir ci-dessous). La profondeur par défaut d’une plongée est de 15m. Si la
|
||||
prfondeur de votre plongée était de 20m, vous devez glisser le point de
|
||||
passage approprié jusqu'à 20m. Pour ajouter un point de passage,
|
||||
passage approprié jusqu’à 20m. Pour ajouter un point de passage,
|
||||
double-cliquez sur n’importe quel segment de la ligne. Pour bouger un point
|
||||
de passage supplémentaire, glissez-le. Le bouger peut également être réalisé
|
||||
en le sélectionnant et en utilisant les flèches du clavier. Pour supprimer
|
||||
@ -831,7 +832,7 @@ de plongée supportés</a>.</p></div>
|
||||
<td class="icon">
|
||||
<img src="images/icons/warning2.png" alt="Warning" />
|
||||
</td>
|
||||
<td class="content">Certains ordinateurs de plongée consomme plus d'énergie lorsqu’ils sont en
|
||||
<td class="content">Certains ordinateurs de plongée consomme plus d’énergie lorsqu’ils sont en
|
||||
mode Communication PC. <strong>Ceci peut consommer une grande partie de la
|
||||
batterie de votre ordinateur de plongée</strong>. Nous recommandons à l’utilisateur
|
||||
de vérifier que l’ordinateur de plongée est chargé lorsqu’il est connecté au
|
||||
@ -843,7 +844,7 @@ au port USB.</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
<div class="paragraph"><p>Pour importer les informations depuis un ordinateur de plongée vers un
|
||||
ordinateur utilisant <em>Subsurface</em>, les deux pièces d'équipement doivent
|
||||
ordinateur utilisant <em>Subsurface</em>, les deux pièces d’équipement doivent
|
||||
communiquer entre elles. Ceci implique la configuration des ports de
|
||||
communication (ou point de montage) de l’ordinateur sur lequel tourne
|
||||
<em>Subsurface</em> qui communique avec l’ordinateur de plongée. Pour configurer
|
||||
@ -851,8 +852,7 @@ cette communication, les utilisateurs doivent trouver l’information
|
||||
appropriée pour renseigner à <em>Subsurface</em> d’où et comment importer les
|
||||
informations de
|
||||
plongée.
|
||||
<a href="#_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer">Annexe
|
||||
A</a> donne les informations techniques pour aider l’utilisateur à configurer
|
||||
<a href="#appendix_a">Annexe A</a> donne les informations techniques pour aider l’utilisateur à configurer
|
||||
ceci pour les différents systèmes d’exploitation et
|
||||
<a href="#_appendix_b_dive_computer_specific_information_for_importing_dive_information">Annexe
|
||||
B</a> contient des informations spécifiques à chaque ordinateur de plongée.</p></div>
|
||||
@ -908,8 +908,7 @@ La boîte de dialogue propose deux menus déroulants, <strong>Fournisseur</stron
|
||||
Le menu déroulant <strong>Périphérique ou point de montage</strong> le nom du port USB ou
|
||||
Bluetooth dont <em>Subsurface</em> a besoin pour communiquer avec l’ordinateur de
|
||||
plongée. Le port approprié doit être sélectionné. Consultez
|
||||
<a href="#_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer">Annexe
|
||||
A</a> et
|
||||
<a href="#appendix_a">Annexe A</a> et
|
||||
<a href="#_appendix_b_dive_computer_specific_information_for_importing_dive_information">Annexe
|
||||
B</a> pour obtenir des détails techniques sur la façon de trouver des
|
||||
informations sur le port approprié à chaque ordinateur de plongée et, dans
|
||||
@ -1035,17 +1034,15 @@ Le câble de connexion est-il fautif ? Le câble fonctionne-t-il avec d’au
|
||||
<li>
|
||||
<p>
|
||||
Consultez
|
||||
<a href="#_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer">Annexe
|
||||
A</a> pour être certain que le point de montage correct a été spécifié (voir
|
||||
<a href="#appendix_a">Annexe A</a> pour être certain que le point de montage correct a été spécifié (voir
|
||||
ci-dessus).
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
Sur les systèmes d’exploitation de type Unix, l’utilisateur a-t-il les
|
||||
droits d'écriture sur le port USB? Si non, consultez
|
||||
<a href="#_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer">Annexe
|
||||
A</a>
|
||||
droits d’écriture sur le port USB? Si non, consultez
|
||||
<a href="#appendix_a">Annexe A</a>
|
||||
</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
@ -1142,7 +1139,7 @@ start by scanning for Bluetooth devices from an empty list (on the desktop)
|
||||
of Bluetooth devices. Once <em>Subsurface</em> has recognised the Bluetooth dive
|
||||
computer, subsequent divelog downloads are likely to be simple.</p></div>
|
||||
<div class="paragraph"><p>Sur les plateformes <em>Linux</em> ou -MacOS_, le nom de l’ordinateur utilisant
|
||||
Subsurface_ et son adresse Bluetooth sont affichées du côté droit. L'état
|
||||
Subsurface_ et son adresse Bluetooth sont affichées du côté droit. L’état
|
||||
(allumé/éteint) de l’adaptateur Bluetooth est affiché sous l’adresse et peut
|
||||
être modifié en cliquer sur la case <em>Allumer/éteindre</em>. Si l’adresse
|
||||
Bluetooth n’est pas affichée, <em>Subsurface</em> ne détecte pas le périphérique
|
||||
@ -1221,10 +1218,10 @@ ci-dessus). Si l’ordinateur de plongée est connecté à Subsurface pour l
|
||||
première fois, il est possible que Subsurface demande un nombre ou un code
|
||||
PIN. Entrez le code indiqué dans le manuel utilisateur de l’ordinatuer de
|
||||
plongée. Un code ou PIN de 0000 est souvent le code par défaut.</p></div>
|
||||
<div class="paragraph"><p>L'étape de jumelage est vérifiée et réalisée automatiquement durant le
|
||||
<div class="paragraph"><p>L’étape de jumelage est vérifiée et réalisée automatiquement durant le
|
||||
processus de téléchargement. Si les périphériques n’ont pas encore été
|
||||
jumelés, le système demandera l’autorisation de le faire et affichera un
|
||||
message sur la partie droite de l'écran. <em>Ajouter un périphérique</em>, <em>Tapez
|
||||
message sur la partie droite de l’écran. <em>Ajouter un périphérique</em>, <em>Tapez
|
||||
pour configurer votre périphérique</em>. <em>Toujours autoriser le jumelage. Après
|
||||
la sélection d’un item découvert, cliquez sur le bouton
|
||||
_Enregistrer</em>. Enfin, sélectionnez le bouton "Télécharger_ dans la boîte de
|
||||
@ -1278,7 +1275,7 @@ avec <em>Subsurface</em>.</td>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="S_DeviceNames">5.2.3. Changement du nom d’un ordinateur de plongée</h4>
|
||||
<div class="paragraph"><p>Il peut être nécessaire d'établir une distinction entre différents
|
||||
<div class="paragraph"><p>Il peut être nécessaire d’établir une distinction entre différents
|
||||
ordinateurs de plongée utilisés pour télécharger des données de plongée vers
|
||||
<em>Subsurface</em>. Par exemple, si l’ordinateur d’un équipier provient du même
|
||||
fabriquant et est dun même modèle que le votre et que les données sont
|
||||
@ -1349,7 +1346,7 @@ dans des boîtes de texte à droite de l’heure de début de plongée. De n
|
||||
renseignent la température de l’eau, et cette boîte peut contenir cette information.
|
||||
Si la température de l’air n’est pas renseignée par l’ordinateur de plongée, la première température pour l’eau
|
||||
peut être utilisée comme température de l’air. En général, elle est proche de la température de l’air.
|
||||
S’il est nécessaire d'éditer ces informations, seule une valeur est nécessaire, l’unité de température étant
|
||||
S’il est nécessaire d’éditer ces informations, seule une valeur est nécessaire, l’unité de température étant
|
||||
automatiquement fournie par
|
||||
<em>Subsurface</em> (sur base des <em>Préférences</em>, les unités métriques ou impériales
|
||||
seront utilisées).</p></div>
|
||||
@ -1365,7 +1362,7 @@ plongée. Les informations de plongée dans les onglets <strong>Notes</strong>
|
||||
informations sur le site de plongée. Enregistrez toutes les autres
|
||||
informations (p. ex. instructeur, équipier, équipement, notes à propos de la
|
||||
plongée) en sélectionnant <em>Appliquer les modifications</em> dans l’onglet
|
||||
<strong>Notes</strong> AVANT d'éditer les informations sur le site de plongée. Ensuite,
|
||||
<strong>Notes</strong> AVANT d’éditer les informations sur le site de plongée. Ensuite,
|
||||
nommez le site de plongée dans la bpîte de texte <em>Lieu</em> dans l’onglet
|
||||
<strong>Notes</strong>.</td>
|
||||
</tr></table>
|
||||
@ -1488,11 +1485,11 @@ Une sélection automatique est disponible.
|
||||
Certains utilisateurs de vêtement étanche peuvent utiliser ce champ pour enregistrer quelle ensemble de
|
||||
combinaison et souris ils ont utilisé.</p></div>
|
||||
<div class="paragraph"><p><strong>Évaluation</strong>: attribue une évaluation subjective à une plongée sur une
|
||||
échelle de 5 points en cliquant sur l'étoile correspondante.</p></div>
|
||||
échelle de 5 points en cliquant sur l’étoile correspondante.</p></div>
|
||||
<div class="paragraph"><p><strong>Visibilité</strong>: attribue une évaluation de la visibilité à une plongée sur une
|
||||
échelle de 5 points en cliquant sur l'étoile correspondante.</p></div>
|
||||
échelle de 5 points en cliquant sur l’étoile correspondante.</p></div>
|
||||
<div class="paragraph"><p><strong>Étiquettes</strong>: il est possible de définir ici des étiquettes qui décrivent le
|
||||
type de plongée (séparées par des virgules). Des exemples courants d'étiquettes sont bateau,
|
||||
type de plongée (séparées par des virgules). Des exemples courants d’étiquettes sont bateau,
|
||||
plongée dérivante, exercice, grotte, etc.
|
||||
<em>Subsurface</em> contient de nombreuses étiquettes. En commençant à taper une étiquette, <em>Subsurface</em> liste
|
||||
les étiquettes correspondant à la frappe. Par exemple, en entrant
|
||||
@ -1515,7 +1512,7 @@ message dans la boîte bleue en haut du panneau:</p></div>
|
||||
<img src="images/BlueEditBar_f22.jpg" alt="FIGURE: Blue edit bar" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>indique que l'équipement a été édité. C’est une partie hautement interactive
|
||||
<div class="paragraph"><p>indique que l’équipement a été édité. C’est une partie hautement interactive
|
||||
de <em>Subsurface</em> et les informations sur les blocs et les gaz (entrées ici)
|
||||
déterminent le comportement du <strong>Profil de plongée</strong> (panneau en haut à
|
||||
droite).</p></div>
|
||||
@ -1892,7 +1889,7 @@ not currently supported on Mac.</p></div>
|
||||
your system before building: <em>glib2.0</em> and <em>mdbtools</em> (see below).</p></div>
|
||||
<div class="paragraph"><p>In addition, a web service is available for divelog convertions from
|
||||
SmartTrak to <em>Subsurface</em> (see below).</p></div>
|
||||
<div class="paragraph"><p>N’hésitez pas à contacter l'équipe de développement de <em>Subsurface</em> via
|
||||
<div class="paragraph"><p>N’hésitez pas à contacter l’équipe de développement de <em>Subsurface</em> via
|
||||
<a href="mailto:subsurface@subsurface-divelog.org">notre liste de diffusion</a> pour de
|
||||
l’aide à l’importation des lofs <em>SmartTrak</em>.</p></div>
|
||||
<div class="sect4">
|
||||
@ -3192,7 +3189,7 @@ profondeur à un moment précis de la plongée.</p></div>
|
||||
<img src="images/icons/scale.jpg" alt="Note" />
|
||||
</td>
|
||||
<td class="content">Dans certains cas, le profil de plongée ne remplit pas toute la zone du
|
||||
panneau <strong>Profil de plongée</strong>. Cliquer sur le bouton <strong>Ajuster l'échelle du
|
||||
panneau <strong>Profil de plongée</strong>. Cliquer sur le bouton <strong>Ajuster l’échelle du
|
||||
graphique</strong> dans la barre d’outils sur la gauche du profil de plongée
|
||||
augmente la taille du profil de plongée pour remplir la zone du panneau.</td>
|
||||
</tr></table>
|
||||
@ -3237,8 +3234,8 @@ panel. These are:</p></div>
|
||||
<td class="content">Affiche la <strong>Profondeur maximale d’utilisation (MOD)</strong> d’une plongée, en
|
||||
fonction du mélange gazeux utilisé. La MOD dépend de la concentration en
|
||||
oxygène du gaz respiré. Pour l’air (21% d’oxygène), il vaut envuron 57m si
|
||||
une pO<sub>2 maximale de 1.4 est choisie dans la section <strong>Préférences</strong>
|
||||
(sélectionnez <em>Fichier → Préférences → Profil</em> et éditez le champ <em>pO</sub>2
|
||||
une pO<sub>2</sub> maximale de 1.4 est choisie dans la section <strong>Préférences</strong>
|
||||
(sélectionnez <em>Fichier → Préférences → Profil</em> et éditez le champ <em>pO<sub>2</sub>
|
||||
dans le calcul de MOD</em>). En plongeant sous la MOD, il y a un risque
|
||||
important d’exposition aux dangers liés à la toxicité de l’oxygène.</td>
|
||||
</tr></table>
|
||||
@ -4049,66 +4046,13 @@ those dives that have either one OR both of these tags.</p></div>
|
||||
<div class="ulist"><ul>
|
||||
<li>
|
||||
<p>
|
||||
Exporter les informations de plongée vers <em>Facebook</em>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<a href="#S_Export_other">Exporter des informations de plongée vers d’autres
|
||||
destinations ou formats</a>
|
||||
</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
<div class="sect2">
|
||||
<h3 id="S_Facebook">8.1. Export des informations de plongée vers <em>Facebook</em></h3>
|
||||
<div class="paragraph"><p>L’export des plongées vers <em>Facebook</em> est géré différemment des autres types
|
||||
d’export car une connexion vers <em>Facebook</em> est nécessaire, nécessitant un
|
||||
identifiant et un mot de passe. À partir du menu principal, sélectionnez
|
||||
<em>Partager sur → Connecter à → Facebook</em> (image <strong>A</strong> ci-dessous). Un écran
|
||||
de connexion s’affiche (image <strong>B</strong> ci dessous). Entrez l’identifiant et le
|
||||
mot de passe <em>Facebook</em>. Depuis la fenêtre <em>Subsurface</em>, il est facile de
|
||||
vérifier si <em>Subsurface</em> a une connection valide vers <em>Facebook</em> : Depuis le
|
||||
"Menu principal", sélectionnez <em>Partager sur</em> (image <strong>A</strong>
|
||||
ci-dessous). Normalement, l’option <em>Facebook</em> est grisée. Mais si une
|
||||
connection vers <em>Facebook</em> existe, cette option est active (c’est à dire
|
||||
écrit en noir et sélectionnable).</p></div>
|
||||
<div class="paragraph"><p>Once logged into to <em>Facebook</em> , a panel is shown with a message: "<em>To
|
||||
disconnect Subsurface from your Facebook account, use the <em>Share on</em> menu
|
||||
entry</em>." Close this message panel.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/facebook1.jpg" alt="Figure: Facebook login" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>Une fois qu’une connexion à <em>Facebook</em> est établie, transférer un profil de
|
||||
plongée vers <em>Facebook</em> est facile. Dans le panneau <strong>Liste des plongées</strong> de
|
||||
<em>Subsurface</em>, sélectionnez la plongée à transférer. Ensuite, à partir du
|
||||
<strong>menu principal</strong>, sélectionnez <em>Partager sur → Facebook</em>. Une fenêtre
|
||||
s’affiche, pour déterminer quelles informations seront transférées avec le
|
||||
profil de plongée (image <strong>A</strong> ci-dessous). Pour transférer un profil de
|
||||
plongée vers <em>Facebook</em>, le nom d’un album <em>Facebook</em> doit être fourni. Les
|
||||
cases à cocher sur la partie gauche permettent de sélectionner des
|
||||
informations supplémentaires à transférer avec le profil de plongée. Ces
|
||||
informations sont affichées dans le champs de texte sur la partie droite du
|
||||
panneau. (image <strong>A</strong> ci dessous). Personnalisez le message qui sera envoyé
|
||||
avec le profil de plongée en modifiant les informations. Une fois les
|
||||
informations supplémentaires ajoutées et vérifiées, sélectionner le bouton
|
||||
<em>OK</em> qui effectue le transfert vers <em>Facebook</em>. Après le transfert, une
|
||||
fenêtre de confirmation apparait ,indiquant le succès du transfert.</p></div>
|
||||
<div class="paragraph"><p>À la fois l’album créé et la publication sur votre ligne temporelle seront
|
||||
marquées comme privés. Pour que vos amis puissent la voir, connectez-vous à
|
||||
<em>Facebook</em> depuis un navigateur ou l’application Facebook et modifiez les
|
||||
permissions.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/facebook2.jpg" alt="Figure: Facebook data submission" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>If required, then close the <em>Facebook</em> connection by selecting, from the
|
||||
<strong>Main Menu</strong>, <em>Share on → Disconnect from → Facebook</em> (image <strong>B</strong> above).</p></div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="S_Export_other">8.2. Exporter des informations de plongée vers d’autres destinations ou formats</h3>
|
||||
<h3 id="S_Export_other">8.1. Exporter des informations de plongée vers d’autres destinations ou formats</h3>
|
||||
<div class="paragraph"><p>For non-<em>Facebook exports</em>, the export function can be found by selecting
|
||||
<em>File → Export</em>, which brings up the Export dialog. This dialog always
|
||||
gives two options: save ALL dives, or save only the dives selected in <strong>Dive
|
||||
@ -4600,7 +4544,7 @@ ces ordinateurs de plongée peuvent être lues et modifiées. Pour commencer,
|
||||
assurez vous que les pilotes pour votre ordinateur de plongée sont installés
|
||||
(également nécessaire pour télécharger les plongées) et que le nom de
|
||||
périphérique de l’ordinateur de plongée est connu. Voir
|
||||
<a href="#_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer">ANNEXE A</a> pour plus d’informations sur la manière de procéder.</p></div>
|
||||
<a href="#appendix_a">ANNEXE A</a> pour plus d’informations sur la manière de procéder.</p></div>
|
||||
<div class="paragraph"><p>Une fois que l’ordinateur de plongée est connecté à <em>Subsurface</em>,
|
||||
sélectionner <em>Fichier → Configurer l’ordinateur de plongée</em>, à partir du
|
||||
menu principal. Sélectionner le nom du périphérique (ou le point de montage)
|
||||
@ -5035,7 +4979,7 @@ L’utilisateur planifie des plongées dans les limites de sa certification.
|
||||
<li>
|
||||
<p>
|
||||
La planification de plongée se base sur les caractéristiques d’une <em>personne
|
||||
normale</em> et ne peut compenser les caractéristiques physiologiques, l'état de
|
||||
normale</em> et ne peut compenser les caractéristiques physiologiques, l’état de
|
||||
santé, l’historique personnel et les caractéristiques du mode de vie.
|
||||
</p>
|
||||
</li>
|
||||
@ -5059,7 +5003,7 @@ Un utilisateur qui n’est pas absolument certain d’un des prérequis
|
||||
</ul></div>
|
||||
</div></div>
|
||||
<div class="sect2">
|
||||
<h3 id="_l_écran_du_planificateur_de_plongée_em_subsurface_em">14.1. L'écran du planificateur de plongée <em>Subsurface</em></h3>
|
||||
<h3 id="_l_8217_écran_du_planificateur_de_plongée_em_subsurface_em">14.1. L’écran du planificateur de plongée <em>Subsurface</em></h3>
|
||||
<div class="paragraph"><p>Like the <em>Subsurface</em> dive log, the planner screen is divided into several
|
||||
sections (see image below). The <strong>setup</strong> parameters for a dive are entered
|
||||
into the sections on the left hand and bottom side of the screen. They are:
|
||||
@ -6162,18 +6106,7 @@ The Edit option allows one to undo or redo an action, e.g. deleting dives.
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_share_on">16.6. Share on</h3>
|
||||
<div class="ulist"><ul>
|
||||
<li>
|
||||
<p>
|
||||
<a href="#S_Facebook"><em>Facebook</em></a> - Partager la plongée sélectionnée sur votre
|
||||
Facebook.
|
||||
</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_aide">16.7. Aide</h3>
|
||||
<h3 id="_aide">16.6. Aide</h3>
|
||||
<div class="ulist"><ul>
|
||||
<li>
|
||||
<p>
|
||||
@ -6205,7 +6138,7 @@ The Edit option allows one to undo or redo an action, e.g. deleting dives.
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="_annexe_a_informations_spécifiques_au_système_d_8217_exploitation_utilisé_pour_importer_les_informations_de_plongées_depuis_un_ordinateur_de_plongée">17. ANNEXE A : informations spécifiques au système d’exploitation utilisé pour importer les informations de plongées depuis un ordinateur de plongée.</h2>
|
||||
<h2 id="appendix_a">17. ANNEXE A : informations spécifiques au système d’exploitation utilisé pour importer les informations de plongées depuis un ordinateur de plongée.</h2>
|
||||
<div class="sectionbody">
|
||||
<div class="sect2">
|
||||
<h3 id="_assurez_vous_que_les_pilotes_drivers_nécessaires_sont_installés">17.1. Assurez-vous que les pilotes (drivers) nécessaires sont installés</h3>
|
||||
@ -6315,14 +6248,14 @@ ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver</code></pre>
|
||||
détecté et connecté sur <code>ttyUSB3</code>. Cette information peut à présent être
|
||||
utilisée pour les paramètres d’importation en tant que <code>/dev/ttyUSB3</code> pour
|
||||
que Subsurface utilise le bon port USB.</p></div>
|
||||
<div class="paragraph"><p>S’assurer que l’utilisateur possède les droits d'écriture sur le port série
|
||||
<div class="paragraph"><p>S’assurer que l’utilisateur possède les droits d’écriture sur le port série
|
||||
USB :</p></div>
|
||||
<div class="paragraph"><p>Sur les systèmes similaires à Unix, les ports USB ne peuvent être accédés
|
||||
que par des utilisateurs membres d’un groupe spécial qui peut être <code>dialout</code>
|
||||
ou <code>uucp</code>. Cela peut être vérifié en listant les permissions associées au
|
||||
périphérique, par exemple via <code>ls - l /dev/ttyUSB0</code>. Notez que le numéro
|
||||
dans le nom de fichier dépend du nombre de périphériques USB que vous avez
|
||||
branchés et peut être ajusté au besoin.Si vous n'êtes pas root, vous n'êtes
|
||||
branchés et peut être ajusté au besoin.Si vous n’êtes pas root, vous n’êtes
|
||||
peut-être pas membre de ce groupe et ne pouvez donc pas utiliser le port
|
||||
USB. Admettons que votre nom d’utilisateur soit <em>johnB</em>.</p></div>
|
||||
<div class="paragraph"><p>En tant que root, tapez : usermod -a -G dialout johnB+ (utilisateurs
|
||||
@ -7854,7 +7787,7 @@ salvaged after being overwritten by new dives.</p></div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated
|
||||
2018-11-05 09:24:27 CET
|
||||
2024-02-08 08:51:28 PST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@ -61,7 +61,7 @@ problème, vous pouvez envoyer un e-mail sur
|
||||
mailto:subsurface@subsurface-divelog.org[notre liste de diffusion] et
|
||||
rapportez les bogues sur http://trac.hohndel.org[notre bugtracker]. Pour
|
||||
des instructions de compilation du logiciel et (si besoin) de ses
|
||||
dépendances, merci de consulter le fichier INSTALL inclus dans les sources
|
||||
dépendances, merci de consulter le fichier INSTALL.md inclus dans les sources
|
||||
logicielles.
|
||||
|
||||
*Public* : Plongeurs loisirs, apnéistes, plongeurs Tek et plongeurs
|
||||
@ -365,8 +365,7 @@ cette communication, les utilisateurs doivent trouver l'information
|
||||
appropriée pour renseigner à _Subsurface_ d'où et comment importer les
|
||||
informations de
|
||||
plongée.
|
||||
xref:_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer[Annexe
|
||||
A] donne les informations techniques pour aider l'utilisateur à configurer
|
||||
xref:appendix_a[Annexe A] donne les informations techniques pour aider l'utilisateur à configurer
|
||||
ceci pour les différents systèmes d'exploitation et
|
||||
xref:_appendix_b_dive_computer_specific_information_for_importing_dive_information[Annexe
|
||||
B] contient des informations spécifiques à chaque ordinateur de plongée.
|
||||
@ -406,8 +405,7 @@ plongée (en tout cas pour ceux qui ne se rechargent pas via USB).
|
||||
- Le menu déroulant *Périphérique ou point de montage* le nom du port USB ou
|
||||
Bluetooth dont _Subsurface_ a besoin pour communiquer avec l'ordinateur de
|
||||
plongée. Le port approprié doit être sélectionné. Consultez
|
||||
xref:_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer[Annexe
|
||||
A] et
|
||||
xref:appendix_a[Annexe A] et
|
||||
xref:_appendix_b_dive_computer_specific_information_for_importing_dive_information[Annexe
|
||||
B] pour obtenir des détails techniques sur la façon de trouver des
|
||||
informations sur le port approprié à chaque ordinateur de plongée et, dans
|
||||
@ -493,14 +491,12 @@ Vérifiez les éléments suivants:
|
||||
sont-ils propres ?
|
||||
|
||||
- Consultez
|
||||
xref:_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer[Annexe
|
||||
A] pour être certain que le point de montage correct a été spécifié (voir
|
||||
xref:appendix_a[Annexe A] pour être certain que le point de montage correct a été spécifié (voir
|
||||
ci-dessus).
|
||||
|
||||
- Sur les systèmes d'exploitation de type Unix, l'utilisateur a-t-il les
|
||||
droits d'écriture sur le port USB? Si non, consultez
|
||||
xref:_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer[Annexe
|
||||
A]
|
||||
xref:appendix_a[Annexe A]
|
||||
|
||||
Si l'ordinateur utilisant _Subsurface_ ne reconnaît pas l'adaptateur USB en
|
||||
ne montrant pas le bon nom de périphérique à côté du Point de montage, il
|
||||
@ -2307,8 +2303,8 @@ panel. These are:
|
||||
Affiche la *Profondeur maximale d'utilisation (MOD)* d'une plongée, en
|
||||
fonction du mélange gazeux utilisé. La MOD dépend de la concentration en
|
||||
oxygène du gaz respiré. Pour l'air (21% d'oxygène), il vaut envuron 57m si
|
||||
une pO~2 maximale de 1.4 est choisie dans la section *Préférences*
|
||||
(sélectionnez _Fichier -> Préférences -> Profil_ et éditez le champ _pO~2
|
||||
une pO~2~ maximale de 1.4 est choisie dans la section *Préférences*
|
||||
(sélectionnez _Fichier -> Préférences -> Profil_ et éditez le champ _pO~2~
|
||||
dans le calcul de MOD_). En plongeant sous la MOD, il y a un risque
|
||||
important d'exposition aux dangers liés à la toxicité de l'oxygène.
|
||||
|
||||
@ -2982,8 +2978,6 @@ those dives that have either one OR both of these tags.
|
||||
|
||||
Il y a deux façons d'exporter des informations de plongée depuis Subsurface:
|
||||
|
||||
- Exporter les informations de plongée vers _Facebook_
|
||||
|
||||
- xref:S_Export_other[Exporter des informations de plongée vers d'autres
|
||||
destinations ou formats]
|
||||
|
||||
@ -3305,8 +3299,7 @@ ces ordinateurs de plongée peuvent être lues et modifiées. Pour commencer,
|
||||
assurez vous que les pilotes pour votre ordinateur de plongée sont installés
|
||||
(également nécessaire pour télécharger les plongées) et que le nom de
|
||||
périphérique de l'ordinateur de plongée est connu. Voir
|
||||
<<_appendix_a_operating_system_specific_information_for_importing_dive_information_from_a_dive_computer,
|
||||
ANNEXE A>> pour plus d'informations sur la manière de procéder.
|
||||
<<appendix_a,ANNEXE A>> pour plus d'informations sur la manière de procéder.
|
||||
|
||||
Une fois que l'ordinateur de plongée est connecté à _Subsurface_,
|
||||
sélectionner _Fichier -> Configurer l'ordinateur de plongée_, à partir du
|
||||
@ -4337,10 +4330,6 @@ des sections de ce manuel traitant des opérations relatives.
|
||||
- _Ordinateur suivant_ - Passer à l'ordinateur de plongée suivant.
|
||||
- _Plein écran_ - Passer en mode plein écran.
|
||||
|
||||
=== Share on
|
||||
- <<S_Facebook,_Facebook_>> - Partager la plongée sélectionnée sur votre
|
||||
Facebook.
|
||||
|
||||
=== Aide
|
||||
- _À propos de Subsurface_ - Affiche un panneau avec le numéro de version de
|
||||
_Subsurface_ ainsi que les informations de licence.
|
||||
@ -4354,6 +4343,7 @@ des sections de ce manuel traitant des opérations relatives.
|
||||
|
||||
|
||||
|
||||
[[appendix_a]]
|
||||
== ANNEXE A : informations spécifiques au système d'exploitation utilisé pour importer les informations de plongées depuis un ordinateur de plongée.
|
||||
|
||||
=== Assurez-vous que les pilotes (drivers) nécessaires sont installés
|
||||
@ -5301,7 +5291,7 @@ see thumbnails that represent individual videos, _Subsurface_ uses an
|
||||
external program calle _FFmpeg_. To create thumbnails for videos, do two
|
||||
things:
|
||||
|
||||
Install _FFmpeg_ on the computer that runs _Subsurface_. The program can be
|
||||
1. Install _FFmpeg_ on the computer that runs _Subsurface_. The program can be
|
||||
downloaded from the FFmpeg web site:
|
||||
https://www.ffmpeg.org/download.html. Most Linux distributions ship with an
|
||||
_ffmpeg_ package and therefore do not need an additional download.
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
|
||||
<meta name="generator" content="AsciiDoc 8.6.10" />
|
||||
<meta name="generator" content="AsciiDoc 10.1.2" />
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
/*
|
||||
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
* { padding: 0; margin: 0; }
|
||||
img { border: 0; }
|
||||
img { border: 0; margin: 15px; max-width:90% }
|
||||
|
||||
/*** Layout ***/
|
||||
|
||||
@ -78,12 +78,12 @@ body { font-family: Verdana, sans-serif; }
|
||||
#footer { font-size: 0.8em; }
|
||||
|
||||
h2, h3, h4, h5, .title { font-family: Arial, sans-serif; }
|
||||
h2 { font-size: 1.5em; }
|
||||
h2 { font-size: 160%; }
|
||||
.sectionbody { font-size: 0.85em; }
|
||||
.sectionbody .sectionbody { font-size: inherit; }
|
||||
h3 { font-size: 159%; } /* 1.35em */
|
||||
h4 { font-size: 141%; } /* 1.2em */
|
||||
h5 { font-size: 118%; } /* 1em */
|
||||
h3 { font-size: 150%; } /* 1.35em */
|
||||
h4 { font-size: 140%; } /* 1.2em */
|
||||
h5 { font-size: 130%; } /* 1em */
|
||||
.title { font-size: 106%; /* 0.9em */
|
||||
font-weight: bold;
|
||||
}
|
||||
@ -514,9 +514,9 @@ moet installeren staat uitgelegd op <em>Downloaden</em> page on the
|
||||
<a href="https://subsurface-divelog.org/"><em>Subsurface</em> website</a>. Vragen over of problemen met
|
||||
het programma kunnen bij de ontwikkelaars gemeld worden via email op
|
||||
<a href="mailto:subsurface@subsurface-divelog.org">onze mailinglijst</a>. Fouten kunnen
|
||||
ook gemeld worden op <a href="https://github.com/Subsurface-divelog/subsurface/issues">onze bugtracker</a>.
|
||||
ook gemeld worden op <a href="https://github.com/Subsurface/subsurface/issues">onze bugtracker</a>.
|
||||
Instructies hoe <em>Subsurface</em> zelf te compileren vanuit de broncode staan ook op
|
||||
onze website en in het INSTALL bestand in de broncode.</p></div>
|
||||
onze website en in het INSTALL.md bestand in de broncode.</p></div>
|
||||
<div class="paragraph"><p><strong>Doelgroep</strong>: Recreatieve duikers, Tec duikers, Apneu duikers,
|
||||
Professionele duikers.</p></div>
|
||||
<div id="toc">
|
||||
@ -2119,7 +2119,7 @@ met een duik, en op deze manier zichtbaar zijn via het <em>Media</em> tabblad va
|
||||
het <strong>Notities</strong> paneel.</p></div>
|
||||
</div>
|
||||
<div class="sect3">
|
||||
<h4 id="_media_bekijken">5.5.2. Media bekijken</h4>
|
||||
<h4 id="S_ViewMedia">5.5.2. Media bekijken</h4>
|
||||
<div class="sidebarblock">
|
||||
<div class="content">
|
||||
<div class="paragraph"><p><strong>Zorg ervoor dat thumbnails voor video kunnen worden gemaakt</strong></p></div>
|
||||
@ -3529,58 +3529,12 @@ grotduik met Bob).</p></div>
|
||||
<div class="ulist"><ul>
|
||||
<li>
|
||||
<p>
|
||||
Exporteer duikinformatie naar <em>Facebook</em>
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<a href="#S_Export_other">Exporteer duikinformatie naar andere bestemmingen of formaten</a>
|
||||
</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
<div class="sect2">
|
||||
<h3 id="S_Facebook">8.1. Exporteer duikinformatie naar <em>Facebook</em></h3>
|
||||
<div class="paragraph"><p>Exporteren naar <em>Facebook</em> werkt op een andere manier dan andere vormen van
|
||||
export, met name omdat er een verbinding met <em>Facebook</em> aanwezig moet zijn die
|
||||
is ingelogd. Selecteer vanuit het hoofdmenu <em>Deel via → Facebook</em> (zie figuur
|
||||
<strong>A</strong> hieronder). Een inlogscherm voor <em>Facebook</em> verschijnt (zie figuur
|
||||
<strong>B</strong> hieronder), en log in bij <em>Facebook</em>.</p></div>
|
||||
<div class="paragraph"><p>Het is eenvoudig te zien in het hoofdmenu of er een verbinding met <em>Facebook</em>
|
||||
actief is. In het <em>Deel via</em> menu is de <em>Facebook knop</em> grijs en niet-selecteerbaar
|
||||
als er geen verbinding is (figuur <strong>A</strong> hieronder).</p></div>
|
||||
<div class="paragraph"><p>Eenmaal ingelogd op <em>Facebook</em> wordt er een paneel getoond met het bericht:
|
||||
"Gebruik het <em>Deel via</em> menu om de verbinding van Subsurface met uw Facebook
|
||||
account te sluiten.". Sluit dit paneel.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/facebook1.jpg" alt="Figuur: Facebook login" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>Met de verbinding met <em>Facebook</em> geactiveerd is het overdragen van een duik naar
|
||||
<em>Facebook</em> eenvoudig. Selecteer eerst de duik in de <strong>Duiklijst</strong>. Selecteer dan
|
||||
uit het hoofdmenu <em>Deel via → Facebook</em>. Er verschijnt een dialoog, waarin
|
||||
aangegeven kan worden welke informatie naast het duikprofiel, moet worden
|
||||
overgedragen naar <em>Facebook</em> (zie figuur <strong>A</strong> hieronder).</p></div>
|
||||
<div class="paragraph"><p>Om een duikprofiel naar <em>Facebook</em> te exporteren is de naam van een (foto) album
|
||||
nodig. De keuzevakjes aan de linker zijde bepalen welke data uit het logboek
|
||||
eveneens wordt geëxporteerd. Deze verschijnen in het tekst veld aan de rechter zijde,
|
||||
welke verder handmatig kan worden aangepast. Nadat alles naar wens is ingevuld,
|
||||
kan via de <em>OK</em> knop de feitelijke export worden gedaan. Als de export gereed is
|
||||
volgt een bevestiging.</p></div>
|
||||
<div class="paragraph"><p>Zowel het album als de geëxporteerde profiel (met annotaties) is in <em>Facebook</em> als
|
||||
privé aangemerkt, en de rechten van de geëxporteerde data moeten dus handmatig
|
||||
in <em>Facebook</em> worden gezet zoals gewenst.</p></div>
|
||||
<div class="imageblock" style="text-align:center;">
|
||||
<div class="content">
|
||||
<img src="images/facebook2.jpg" alt="Figuur: Facebook data submission" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph"><p>De verbinding met <em>Facebook</em> kan nu worden afgesloten als dat gewenst is. Gebruik
|
||||
hiervoor uit het hoofdmenu <em>Deel via → Verbinding verbreken met → Facebook</em> (
|
||||
figuur <strong>B</strong> hierboven).</p></div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="S_Export_other">8.2. Exporteer duikinformatie naar andere bestemmingen of formaten</h3>
|
||||
<h3 id="S_Export_other">8.1. Exporteer duikinformatie naar andere bestemmingen of formaten</h3>
|
||||
<div class="paragraph"><p>Andere dan <em>Facebook</em> exports kunnen gevonden worden door in het hoofdmenu
|
||||
<em>Bestand → Exporteren</em> te kiezen. De exporteer dialoog biedt de mogelijkheid
|
||||
om ALLE, of alleen de in de <strong>Duiklijst</strong> geselecteerde duiken, te exporteren. Kies
|
||||
@ -5484,17 +5438,7 @@ tegelijktijd.
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_deel_via">16.6. Deel via</h3>
|
||||
<div class="ulist"><ul>
|
||||
<li>
|
||||
<p>
|
||||
<a href="#S_Facebook"><em>Facebook</em></a> - Deel de geselecteerde duik op de Facebook tijdslijn.
|
||||
</p>
|
||||
</li>
|
||||
</ul></div>
|
||||
</div>
|
||||
<div class="sect2">
|
||||
<h3 id="_help">16.7. Help</h3>
|
||||
<h3 id="_help">16.6. Help</h3>
|
||||
<div class="ulist"><ul>
|
||||
<li>
|
||||
<p>
|
||||
@ -7105,7 +7049,7 @@ alleen als deze nog niet zijn overschreven door nieuwere duiken.</p></div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated
|
||||
2018-09-19 08:04:33 PDT
|
||||
2024-02-08 08:55:00 PST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@ -59,7 +59,7 @@ het programma kunnen bij de ontwikkelaars gemeld worden via email op
|
||||
mailto:subsurface@subsurface-divelog.org[onze mailinglijst]. Fouten kunnen
|
||||
ook gemeld worden op https://github.com/Subsurface/subsurface/issues[onze bugtracker].
|
||||
Instructies hoe _Subsurface_ zelf te compileren vanuit de broncode staan ook op
|
||||
onze website en in het INSTALL bestand in de broncode.
|
||||
onze website en in het INSTALL.md bestand in de broncode.
|
||||
|
||||
*Doelgroep*: Recreatieve duikers, Tec duikers, Apneu duikers,
|
||||
Professionele duikers.
|
||||
@ -1409,6 +1409,7 @@ met een duik, en op deze manier zichtbaar zijn via het _Media_ tabblad van
|
||||
het *Notities* paneel.
|
||||
|
||||
|
||||
[[S_ViewMedia]]
|
||||
==== Media bekijken
|
||||
|
||||
****
|
||||
@ -2541,8 +2542,6 @@ grotduik met Bob).
|
||||
Er zijn twee manieren om duik informatie uit _Subsurface_ te exporteren:
|
||||
|
||||
|
||||
- Exporteer duikinformatie naar _Facebook_
|
||||
|
||||
- xref:S_Export_other[Exporteer duikinformatie naar andere bestemmingen of formaten]
|
||||
|
||||
[[S_Export_other]]
|
||||
@ -3772,9 +3771,6 @@ tegelijkertijd gebruiken>> en <<S_MergeDivePlan, combineren van een duik en zij
|
||||
- _Volgende duikcomputer_ - Kies de volgende duikcomputer.
|
||||
- _Volledig scherm_ - Volledig gevuld scherm aan en uit.
|
||||
|
||||
=== Deel via
|
||||
- <<S_Facebook,_Facebook_>> - Deel de geselecteerde duik op de Facebook tijdslijn.
|
||||
|
||||
=== Help
|
||||
- _Over Subsurface_ - Toont een paneel met versienummer van _Subsurface_ en
|
||||
licentievoorwaarden.
|
||||
|
||||
357
INSTALL
@ -1,357 +0,0 @@
|
||||
Building Subsurface from Source
|
||||
===============================
|
||||
|
||||
Subsurface uses quite a few open source libraries and frameworks to do its
|
||||
job. The most important ones include libdivecomputer, Qt, libxml2, libxslt,
|
||||
libsqlite3, libzip, and libgit2.
|
||||
|
||||
Below are instructions for building Subsurface
|
||||
- on some popular Linux distributions,
|
||||
- MacOSX,
|
||||
- Windows (cross-building)
|
||||
- Android (cross-building)
|
||||
- iOS (cross-building)
|
||||
|
||||
|
||||
Getting Subsurface source
|
||||
-------------------------
|
||||
|
||||
You can get the sources to the latest development version from our git
|
||||
repository:
|
||||
git clone http://github.com/Subsurface/subsurface.git
|
||||
cd subsurface
|
||||
git submodule init # this will give you our flavor of libdivecomputer
|
||||
|
||||
You keep it updated by doing:
|
||||
git checkout master
|
||||
git pull -r
|
||||
git submodule update
|
||||
|
||||
|
||||
Our flavor of libdivecomputer
|
||||
-----------------------------
|
||||
|
||||
Subsurface requires its own flavor of libdivecomputer which is inclduded
|
||||
above as git submodule
|
||||
|
||||
The branches won't have a pretty history and will include ugly merges,
|
||||
but they should always allow a fast forward pull that tracks what we
|
||||
believe developers should build against. All our patches are contained
|
||||
in the "Subsurface-DS9" branch.
|
||||
|
||||
This should allow distros to see which patches we have applied on top of
|
||||
upstream. They will receive force pushes as we rebase to newer versions of
|
||||
upstream so they are not ideal for ongoing development (but they are of
|
||||
course easy to use for distributions as they always build "from scratch",
|
||||
anyway).
|
||||
|
||||
The rationale for this is that we have no intention of forking the
|
||||
project. We simply are adding a few patches on top of their latest
|
||||
version and want to do so in a manner that is both easy for our
|
||||
developers who try to keep them updated frequently, and anyone packaging
|
||||
Subsurface or trying to understand what we have done relative to their
|
||||
respective upstreams.
|
||||
|
||||
|
||||
Getting Qt5
|
||||
-----------
|
||||
|
||||
We use Qt5 in order to only maintain one UI across platforms.
|
||||
|
||||
Qt5.9.1 is the oldest version supported if ONLY building Subsurface
|
||||
Qt5.12 is the oldest version supported if also building Subsurface-mobile
|
||||
|
||||
Most Linux distributions include a new enough version of Qt (and if you are on
|
||||
a distro that still ships with an older Qt, likely your C compiler is also not
|
||||
new enough to build Subsurface).
|
||||
|
||||
If you need Qt (likely on macOS) or want a newer version than provided by your
|
||||
Linux distro, you can install a separate version that Subsurface will use.
|
||||
As of Qt5.15 it has become a lot harder to download and install Qt - you
|
||||
now need a Qt account and the installer tool has a new space age look and
|
||||
significantly reduced flexibility.
|
||||
|
||||
As of this writing, there is thankfully a thirdparty offline installer still
|
||||
available:
|
||||
|
||||
pip3 install aqtinstall
|
||||
aqt install -O <Qt Location> 5.15.2 mac desktop
|
||||
|
||||
(or whatever version / OS you need). This installer is surprisingly fast
|
||||
and seems well maintained - note that we don't use this for Windows as
|
||||
that is completely built from source using MXE.
|
||||
|
||||
In order to use this Qt installation, simply add it to your PATH:
|
||||
PATH=<Qt Location>/<version>/<type>/bin:$PATH
|
||||
|
||||
QtWebKit is needed, if you want to print, but no longer part of Qt5,
|
||||
so you need to download it and compile. In case you just want to test
|
||||
without print possibility omit this step.
|
||||
|
||||
git clone -b 5.212 https://github.com/qt/qtwebkit
|
||||
mkdir -p qtwebkit/WebKitBuild/Release
|
||||
cd qtwebkit/WebKitBuild/Release
|
||||
cmake -DPORT=Qt -DCMAKE_BUILD_TYPE=Release -DQt5_DIR=/<Qt Location>/<version>/<type>/lib/cmake/Qt5 ../..
|
||||
make install
|
||||
|
||||
|
||||
Other third party library dependencies
|
||||
--------------------------------------
|
||||
|
||||
In order for our cloud storage to be fully functional you need
|
||||
libgit2 0.26 or newer.
|
||||
|
||||
|
||||
cmake build system
|
||||
------------------
|
||||
|
||||
Our main build system is based on cmake. But qmake is needed
|
||||
for the googlemaps plugin and the iOS build.
|
||||
|
||||
Download from https://cmake.org/download and follow the instructions
|
||||
to install it or alternatively follow the instruction specific to a
|
||||
distribution (see build instructions).
|
||||
|
||||
|
||||
|
||||
Build options for Subsurface
|
||||
----------------------------
|
||||
|
||||
The following options are recognised when passed to cmake:
|
||||
|
||||
-DCMAKE_BUILD_TYPE=Release create a release build
|
||||
-DCMAKE_BUILD_TYPE=Debug create a debug build
|
||||
|
||||
The Makefile that was created using cmake can be forced into a much more
|
||||
verbose mode by calling
|
||||
|
||||
make VERBOSE=1
|
||||
|
||||
Many more variables are supported, the easiest way to interact with them is
|
||||
to call
|
||||
|
||||
ccmake .
|
||||
|
||||
in your build directory.
|
||||
|
||||
|
||||
Building the development version of Subsurface under Linux
|
||||
----------------------------------------------------------
|
||||
|
||||
On Fedora you need
|
||||
|
||||
sudo dnf install autoconf automake bluez-libs-devel cmake gcc-c++ git \
|
||||
libcurl-devel libsqlite3x-devel libssh2-devel libtool libudev-devel \
|
||||
libusbx-devel libxml2-devel libxslt-devel make \
|
||||
qt5-qtbase-devel qt5-qtconnectivity-devel qt5-qtdeclarative-devel \
|
||||
qt5-qtlocation-devel qt5-qtscript-devel qt5-qtsvg-devel \
|
||||
qt5-qttools-devel qt5-qtwebkit-devel redhat-rpm-config \
|
||||
bluez-libs-devel libgit2-devel libzip-devel libmtp-devel
|
||||
|
||||
|
||||
Package names are sadly different on OpenSUSE
|
||||
|
||||
sudo zypper install git gcc-c++ make autoconf automake libtool cmake libzip-devel \
|
||||
libxml2-devel libxslt-devel sqlite3-devel libusb-1_0-devel \
|
||||
libqt5-linguist-devel libqt5-qttools-devel libQt5WebKitWidgets-devel \
|
||||
libqt5-qtbase-devel libQt5WebKit5-devel libqt5-qtsvg-devel \
|
||||
libqt5-qtscript-devel libqt5-qtdeclarative-devel \
|
||||
libqt5-qtconnectivity-devel libqt5-qtlocation-devel libcurl-devel \
|
||||
bluez-devel libgit2-devel libmtp-devel
|
||||
|
||||
On Debian Buster this seems to work
|
||||
|
||||
sudo apt install \
|
||||
autoconf automake cmake g++ git libbluetooth-dev libcrypto++-dev \
|
||||
libcurl4-openssl-dev libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libtool \
|
||||
libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make pkg-config \
|
||||
qml-module-qtlocation qml-module-qtpositioning qml-module-qtquick2 \
|
||||
qt5-default qt5-qmake qtchooser qtconnectivity5-dev qtdeclarative5-dev \
|
||||
qtdeclarative5-private-dev qtlocation5-dev qtpositioning5-dev \
|
||||
qtscript5-dev qttools5-dev qttools5-dev-tools libmtp-dev
|
||||
|
||||
In order to build and run mobile-on-desktop, you also need
|
||||
|
||||
sudo apt install \
|
||||
qtquickcontrols2-5-dev qml-module-qtquick-window2 qml-module-qtquick-dialogs \
|
||||
qml-module-qtquick-layouts qml-module-qtquick-controls2 qml-module-qtquick-templates2 \
|
||||
qml-module-qtgraphicaleffects qml-module-qtqml-models2 qml-module-qtquick-controls
|
||||
|
||||
|
||||
Package names for Ubuntu 21.04
|
||||
|
||||
sudo apt install \
|
||||
autoconf automake cmake g++ git libbluetooth-dev libcrypto++-dev \
|
||||
libcurl4-gnutls-dev libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libtool \
|
||||
libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make pkg-config \
|
||||
qml-module-qtlocation qml-module-qtpositioning qml-module-qtquick2 \
|
||||
qt5-qmake qtchooser qtconnectivity5-dev qtdeclarative5-dev \
|
||||
qtdeclarative5-private-dev qtlocation5-dev qtpositioning5-dev \
|
||||
qtscript5-dev qttools5-dev qttools5-dev-tools libmtp-dev
|
||||
|
||||
In order to build and run mobile-on-desktop, you also need
|
||||
|
||||
sudo apt install \
|
||||
qtquickcontrols2-5-dev qml-module-qtquick-window2 qml-module-qtquick-dialogs \
|
||||
qml-module-qtquick-layouts qml-module-qtquick-controls2 qml-module-qtquick-templates2 \
|
||||
qml-module-qtgraphicaleffects qml-module-qtqml-models2 qml-module-qtquick-controls
|
||||
|
||||
|
||||
On Raspberry Pi (Raspian Buster and Ubuntu Mate 20.04.1) this seems to work
|
||||
|
||||
sudo apt install \
|
||||
autoconf automake cmake g++ git libbluetooth-dev libcrypto++-dev \
|
||||
libcurl4-gnutls-dev libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libtool \
|
||||
libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make pkg-config \
|
||||
qml-module-qtlocation qml-module-qtpositioning qml-module-qtquick2 \
|
||||
qt5-default qt5-qmake qtchooser qtconnectivity5-dev qtdeclarative5-dev \
|
||||
qtdeclarative5-private-dev qtlocation5-dev qtpositioning5-dev \
|
||||
qtscript5-dev qttools5-dev qttools5-dev-tools libmtp-dev
|
||||
|
||||
In order to build and run mobile-on-desktop, you also need
|
||||
|
||||
sudo apt install \
|
||||
qtquickcontrols2-5-dev qml-module-qtquick-window2 qml-module-qtquick-dialogs \
|
||||
qml-module-qtquick-layouts qml-module-qtquick-controls2 qml-module-qtquick-templates2 \
|
||||
qml-module-qtgraphicaleffects qml-module-qtqml-models2 qml-module-qtquick-controls
|
||||
|
||||
|
||||
Note that on Ubuntu Mate on the Raspberry Pi, you may need to configure
|
||||
some swap space in order for the build to complete successfully. There is no
|
||||
swap space configured by default. See the dphys-swapfile package.
|
||||
|
||||
On PCLinuxOS you appear to need the following packages
|
||||
|
||||
su -c "apt-get install -y autoconf automake cmake gcc-c++ git libtool \
|
||||
lib64bluez-devel lib64qt5bluetooth-devel lib64qt5concurrent-devel \
|
||||
lib64qt5help-devel lib64qt5location-devel lib64qt5quicktest-devel \
|
||||
lib64qt5quickwidgets-devel lib64qt5script-devel lib64qt5svg-devel \
|
||||
lib64qt5test-devel lib64qt5webkitwidgets-devel lib64qt5xml-devel \
|
||||
lib64ssh2-devel lib64usb1.0-devel lib64zip-devel qttools5 qttranslations5"
|
||||
|
||||
In order to build Subsurface, use the supplied build script. This should
|
||||
work on most systems that have all the prerequisite packages installed.
|
||||
|
||||
You should have Subsurface sources checked out in a sane place, something
|
||||
like this:
|
||||
|
||||
mkdir -p ~/src
|
||||
cd ~/src
|
||||
git clone https://github.com/Subsurface/subsurface.git
|
||||
./subsurface/scripts/build.sh # <- this step will take quite a while as it
|
||||
# compiles a handful of libraries before
|
||||
# building Subsurface
|
||||
|
||||
Now you can run Subsurface like this:
|
||||
|
||||
cd ~/src/subsurface/build
|
||||
./subsurface
|
||||
|
||||
|
||||
Note: on many Linux versions (for example on Kubuntu 15.04) the user must
|
||||
belong to the dialout group.
|
||||
|
||||
You may need to run something like
|
||||
|
||||
sudo usermod -a -G dialout username
|
||||
|
||||
with your correct username and log out and log in again for that to take
|
||||
effect.
|
||||
|
||||
If you get errors like:
|
||||
|
||||
./subsurface: error while loading shared libraries: libGrantlee_Templates.so.5: cannot open shared object file: No such file or directory
|
||||
|
||||
You can run the following command:
|
||||
|
||||
sudo ldconfig ~/src/install-root/lib
|
||||
|
||||
|
||||
Building Subsurface under MacOSX
|
||||
--------------------------------
|
||||
|
||||
While it is possible to build all required components completely from source,
|
||||
at this point the preferred way to build Subsurface is to set up the build
|
||||
infrastructure via Homebrew and then build the dependencies from source.
|
||||
|
||||
0) You need to have XCode installed. The first time (and possibly after updating OSX)
|
||||
|
||||
xcode-select --install
|
||||
|
||||
1) install Homebrew (see https://brew.sh) and then the required build infrastructure:
|
||||
|
||||
brew install autoconf automake libtool pkg-config gettext
|
||||
|
||||
2) install Qt
|
||||
|
||||
download the macOS installer from https://download.qt.io/official_releases/online_installers
|
||||
and use it to install the desired Qt version. At this point the latest Qt5 version is still
|
||||
preferred over Qt6.
|
||||
|
||||
3) now build Subsurface
|
||||
|
||||
cd ~/src; bash subsurface/scripts/build.sh -build-deps
|
||||
|
||||
if you are building against Qt6 (still experimental) you can create a universal binary with
|
||||
|
||||
cd ~/src; bash subsurface/scripts/build.sh -build-with-qt6 -build-deps -fat-build
|
||||
|
||||
After the above is done, Subsurface.app will be available in the
|
||||
subsurface/build directory. You can run Subsurface with the command
|
||||
|
||||
A) open subsurface/build/Subsurface.app
|
||||
this will however not show diagnostic output
|
||||
|
||||
B) subsurface/build/Subsurface.app/Contents/MacOS/Subsurface
|
||||
the TAB key is your friend :-)
|
||||
|
||||
Debugging can be done with either Xcode or QtCreator.
|
||||
|
||||
To install the app for all users, move subsurface/build/Subsurface.app to /Applications.
|
||||
|
||||
|
||||
Cross-building Subsurface on MacOSX for iOS
|
||||
-------------------------------------------
|
||||
|
||||
1) build SubSurface under MacOSX and iOS
|
||||
|
||||
1.1) cd <repo>/..; bash <repo>/scripts/build.sh -build-deps -both
|
||||
note: this is mainly done to ensure all external dependencies are downloaded and set
|
||||
to the correct versions
|
||||
|
||||
2) continue as described in subsurface/packaging/ios
|
||||
|
||||
|
||||
|
||||
Cross-building Subsurface on Linux for Windows
|
||||
----------------------------------------------
|
||||
|
||||
Subsurface builds nicely with MinGW - the official builds are done as
|
||||
cross builds under Linux (currently on Ubuntu 20.04). A shell script to do
|
||||
that (plus the .nsi file to create the installer with makensis) are
|
||||
included in the packaging/windows directory.
|
||||
|
||||
Please read through the explanations and instructions in
|
||||
packaging/windows/README.md, packaging/windows/create-win-installer.sh, and
|
||||
packaging/windows/mxe-based-build.sh if you want to build the Windows version
|
||||
on your Linux system.
|
||||
|
||||
Building Subsurface on Windows
|
||||
------------------------------
|
||||
|
||||
This is NOT RECOMMENDED. To the best of our knowledge there is one single
|
||||
person who regularly does this. The Subsurface team does not provide support
|
||||
for Windows binary build from sources natively under Windows...
|
||||
|
||||
The lack of a working package management system for Windows makes it
|
||||
really painful to build Subsurface natively under Windows,
|
||||
so we don't support that at all.
|
||||
|
||||
|
||||
Cross-building Subsurface on Linux for Android
|
||||
----------------------------------------------
|
||||
|
||||
Follow the instructions in packaging/android/README
|
||||
430
INSTALL.md
Normal file
@ -0,0 +1,430 @@
|
||||
# Building Subsurface from Source
|
||||
|
||||
Subsurface uses quite a few open source libraries and frameworks to do its
|
||||
job. The most important ones include libdivecomputer, Qt, libxml2, libxslt,
|
||||
libsqlite3, libzip, and libgit2.
|
||||
|
||||
Below are instructions for building Subsurface
|
||||
- on some popular Linux distributions,
|
||||
- MacOSX,
|
||||
- Windows (cross-building)
|
||||
- Android (cross-building)
|
||||
- iOS (cross-building)
|
||||
|
||||
|
||||
## Getting Subsurface source
|
||||
|
||||
You can get the sources to the latest development version from our git
|
||||
repository:
|
||||
|
||||
```
|
||||
git clone http://github.com/Subsurface/subsurface.git
|
||||
cd subsurface
|
||||
git submodule init # this will give you our flavor of libdivecomputer
|
||||
```
|
||||
|
||||
You keep it updated by doing:
|
||||
|
||||
```
|
||||
git checkout master
|
||||
git pull -r
|
||||
git submodule update
|
||||
```
|
||||
|
||||
|
||||
### Our flavor of libdivecomputer
|
||||
|
||||
Subsurface requires its own flavor of libdivecomputer which is inclduded
|
||||
above as git submodule
|
||||
|
||||
The branches won't have a pretty history and will include ugly merges,
|
||||
but they should always allow a fast forward pull that tracks what we
|
||||
believe developers should build against. All our patches are contained
|
||||
in the `Subsurface-DS9` branch.
|
||||
|
||||
This should allow distros to see which patches we have applied on top of
|
||||
upstream. They will receive force pushes as we rebase to newer versions of
|
||||
upstream so they are not ideal for ongoing development (but they are of
|
||||
course easy to use for distributions as they always build "from scratch",
|
||||
anyway).
|
||||
|
||||
The rationale for this is that we have no intention of forking the
|
||||
project. We simply are adding a few patches on top of their latest
|
||||
version and want to do so in a manner that is both easy for our
|
||||
developers who try to keep them updated frequently, and anyone packaging
|
||||
Subsurface or trying to understand what we have done relative to their
|
||||
respective upstreams.
|
||||
|
||||
|
||||
### Getting Qt5
|
||||
|
||||
We use Qt5 in order to only maintain one UI across platforms.
|
||||
|
||||
Qt5.9.1 is the oldest version supported if ONLY building Subsurface
|
||||
Qt5.12 is the oldest version supported if also building Subsurface-mobile
|
||||
|
||||
Most Linux distributions include a new enough version of Qt (and if you are on
|
||||
a distro that still ships with an older Qt, likely your C compiler is also not
|
||||
new enough to build Subsurface).
|
||||
|
||||
If you need Qt (likely on macOS) or want a newer version than provided by your
|
||||
Linux distro, you can install a separate version that Subsurface will use.
|
||||
As of Qt5.15 it has become a lot harder to download and install Qt - you
|
||||
now need a Qt account and the installer tool has a new space age look and
|
||||
significantly reduced flexibility.
|
||||
|
||||
As of this writing, there is thankfully a thirdparty offline installer still
|
||||
available:
|
||||
|
||||
```
|
||||
pip3 install aqtinstall
|
||||
aqt install -O <Qt Location> 5.15.2 mac desktop
|
||||
```
|
||||
|
||||
(or whatever version / OS you need). This installer is surprisingly fast
|
||||
and seems well maintained - note that we don't use this for Windows as
|
||||
that is completely built from source using MXE.
|
||||
|
||||
In order to use this Qt installation, simply add it to your PATH:
|
||||
|
||||
```
|
||||
PATH=<Qt Location>/<version>/<type>/bin:$PATH
|
||||
```
|
||||
|
||||
QtWebKit is needed, if you want to print, but no longer part of Qt5,
|
||||
so you need to download it and compile. In case you just want to test
|
||||
without print possibility omit this step.
|
||||
|
||||
```
|
||||
git clone -b 5.212 https://github.com/qt/qtwebkit
|
||||
mkdir -p qtwebkit/WebKitBuild/Release
|
||||
cd qtwebkit/WebKitBuild/Release
|
||||
cmake -DPORT=Qt -DCMAKE_BUILD_TYPE=Release -DQt5_DIR=/<Qt Location>/<version>/<type>/lib/cmake/Qt5 ../..
|
||||
make install
|
||||
```
|
||||
|
||||
|
||||
### Other third party library dependencies
|
||||
|
||||
In order for our cloud storage to be fully functional you need
|
||||
libgit2 0.26 or newer.
|
||||
|
||||
|
||||
### cmake build system
|
||||
|
||||
Our main build system is based on cmake. But qmake is needed
|
||||
for the googlemaps plugin and the iOS build.
|
||||
|
||||
Download from https://cmake.org/download and follow the instructions
|
||||
to install it or alternatively follow the instruction specific to a
|
||||
distribution (see build instructions).
|
||||
|
||||
|
||||
|
||||
## Build options for Subsurface
|
||||
|
||||
The following options are recognised when passed to cmake:
|
||||
|
||||
`-DCMAKE_BUILD_TYPE=Release` create a release build
|
||||
`-DCMAKE_BUILD_TYPE=Debug` create a debug build
|
||||
|
||||
The Makefile that was created using cmake can be forced into a much more
|
||||
verbose mode by calling
|
||||
|
||||
```
|
||||
make VERBOSE=1
|
||||
```
|
||||
|
||||
Many more variables are supported, the easiest way to interact with them is
|
||||
to call
|
||||
|
||||
```
|
||||
ccmake .
|
||||
```
|
||||
|
||||
in your build directory.
|
||||
|
||||
|
||||
### Building the development version of Subsurface under Linux
|
||||
|
||||
On Fedora you need
|
||||
|
||||
```
|
||||
sudo dnf install autoconf automake bluez-libs-devel cmake gcc-c++ git \
|
||||
libcurl-devel libsqlite3x-devel libssh2-devel libtool libudev-devel \
|
||||
libusbx-devel libxml2-devel libxslt-devel make \
|
||||
qt5-qtbase-devel qt5-qtconnectivity-devel qt5-qtdeclarative-devel \
|
||||
qt5-qtlocation-devel qt5-qtscript-devel qt5-qtsvg-devel \
|
||||
qt5-qttools-devel qt5-qtwebkit-devel redhat-rpm-config \
|
||||
bluez-libs-devel libgit2-devel libzip-devel libmtp-devel
|
||||
```
|
||||
|
||||
|
||||
Package names are sadly different on OpenSUSE
|
||||
|
||||
```
|
||||
sudo zypper install git gcc-c++ make autoconf automake libtool cmake libzip-devel \
|
||||
libxml2-devel libxslt-devel sqlite3-devel libusb-1_0-devel \
|
||||
libqt5-linguist-devel libqt5-qttools-devel libQt5WebKitWidgets-devel \
|
||||
libqt5-qtbase-devel libQt5WebKit5-devel libqt5-qtsvg-devel \
|
||||
libqt5-qtscript-devel libqt5-qtdeclarative-devel \
|
||||
libqt5-qtconnectivity-devel libqt5-qtlocation-devel libcurl-devel \
|
||||
bluez-devel libgit2-devel libmtp-devel
|
||||
```
|
||||
|
||||
On Debian Bookworm this seems to work
|
||||
|
||||
```
|
||||
sudo apt install \
|
||||
autoconf automake cmake g++ git libbluetooth-dev libcrypto++-dev \
|
||||
libcurl4-openssl-dev libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libtool \
|
||||
libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make pkg-config \
|
||||
qml-module-qtlocation qml-module-qtpositioning qml-module-qtquick2 \
|
||||
qt5-qmake qtchooser qtconnectivity5-dev qtdeclarative5-dev \
|
||||
qtdeclarative5-private-dev qtlocation5-dev qtpositioning5-dev \
|
||||
qtscript5-dev qttools5-dev qttools5-dev-tools libmtp-dev
|
||||
```
|
||||
|
||||
In order to build and run mobile-on-desktop, you also need
|
||||
|
||||
```
|
||||
sudo apt install \
|
||||
qtquickcontrols2-5-dev qml-module-qtquick-window2 qml-module-qtquick-dialogs \
|
||||
qml-module-qtquick-layouts qml-module-qtquick-controls2 qml-module-qtquick-templates2 \
|
||||
qml-module-qtgraphicaleffects qml-module-qtqml-models2 qml-module-qtquick-controls
|
||||
```
|
||||
|
||||
|
||||
Package names for Ubuntu 21.04
|
||||
|
||||
```
|
||||
sudo apt install \
|
||||
autoconf automake cmake g++ git libbluetooth-dev libcrypto++-dev \
|
||||
libcurl4-gnutls-dev libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libtool \
|
||||
libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make pkg-config \
|
||||
qml-module-qtlocation qml-module-qtpositioning qml-module-qtquick2 \
|
||||
qt5-qmake qtchooser qtconnectivity5-dev qtdeclarative5-dev \
|
||||
qtdeclarative5-private-dev qtlocation5-dev qtpositioning5-dev \
|
||||
qtscript5-dev qttools5-dev qttools5-dev-tools libmtp-dev
|
||||
```
|
||||
|
||||
In order to build and run mobile-on-desktop, you also need
|
||||
|
||||
```
|
||||
sudo apt install \
|
||||
qtquickcontrols2-5-dev qml-module-qtquick-window2 qml-module-qtquick-dialogs \
|
||||
qml-module-qtquick-layouts qml-module-qtquick-controls2 qml-module-qtquick-templates2 \
|
||||
qml-module-qtgraphicaleffects qml-module-qtqml-models2 qml-module-qtquick-controls
|
||||
```
|
||||
|
||||
|
||||
On Raspberry Pi (Raspian Buster and Ubuntu Mate 20.04.1) this seems to work
|
||||
|
||||
```
|
||||
sudo apt install \
|
||||
autoconf automake cmake g++ git libbluetooth-dev libcrypto++-dev \
|
||||
libcurl4-gnutls-dev libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libtool \
|
||||
libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make pkg-config \
|
||||
qml-module-qtlocation qml-module-qtpositioning qml-module-qtquick2 \
|
||||
qt5-qmake qtchooser qtconnectivity5-dev qtdeclarative5-dev \
|
||||
qtdeclarative5-private-dev qtlocation5-dev qtpositioning5-dev \
|
||||
qtscript5-dev qttools5-dev qttools5-dev-tools libmtp-dev
|
||||
```
|
||||
|
||||
In order to build and run mobile-on-desktop, you also need
|
||||
|
||||
```
|
||||
sudo apt install \
|
||||
qtquickcontrols2-5-dev qml-module-qtquick-window2 qml-module-qtquick-dialogs \
|
||||
qml-module-qtquick-layouts qml-module-qtquick-controls2 qml-module-qtquick-templates2 \
|
||||
qml-module-qtgraphicaleffects qml-module-qtqml-models2 qml-module-qtquick-controls
|
||||
```
|
||||
|
||||
|
||||
Note that on Ubuntu Mate on the Raspberry Pi, you may need to configure
|
||||
some swap space in order for the build to complete successfully. There is no
|
||||
swap space configured by default. See the dphys-swapfile package.
|
||||
|
||||
On Raspberry Pi OS with Desktop (64-bit) Released April 4th, 2022, this seems
|
||||
to work
|
||||
|
||||
```
|
||||
sudo apt install \
|
||||
autoconf automake cmake g++ git libbluetooth-dev libcrypto++-dev \
|
||||
libcurl4-gnutls-dev libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libtool \
|
||||
libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make pkg-config \
|
||||
qml-module-qtlocation qml-module-qtpositioning qml-module-qtquick2 \
|
||||
qt5-qmake qtchooser qtconnectivity5-dev qtdeclarative5-dev \
|
||||
qtdeclarative5-private-dev qtlocation5-dev qtpositioning5-dev \
|
||||
qtscript5-dev qttools5-dev qttools5-dev-tools libmtp-dev
|
||||
```
|
||||
|
||||
Note that you'll need to increase the swap space as the default of 100MB
|
||||
doesn't seem to be enough. 1024MB worked on a 3B+.
|
||||
|
||||
If maps aren't working, copy the googlemaps plugin
|
||||
from `<build_dir>/subsurface/googlemaps/build/libqtgeoservices_googlemaps.so`
|
||||
to `/usr/lib/aarch64-linux-gnu/qt5/plugins/geoservices/`.
|
||||
|
||||
If Subsurface can't seem to see your dive computer on `/dev/ttyUSB0`, even after
|
||||
adjusting your account's group settings (see note below about usermod), it
|
||||
might be that the FTDI driver doesn't recognize the VendorID/ProductID of your
|
||||
computer. Follow the instructions here:
|
||||
|
||||
https://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_101_Customising_FTDI_VID_PID_In_Linux(FT_000081).pdf
|
||||
|
||||
If you're unsure of the VID/PID of your device, plug your dive computer in to
|
||||
your host and run `dmesg`. That should show the codes that are needed to
|
||||
follow TN_101.
|
||||
|
||||
On PCLinuxOS you appear to need the following packages
|
||||
|
||||
```
|
||||
su -c "apt-get install -y autoconf automake cmake gcc-c++ git libtool \
|
||||
lib64bluez-devel lib64qt5bluetooth-devel lib64qt5concurrent-devel \
|
||||
lib64qt5help-devel lib64qt5location-devel lib64qt5quicktest-devel \
|
||||
lib64qt5quickwidgets-devel lib64qt5script-devel lib64qt5svg-devel \
|
||||
lib64qt5test-devel lib64qt5webkitwidgets-devel lib64qt5xml-devel \
|
||||
lib64ssh2-devel lib64usb1.0-devel lib64zip-devel qttools5 qttranslations5"
|
||||
```
|
||||
|
||||
In order to build Subsurface, use the supplied build script. This should
|
||||
work on most systems that have all the prerequisite packages installed.
|
||||
|
||||
You should have Subsurface sources checked out in a sane place, something
|
||||
like this:
|
||||
|
||||
```
|
||||
mkdir -p ~/src
|
||||
cd ~/src
|
||||
git clone https://github.com/Subsurface/subsurface.git
|
||||
./subsurface/scripts/build.sh # <- this step will take quite a while as it
|
||||
# compiles a handful of libraries before
|
||||
# building Subsurface
|
||||
```
|
||||
|
||||
Now you can run Subsurface like this:
|
||||
|
||||
```
|
||||
cd ~/src/subsurface/build
|
||||
./subsurface
|
||||
```
|
||||
|
||||
|
||||
Note: on many Linux versions (for example on Kubuntu 15.04) the user must
|
||||
belong to the `dialout` group.
|
||||
|
||||
You may need to run something like
|
||||
|
||||
```
|
||||
sudo usermod -a -G dialout $USER
|
||||
```
|
||||
|
||||
with your correct username and log out and log in again for that to take
|
||||
effect.
|
||||
|
||||
If you get errors like:
|
||||
|
||||
```
|
||||
./subsurface: error while loading shared libraries: libGrantlee_Templates.so.5: cannot open shared object file: No such file or directory
|
||||
```
|
||||
|
||||
You can run the following command:
|
||||
|
||||
```
|
||||
sudo ldconfig ~/src/install-root/lib
|
||||
```
|
||||
|
||||
|
||||
### Building Subsurface under MacOSX
|
||||
|
||||
While it is possible to build all required components completely from source,
|
||||
at this point the preferred way to build Subsurface is to set up the build
|
||||
infrastructure via Homebrew and then build the dependencies from source.
|
||||
|
||||
0. You need to have XCode installed. The first time (and possibly after updating OSX)
|
||||
|
||||
```
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
1. install Homebrew (see https://brew.sh) and then the required build infrastructure:
|
||||
|
||||
```
|
||||
brew install autoconf automake libtool pkg-config gettext
|
||||
```
|
||||
|
||||
2. install Qt
|
||||
|
||||
download the macOS installer from https://download.qt.io/official_releases/online_installers
|
||||
and use it to install the desired Qt version. At this point the latest Qt5 version is still
|
||||
preferred over Qt6.
|
||||
|
||||
If you plan to deploy your build to an Apple Silicon Mac, you may have better results with
|
||||
Bluetooth connections if you install Qt5.15.13. If Qt5.15.13 is not available via the
|
||||
installer, you can download from https://download.qt.io/official_releases/qt/5.15/5.15.13
|
||||
and build using the usual configure, make, and make install.
|
||||
|
||||
3. now build Subsurface
|
||||
|
||||
```
|
||||
cd ~/src; bash subsurface/scripts/build.sh -build-deps
|
||||
```
|
||||
|
||||
if you are building against Qt6 (still experimental) you can create a universal binary with
|
||||
|
||||
```
|
||||
cd ~/src; bash subsurface/scripts/build.sh -build-with-qt6 -build-deps -fat-build
|
||||
```
|
||||
|
||||
After the above is done, Subsurface.app will be available in the
|
||||
subsurface/build directory. You can run Subsurface with the command
|
||||
|
||||
A. `open subsurface/build/Subsurface.app`
|
||||
this will however not show diagnostic output
|
||||
|
||||
B. `subsurface/build/Subsurface.app/Contents/MacOS/Subsurface`
|
||||
the [Tab] key is your friend :-)
|
||||
|
||||
Debugging can be done with either Xcode or QtCreator.
|
||||
|
||||
To install the app for all users, move subsurface/build/Subsurface.app to /Applications.
|
||||
|
||||
|
||||
### Cross-building Subsurface on MacOSX for iOS
|
||||
|
||||
0. build SubSurface under MacOSX and iOS
|
||||
|
||||
1. `cd <repo>/..; bash <repo>/scripts/build.sh -build-deps -both`
|
||||
note: this is mainly done to ensure all external dependencies are downloaded and set
|
||||
to the correct versions
|
||||
|
||||
2. follow [these instructions](packaging/ios/README.md)
|
||||
|
||||
|
||||
|
||||
### Cross-building Subsurface on Linux for Windows
|
||||
|
||||
Subsurface for Windows builds on linux by using the [MXE (M cross environment)](https://github.com/mxe/mxe). The easiest way to do this is to use a Docker container with a pre-built MXE for Subsurface by following [these instructions](packaging/windows/README.md).
|
||||
|
||||
|
||||
### Building Subsurface on Windows
|
||||
|
||||
This is NOT RECOMMENDED. To the best of our knowledge there is one single
|
||||
person who regularly does this. The Subsurface team does not provide support
|
||||
for Windows binary build from sources natively under Windows...
|
||||
|
||||
The lack of a working package management system for Windows makes it
|
||||
really painful to build Subsurface natively under Windows,
|
||||
so we don't support that at all.
|
||||
|
||||
But if you want to build Subsurface on a Windows system, the docker based [cross-build for Windows](packaging/windows/README.md) works just fine in WSL2 on Windows.
|
||||
|
||||
|
||||
### Cross-building Subsurface on Linux for Android
|
||||
|
||||
Follow [these instructions](packaging/android/README.md).
|
||||
47
README.md
@ -1,20 +1,17 @@
|
||||
# Subsurface
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
[](https://github.com/subsurface/subsurface/actions/workflows/windows.yml)
|
||||
[](https://github.com/subsurface/subsurface/actions/workflows/mac.yml)
|
||||
[](https://github.com/subsurface/subsurface/actions/workflows/ios.yml)
|
||||
[](https://github.com/subsurface/subsurface/actions/workflows/android.yml)
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
[](https://github.com/subsurface/subsurface/actions/workflows/linux-snap.yml)
|
||||
[](https://github.com/subsurface/subsurface/actions/workflows/linux-ubuntu-16.04-5.12-appimage.yml)
|
||||
[](https://github.com/subsurface/subsurface/actions/workflows/linux-ubuntu-24.04-5.15.yml)
|
||||
[](https://github.com/subsurface/subsurface/actions/workflows/linux-fedora-35-qt6.yml)
|
||||
[](https://github.com/subsurface/subsurface/actions/workflows/linux-debian-trixie-5.15.yml)
|
||||
|
||||
This is the README file for Subsurface 5.0.9
|
||||
|
||||
Please check the `ReleaseNotes.txt` for details about new features and
|
||||
changes since Subsurface 5.0.8 (and earlier versions).
|
||||
[](https://scan.coverity.com/projects/subsurface-divelog-subsurface)
|
||||
|
||||
Subsurface can be found at http://subsurface-divelog.org
|
||||
|
||||
@ -24,15 +21,9 @@ Report bugs and issues at https://github.com/Subsurface/subsurface/issues
|
||||
|
||||
License: GPLv2
|
||||
|
||||
We frequently make new test versions of Subsurface available at
|
||||
http://subsurface-divelog.org/downloads/test/ and there you can always get
|
||||
the latest builds for Mac, Windows, Linux AppImage and Android (with some
|
||||
caveats about installability). Additionally, those same versions are
|
||||
posted to the Subsurface-daily repos on Launchpad and OBS.
|
||||
|
||||
These tend to contain the latest bug fixes and features, but also
|
||||
occasionally the latest bugs and issues. Please understand when using them
|
||||
that these are primarily intended for testing.
|
||||
We are releasing 'nightly' builds of Subsurface that are built from the latest version of the code. Versions of this build for Windows, macOS, Android (requiring sideloading), and a Linux AppImage can be downloaded from the [Latest Dev Release](https://www.subsurface-divelog.org/latest-release/) page on [our website](https://www.subsurface-divelog.org/). Alternatively, they can be downloaded [directly from GitHub](https://github.com/subsurface/nightly-builds/releases). Additionally, those same versions are
|
||||
posted to the Subsurface-daily repos on Ubuntu Launchpad, Fedora COPR, and
|
||||
OpenSUSE OBS, and released to [Snapcraft](https://snapcraft.io/subsurface) into the 'edge' channel of subsurface.
|
||||
|
||||
You can get the sources to the latest development version from the git
|
||||
repository:
|
||||
@ -44,17 +35,11 @@ git clone https://github.com/Subsurface/subsurface.git
|
||||
You can also fork the repository and browse the sources at the same site,
|
||||
simply using https://github.com/Subsurface/subsurface
|
||||
|
||||
If you want the latest release (instead of the bleeding edge
|
||||
development version) you can either get this via git or the release tar
|
||||
ball. After cloning run the following command:
|
||||
Additionally, artifacts for Windows, macOS, Android, Linux AppImage, and iOS (simulator build) are generated for all open pull requests and linked in pull request comments. Use these if you want to test the changes in a specific pull request and provide feedback before it has been merged.
|
||||
|
||||
```
|
||||
git checkout v5.0.9 (or whatever the last release is)
|
||||
```
|
||||
If you want a more stable version that is a little bit more tested you can get this from the [Curent Release](https://www.subsurface-divelog.org/current-release/) page on [our website](https://www.subsurface-divelog.org/).
|
||||
|
||||
or download a tarball from http://subsurface-divelog.org/downloads/Subsurface-5.0.9.tgz
|
||||
|
||||
Detailed build instructions can be found in the INSTALL file.
|
||||
Detailed build instructions can be found in the [INSTALL.md](/INSTALL.md) file.
|
||||
|
||||
## System Requirements
|
||||
|
||||
|
||||
@ -2,6 +2,19 @@
|
||||
|
||||
= _Subsurface_ Release Notes
|
||||
|
||||
New in _Subsurface_ 5.0.10
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
- remove divesite list from tab-widgets
|
||||
- implement panning of the profile
|
||||
- infobox: show an icon for warnings
|
||||
- import: allow import of divesites without UUID
|
||||
- planner: allow handle manipulation in zoomed in state
|
||||
- divelist: do not include planned versions of a dive if there is real data
|
||||
- fix key composition in tag widgets and dive site widget
|
||||
- use combobox for moving sensor between cylinders
|
||||
- dive computer support:
|
||||
- fix Ratio dive computer detection for BLE only devices
|
||||
|
||||
New in _Subsurface_ 5.0.9
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
- filter: normalize unicode code points to base letter (for searching ℓ, etc.)
|
||||
|
||||
@ -25,15 +25,15 @@ SOURCES += subsurface-mobile-main.cpp \
|
||||
core/devicedetails.cpp \
|
||||
core/downloadfromdcthread.cpp \
|
||||
core/qtserialbluetooth.cpp \
|
||||
core/plannernotes.c \
|
||||
core/uemis-downloader.c \
|
||||
core/plannernotes.cpp \
|
||||
core/uemis-downloader.cpp \
|
||||
core/qthelper.cpp \
|
||||
core/checkcloudconnection.cpp \
|
||||
core/color.cpp \
|
||||
core/configuredivecomputer.cpp \
|
||||
core/divelogexportlogic.cpp \
|
||||
core/divesitehelpers.cpp \
|
||||
core/errorhelper.c \
|
||||
core/errorhelper.cpp \
|
||||
core/exif.cpp \
|
||||
core/format.cpp \
|
||||
core/gettextfromc.cpp \
|
||||
@ -41,48 +41,51 @@ SOURCES += subsurface-mobile-main.cpp \
|
||||
core/qt-init.cpp \
|
||||
core/subsurfacesysinfo.cpp \
|
||||
core/windowtitleupdate.cpp \
|
||||
core/file.c \
|
||||
core/file.cpp \
|
||||
core/fulltext.cpp \
|
||||
core/subsurfacestartup.c \
|
||||
core/subsurfacestartup.cpp \
|
||||
core/subsurface-string.cpp \
|
||||
core/pref.c \
|
||||
core/profile.c \
|
||||
core/profile.cpp \
|
||||
core/device.cpp \
|
||||
core/dive.c \
|
||||
core/dive.cpp \
|
||||
core/divecomputer.c \
|
||||
core/divefilter.cpp \
|
||||
core/event.c \
|
||||
core/eventtype.cpp \
|
||||
core/filterconstraint.cpp \
|
||||
core/filterpreset.cpp \
|
||||
core/divelist.c \
|
||||
core/divelog.cpp \
|
||||
core/gas-model.c \
|
||||
core/gaspressures.c \
|
||||
core/git-access.c \
|
||||
core/git-access.cpp \
|
||||
core/globals.cpp \
|
||||
core/liquivision.c \
|
||||
core/load-git.c \
|
||||
core/parse-xml.c \
|
||||
core/parse.c \
|
||||
core/liquivision.cpp \
|
||||
core/load-git.cpp \
|
||||
core/parse-xml.cpp \
|
||||
core/parse.cpp \
|
||||
core/picture.c \
|
||||
core/pictureobj.cpp \
|
||||
core/sample.c \
|
||||
core/import-suunto.c \
|
||||
core/import-shearwater.c \
|
||||
core/import-seac.c \
|
||||
core/import-cobalt.c \
|
||||
core/import-divinglog.c \
|
||||
core/import-csv.c \
|
||||
core/save-html.c \
|
||||
core/sample.cpp \
|
||||
core/import-suunto.cpp \
|
||||
core/import-shearwater.cpp \
|
||||
core/import-seac.cpp \
|
||||
core/import-cobalt.cpp \
|
||||
core/import-divinglog.cpp \
|
||||
core/import-csv.cpp \
|
||||
core/save-html.cpp \
|
||||
core/statistics.c \
|
||||
core/worldmap-save.c \
|
||||
core/libdivecomputer.c \
|
||||
core/worldmap-save.cpp \
|
||||
core/libdivecomputer.cpp \
|
||||
core/version.c \
|
||||
core/save-git.c \
|
||||
core/datatrak.c \
|
||||
core/save-git.cpp \
|
||||
core/datatrak.cpp \
|
||||
core/ostctools.c \
|
||||
core/planner.c \
|
||||
core/save-xml.c \
|
||||
core/cochran.c \
|
||||
core/deco.c \
|
||||
core/planner.cpp \
|
||||
core/save-xml.cpp \
|
||||
core/cochran.cpp \
|
||||
core/deco.cpp \
|
||||
core/divesite.c \
|
||||
core/equipment.c \
|
||||
core/gas.c \
|
||||
@ -91,9 +94,9 @@ SOURCES += subsurface-mobile-main.cpp \
|
||||
core/sha1.c \
|
||||
core/string-format.cpp \
|
||||
core/strtod.c \
|
||||
core/tag.c \
|
||||
core/tag.cpp \
|
||||
core/taxonomy.c \
|
||||
core/time.c \
|
||||
core/time.cpp \
|
||||
core/trip.c \
|
||||
core/units.c \
|
||||
core/uemis.c \
|
||||
@ -200,12 +203,15 @@ HEADERS += \
|
||||
core/dive.h \
|
||||
core/divecomputer.h \
|
||||
core/event.h \
|
||||
core/eventtype.h \
|
||||
core/extradata.h \
|
||||
core/git-access.h \
|
||||
core/globals.h \
|
||||
core/owning_ptrs.h \
|
||||
core/pref.h \
|
||||
core/profile.h \
|
||||
core/qthelper.h \
|
||||
core/range.h \
|
||||
core/save-html.h \
|
||||
core/statistics.h \
|
||||
core/units.h \
|
||||
@ -224,6 +230,7 @@ HEADERS += \
|
||||
core/filterconstraint.h \
|
||||
core/filterpreset.h \
|
||||
core/divelist.h \
|
||||
core/divelog.h \
|
||||
core/divelogexportlogic.h \
|
||||
core/divesitehelpers.h \
|
||||
core/exif.h \
|
||||
@ -238,7 +245,6 @@ HEADERS += \
|
||||
core/sample.h \
|
||||
core/selection.h \
|
||||
core/sha1.h \
|
||||
core/strndup.h \
|
||||
core/string-format.h \
|
||||
core/subsurfacestartup.h \
|
||||
core/subsurfacesysinfo.h \
|
||||
@ -398,7 +404,7 @@ android {
|
||||
ios {
|
||||
SOURCES += core/ios.cpp
|
||||
RESOURCES += packaging/ios/translations.qrc
|
||||
QMAKE_IOS_DEPLOYMENT_TARGET = 10.0
|
||||
QMAKE_IOS_DEPLOYMENT_TARGET = 12.0
|
||||
QMAKE_TARGET_BUNDLE_PREFIX = org.subsurface-divelog
|
||||
QMAKE_BUNDLE = subsurface-mobile
|
||||
QMAKE_INFO_PLIST = packaging/ios/Info.plist
|
||||
@ -407,24 +413,32 @@ ios {
|
||||
images.files = icons/subsurface-mobile-icon.png
|
||||
QMAKE_BUNDLE_DATA += app_launch_images images
|
||||
|
||||
LIBS += ../install-root/ios/lib/libdivecomputer.a \
|
||||
../install-root/ios/lib/libgit2.a \
|
||||
../install-root/ios/lib/libzip.a \
|
||||
../install-root/ios/lib/libxslt.a \
|
||||
../install-root/ios/lib/qml/org/kde/kirigami.2/libkirigamiplugin.a \
|
||||
OBJECTIVE_SOURCES += ios/ios-share.mm
|
||||
HEADERS += ios/ios-share.h
|
||||
Q_ENABLE_BITCODE.name = ENABLE_BITCODE
|
||||
Q_ENABLE_BITCODE.value = NO
|
||||
QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_BITCODE
|
||||
ARCH_PATH = ../install-root/ios/$${ARCH}
|
||||
|
||||
LIBS += $${ARCH_PATH}/lib/libdivecomputer.a \
|
||||
$${ARCH_PATH}/lib/libgit2.a \
|
||||
$${ARCH_PATH}/lib/libzip.a \
|
||||
$${ARCH_PATH}/lib/libxslt.a \
|
||||
$${ARCH_PATH}/lib/qml/org/kde/kirigami.2/libkirigamiplugin.a \
|
||||
../googlemaps-build/libqtgeoservices_googlemaps.a \
|
||||
-liconv \
|
||||
-lsqlite3 \
|
||||
-lxml2
|
||||
|
||||
INCLUDEPATH += ../install-root/ios/include/ \
|
||||
../install-root/lib/libzip/include \
|
||||
../install-root/ios/include/libxstl \
|
||||
../install-root/ios/include/libexstl \
|
||||
../install-root/ios/include/openssl \
|
||||
LIBS += -framework MessageUI
|
||||
|
||||
INCLUDEPATH += $${ARCH_PATH}/include/ \
|
||||
$${ARCH_PATH}/include/libxstl \
|
||||
$${ARCH_PATH}/include/libexstl \
|
||||
$${ARCH_PATH}/include/openssl \
|
||||
. \
|
||||
./core \
|
||||
./mobile-widgets/3rdparty/kirigami/src/libkirigami \
|
||||
/usr/include/libxml2
|
||||
$${ARCH_PATH}/include/libxml2
|
||||
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<li>Commander I, Commander II, Commander TM, EMC-14, EMC-16, EMC-20H</li></ul>
|
||||
</dd>
|
||||
<dt>Cressi</dt><dd><ul>
|
||||
<li>Cartesio, Drake, Edy, Giotto, Goa, Leonardo, Michelangelo, Neon, Newton</li></ul>
|
||||
<li>Cartesio, Donatello, Drake, Edy, Giotto, Goa, Leonardo, Michelangelo, Neon, Newton</li></ul>
|
||||
</dd>
|
||||
<dt>Crest</dt><dd><ul>
|
||||
<li>CR-4</li></ul>
|
||||
@ -38,6 +38,12 @@
|
||||
<dt>DiveSystem</dt><dd><ul>
|
||||
<li>Orca, iDive DAN, iDive Deep, iDive Easy, iDive Free, iDive Pro, iDive Reb, iDive Stealth, iDive Tech, iDive X3M</li></ul>
|
||||
</dd>
|
||||
<dt>Divesoft</dt><dd><ul>
|
||||
<li>Freedom, Liberty</li></ul>
|
||||
</dd>
|
||||
<dt>FIT</dt><dd><ul>
|
||||
<li>File import</li></ul>
|
||||
</dd>
|
||||
<dt>Garmin</dt><dd><ul>
|
||||
<li>Descent Mk1, Descent Mk2/Mk2i</li></ul>
|
||||
</dd>
|
||||
@ -60,19 +66,22 @@
|
||||
<li>Extreme</li></ul>
|
||||
</dd>
|
||||
<dt>Oceanic</dt><dd><ul>
|
||||
<li>Atom 1.0, Atom 2.0, Atom 3.0, Atom 3.1, Datamask, F10, F11, Geo, Geo 2.0, Geo 4.0, OC1, OCS, OCi, Pro Plus 2, Pro Plus 2.1, Pro Plus 3, Pro Plus 4, Pro Plus X, VT 4.1, VT Pro, VT3, VT4, VTX, Veo 1.0, Veo 180, Veo 2.0, Veo 200, Veo 250, Veo 3.0, Veo 4.0, Versa Pro</li></ul>
|
||||
<li>Atom 1.0, Atom 2.0, Atom 3.0, Atom 3.1, Datamask, F10, F11, Geo, Geo 2.0, Geo 4.0, Geo Air, OC1, OCS, OCi, Pro Plus 2, Pro Plus 2.1, Pro Plus 3, Pro Plus 4, Pro Plus X, VT 4.1, VT Pro, VT3, VT4, VTX, Veo 1.0, Veo 180, Veo 2.0, Veo 200, Veo 250, Veo 3.0, Veo 4.0, Versa Pro</li></ul>
|
||||
</dd>
|
||||
<dt>Oceans</dt><dd><ul>
|
||||
<li>S1</li></ul>
|
||||
</dd>
|
||||
<dt>Ratio</dt><dd><ul>
|
||||
<li>iDive Color Deep, iDive Color Easy, iDive Color Fancy, iDive Color Free, iDive Color Pro, iDive Color Reb, iDive Color Tech+, iDive Deep, iDive Easy, iDive Fancy, iDive Free, iDive Pro, iDive Reb, iDive Tech+, iX3M 2 Deep, iX3M 2 Easy, iX3M 2 Gauge, iX3M 2 Pro, iX3M 2 Tech+, iX3M 2021 GPS Deep, iX3M 2021 GPS Easy, iX3M 2021 GPS Fancy, iX3M 2021 GPS Pro , iX3M 2021 GPS Reb, iX3M 2021 GPS Tech+, iX3M 2021 Pro Deep, iX3M 2021 Pro Easy, iX3M 2021 Pro Fancy, iX3M 2021 Pro Pro, iX3M 2021 Pro Reb, iX3M 2021 Pro Tech+, iX3M GPS Deep, iX3M GPS Easy, iX3M GPS Fancy, iX3M GPS Pro , iX3M GPS Reb, iX3M GPS Tech+, iX3M Pro Deep, iX3M Pro Easy, iX3M Pro Fancy, iX3M Pro Pro, iX3M Pro Reb, iX3M Pro Tech+</li></ul>
|
||||
<li>ATOM, iDive 2 Deep, iDive 2 Easy, iDive 2 Fancy, iDive 2 Free, iDive 2 Pro, iDive 2 Reb, iDive 2 Tech, iDive Color Deep, iDive Color Easy, iDive Color Fancy, iDive Color Free, iDive Color Pro, iDive Color Reb, iDive Color Tech+, iDive Deep, iDive Easy, iDive Fancy, iDive Free, iDive Pro, iDive Reb, iDive Tech+, iX3M 2 Deep, iX3M 2 Easy, iX3M 2 GPS Deep, iX3M 2 GPS Easy, iX3M 2 GPS Gauge, iX3M 2 GPS Pro, iX3M 2 GPS Reb, iX3M 2 GPS Tech, iX3M 2 Gauge, iX3M 2 Pro, iX3M 2 Tech+, iX3M 2021 GPS Deep, iX3M 2021 GPS Easy, iX3M 2021 GPS Fancy, iX3M 2021 GPS Pro , iX3M 2021 GPS Reb, iX3M 2021 GPS Tech+, iX3M 2021 Pro Deep, iX3M 2021 Pro Easy, iX3M 2021 Pro Fancy, iX3M 2021 Pro Pro, iX3M 2021 Pro Reb, iX3M 2021 Pro Tech+, iX3M GPS Deep, iX3M GPS Easy, iX3M GPS Fancy, iX3M GPS Pro , iX3M GPS Reb, iX3M GPS Tech+, iX3M Pro Deep, iX3M Pro Easy, iX3M Pro Fancy, iX3M Pro Pro, iX3M Pro Reb, iX3M Pro Tech+</li></ul>
|
||||
</dd>
|
||||
<dt>Reefnet</dt><dd><ul>
|
||||
<li>Sensus, Sensus Pro, Sensus Ultra</li></ul>
|
||||
</dd>
|
||||
<dt>Scorpena</dt><dd><ul>
|
||||
<li>Alpha</li></ul>
|
||||
</dd>
|
||||
<dt>Scubapro</dt><dd><ul>
|
||||
<li>Aladin A1, Aladin A2, Aladin H Matrix, Aladin Sport Matrix, Aladin Square, Chromis, G2, G2 Console, G2 HUD, Mantis, Mantis 2, Meridian, XTender 5</li></ul>
|
||||
<li>Aladin A1, Aladin A2, Aladin H Matrix, Aladin Sport Matrix, Aladin Square, Chromis, G2, G2 Console, G2 HUD, G2 TEK, G3, Luna 2.0, Luna 2.0 AI, Mantis, Mantis 2, Meridian, XTender 5</li></ul>
|
||||
</dd>
|
||||
<dt>Seabaer</dt><dd><ul>
|
||||
<li>T1, H3, HUDC</li></ul>
|
||||
@ -84,7 +93,7 @@
|
||||
<li>XP5</li></ul>
|
||||
</dd>
|
||||
<dt>Shearwater</dt><dd><ul>
|
||||
<li>Nerd, Nerd 2, Perdix, Perdix 2, Perdix AI, Peregrine, Petrel, Petrel 2, Petrel 3, Predator, Teric</li></ul>
|
||||
<li>Nerd, Nerd 2, Perdix, Perdix 2, Perdix AI, Peregrine, Petrel, Petrel 2, Petrel 3, Predator, Teric, Tern</li></ul>
|
||||
</dd>
|
||||
<dt>Sherwood</dt><dd><ul>
|
||||
<li>Amphos, Amphos 2.0, Amphos Air, Amphos Air 2.0, Beacon, Insight, Insight 2, Sage, Vision, Wisdom, Wisdom 2, Wisdom 3, Wisdom 4</li></ul>
|
||||
@ -102,7 +111,7 @@
|
||||
<li>DiveComputer.eu</li></ul>
|
||||
</dd>
|
||||
<dt>Tusa</dt><dd><ul>
|
||||
<li>Element II (IQ-750), IQ-700, TC1, Talis, Zen (IQ-900), Zen Air (IQ-950)</li></ul>
|
||||
<li>Element II (IQ-750), IQ-700, Talis, Zen (IQ-900), Zen Air (IQ-950)</li></ul>
|
||||
</dd>
|
||||
<dt>Uemis</dt><dd><ul>
|
||||
<li>Zürich SDA</li></ul>
|
||||
|
||||
@ -6,12 +6,14 @@ Atomic Aquatics: Cobalt, Cobalt 2
|
||||
Beuchat: Mundial 2, Mundial 3, Voyager 2G
|
||||
Citizen: Hyper Aqualand
|
||||
Cochran: Commander I, Commander II, Commander TM, EMC-14, EMC-16, EMC-20H
|
||||
Cressi: Cartesio, Drake, Edy, Giotto, Goa, Leonardo, Michelangelo, Neon, Newton
|
||||
Cressi: Cartesio, Donatello, Drake, Edy, Giotto, Goa, Leonardo, Michelangelo, Neon, Newton
|
||||
Crest: CR-4
|
||||
Deep Six: Excursion
|
||||
Deepblu: Cosmiq+
|
||||
Dive Rite: NiTek Q, NiTek Trio
|
||||
DiveSystem: Orca, iDive DAN, iDive Deep, iDive Easy, iDive Free, iDive Pro, iDive Reb, iDive Stealth, iDive Tech, iDive X3M
|
||||
Divesoft: Freedom, Liberty
|
||||
FIT: File import
|
||||
Garmin: Descent Mk1, Descent Mk2/Mk2i
|
||||
Genesis: Centauri, React Pro, React Pro White
|
||||
Heinrichs Weikamp: Frog, OSTC, OSTC 2, OSTC 2 TR, OSTC 2C, OSTC 2N, OSTC 3, OSTC 4, OSTC Mk2, OSTC Plus, OSTC Sport, OSTC cR
|
||||
@ -19,21 +21,22 @@ Hollis: DG02, DG03, TX1
|
||||
Liquivision: Kaon, Lynx, Xen, Xeo
|
||||
Mares: Airlab, Darwin, Darwin Air, Genius, Horizon, Icon HD, Icon HD Net Ready, M1, M2, Matrix, Nemo, Nemo Air, Nemo Apneist, Nemo Excel, Nemo Steel, Nemo Titanium, Nemo Wide, Nemo Wide 2, Puck, Puck 2, Puck Air, Puck Pro, Puck Pro +, Quad, Quad Air, Smart, Smart Air, Smart Apnea
|
||||
McLean: Extreme
|
||||
Oceanic: Atom 1.0, Atom 2.0, Atom 3.0, Atom 3.1, Datamask, F10, F11, Geo, Geo 2.0, Geo 4.0, OC1, OCS, OCi, Pro Plus 2, Pro Plus 2.1, Pro Plus 3, Pro Plus 4, Pro Plus X, VT 4.1, VT Pro, VT3, VT4, VTX, Veo 1.0, Veo 180, Veo 2.0, Veo 200, Veo 250, Veo 3.0, Veo 4.0, Versa Pro
|
||||
Oceanic: Atom 1.0, Atom 2.0, Atom 3.0, Atom 3.1, Datamask, F10, F11, Geo, Geo 2.0, Geo 4.0, Geo Air, OC1, OCS, OCi, Pro Plus 2, Pro Plus 2.1, Pro Plus 3, Pro Plus 4, Pro Plus X, VT 4.1, VT Pro, VT3, VT4, VTX, Veo 1.0, Veo 180, Veo 2.0, Veo 200, Veo 250, Veo 3.0, Veo 4.0, Versa Pro
|
||||
Oceans: S1
|
||||
Ratio: iDive Color Deep, iDive Color Easy, iDive Color Fancy, iDive Color Free, iDive Color Pro, iDive Color Reb, iDive Color Tech+, iDive Deep, iDive Easy, iDive Fancy, iDive Free, iDive Pro, iDive Reb, iDive Tech+, iX3M 2 Deep, iX3M 2 Easy, iX3M 2 Gauge, iX3M 2 Pro, iX3M 2 Tech+, iX3M 2021 GPS Deep, iX3M 2021 GPS Easy, iX3M 2021 GPS Fancy, iX3M 2021 GPS Pro , iX3M 2021 GPS Reb, iX3M 2021 GPS Tech+, iX3M 2021 Pro Deep, iX3M 2021 Pro Easy, iX3M 2021 Pro Fancy, iX3M 2021 Pro Pro, iX3M 2021 Pro Reb, iX3M 2021 Pro Tech+, iX3M GPS Deep, iX3M GPS Easy, iX3M GPS Fancy, iX3M GPS Pro , iX3M GPS Reb, iX3M GPS Tech+, iX3M Pro Deep, iX3M Pro Easy, iX3M Pro Fancy, iX3M Pro Pro, iX3M Pro Reb, iX3M Pro Tech+
|
||||
Ratio: ATOM, iDive 2 Deep, iDive 2 Easy, iDive 2 Fancy, iDive 2 Free, iDive 2 Pro, iDive 2 Reb, iDive 2 Tech, iDive Color Deep, iDive Color Easy, iDive Color Fancy, iDive Color Free, iDive Color Pro, iDive Color Reb, iDive Color Tech+, iDive Deep, iDive Easy, iDive Fancy, iDive Free, iDive Pro, iDive Reb, iDive Tech+, iX3M 2 Deep, iX3M 2 Easy, iX3M 2 GPS Deep, iX3M 2 GPS Easy, iX3M 2 GPS Gauge, iX3M 2 GPS Pro, iX3M 2 GPS Reb, iX3M 2 GPS Tech, iX3M 2 Gauge, iX3M 2 Pro, iX3M 2 Tech+, iX3M 2021 GPS Deep, iX3M 2021 GPS Easy, iX3M 2021 GPS Fancy, iX3M 2021 GPS Pro , iX3M 2021 GPS Reb, iX3M 2021 GPS Tech+, iX3M 2021 Pro Deep, iX3M 2021 Pro Easy, iX3M 2021 Pro Fancy, iX3M 2021 Pro Pro, iX3M 2021 Pro Reb, iX3M 2021 Pro Tech+, iX3M GPS Deep, iX3M GPS Easy, iX3M GPS Fancy, iX3M GPS Pro , iX3M GPS Reb, iX3M GPS Tech+, iX3M Pro Deep, iX3M Pro Easy, iX3M Pro Fancy, iX3M Pro Pro, iX3M Pro Reb, iX3M Pro Tech+
|
||||
Reefnet: Sensus, Sensus Pro, Sensus Ultra
|
||||
Scubapro: Aladin A1, Aladin A2, Aladin H Matrix, Aladin Sport Matrix, Aladin Square, Chromis, G2, G2 Console, G2 HUD, Mantis, Mantis 2, Meridian, XTender 5
|
||||
Scorpena: Alpha
|
||||
Scubapro: Aladin A1, Aladin A2, Aladin H Matrix, Aladin Sport Matrix, Aladin Square, Chromis, G2, G2 Console, G2 HUD, G2 TEK, G3, Luna 2.0, Luna 2.0 AI, Mantis, Mantis 2, Meridian, XTender 5
|
||||
Seabaer: T1, H3, HUDC
|
||||
Seac: Action, Guru, Jack, Screen
|
||||
Seemann: XP5
|
||||
Shearwater: Nerd, Nerd 2, Perdix, Perdix 2, Perdix AI, Peregrine, Petrel, Petrel 2, Petrel 3, Predator, Teric
|
||||
Shearwater: Nerd, Nerd 2, Perdix, Perdix 2, Perdix AI, Peregrine, Petrel, Petrel 2, Petrel 3, Predator, Teric, Tern
|
||||
Sherwood: Amphos, Amphos 2.0, Amphos Air, Amphos Air 2.0, Beacon, Insight, Insight 2, Sage, Vision, Wisdom, Wisdom 2, Wisdom 3, Wisdom 4
|
||||
Sporasub: SP2
|
||||
Subgear: XP Air, XP-10, XP-3G, XP-Air
|
||||
Suunto: Cobra, Cobra 2, Cobra 3, D3, D4, D4f, D4i, D5, D6, D6i, D9, D9tx, DX, EON Core, EON Steel, EON Steel Black, Eon, Gekko, HelO2, Mosquito, Solution, Solution Alpha, Solution Nitrox, Spyder, Stinger, Vyper, Vyper 2, Vyper Air, Vyper Novo, Vytec, Zoop, Zoop Novo
|
||||
Tecdiving: DiveComputer.eu
|
||||
Tusa: Element II (IQ-750), IQ-700, TC1, Talis, Zen (IQ-900), Zen Air (IQ-950)
|
||||
Tusa: Element II (IQ-750), IQ-700, Talis, Zen (IQ-900), Zen Air (IQ-950)
|
||||
Uemis: Zürich SDA
|
||||
Uwatec: Aladin 2G, Aladin Air Twin, Aladin Air Z, Aladin Air Z Nitrox, Aladin Air Z O2, Aladin Prime, Aladin Pro, Aladin Pro Ultra, Aladin Sport, Aladin Sport Plus, Aladin Tec, Aladin Tec 2G, Aladin Tec 3G, Galileo Luna, Galileo Sol, Galileo Terra, Galileo Trimix, Memomouse, Smart Com, Smart Pro, Smart Tec, Smart Z
|
||||
Zeagle: N2iTiON3
|
||||
@ -37,18 +37,21 @@ public class SubsurfaceMobileActivity extends QtActivity
|
||||
// FileProvider declares an 'authority' in AndroidManifest.xml
|
||||
private static String fileProviderAuthority="org.subsurfacedivelog.mobile.fileprovider";
|
||||
|
||||
// you can share one file (for future use, I'm thinking divelist XML), or two files
|
||||
// which is assumed to be a support request - maybe that shouldn't be implicit?
|
||||
public boolean shareFiles(String path1, String path2) {
|
||||
// you can share one or two files
|
||||
public boolean shareViaEmail(String subject, String recipient, String body, String path1, String path2) {
|
||||
// better save than sorry
|
||||
if (QtNative.activity() == null)
|
||||
return false;
|
||||
|
||||
Log.d(TAG + " shareFile - trying to share: ", path1 + " and " + path2);
|
||||
Log.d(TAG + " shareFile - trying to share: ", path1 + " and " + path2 + " to " + recipient);
|
||||
|
||||
// Can't get this to work building my own intent, so let's use the IntentBuilder
|
||||
Intent shareFileIntent = ShareCompat.IntentBuilder.from(QtNative.activity()).getIntent();
|
||||
shareFileIntent.setAction(Intent.ACTION_SEND_MULTIPLE);
|
||||
// recipients are always an array, even if there's only one
|
||||
shareFileIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { recipient });
|
||||
shareFileIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
|
||||
shareFileIntent.putExtra(Intent.EXTRA_TEXT, body);
|
||||
|
||||
// now figure out the URI we need to share the first file
|
||||
File fileToShare = new File(path1);
|
||||
@ -67,7 +70,7 @@ public class SubsurfaceMobileActivity extends QtActivity
|
||||
attachments.add(uri);
|
||||
|
||||
// if there is a second file name (that's for support emails) add it and set this up as support email as well
|
||||
if (path2 != "") {
|
||||
if (!path2.isEmpty()) {
|
||||
fileToShare = new File(path2);
|
||||
try {
|
||||
uri = FileProvider.getUriForFile(QtNative.activity(), fileProviderAuthority, fileToShare);
|
||||
@ -77,10 +80,6 @@ public class SubsurfaceMobileActivity extends QtActivity
|
||||
}
|
||||
Log.d(TAG + " shareFile - URI for file: ", uri.toString());
|
||||
attachments.add(uri);
|
||||
// recipients are also always an array, even if there's only one
|
||||
shareFileIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { "in-app-support@subsurface-divelog.org" });
|
||||
shareFileIntent.putExtra(Intent.EXTRA_SUBJECT, "Subsurface-mobile support request");
|
||||
shareFileIntent.putExtra(Intent.EXTRA_TEXT, "Please describe your issue here and keep the attached logs.\n\n\n\n");
|
||||
}
|
||||
shareFileIntent.setType("text/plain");
|
||||
shareFileIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, attachments);
|
||||
@ -93,6 +92,12 @@ public class SubsurfaceMobileActivity extends QtActivity
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean supportEmail(String path1, String path2) {
|
||||
return shareViaEmail("Subsurface-mobile support request",
|
||||
"in-app-support@subsurface-divelog.org",
|
||||
"Please describe your issue here and keep the attached logs.\n\n\n\n",
|
||||
path1, path2);
|
||||
}
|
||||
|
||||
public static boolean isIntentPending;
|
||||
public static boolean isInitialized;
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#include "exportfuncs.h"
|
||||
#include "core/membuffer.h"
|
||||
#include "core/dive.h"
|
||||
#include "core/divelog.h"
|
||||
#include "core/divesite.h"
|
||||
#include "core/gettextfromc.h"
|
||||
#include "core/tag.h"
|
||||
@ -62,7 +63,7 @@ void exportProfile(QString filename, bool selected_only, ExportCallback &cb)
|
||||
filename = filename.append(".png");
|
||||
QFileInfo fi(filename);
|
||||
|
||||
int todo = selected_only ? amount_selected : dive_table.nr;
|
||||
int todo = selected_only ? amount_selected : divelog.dives->nr;
|
||||
int done = 0;
|
||||
auto profile = getPrintProfile();
|
||||
for_each_dive (i, dive) {
|
||||
@ -131,7 +132,7 @@ void export_TeX(const char *filename, bool selected_only, bool plain, ExportCall
|
||||
|
||||
put_format(&buf, "\n%%%%%%%%%% Begin Dive Data: %%%%%%%%%%\n");
|
||||
|
||||
int todo = selected_only ? amount_selected : dive_table.nr;
|
||||
int todo = selected_only ? amount_selected : divelog.dives->nr;
|
||||
int done = 0;
|
||||
auto profile = getPrintProfile();
|
||||
for_each_dive (i, dive) {
|
||||
@ -180,7 +181,7 @@ void export_TeX(const char *filename, bool selected_only, bool plain, ExportCall
|
||||
site ? put_format(&buf, "\\def\\%sgpslon{%f}\n", ssrf, site->location.lon.udeg / 1000000.0) : put_format(&buf, "\\def\\gpslon{}\n");
|
||||
put_format(&buf, "\\def\\%scomputer{%s}\n", ssrf, dive->dc.model);
|
||||
put_format(&buf, "\\def\\%scountry{%s}\n", ssrf, country ?: "");
|
||||
put_format(&buf, "\\def\\%stime{%u:%02u}\n", ssrf, FRACTION(dive->duration.seconds, 60));
|
||||
put_format(&buf, "\\def\\%stime{%u:%02u}\n", ssrf, FRACTION_TUPLE(dive->duration.seconds, 60));
|
||||
|
||||
put_format(&buf, "\n%% Dive Profile Details:\n");
|
||||
dive->maxtemp.mkelvin ? put_format(&buf, "\\def\\%smaxtemp{%.1f\\%stemperatureunit}\n", ssrf, get_temp_units(dive->maxtemp.mkelvin, &unit), ssrf) : put_format(&buf, "\\def\\%smaxtemp{}\n", ssrf);
|
||||
@ -190,14 +191,8 @@ void export_TeX(const char *filename, bool selected_only, bool plain, ExportCall
|
||||
dive->maxdepth.mm ? put_format(&buf, "\\def\\%smaximumdepth{%.1f\\%sdepthunit}\n", ssrf, get_depth_units(dive->maxdepth.mm, NULL, &unit), ssrf) : put_format(&buf, "\\def\\%smaximumdepth{}\n", ssrf);
|
||||
dive->meandepth.mm ? put_format(&buf, "\\def\\%smeandepth{%.1f\\%sdepthunit}\n", ssrf, get_depth_units(dive->meandepth.mm, NULL, &unit), ssrf) : put_format(&buf, "\\def\\%smeandepth{}\n", ssrf);
|
||||
|
||||
struct tag_entry *tag = dive->tag_list;
|
||||
QString tags;
|
||||
if (tag) {
|
||||
tags = tag->tag->name;
|
||||
while ((tag = tag->next))
|
||||
tags += QString(", ") + QString(tag->tag->name);
|
||||
}
|
||||
put_format(&buf, "\\def\\%stype{%s}\n", ssrf, qPrintable(tags));
|
||||
std::string tags = taglist_get_tagstring(dive->tag_list);
|
||||
put_format(&buf, "\\def\\%stype{%s}\n", ssrf, tags.c_str());
|
||||
put_format(&buf, "\\def\\%sviz{%s}\n", ssrf, qPrintable(viz));
|
||||
put_format(&buf, "\\def\\%srating{%s}\n", ssrf, qPrintable(rating));
|
||||
put_format(&buf, "\\def\\%splot{\\includegraphics[width=9cm,height=4cm]{profile%d}}\n", ssrf, dive->number);
|
||||
@ -212,7 +207,7 @@ void export_TeX(const char *filename, bool selected_only, bool plain, ExportCall
|
||||
qty_cyl = 0;
|
||||
for (i = 0; i < dive->cylinders.nr; i++){
|
||||
const cylinder_t &cyl = *get_cylinder(dive, i);
|
||||
if (is_cylinder_used(dive, i) || (prefs.display_unused_tanks && cyl.type.description)){
|
||||
if (is_cylinder_used(dive, i) || (prefs.include_unused_tanks && cyl.type.description)){
|
||||
put_format(&buf, "\\def\\%scyl%cdescription{%s}\n", ssrf, 'a' + i, cyl.type.description);
|
||||
put_format(&buf, "\\def\\%scyl%cgasname{%s}\n", ssrf, 'a' + i, gasname(cyl.gasmix));
|
||||
put_format(&buf, "\\def\\%scyl%cmixO2{%.1f\\%%}\n", ssrf, 'a' + i, get_o2(cyl.gasmix)/10.0);
|
||||
@ -330,9 +325,9 @@ std::vector<const dive_site *> getDiveSitesToExport(bool selectedOnly)
|
||||
return res;
|
||||
}
|
||||
|
||||
res.reserve(dive_site_table.nr);
|
||||
for (int i = 0; i < dive_site_table.nr; i++) {
|
||||
struct dive_site *ds = get_dive_site(i, &dive_site_table);
|
||||
res.reserve(divelog.sites->nr);
|
||||
for (int i = 0; i < divelog.sites->nr; i++) {
|
||||
struct dive_site *ds = get_dive_site(i, divelog.sites);
|
||||
if (dive_site_is_empty(ds))
|
||||
continue;
|
||||
if (selectedOnly && !is_dive_site_selected(ds))
|
||||
@ -343,14 +338,14 @@ std::vector<const dive_site *> getDiveSitesToExport(bool selectedOnly)
|
||||
/* walk the dive site list */
|
||||
int i;
|
||||
const struct dive_site *ds;
|
||||
for_each_dive_site (i, ds, &dive_site_table)
|
||||
res.push_back(get_dive_site(i, &dive_site_table));
|
||||
for_each_dive_site (i, ds, divelog.sites)
|
||||
res.push_back(get_dive_site(i, divelog.sites));
|
||||
#endif
|
||||
return res;
|
||||
}
|
||||
|
||||
QFuture<int> exportUsingStyleSheet(QString filename, bool doExport, int units,
|
||||
QString stylesheet, bool anonymize)
|
||||
QFuture<int> exportUsingStyleSheet(const QString &filename, bool doExport, int units,
|
||||
const QString &stylesheet, bool anonymize)
|
||||
{
|
||||
return QtConcurrent::run(export_dives_xslt, filename.toUtf8(), doExport, units, stylesheet.toUtf8(), anonymize);
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ void exportProfile(QString filename, bool selected_only, ExportCallback &cb);
|
||||
void export_TeX(const char *filename, bool selected_only, bool plain, ExportCallback &cb);
|
||||
void export_depths(const char *filename, bool selected_only);
|
||||
std::vector<const dive_site *> getDiveSitesToExport(bool selectedOnly);
|
||||
QFuture<int> exportUsingStyleSheet(QString filename, bool doExport, int units, QString stylesheet, bool anonymize);
|
||||
QFuture<int> exportUsingStyleSheet(const QString &filename, bool doExport, int units, const QString &stylesheet, bool anonymize);
|
||||
|
||||
// prepareDivesForUploadDiveLog
|
||||
// prepareDivesForUploadDiveShare
|
||||
|
||||
@ -29,6 +29,7 @@ void cliDownloader(const char *vendor, const char *product, const char *device)
|
||||
data->setForceDownload(false);
|
||||
data->setSaveLog(true);
|
||||
data->setSaveDump(false);
|
||||
data->setSyncTime(false);
|
||||
|
||||
diveImportedModel.startDownload();
|
||||
diveImportedModel.waitForDownload();
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
# Generate the ssrf-config.h every 'make'
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/version.h.in
|
||||
"#define GIT_VERSION_STRING \"@GIT_VERSION_STRING@\"
|
||||
#define CANONICAL_VERSION_STRING \"@CANONICAL_VERSION_STRING@\"
|
||||
#define MOBILE_VERSION_STRING \"@MOBILE_VERSION_STRING@\"
|
||||
"#define CANONICAL_VERSION_STRING \"@CANONICAL_VERSION_STRING@\"
|
||||
#define CANONICAL_VERSION_STRING_4 \"@CANONICAL_VERSION_STRING_4@\"
|
||||
")
|
||||
|
||||
file(COPY cmake/Modules/version.cmake
|
||||
|
||||
@ -1,23 +1,31 @@
|
||||
|
||||
execute_process(
|
||||
COMMAND sh ${CMAKE_TOP_SRC_DIR}/scripts/get-version linux
|
||||
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version.sh 4
|
||||
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
||||
OUTPUT_VARIABLE GIT_VERSION_STRING
|
||||
OUTPUT_VARIABLE CANONICAL_VERSION_STRING_4
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND sh ${CMAKE_TOP_SRC_DIR}/scripts/get-version full
|
||||
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version.sh 3
|
||||
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
||||
OUTPUT_VARIABLE CANONICAL_VERSION_STRING_3
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version.sh
|
||||
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
||||
OUTPUT_VARIABLE CANONICAL_VERSION_STRING
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(MOBILE_VERSION_STRING "3.4.6")
|
||||
|
||||
configure_file(${SRC} ${DST} @ONLY)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
execute_process(
|
||||
COMMAND cat ${CMAKE_TOP_SRC_DIR}/packaging/windows/subsurface.nsi.in
|
||||
COMMAND sed -e "s/VERSIONTOKEN/${GIT_VERSION_STRING}/"
|
||||
COMMAND sed -e "s/PRODVTOKEN/${CANONICAL_VERSION_STRING}/"
|
||||
COMMAND sed -e "s/VERSIONTOKEN/${CANONICAL_VERSION_STRING}/"
|
||||
COMMAND sed -e "s/PRODVTOKEN/${CANONICAL_VERSION_STRING_4}/"
|
||||
OUTPUT_FILE ${CMAKE_BINARY_DIR}/staging/subsurface.nsi
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -18,11 +18,9 @@ void addDive(dive *d, bool autogroup, bool newNumber)
|
||||
execute(new AddDive(d, autogroup, newNumber));
|
||||
}
|
||||
|
||||
void importDives(struct dive_table *dives, struct trip_table *trips, struct dive_site_table *sites,
|
||||
struct device_table *devices, struct filter_preset_table *presets,
|
||||
int flags, const QString &source)
|
||||
void importDives(struct divelog *log, int flags, const QString &source)
|
||||
{
|
||||
execute(new ImportDives(dives, trips, sites, devices, presets, flags, source));
|
||||
execute(new ImportDives(log, flags, source));
|
||||
}
|
||||
|
||||
void deleteDive(const QVector<struct dive*> &divesToDelete)
|
||||
@ -279,9 +277,9 @@ void replanDive(dive *d)
|
||||
execute(new ReplanDive(d));
|
||||
}
|
||||
|
||||
void editProfile(const dive *d, EditProfileType type, int count)
|
||||
void editProfile(const dive *d, int dcNr, EditProfileType type, int count)
|
||||
{
|
||||
execute(new EditProfile(d, type, count));
|
||||
execute(new EditProfile(d, dcNr, type, count));
|
||||
}
|
||||
|
||||
int addWeight(bool currentDiveOnly)
|
||||
@ -314,9 +312,9 @@ int editCylinder(int index, cylinder_t cyl, EditCylinderType type, bool currentD
|
||||
return execute_edit(new EditCylinder(index, cyl, type, currentDiveOnly));
|
||||
}
|
||||
|
||||
void editSensors(int toCylinder, const int fromCylinder)
|
||||
void editSensors(int toCylinder, int fromCylinder, int dcNr)
|
||||
{
|
||||
execute(new EditSensors(toCylinder, fromCylinder));
|
||||
execute(new EditSensors(toCylinder, fromCylinder, dcNr));
|
||||
}
|
||||
|
||||
// Trip editing related commands
|
||||
|
||||
@ -2,17 +2,23 @@
|
||||
#ifndef COMMAND_H
|
||||
#define COMMAND_H
|
||||
|
||||
#include "core/dive.h"
|
||||
#include "core/divelog.h"
|
||||
#include "core/equipment.h"
|
||||
#include "core/pictureobj.h"
|
||||
#include "core/taxonomy.h"
|
||||
#include <QVector>
|
||||
#include <QAction>
|
||||
#include <vector>
|
||||
|
||||
struct divecomputer;
|
||||
struct divelog;
|
||||
struct dive_components;
|
||||
struct dive_site;
|
||||
struct dive_trip;
|
||||
struct event;
|
||||
struct DiveAndLocation;
|
||||
struct FilterData;
|
||||
struct filter_preset_table;
|
||||
struct device_table;
|
||||
|
||||
// We put everything in a namespace, so that we can shorten names without polluting the global namespace
|
||||
namespace Command {
|
||||
@ -24,8 +30,8 @@ void clear(); // Reset the undo stack. Delete all commands.
|
||||
void setClean(); // Call after save - this marks a state where no changes need to be saved.
|
||||
bool isClean(); // Any changes need to be saved?
|
||||
QAction *undoAction(QObject *parent); // Create an undo action.
|
||||
QAction *redoAction(QObject *parent); // Create an redo action.
|
||||
QString changesMade(); // return a string with the texts from all commands on the undo stack -> for commit message
|
||||
QAction *redoAction(QObject *parent); // Create a redo action.
|
||||
QString changesMade(); // Return a string with the texts from all commands on the undo stack -> for commit message.
|
||||
bool placingCommand(); // Currently executing a new command -> might not have to update the field the user just edited.
|
||||
|
||||
// 2) Dive-list related commands
|
||||
@ -35,10 +41,7 @@ bool placingCommand(); // Currently executing a new command -> might not have
|
||||
// If newNumber is true, the dive is assigned a new number, depending on the
|
||||
// insertion position.
|
||||
void addDive(dive *d, bool autogroup, bool newNumber);
|
||||
void importDives(struct dive_table *dives, struct trip_table *trips,
|
||||
struct dive_site_table *sites, struct device_table *devices,
|
||||
struct filter_preset_table *filter_presets,
|
||||
int flags, const QString &source); // The tables are consumed!
|
||||
void importDives(struct divelog *log, int flags, const QString &source); // The tables are consumed!
|
||||
void deleteDive(const QVector<struct dive*> &divesToDelete);
|
||||
void shiftTime(const std::vector<dive *> &changedDives, int amount);
|
||||
void renumberDives(const QVector<QPair<dive *, int>> &divesToRenumber);
|
||||
@ -97,9 +100,10 @@ enum class EditProfileType {
|
||||
ADD,
|
||||
REMOVE,
|
||||
MOVE,
|
||||
EDIT,
|
||||
};
|
||||
void replanDive(dive *d); // dive computer(s) and cylinder(s) of first argument will be consumed!
|
||||
void editProfile(const dive *d, EditProfileType type, int count);
|
||||
void editProfile(const dive *d, int dcNr, EditProfileType type, int count);
|
||||
int addWeight(bool currentDiveOnly);
|
||||
int removeWeight(int index, bool currentDiveOnly);
|
||||
int editWeight(int index, weightsystem_t ws, bool currentDiveOnly);
|
||||
@ -111,7 +115,7 @@ enum class EditCylinderType {
|
||||
GASMIX
|
||||
};
|
||||
int editCylinder(int index, cylinder_t cyl, EditCylinderType type, bool currentDiveOnly);
|
||||
void editSensors(int toCylinder, const int fromCylinder);
|
||||
void editSensors(int toCylinder, int fromCylinder, int dcNr);
|
||||
#ifdef SUBSURFACE_MOBILE
|
||||
// Edits a dive and creates a divesite (if createDs != NULL) or edits a divesite (if changeDs != NULL).
|
||||
// Takes ownership of newDive and createDs!
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
#include "command.h"
|
||||
#include "command_base.h"
|
||||
#include "core/divelog.h"
|
||||
#include "core/globals.h"
|
||||
#include "core/qthelper.h" // for updateWindowTitle()
|
||||
#include "core/subsurface-qt/divelistnotifier.h"
|
||||
@ -65,7 +66,7 @@ QString diveNumberOrDate(struct dive *d)
|
||||
QString getListOfDives(const std::vector<struct dive*> &dives)
|
||||
{
|
||||
QString listOfDives;
|
||||
if ((int)dives.size() == dive_table.nr)
|
||||
if ((int)dives.size() == divelog.dives->nr)
|
||||
return Base::tr("all dives");
|
||||
int i = 0;
|
||||
for (dive *d: dives) {
|
||||
@ -86,11 +87,29 @@ QString getListOfDives(QVector<struct dive *> dives)
|
||||
|
||||
// return a string that can be used for the commit message and should list the changes that
|
||||
// were made to the dive list
|
||||
// keep in mind that the changes could have been a number of undo commands, so we might have
|
||||
// to go backwards from the last one written; this isn't perfect as a user could undo a command
|
||||
// and then do something else instead of redoing that undo - the undo information is then lost
|
||||
// for the changelog -- but of course the git history will show what happened
|
||||
QString changesMade()
|
||||
{
|
||||
static int nextToWrite = 0;
|
||||
int curIdx = undoStack->index();
|
||||
QString changeTexts;
|
||||
for (int i = 0; i < undoStack->index(); i++)
|
||||
changeTexts += undoStack->text(i) + "\n";
|
||||
|
||||
if (curIdx > nextToWrite) {
|
||||
for (int i = nextToWrite; i < curIdx; i++)
|
||||
changeTexts += undoStack->text(i) + "\n";
|
||||
} else if (curIdx < nextToWrite) { // we walked back undoing things
|
||||
for (int i = nextToWrite - 1; i >= curIdx; i--)
|
||||
changeTexts += "(undo) " + undoStack->text(i) + "\n";
|
||||
} else if (curIdx > 0) {
|
||||
// so this means we undid something (or more than one thing) and then did something else
|
||||
// so we lost the information of what was undone - and how many things were changed;
|
||||
// just show the last change
|
||||
changeTexts += undoStack->text(curIdx - 1) + "\n";
|
||||
}
|
||||
nextToWrite = curIdx;
|
||||
return changeTexts;
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include "core/divesite.h"
|
||||
#include "core/trip.h"
|
||||
#include "core/dive.h"
|
||||
#include "core/owning_ptrs.h"
|
||||
|
||||
#include <QUndoCommand>
|
||||
#include <QCoreApplication> // For Q_DECLARE_TR_FUNCTIONS
|
||||
@ -153,26 +154,6 @@ QVector<T> stdToQt(const std::vector<T> &v)
|
||||
// We put everything in a namespace, so that we can shorten names without polluting the global namespace
|
||||
namespace Command {
|
||||
|
||||
// Classes used to automatically call the appropriate free_*() function for owning pointers that go out of scope.
|
||||
struct DiveDeleter {
|
||||
void operator()(dive *d) { free_dive(d); }
|
||||
};
|
||||
struct TripDeleter {
|
||||
void operator()(dive_trip *t) { free_trip(t); }
|
||||
};
|
||||
struct DiveSiteDeleter {
|
||||
void operator()(dive_site *ds) { free_dive_site(ds); }
|
||||
};
|
||||
struct EventDeleter {
|
||||
void operator()(event *ev) { free(ev); }
|
||||
};
|
||||
|
||||
// Owning pointers to dive, dive_trip, dive_site and event objects.
|
||||
typedef std::unique_ptr<dive, DiveDeleter> OwningDivePtr;
|
||||
typedef std::unique_ptr<dive_trip, TripDeleter> OwningTripPtr;
|
||||
typedef std::unique_ptr<dive_site, DiveSiteDeleter> OwningDiveSitePtr;
|
||||
typedef std::unique_ptr<event, EventDeleter> OwningEventPtr;
|
||||
|
||||
// This is the base class of all commands.
|
||||
// It defines the Qt-translation functions
|
||||
class Base : public QUndoCommand {
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include "command_device.h"
|
||||
#include "core/divelog.h"
|
||||
#include "core/subsurface-qt/divelistnotifier.h"
|
||||
|
||||
namespace Command {
|
||||
@ -8,7 +9,7 @@ namespace Command {
|
||||
EditDeviceNickname::EditDeviceNickname(const struct divecomputer *dc, const QString &nicknameIn) :
|
||||
nickname(nicknameIn.toStdString())
|
||||
{
|
||||
index = get_or_add_device_for_dc(&device_table, dc);
|
||||
index = get_or_add_device_for_dc(divelog.devices, dc);
|
||||
if (index == -1)
|
||||
return;
|
||||
|
||||
@ -17,12 +18,12 @@ EditDeviceNickname::EditDeviceNickname(const struct divecomputer *dc, const QStr
|
||||
|
||||
bool EditDeviceNickname::workToBeDone()
|
||||
{
|
||||
return get_device(&device_table, index) != nullptr;
|
||||
return get_device(divelog.devices, index) != nullptr;
|
||||
}
|
||||
|
||||
void EditDeviceNickname::redo()
|
||||
{
|
||||
device *dev = get_device_mutable(&device_table, index);
|
||||
device *dev = get_device_mutable(divelog.devices, index);
|
||||
if (!dev)
|
||||
return;
|
||||
std::swap(dev->nickName, nickname);
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
#include "command_divelist.h"
|
||||
#include "core/divelist.h"
|
||||
#include "core/divelog.h"
|
||||
#include "core/qthelper.h"
|
||||
#include "core/selection.h"
|
||||
#include "core/subsurface-qt/divelistnotifier.h"
|
||||
@ -17,7 +18,7 @@ static void remove_trip_from_backend(dive_trip *trip)
|
||||
{
|
||||
if (trip->selected)
|
||||
deselect_trip(trip);
|
||||
remove_trip(trip, &trip_table); // Remove trip from backend
|
||||
remove_trip(trip, divelog.trips); // Remove trip from backend
|
||||
}
|
||||
|
||||
// This helper function removes a dive, takes ownership of the dive and adds it to a DiveToAdd structure.
|
||||
@ -77,9 +78,9 @@ dive *DiveListBase::addDive(DiveToAdd &d)
|
||||
// dives have been added, their status will be updated.
|
||||
res->hidden_by_filter = true;
|
||||
|
||||
int idx = dive_table_get_insertion_index(&dive_table, res);
|
||||
int idx = dive_table_get_insertion_index(divelog.dives, res);
|
||||
fulltext_register(res); // Register the dive's fulltext cache
|
||||
add_to_dive_table(&dive_table, idx, res); // Return ownership to backend
|
||||
add_to_dive_table(divelog.dives, idx, res); // Return ownership to backend
|
||||
invalidate_dive_cache(res); // Ensure that dive is written in git_save()
|
||||
|
||||
return res;
|
||||
@ -210,7 +211,7 @@ DivesAndSitesToRemove DiveListBase::addDives(DivesAndTripsToAdd &toAdd)
|
||||
addedTrips.reserve(toAdd.trips.size());
|
||||
for (OwningTripPtr &trip: toAdd.trips) {
|
||||
addedTrips.push_back(trip.get());
|
||||
insert_trip(trip.release(), &trip_table); // Return ownership to backend
|
||||
insert_trip(trip.release(), divelog.trips); // Return ownership to backend
|
||||
}
|
||||
toAdd.trips.clear();
|
||||
|
||||
@ -233,7 +234,7 @@ DivesAndSitesToRemove DiveListBase::addDives(DivesAndTripsToAdd &toAdd)
|
||||
if (!change.newShown.empty() || !change.newHidden.empty())
|
||||
emit diveListNotifier.numShownChanged();
|
||||
|
||||
return { res, sites };
|
||||
return { std::move(res), std::move(sites) };
|
||||
}
|
||||
|
||||
// This helper function renumbers dives according to an array of id/number pairs.
|
||||
@ -300,7 +301,7 @@ static void moveDivesBetweenTrips(DivesToTrip &dives)
|
||||
for (OwningTripPtr &trip: dives.tripsToAdd) {
|
||||
dive_trip *t = trip.release(); // Give up ownership
|
||||
createdTrips.push_back(t);
|
||||
insert_trip(t, &trip_table); // Return ownership to backend
|
||||
insert_trip(t, divelog.trips); // Return ownership to backend
|
||||
}
|
||||
dives.tripsToAdd.clear();
|
||||
|
||||
@ -430,7 +431,7 @@ AddDive::AddDive(dive *d, bool autogroup, bool newNumber)
|
||||
allocTrip.reset(trip);
|
||||
}
|
||||
|
||||
int idx = dive_table_get_insertion_index(&dive_table, divePtr.get());
|
||||
int idx = dive_table_get_insertion_index(divelog.dives, divePtr.get());
|
||||
if (newNumber)
|
||||
divePtr->number = get_dive_nr_at_idx(idx);
|
||||
|
||||
@ -451,27 +452,25 @@ void AddDive::redoit()
|
||||
currentDive = current_dive;
|
||||
|
||||
divesAndSitesToRemove = addDives(divesToAdd);
|
||||
sort_trip_table(&trip_table); // Though unlikely, adding a dive may reorder trips
|
||||
sort_trip_table(divelog.trips); // Though unlikely, adding a dive may reorder trips
|
||||
|
||||
// Select the newly added dive
|
||||
setSelection(divesAndSitesToRemove.dives, divesAndSitesToRemove.dives[0]);
|
||||
setSelection(divesAndSitesToRemove.dives, divesAndSitesToRemove.dives[0], -1);
|
||||
}
|
||||
|
||||
void AddDive::undoit()
|
||||
{
|
||||
// Simply remove the dive that was previously added...
|
||||
divesToAdd = removeDives(divesAndSitesToRemove);
|
||||
sort_trip_table(&trip_table); // Though unlikely, removing a dive may reorder trips
|
||||
sort_trip_table(divelog.trips); // Though unlikely, removing a dive may reorder trips
|
||||
|
||||
// ...and restore the selection
|
||||
setSelection(selection, currentDive);
|
||||
setSelection(selection, currentDive, -1);
|
||||
}
|
||||
|
||||
ImportDives::ImportDives(struct dive_table *dives, struct trip_table *trips, struct dive_site_table *sites,
|
||||
struct device_table *devices, struct filter_preset_table *filter_presets, int flags,
|
||||
const QString &source)
|
||||
ImportDives::ImportDives(struct divelog *log, int flags, const QString &source)
|
||||
{
|
||||
setText(Command::Base::tr("import %n dive(s) from %1", "", dives->nr).arg(source));
|
||||
setText(Command::Base::tr("import %n dive(s) from %1", "", log->dives->nr).arg(source));
|
||||
|
||||
// this only matters if undoit were called before redoit
|
||||
currentDive = nullptr;
|
||||
@ -480,7 +479,7 @@ ImportDives::ImportDives(struct dive_table *dives, struct trip_table *trips, str
|
||||
struct dive_table dives_to_remove = empty_dive_table;
|
||||
struct trip_table trips_to_add = empty_trip_table;
|
||||
struct dive_site_table sites_to_add = empty_dive_site_table;
|
||||
process_imported_dives(dives, trips, sites, devices, flags,
|
||||
process_imported_dives(log, flags,
|
||||
&dives_to_add, &dives_to_remove, &trips_to_add,
|
||||
&sites_to_add, &devicesToAddAndRemove);
|
||||
|
||||
@ -514,19 +513,19 @@ ImportDives::ImportDives(struct dive_table *dives, struct trip_table *trips, str
|
||||
|
||||
// When encountering filter presets with equal names, check whether they are
|
||||
// the same. If they are, ignore them.
|
||||
if (filter_presets) {
|
||||
for (const filter_preset &preset: *filter_presets) {
|
||||
QString name = preset.name;
|
||||
auto it = std::find_if(filter_preset_table.begin(), filter_preset_table.end(),
|
||||
[&name](const filter_preset &preset) { return preset.name == name; });
|
||||
if (it != filter_preset_table.end() && it->data == preset.data)
|
||||
continue;
|
||||
filterPresetsToAdd.emplace_back(preset.name, preset.data);
|
||||
}
|
||||
|
||||
// Consume the table for analogy with the other tables.
|
||||
filter_presets->clear();
|
||||
for (const filter_preset &preset: *log->filter_presets) {
|
||||
std::string name = preset.name;
|
||||
auto it = std::find_if(divelog.filter_presets->begin(), divelog.filter_presets->end(),
|
||||
[&name](const filter_preset &preset) { return preset.name == name; });
|
||||
if (it != divelog.filter_presets->end() && it->data == preset.data)
|
||||
continue;
|
||||
filterPresetsToAdd.emplace_back(preset.name, preset.data);
|
||||
}
|
||||
|
||||
free(dives_to_add.dives);
|
||||
free(dives_to_remove.dives);
|
||||
free(trips_to_add.trips);
|
||||
free(sites_to_add.dive_sites);
|
||||
}
|
||||
|
||||
bool ImportDives::workToBeDone()
|
||||
@ -546,14 +545,14 @@ void ImportDives::redoit()
|
||||
divesToAdd = removeDives(divesAndSitesToRemove);
|
||||
|
||||
// Select the newly added dives
|
||||
setSelection(divesAndSitesToRemoveNew.dives, divesAndSitesToRemoveNew.dives.back());
|
||||
setSelection(divesAndSitesToRemoveNew.dives, divesAndSitesToRemoveNew.dives.back(), -1);
|
||||
|
||||
// Remember dives and sites to remove
|
||||
divesAndSitesToRemove = std::move(divesAndSitesToRemoveNew);
|
||||
|
||||
// Add devices
|
||||
for (const device &dev: devicesToAddAndRemove.devices)
|
||||
add_to_device_table(&device_table, &dev);
|
||||
add_to_device_table(divelog.devices, &dev);
|
||||
|
||||
// Add new filter presets
|
||||
for (auto &it: filterPresetsToAdd) {
|
||||
@ -577,16 +576,16 @@ void ImportDives::undoit()
|
||||
divesAndSitesToRemove = std::move(divesAndSitesToRemoveNew);
|
||||
|
||||
// ...and restore the selection
|
||||
setSelection(selection, currentDive);
|
||||
setSelection(selection, currentDive, -1);
|
||||
|
||||
// Remove devices
|
||||
for (const device &dev: devicesToAddAndRemove.devices)
|
||||
remove_device(&device_table, &dev);
|
||||
remove_device(divelog.devices, &dev);
|
||||
|
||||
// Remove filter presets. Do this in reverse order.
|
||||
for (auto it = filterPresetsToRemove.rbegin(); it != filterPresetsToRemove.rend(); ++it) {
|
||||
int index = *it;
|
||||
QString oldName = filter_preset_name_qstring(index);
|
||||
std::string oldName = filter_preset_name(index);
|
||||
FilterData oldData = filter_preset_get(index);
|
||||
filter_preset_delete(index);
|
||||
emit diveListNotifier.filterPresetRemoved(index);
|
||||
@ -610,17 +609,17 @@ bool DeleteDive::workToBeDone()
|
||||
void DeleteDive::undoit()
|
||||
{
|
||||
divesToDelete = addDives(divesToAdd);
|
||||
sort_trip_table(&trip_table); // Though unlikely, removing a dive may reorder trips
|
||||
sort_trip_table(divelog.trips); // Though unlikely, removing a dive may reorder trips
|
||||
|
||||
// Select all re-added dives and make the first one current
|
||||
dive *currentDive = !divesToDelete.dives.empty() ? divesToDelete.dives[0] : nullptr;
|
||||
setSelection(divesToDelete.dives, currentDive);
|
||||
setSelection(divesToDelete.dives, currentDive, -1);
|
||||
}
|
||||
|
||||
void DeleteDive::redoit()
|
||||
{
|
||||
divesToAdd = removeDives(divesToDelete);
|
||||
sort_trip_table(&trip_table); // Though unlikely, adding a dive may reorder trips
|
||||
sort_trip_table(divelog.trips); // Though unlikely, adding a dive may reorder trips
|
||||
|
||||
// Deselect all dives and select dive that was close to the first deleted dive
|
||||
dive *newCurrent = nullptr;
|
||||
@ -648,8 +647,8 @@ void ShiftTime::redoit()
|
||||
}
|
||||
|
||||
// Changing times may have unsorted the dive and trip tables
|
||||
sort_dive_table(&dive_table);
|
||||
sort_trip_table(&trip_table);
|
||||
sort_dive_table(divelog.dives);
|
||||
sort_trip_table(divelog.trips);
|
||||
for (dive_trip *trip: trips)
|
||||
sort_dive_table(&trip->dives); // Keep the trip-table in order
|
||||
|
||||
@ -659,7 +658,7 @@ void ShiftTime::redoit()
|
||||
emit diveListNotifier.divesChanged(dives, DiveField::DATETIME);
|
||||
|
||||
// Select the changed dives
|
||||
setSelection(diveList, diveList[0]);
|
||||
setSelection(diveList, diveList[0], -1);
|
||||
|
||||
// Negate the time-shift so that the next call does the reverse
|
||||
timeChanged = -timeChanged;
|
||||
@ -695,7 +694,7 @@ void RenumberDives::undoit()
|
||||
dives.reserve(divesToRenumber.size());
|
||||
for (const QPair<dive *, int> &item: divesToRenumber)
|
||||
dives.push_back(item.first);
|
||||
setSelection(dives, dives[0]);
|
||||
setSelection(dives, dives[0], -1);
|
||||
}
|
||||
|
||||
bool RenumberDives::workToBeDone()
|
||||
@ -717,14 +716,14 @@ bool TripBase::workToBeDone()
|
||||
void TripBase::redoit()
|
||||
{
|
||||
moveDivesBetweenTrips(divesToMove);
|
||||
sort_trip_table(&trip_table); // Though unlikely, moving dives may reorder trips
|
||||
sort_trip_table(divelog.trips); // Though unlikely, moving dives may reorder trips
|
||||
|
||||
// Select the moved dives
|
||||
std::vector<dive *> dives;
|
||||
dives.reserve(divesToMove.divesToMove.size());
|
||||
for (const DiveToTrip &item: divesToMove.divesToMove)
|
||||
dives.push_back(item.dive);
|
||||
setSelection(dives, dives[0]);
|
||||
setSelection(dives, dives[0], -1);
|
||||
}
|
||||
|
||||
void TripBase::undoit()
|
||||
@ -790,7 +789,7 @@ AutogroupDives::AutogroupDives()
|
||||
dive_trip *trip;
|
||||
bool alloc;
|
||||
int from, to;
|
||||
for(int i = 0; (trip = get_dives_to_autogroup(&dive_table, i, &from, &to, &alloc)) != NULL; i = to) {
|
||||
for(int i = 0; (trip = get_dives_to_autogroup(divelog.dives, i, &from, &to, &alloc)) != NULL; i = to) {
|
||||
// If this is an allocated trip, take ownership
|
||||
if (alloc)
|
||||
divesToMove.tripsToAdd.emplace_back(trip);
|
||||
@ -853,7 +852,7 @@ void SplitDivesBase::redoit()
|
||||
unsplitDive = removeDives(diveToSplit);
|
||||
|
||||
// Select split dives and make first dive current
|
||||
setSelection(divesToUnsplit.dives, divesToUnsplit.dives[0]);
|
||||
setSelection(divesToUnsplit.dives, divesToUnsplit.dives[0], -1);
|
||||
}
|
||||
|
||||
void SplitDivesBase::undoit()
|
||||
@ -863,7 +862,7 @@ void SplitDivesBase::undoit()
|
||||
splitDives = removeDives(divesToUnsplit);
|
||||
|
||||
// Select unsplit dive and make it current
|
||||
setSelection(diveToSplit.dives, diveToSplit.dives[0] );
|
||||
setSelection(diveToSplit.dives, diveToSplit.dives[0], -1);
|
||||
}
|
||||
|
||||
static std::array<dive *, 2> doSplitDives(const dive *d, duration_t time)
|
||||
@ -901,8 +900,9 @@ SplitDiveComputer::SplitDiveComputer(dive *d, int dc_num) : SplitDivesBase(d, sp
|
||||
setText(Command::Base::tr("split dive computer"));
|
||||
}
|
||||
|
||||
DiveComputerBase::DiveComputerBase(dive *old_dive, dive *new_dive, int dc_nr_after_in) : dc_nr_before(dc_number),
|
||||
dc_nr_after(dc_nr_after_in)
|
||||
DiveComputerBase::DiveComputerBase(dive *old_dive, dive *new_dive, int dc_nr_before, int dc_nr_after) :
|
||||
dc_nr_before(dc_nr_before),
|
||||
dc_nr_after(dc_nr_after)
|
||||
{
|
||||
if (!new_dive)
|
||||
return;
|
||||
@ -936,11 +936,9 @@ void DiveComputerBase::redoit()
|
||||
diveToAdd = removeDives(diveToRemove);
|
||||
diveToRemove = std::move(addedDive);
|
||||
|
||||
dc_number = dc_nr_after;
|
||||
|
||||
// Select added dive and make it current.
|
||||
// This automatically replots the profile.
|
||||
setSelection(diveToRemove.dives, diveToRemove.dives[0]);
|
||||
setSelection(diveToRemove.dives, diveToRemove.dives[0], dc_nr_after);
|
||||
|
||||
std::swap(dc_nr_before, dc_nr_after);
|
||||
}
|
||||
@ -952,13 +950,13 @@ void DiveComputerBase::undoit()
|
||||
}
|
||||
|
||||
MoveDiveComputerToFront::MoveDiveComputerToFront(dive *d, int dc_num)
|
||||
: DiveComputerBase(d, make_first_dc(d, dc_num), 0)
|
||||
: DiveComputerBase(d, make_first_dc(d, dc_num), dc_num, 0)
|
||||
{
|
||||
setText(Command::Base::tr("move dive computer to front"));
|
||||
}
|
||||
|
||||
DeleteDiveComputer::DeleteDiveComputer(dive *d, int dc_num)
|
||||
: DiveComputerBase(d, clone_delete_divecomputer(d, dc_num), std::min((int)number_of_computers(d) - 1, dc_num))
|
||||
: DiveComputerBase(d, clone_delete_divecomputer(d, dc_num), dc_num, std::min((int)number_of_computers(d) - 1, dc_num))
|
||||
{
|
||||
setText(Command::Base::tr("delete dive computer"));
|
||||
}
|
||||
@ -1009,7 +1007,7 @@ MergeDives::MergeDives(const QVector <dive *> &dives)
|
||||
// like the best option.
|
||||
int idx = get_divenr(dives[0]);
|
||||
int num = dives.count();
|
||||
if (idx < 0 || idx + num > dive_table.nr) {
|
||||
if (idx < 0 || idx + num > divelog.dives->nr) {
|
||||
// It was the callers responsibility to pass only known dives.
|
||||
// Something is seriously wrong - give up.
|
||||
qWarning("Merging unknown dives");
|
||||
@ -1017,7 +1015,7 @@ MergeDives::MergeDives(const QVector <dive *> &dives)
|
||||
}
|
||||
// std::equal compares two ranges. The parameters are (begin_range1, end_range1, begin_range2).
|
||||
// Here, we can compare C-arrays, because QVector guarantees contiguous storage.
|
||||
if (std::equal(&dives[0], &dives[0] + num, &dive_table.dives[idx]) &&
|
||||
if (std::equal(&dives[0], &dives[0] + num, &divelog.dives->dives[idx]) &&
|
||||
dives[0]->number && dives.last()->number && dives[0]->number < dives.last()->number) {
|
||||
// We have a consecutive set of dives. Rename all following dives according to the
|
||||
// number of erased dives. This considers that there might be missing numbers.
|
||||
@ -1033,15 +1031,15 @@ MergeDives::MergeDives(const QVector <dive *> &dives)
|
||||
// consecutive, and the difference will be 1, so the
|
||||
// above example is not supposed to be normal.
|
||||
int diff = dives.last()->number - dives[0]->number;
|
||||
divesToRenumber.reserve(dive_table.nr - idx - num);
|
||||
divesToRenumber.reserve(divelog.dives->nr - idx - num);
|
||||
int previousnr = dives[0]->number;
|
||||
for (int i = idx + num; i < dive_table.nr; ++i) {
|
||||
int newnr = dive_table.dives[i]->number - diff;
|
||||
for (int i = idx + num; i < divelog.dives->nr; ++i) {
|
||||
int newnr = divelog.dives->dives[i]->number - diff;
|
||||
|
||||
// Stop renumbering if stuff isn't in order (see also core/divelist.c)
|
||||
if (newnr <= previousnr)
|
||||
break;
|
||||
divesToRenumber.append(QPair<dive *,int>(dive_table.dives[i], newnr));
|
||||
divesToRenumber.append(QPair<dive *,int>(divelog.dives->dives[i], newnr));
|
||||
previousnr = newnr;
|
||||
}
|
||||
}
|
||||
@ -1065,7 +1063,7 @@ void MergeDives::redoit()
|
||||
unmergedDives = removeDives(divesToMerge);
|
||||
|
||||
// Select merged dive and make it current
|
||||
setSelection(diveToUnmerge.dives, diveToUnmerge.dives[0]);
|
||||
setSelection(diveToUnmerge.dives, diveToUnmerge.dives[0], -1);
|
||||
}
|
||||
|
||||
void MergeDives::undoit()
|
||||
@ -1075,7 +1073,7 @@ void MergeDives::undoit()
|
||||
renumberDives(divesToRenumber);
|
||||
|
||||
// Select unmerged dives and make first one current
|
||||
setSelection(divesToMerge.dives, divesToMerge.dives[0]);
|
||||
setSelection(divesToMerge.dives, divesToMerge.dives[0], -1);
|
||||
}
|
||||
|
||||
} // namespace Command
|
||||
|
||||
@ -99,9 +99,7 @@ private:
|
||||
class ImportDives : public DiveListBase {
|
||||
public:
|
||||
// Note: dives and trips are consumed - after the call they will be empty.
|
||||
ImportDives(struct dive_table *dives, struct trip_table *trips, struct dive_site_table *sites,
|
||||
struct device_table *devices, struct filter_preset_table *filter_presets, int flags,
|
||||
const QString &source);
|
||||
ImportDives(struct divelog *log, int flags, const QString &source);
|
||||
private:
|
||||
void undoit() override;
|
||||
void redoit() override;
|
||||
@ -114,7 +112,7 @@ private:
|
||||
|
||||
// For redo
|
||||
std::vector<OwningDiveSitePtr> sitesToAdd;
|
||||
std::vector<std::pair<QString,FilterData>>
|
||||
std::vector<std::pair<std::string,FilterData>>
|
||||
filterPresetsToAdd;
|
||||
|
||||
// For undo
|
||||
@ -239,7 +237,7 @@ class DiveComputerBase : public DiveListBase {
|
||||
protected:
|
||||
// old_dive must be a dive known to the core.
|
||||
// new_dive must be new dive whose ownership is taken.
|
||||
DiveComputerBase(dive *old_dive, dive *new_dive, int dc_nr_after);
|
||||
DiveComputerBase(dive *old_dive, dive *new_dive, int dc_nr_before, int dc_nr_after);
|
||||
private:
|
||||
void undoit() override;
|
||||
void redoit() override;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include "command_divesite.h"
|
||||
#include "core/divelog.h"
|
||||
#include "core/divesite.h"
|
||||
#include "core/subsurface-qt/divelistnotifier.h"
|
||||
#include "core/qthelper.h"
|
||||
@ -154,8 +155,8 @@ void DeleteDiveSites::undo()
|
||||
PurgeUnusedDiveSites::PurgeUnusedDiveSites()
|
||||
{
|
||||
setText(Command::Base::tr("purge unused dive sites"));
|
||||
for (int i = 0; i < dive_site_table.nr; ++i) {
|
||||
dive_site *ds = dive_site_table.dive_sites[i];
|
||||
for (int i = 0; i < divelog.sites->nr; ++i) {
|
||||
dive_site *ds = divelog.sites->dive_sites[i];
|
||||
if (ds->dives.nr == 0)
|
||||
sitesToRemove.push_back(ds);
|
||||
}
|
||||
@ -404,7 +405,7 @@ ApplyGPSFixes::ApplyGPSFixes(const std::vector<DiveAndLocation> &fixes)
|
||||
siteLocations.push_back({ ds, dl.location });
|
||||
}
|
||||
} else {
|
||||
ds = create_dive_site(qPrintable(dl.name), &dive_site_table);
|
||||
ds = create_dive_site(qPrintable(dl.name), divelog.sites);
|
||||
ds->location = dl.location;
|
||||
add_dive_to_dive_site(dl.d, ds);
|
||||
dl.d->dive_site = nullptr; // This will be set on redo()
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
#include "command_edit.h"
|
||||
#include "core/divelist.h"
|
||||
#include "core/divelog.h"
|
||||
#include "core/fulltext.h"
|
||||
#include "core/qthelper.h" // for copy_qstring
|
||||
#include "core/sample.h"
|
||||
@ -158,7 +159,7 @@ void EditBase<T>::undo()
|
||||
DiveField id = fieldId();
|
||||
emit diveListNotifier.divesChanged(stdToQt<dive *>(dives), id);
|
||||
if (!placingCommand())
|
||||
setSelection(selectedDives, current);
|
||||
setSelection(selectedDives, current, -1);
|
||||
}
|
||||
|
||||
// We have to manually instantiate the constructors of the EditBase class,
|
||||
@ -551,7 +552,7 @@ void EditTagsBase::undo()
|
||||
// Send signals.
|
||||
DiveField id = fieldId();
|
||||
emit diveListNotifier.divesChanged(stdToQt<dive *>(dives), id);
|
||||
setSelection(selectedDives, current);
|
||||
setSelection(selectedDives, current, -1);
|
||||
}
|
||||
|
||||
// Undo and redo do the same as just the stored value is exchanged
|
||||
@ -565,7 +566,7 @@ QStringList EditTags::data(struct dive *d) const
|
||||
{
|
||||
QStringList res;
|
||||
for (const struct tag_entry *tag = d->tag_list; tag; tag = tag->next)
|
||||
res.push_back(tag->tag->name);
|
||||
res.push_back(QString::fromStdString(tag->tag->name));
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -861,7 +862,7 @@ void ReplanDive::undo()
|
||||
emit diveListNotifier.divesChanged(divesToNotify, DiveField::DATETIME | DiveField::DURATION | DiveField::DEPTH | DiveField::MODE |
|
||||
DiveField::NOTES | DiveField::SALINITY | DiveField::ATM_PRESS);
|
||||
if (!placingCommand())
|
||||
setSelection({ d }, d);
|
||||
setSelection({ d }, d, -1);
|
||||
}
|
||||
|
||||
// Redo and undo do the same
|
||||
@ -878,11 +879,12 @@ QString editProfileTypeToString(EditProfileType type, int count)
|
||||
case EditProfileType::ADD: return Command::Base::tr("Add stop");
|
||||
case EditProfileType::REMOVE: return Command::Base::tr("Remove %n stop(s)", "", count);
|
||||
case EditProfileType::MOVE: return Command::Base::tr("Move %n stop(s)", "", count);
|
||||
case EditProfileType::EDIT: return Command::Base::tr("Edit stop");
|
||||
}
|
||||
}
|
||||
|
||||
EditProfile::EditProfile(const dive *source, EditProfileType type, int count) : d(current_dive),
|
||||
dcNr(dc_number),
|
||||
EditProfile::EditProfile(const dive *source, int dcNr, EditProfileType type, int count) : d(current_dive),
|
||||
dcNr(dcNr),
|
||||
maxdepth({0}),
|
||||
meandepth({0}),
|
||||
dcmaxdepth({0}),
|
||||
@ -903,7 +905,7 @@ EditProfile::EditProfile(const dive *source, EditProfileType type, int count) :
|
||||
copy_samples(sdc, &dc);
|
||||
copy_events(sdc, &dc);
|
||||
|
||||
setText(editProfileTypeToString(type, count) + diveNumberOrDate(d));
|
||||
setText(editProfileTypeToString(type, count) + " " + diveNumberOrDate(d));
|
||||
}
|
||||
|
||||
EditProfile::~EditProfile()
|
||||
@ -924,6 +926,7 @@ void EditProfile::undo()
|
||||
std::swap(sdc->samples, dc.samples);
|
||||
std::swap(sdc->alloc_samples, dc.alloc_samples);
|
||||
std::swap(sdc->sample, dc.sample);
|
||||
std::swap(sdc->events, dc.events);
|
||||
std::swap(sdc->maxdepth, dc.maxdepth);
|
||||
std::swap(d->maxdepth, maxdepth);
|
||||
std::swap(d->meandepth, meandepth);
|
||||
@ -934,7 +937,7 @@ void EditProfile::undo()
|
||||
QVector<dive *> divesToNotify = { d };
|
||||
emit diveListNotifier.divesChanged(divesToNotify, DiveField::DURATION | DiveField::DEPTH);
|
||||
if (!placingCommand())
|
||||
setSelection({ d }, d);
|
||||
setSelection({ d }, d, dcNr);
|
||||
}
|
||||
|
||||
// Redo and undo do the same
|
||||
@ -1089,11 +1092,6 @@ EditWeight::EditWeight(int index, weightsystem_t wsIn, bool currentDiveOnly) :
|
||||
dives.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
WSInfoModel *wsim = WSInfoModel::instance();
|
||||
QModelIndexList matches = wsim->match(wsim->index(0, 0), Qt::DisplayRole, gettextFromC::tr(new_ws.description));
|
||||
if (!matches.isEmpty())
|
||||
wsim->setData(wsim->index(matches.first().row(), WSInfoModel::GR), new_ws.weight.grams);
|
||||
}
|
||||
|
||||
EditWeight::~EditWeight()
|
||||
@ -1104,6 +1102,7 @@ EditWeight::~EditWeight()
|
||||
void EditWeight::redo()
|
||||
{
|
||||
for (size_t i = 0; i < dives.size(); ++i) {
|
||||
add_weightsystem_description(&new_ws); // This updates the weightsystem info table
|
||||
set_weightsystem(dives[i], indices[i], new_ws);
|
||||
emit diveListNotifier.weightEdited(dives[i], indices[i]);
|
||||
invalidate_dive_cache(dives[i]); // Ensure that dive is written in git_save()
|
||||
@ -1128,7 +1127,7 @@ AddCylinder::AddCylinder(bool currentDiveOnly) :
|
||||
setText(Command::Base::tr("Add cylinder"));
|
||||
else
|
||||
setText(Command::Base::tr("Add cylinder (%n dive(s))", "", dives.size()));
|
||||
cyl = create_new_cylinder(dives[0]);
|
||||
cyl = create_new_manual_cylinder(dives[0]);
|
||||
indexes.reserve(dives.size());
|
||||
}
|
||||
|
||||
@ -1177,35 +1176,12 @@ static bool same_cylinder_size(const cylinder_t &cyl1, const cylinder_t &cyl2)
|
||||
cyl1.type.workingpressure.mbar == cyl2.type.workingpressure.mbar;
|
||||
}
|
||||
|
||||
static bool same_cylinder_pressure(const cylinder_t &cyl1, const cylinder_t &cyl2)
|
||||
{
|
||||
return cyl1.start.mbar == cyl2.start.mbar &&
|
||||
cyl1.end.mbar == cyl2.end.mbar;
|
||||
}
|
||||
|
||||
// Flags for comparing cylinders
|
||||
static constexpr int SAME_TYPE = 1 << 0;
|
||||
static constexpr int SAME_SIZE = 1 << 1;
|
||||
static constexpr int SAME_PRESS = 1 << 2;
|
||||
static constexpr int SAME_GAS = 1 << 3;
|
||||
|
||||
static bool same_cylinder_with_flags(const cylinder_t &cyl1, const cylinder_t &cyl2, int sameCylinderFlags)
|
||||
{
|
||||
return (((sameCylinderFlags & SAME_TYPE) == 0 || same_cylinder_type(cyl1, cyl2)) &&
|
||||
((sameCylinderFlags & SAME_SIZE) == 0 || same_cylinder_size(cyl1, cyl2)) &&
|
||||
((sameCylinderFlags & SAME_PRESS) == 0 || same_cylinder_pressure(cyl1, cyl2)) &&
|
||||
((sameCylinderFlags & SAME_GAS) == 0 || same_gasmix(cyl1.gasmix, cyl2.gasmix)));
|
||||
}
|
||||
|
||||
static int find_cylinder_index(const struct dive *d, const cylinder_t &cyl, int sameCylinderFlags)
|
||||
{
|
||||
for (int idx = 0; idx < d->cylinders.nr; ++idx) {
|
||||
if (same_cylinder_with_flags(cyl, *get_cylinder(d, idx), sameCylinderFlags))
|
||||
return idx;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
EditCylinderBase::EditCylinderBase(int index, bool currentDiveOnly, bool nonProtectedOnly, int sameCylinderFlags) :
|
||||
EditDivesBase(currentDiveOnly)
|
||||
{
|
||||
@ -1222,19 +1198,24 @@ EditCylinderBase::EditCylinderBase(int index, bool currentDiveOnly, bool nonProt
|
||||
cyl.reserve(dives.size());
|
||||
|
||||
for (dive *d: dives) {
|
||||
if (index >= d->cylinders.nr)
|
||||
continue;
|
||||
if (nonProtectedOnly && is_cylinder_prot(d, index))
|
||||
continue;
|
||||
// We checked that the cylinder exists above.
|
||||
const cylinder_t &cylinder = *get_cylinder(d, index);
|
||||
if (d != current &&
|
||||
(!same_cylinder_size(orig, *get_cylinder(d, index)) || !same_cylinder_type(orig, *get_cylinder(d, index))))
|
||||
(!same_cylinder_size(orig, cylinder) || !same_cylinder_type(orig, cylinder))) {
|
||||
// when editing cylinders, we assume that the user wanted to edit the 'n-th' cylinder
|
||||
// and we only do edit that cylinder, if it was the same type as the one in the current dive
|
||||
continue;
|
||||
}
|
||||
|
||||
divesNew.push_back(d);
|
||||
// that's silly as it's always the same value - but we need this vector of indices in the case where we add
|
||||
// a cylinder to several dives as the spot will potentially be different in different dives
|
||||
indexes.push_back(index);
|
||||
cyl.push_back(clone_cylinder(*get_cylinder(d, index)));
|
||||
cyl.push_back(clone_cylinder(cylinder));
|
||||
}
|
||||
dives = std::move(divesNew);
|
||||
}
|
||||
@ -1310,24 +1291,7 @@ EditCylinder::EditCylinder(int index, cylinder_t cylIn, EditCylinderType typeIn,
|
||||
else
|
||||
setText(Command::Base::tr("Edit cylinder (%n dive(s))", "", dives.size()));
|
||||
|
||||
// Try to untranslate the cylinder type
|
||||
QString description = cylIn.type.description;
|
||||
for (int i = 0; i < tank_info_table.nr; ++i) {
|
||||
if (gettextFromC::tr(tank_info_table.infos[i].name) == description) {
|
||||
description = tank_info_table.infos[i].name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Update the tank info model
|
||||
TankInfoModel *tim = TankInfoModel::instance();
|
||||
QModelIndexList matches = tim->match(tim->index(0, 0), Qt::DisplayRole, gettextFromC::tr(cylIn.type.description));
|
||||
if (!matches.isEmpty()) {
|
||||
if (cylIn.type.size.mliter != cyl[0].type.size.mliter)
|
||||
tim->setData(tim->index(matches.first().row(), TankInfoModel::ML), cylIn.type.size.mliter);
|
||||
if (cylIn.type.workingpressure.mbar != cyl[0].type.workingpressure.mbar)
|
||||
tim->setData(tim->index(matches.first().row(), TankInfoModel::BAR), cylIn.type.workingpressure.mbar / 1000.0);
|
||||
}
|
||||
|
||||
// The base class copied the cylinders for us, let's edit them
|
||||
for (int i = 0; i < (int)indexes.size(); ++i) {
|
||||
@ -1355,6 +1319,7 @@ EditCylinder::EditCylinder(int index, cylinder_t cylIn, EditCylinderType typeIn,
|
||||
void EditCylinder::redo()
|
||||
{
|
||||
for (size_t i = 0; i < dives.size(); ++i) {
|
||||
set_tank_info_data(&tank_info_table, cyl[i].type.description, cyl[i].type.size, cyl[i].type.workingpressure);
|
||||
std::swap(*get_cylinder(dives[i], indexes[i]), cyl[i]);
|
||||
update_cylinder_related_info(dives[i]);
|
||||
emit diveListNotifier.cylinderEdited(dives[i], indexes[i]);
|
||||
@ -1368,14 +1333,13 @@ void EditCylinder::undo()
|
||||
redo();
|
||||
}
|
||||
|
||||
EditSensors::EditSensors(int toCylinderIn, int fromCylinderIn)
|
||||
: d(current_dive), dc(get_dive_dc(d, dc_number)), toCylinder(toCylinderIn), fromCylinder(fromCylinderIn)
|
||||
EditSensors::EditSensors(int toCylinderIn, int fromCylinderIn, int dcNr)
|
||||
: d(current_dive), dc(get_dive_dc(d, dcNr)), toCylinder(toCylinderIn), fromCylinder(fromCylinderIn)
|
||||
{
|
||||
if (!d || !dc)
|
||||
return;
|
||||
|
||||
setText(Command::Base::tr("Edit sensors"));
|
||||
|
||||
}
|
||||
|
||||
void EditSensors::mapSensors(int toCyl, int fromCyl)
|
||||
@ -1384,6 +1348,9 @@ void EditSensors::mapSensors(int toCyl, int fromCyl)
|
||||
for (int s = 0; s < MAX_SENSORS; ++s) {
|
||||
if (dc->sample[i].pressure[s].mbar && dc->sample[i].sensor[s] == fromCyl)
|
||||
dc->sample[i].sensor[s] = toCyl;
|
||||
// In case the cylinder we are moving to has a sensor attached, move it to the other cylinder
|
||||
else if (dc->sample[i].pressure[s].mbar && dc->sample[i].sensor[s] == toCyl)
|
||||
dc->sample[i].sensor[s] = fromCyl;
|
||||
}
|
||||
}
|
||||
emit diveListNotifier.diveComputerEdited(dc);
|
||||
@ -1460,7 +1427,7 @@ EditDive::EditDive(dive *oldDiveIn, dive *newDiveIn, dive_site *createDs, dive_s
|
||||
changedFields |= DiveField::CHILL;
|
||||
if (!same_string(oldDive->suit, newDive->suit))
|
||||
changedFields |= DiveField::SUIT;
|
||||
if (get_taglist_string(oldDive->tag_list) != get_taglist_string(newDive->tag_list)) // This is cheating. Do we have a taglist comparison function?
|
||||
if (taglist_get_tagstring(oldDive->tag_list) != taglist_get_tagstring(newDive->tag_list)) // This is cheating. Do we have a taglist comparison function?
|
||||
changedFields |= DiveField::TAGS;
|
||||
if (oldDive->dc.divemode != newDive->dc.divemode)
|
||||
changedFields |= DiveField::MODE;
|
||||
@ -1522,8 +1489,8 @@ void EditDive::exchangeDives()
|
||||
QVector<dive *> dives = { oldDive };
|
||||
timestamp_t delta = oldDive->when - newDive->when;
|
||||
if (delta != 0) {
|
||||
sort_dive_table(&dive_table);
|
||||
sort_trip_table(&trip_table);
|
||||
sort_dive_table(divelog.dives);
|
||||
sort_trip_table(divelog.trips);
|
||||
if (newDive->divetrip != oldDive->divetrip)
|
||||
qWarning("Command::EditDive::redo(): This command does not support moving between trips!");
|
||||
if (oldDive->divetrip)
|
||||
@ -1535,7 +1502,7 @@ void EditDive::exchangeDives()
|
||||
emit diveListNotifier.divesChanged(dives, changedFields);
|
||||
|
||||
// Select the changed dives
|
||||
setSelection( { oldDive }, oldDive);
|
||||
setSelection( { oldDive }, oldDive, -1);
|
||||
}
|
||||
|
||||
void EditDive::editDs()
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
|
||||
#include "command_base.h"
|
||||
#include "command.h" // for EditCylinderType
|
||||
#include "core/divecomputer.h"
|
||||
#include "core/subsurface-qt/divelistnotifier.h"
|
||||
|
||||
#include <QVector>
|
||||
@ -351,7 +352,7 @@ class EditProfile : public Base {
|
||||
struct divecomputer dc;
|
||||
public:
|
||||
// Note: source must be clean (i.e. fixup_dive must have been called on it).
|
||||
EditProfile(const dive *source, EditProfileType type, int count);
|
||||
EditProfile(const dive *source, int dcNr, EditProfileType type, int count);
|
||||
~EditProfile();
|
||||
private:
|
||||
void undo() override;
|
||||
@ -443,7 +444,7 @@ private:
|
||||
class EditSensors : public Base
|
||||
{
|
||||
public:
|
||||
EditSensors(int cylIndex, int fromCylinder);
|
||||
EditSensors(int cylIndex, int fromCylinder, int dcNr);
|
||||
|
||||
private:
|
||||
struct dive *d;
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
namespace Command {
|
||||
|
||||
EditTripBase::EditTripBase(dive_trip *tripIn, const QString &newValue) : trip(tripIn),
|
||||
current(current_dive),
|
||||
value(newValue)
|
||||
{
|
||||
}
|
||||
@ -26,6 +27,7 @@ void EditTripBase::undo()
|
||||
value = old;
|
||||
|
||||
emit diveListNotifier.tripChanged(trip, fieldId());
|
||||
setTripSelection(trip, current);
|
||||
}
|
||||
|
||||
// Undo and redo do the same as just the stored value is exchanged
|
||||
|
||||
@ -20,6 +20,7 @@ class EditTripBase : public Base {
|
||||
bool workToBeDone() override;
|
||||
|
||||
dive_trip *trip; // Trip to be edited.
|
||||
dive *current;
|
||||
public:
|
||||
EditTripBase(dive_trip *trip, const QString &newValue);
|
||||
|
||||
|
||||
@ -32,8 +32,7 @@ void EventBase::updateDive()
|
||||
{
|
||||
invalidate_dive_cache(d);
|
||||
emit diveListNotifier.eventsChanged(d);
|
||||
dc_number = dcNr;
|
||||
setSelection({ d }, d);
|
||||
setSelection({ d }, d, dcNr);
|
||||
}
|
||||
|
||||
AddEventBase::AddEventBase(struct dive *d, int dcNr, struct event *ev) : EventBase(d, dcNr),
|
||||
|
||||
@ -6,16 +6,16 @@
|
||||
|
||||
namespace Command {
|
||||
|
||||
static int createFilterPreset(const QString &name, const FilterData &data)
|
||||
static int createFilterPreset(const std::string &name, const FilterData &data)
|
||||
{
|
||||
int index = filter_preset_add(name, data);
|
||||
emit diveListNotifier.filterPresetAdded(index);
|
||||
return index;
|
||||
}
|
||||
|
||||
static std::pair<QString, FilterData> removeFilterPreset(int index)
|
||||
static std::pair<std::string, FilterData> removeFilterPreset(int index)
|
||||
{
|
||||
QString oldName = filter_preset_name_qstring(index);
|
||||
std::string oldName = filter_preset_name(index);
|
||||
FilterData oldData = filter_preset_get(index);
|
||||
filter_preset_delete(index);
|
||||
emit diveListNotifier.filterPresetRemoved(index);
|
||||
@ -23,7 +23,7 @@ static std::pair<QString, FilterData> removeFilterPreset(int index)
|
||||
}
|
||||
|
||||
CreateFilterPreset::CreateFilterPreset(const QString &nameIn, const FilterData &dataIn) :
|
||||
name(nameIn), data(dataIn), index(0)
|
||||
name(nameIn.toStdString()), data(dataIn), index(0)
|
||||
{
|
||||
setText(Command::Base::tr("Create filter preset %1").arg(nameIn));
|
||||
}
|
||||
@ -46,7 +46,7 @@ void CreateFilterPreset::undo()
|
||||
|
||||
RemoveFilterPreset::RemoveFilterPreset(int indexIn) : index(indexIn)
|
||||
{
|
||||
setText(Command::Base::tr("Delete filter preset %1").arg(filter_preset_name_qstring(index)));
|
||||
setText(Command::Base::tr("Delete filter preset %1").arg(QString(filter_preset_name(index).c_str())));
|
||||
}
|
||||
|
||||
bool RemoveFilterPreset::workToBeDone()
|
||||
@ -68,7 +68,7 @@ void RemoveFilterPreset::undo()
|
||||
EditFilterPreset::EditFilterPreset(int indexIn, const FilterData &dataIn) :
|
||||
index(indexIn), data(dataIn)
|
||||
{
|
||||
setText(Command::Base::tr("Edit filter preset %1").arg(filter_preset_name_qstring(index)));
|
||||
setText(Command::Base::tr("Edit filter preset %1").arg(QString(filter_preset_name(index).c_str())));
|
||||
}
|
||||
|
||||
bool EditFilterPreset::workToBeDone()
|
||||
|
||||
@ -17,7 +17,7 @@ public:
|
||||
CreateFilterPreset(const QString &name, const FilterData &data);
|
||||
private:
|
||||
// for redo
|
||||
QString name;
|
||||
std::string name;
|
||||
FilterData data;
|
||||
|
||||
// for undo
|
||||
@ -33,7 +33,7 @@ public:
|
||||
RemoveFilterPreset(int index);
|
||||
private:
|
||||
// for undo
|
||||
QString name;
|
||||
std::string name;
|
||||
FilterData data;
|
||||
|
||||
// for redo
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include "command_pictures.h"
|
||||
#include "core/errorhelper.h"
|
||||
#include "core/subsurface-qt/divelistnotifier.h"
|
||||
#include "qt-models/divelocationmodel.h"
|
||||
|
||||
@ -24,7 +25,7 @@ void SetPictureOffset::redo()
|
||||
{
|
||||
picture *pic = dive_get_picture(d, filename);
|
||||
if (!pic) {
|
||||
fprintf(stderr, "SetPictureOffset::redo(): picture disappeared!\n");
|
||||
report_info("SetPictureOffset::redo(): picture disappeared!");
|
||||
return;
|
||||
}
|
||||
std::swap(pic->offset, offset);
|
||||
@ -73,7 +74,7 @@ static std::vector<PictureListForAddition> removePictures(std::vector<PictureLis
|
||||
for (const std::string &fn: list.filenames) {
|
||||
int idx = get_picture_idx(&list.d->pictures, fn.c_str());
|
||||
if (idx < 0) {
|
||||
fprintf(stderr, "removePictures(): picture disappeared!\n");
|
||||
report_info("removePictures(): picture disappeared!");
|
||||
continue; // Huh? We made sure that this can't happen by filtering out non-existent pictures.
|
||||
}
|
||||
filenames.push_back(QString::fromStdString(fn));
|
||||
@ -83,7 +84,7 @@ static std::vector<PictureListForAddition> removePictures(std::vector<PictureLis
|
||||
if (!toAdd.pics.empty())
|
||||
res.push_back(toAdd);
|
||||
invalidate_dive_cache(list.d);
|
||||
emit diveListNotifier.picturesRemoved(list.d, filenames);
|
||||
emit diveListNotifier.picturesRemoved(list.d, std::move(filenames));
|
||||
}
|
||||
picturesToRemove.clear();
|
||||
return res;
|
||||
@ -103,7 +104,7 @@ static std::vector<PictureListForDeletion> addPictures(std::vector<PictureListFo
|
||||
for (const PictureObj &pic: list.pics) {
|
||||
int idx = get_picture_idx(&list.d->pictures, pic.filename.c_str()); // This should *not* already exist!
|
||||
if (idx >= 0) {
|
||||
fprintf(stderr, "addPictures(): picture disappeared!\n");
|
||||
report_info("addPictures(): picture disappeared!");
|
||||
continue; // Huh? We made sure that this can't happen by filtering out existing pictures.
|
||||
}
|
||||
picsForSignal.push_back(pic);
|
||||
@ -113,7 +114,7 @@ static std::vector<PictureListForDeletion> addPictures(std::vector<PictureListFo
|
||||
if (!toRemove.filenames.empty())
|
||||
res.push_back(toRemove);
|
||||
invalidate_dive_cache(list.d);
|
||||
emit diveListNotifier.picturesAdded(list.d, picsForSignal);
|
||||
emit diveListNotifier.picturesAdded(list.d, std::move(picsForSignal));
|
||||
}
|
||||
picturesToAdd.clear();
|
||||
return res;
|
||||
|
||||
@ -4,16 +4,16 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
if(ANDROID)
|
||||
set(PLATFORM_SRC android.cpp serial_usb_android.cpp)
|
||||
else()
|
||||
set(PLATFORM_SRC unix.c)
|
||||
set(PLATFORM_SRC unix.cpp)
|
||||
endif()
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
set(PLATFORM_SRC android.cpp serial_usb_android.cpp)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(PLATFORM_SRC macos.c)
|
||||
set(PLATFORM_SRC macos.cpp)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(PLATFORM_SRC windows.c)
|
||||
set(PLATFORM_SRC windows.cpp)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
|
||||
set(PLATFORM_SRC unix.c)
|
||||
set(PLATFORM_SRC unix.cpp)
|
||||
endif()
|
||||
|
||||
if(FTDISUPPORT)
|
||||
@ -41,7 +41,7 @@ set(SUBSURFACE_CORE_LIB_SRCS
|
||||
checkcloudconnection.h
|
||||
cloudstorage.cpp
|
||||
cloudstorage.h
|
||||
cochran.c
|
||||
cochran.cpp
|
||||
cochran.h
|
||||
color.cpp
|
||||
color.h
|
||||
@ -51,15 +51,15 @@ set(SUBSURFACE_CORE_LIB_SRCS
|
||||
configuredivecomputerthreads.h
|
||||
connectionlistmodel.cpp
|
||||
connectionlistmodel.h
|
||||
datatrak.c
|
||||
datatrak.cpp
|
||||
datatrak.h
|
||||
deco.c
|
||||
deco.cpp
|
||||
deco.h
|
||||
device.cpp
|
||||
device.h
|
||||
devicedetails.cpp
|
||||
devicedetails.h
|
||||
dive.c
|
||||
dive.cpp
|
||||
dive.h
|
||||
divecomputer.c
|
||||
divecomputer.h
|
||||
@ -68,6 +68,8 @@ set(SUBSURFACE_CORE_LIB_SRCS
|
||||
divefilter.h
|
||||
divelist.c
|
||||
divelist.h
|
||||
divelog.cpp
|
||||
divelog.h
|
||||
divelogexportlogic.cpp
|
||||
divelogexportlogic.h
|
||||
divesite-helper.cpp
|
||||
@ -79,13 +81,15 @@ set(SUBSURFACE_CORE_LIB_SRCS
|
||||
downloadfromdcthread.h
|
||||
event.c
|
||||
event.h
|
||||
eventtype.cpp
|
||||
eventtype.h
|
||||
equipment.c
|
||||
equipment.h
|
||||
errorhelper.c
|
||||
errorhelper.cpp
|
||||
exif.cpp
|
||||
exif.h
|
||||
extradata.h
|
||||
file.c
|
||||
file.cpp
|
||||
file.h
|
||||
filterconstraint.cpp
|
||||
filterconstraint.h
|
||||
@ -103,24 +107,24 @@ set(SUBSURFACE_CORE_LIB_SRCS
|
||||
gettext.h
|
||||
gettextfromc.cpp
|
||||
gettextfromc.h
|
||||
git-access.c
|
||||
git-access.cpp
|
||||
git-access.h
|
||||
globals.cpp
|
||||
globals.h
|
||||
imagedownloader.cpp
|
||||
imagedownloader.h
|
||||
import-cobalt.c
|
||||
import-csv.c
|
||||
import-cobalt.cpp
|
||||
import-csv.cpp
|
||||
import-csv.h
|
||||
import-divinglog.c
|
||||
import-shearwater.c
|
||||
import-suunto.c
|
||||
import-seac.c
|
||||
import-divinglog.cpp
|
||||
import-shearwater.cpp
|
||||
import-suunto.cpp
|
||||
import-seac.cpp
|
||||
interpolate.h
|
||||
libdivecomputer.c
|
||||
libdivecomputer.cpp
|
||||
libdivecomputer.h
|
||||
liquivision.c
|
||||
load-git.c
|
||||
liquivision.cpp
|
||||
load-git.cpp
|
||||
membuffer.cpp
|
||||
membuffer.h
|
||||
metadata.cpp
|
||||
@ -128,32 +132,34 @@ set(SUBSURFACE_CORE_LIB_SRCS
|
||||
metrics.cpp
|
||||
metrics.h
|
||||
ostctools.c
|
||||
owning_ptrs.h
|
||||
parse-gpx.cpp
|
||||
parse-xml.c
|
||||
parse.c
|
||||
parse-xml.cpp
|
||||
parse.cpp
|
||||
parse.h
|
||||
picture.c
|
||||
picture.h
|
||||
pictureobj.cpp
|
||||
pictureobj.h
|
||||
planner.c
|
||||
planner.cpp
|
||||
planner.h
|
||||
plannernotes.c
|
||||
plannernotes.cpp
|
||||
pref.h
|
||||
pref.c
|
||||
profile.c
|
||||
profile.cpp
|
||||
profile.h
|
||||
qt-gui.h
|
||||
qt-init.cpp
|
||||
qthelper.cpp
|
||||
qthelper.h
|
||||
sample.c
|
||||
range.h
|
||||
sample.cpp
|
||||
sample.h
|
||||
save-git.c
|
||||
save-html.c
|
||||
save-git.cpp
|
||||
save-html.cpp
|
||||
save-html.h
|
||||
save-profiledata.c
|
||||
save-xml.c
|
||||
save-xml.cpp
|
||||
selection.cpp
|
||||
selection.h
|
||||
sha1.c
|
||||
@ -161,25 +167,26 @@ set(SUBSURFACE_CORE_LIB_SRCS
|
||||
ssrf.h
|
||||
statistics.c
|
||||
statistics.h
|
||||
strndup.h
|
||||
string-format.h
|
||||
string-format.cpp
|
||||
strtod.c
|
||||
subsurface-float.h
|
||||
subsurface-string.cpp
|
||||
subsurface-string.h
|
||||
subsurfacestartup.c
|
||||
subsurfacestartup.cpp
|
||||
subsurfacestartup.h
|
||||
subsurfacesysinfo.cpp
|
||||
subsurfacesysinfo.h
|
||||
tag.c
|
||||
tag.cpp
|
||||
tag.h
|
||||
taxonomy.c
|
||||
taxonomy.h
|
||||
time.c
|
||||
time.cpp
|
||||
timer.c
|
||||
timer.h
|
||||
trip.c
|
||||
trip.h
|
||||
uemis-downloader.c
|
||||
uemis-downloader.cpp
|
||||
uemis.c
|
||||
uemis.h
|
||||
units.h
|
||||
@ -196,7 +203,7 @@ set(SUBSURFACE_CORE_LIB_SRCS
|
||||
windowtitleupdate.cpp
|
||||
windowtitleupdate.h
|
||||
worldmap-options.h
|
||||
worldmap-save.c
|
||||
worldmap-save.cpp
|
||||
worldmap-save.h
|
||||
xmlparams.cpp
|
||||
xmlparams.h
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <zip.h>
|
||||
#include <string>
|
||||
|
||||
#include <QtAndroidExtras/QtAndroidExtras>
|
||||
#include <QtAndroidExtras/QAndroidJniObject>
|
||||
@ -26,9 +27,20 @@
|
||||
#define LOG(x) qDebug() << x;
|
||||
#endif
|
||||
|
||||
|
||||
#define USB_SERVICE "usb"
|
||||
|
||||
static std::string system_default_path()
|
||||
{
|
||||
// Qt appears to find a working path for us - let's just go with that
|
||||
// AppDataLocation allows potential sharing of the files we put there
|
||||
return QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).first().toStdString();
|
||||
}
|
||||
|
||||
static std::string make_default_filename()
|
||||
{
|
||||
return system_default_path() + "/subsurface.xml";
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
const char android_system_divelist_default_font[] = "Roboto";
|
||||
@ -46,35 +58,19 @@ bool subsurface_ignore_font(const char *font)
|
||||
return false;
|
||||
}
|
||||
|
||||
static const char *system_default_path_append(const char *append)
|
||||
{
|
||||
// Qt appears to find a working path for us - let's just go with that
|
||||
// AppDataLocation allows potential sharing of the files we put there
|
||||
QString path = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).first();
|
||||
|
||||
if (append)
|
||||
path += QString("/%1").arg(append);
|
||||
|
||||
return copy_qstring(path);
|
||||
}
|
||||
|
||||
const char *system_default_directory(void)
|
||||
{
|
||||
static const char *path = NULL;
|
||||
if (!path)
|
||||
path = system_default_path_append(NULL);
|
||||
return path;
|
||||
static const std::string path = system_default_path();
|
||||
return path.c_str();
|
||||
}
|
||||
|
||||
const char *system_default_filename(void)
|
||||
{
|
||||
static const char *filename = "subsurface.xml";
|
||||
static const char *path = NULL;
|
||||
if (!path)
|
||||
path = system_default_path_append(filename);
|
||||
return path;
|
||||
static const std::string fn = make_default_filename();
|
||||
return fn.c_str();
|
||||
}
|
||||
|
||||
|
||||
int enumerate_devices(device_callback_t callback, void *userdata, unsigned int transport)
|
||||
{
|
||||
/* FIXME: we need to enumerate in some other way on android */
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
|
||||
#include "btdiscovery.h"
|
||||
#include "downloadfromdcthread.h"
|
||||
#include "core/libdivecomputer.h"
|
||||
#include "libdivecomputer.h"
|
||||
#include "errorhelper.h"
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
#include <QLoggingCategory>
|
||||
#include <QRegularExpression>
|
||||
#include <QElapsedTimer>
|
||||
@ -35,7 +35,9 @@ static struct modelPattern model[] = {
|
||||
{ 0x4654, "Oceanic", "Veo 4.0" },
|
||||
{ 0x4655, "Sherwood", "Wisdom 4" },
|
||||
{ 0x4656, "Oceanic", "Pro Plus 4" },
|
||||
{ 0x4743, "Aqualung", "i470TC" }
|
||||
{ 0x4741, "Apeks", "DSX" },
|
||||
{ 0x4743, "Aqualung", "i470TC" },
|
||||
{ 0x4744, "Aqualung", "i330R" },
|
||||
};
|
||||
|
||||
struct namePattern {
|
||||
@ -60,6 +62,7 @@ static struct namePattern name[] = {
|
||||
{ "NERD 2", "Shearwater", "NERD 2" },
|
||||
{ "NERD", "Shearwater", "NERD" }, // order is important, test for the more specific one first
|
||||
{ "Predator", "Shearwater", "Predator" },
|
||||
{ "Tern", "Shearwater", "Tern" },
|
||||
// Suunto dive computers
|
||||
{ "EON Steel", "Suunto", "EON Steel" },
|
||||
{ "EON Core", "Suunto", "EON Core" },
|
||||
@ -67,9 +70,12 @@ static struct namePattern name[] = {
|
||||
// Scubapro dive computers
|
||||
{ "G2", "Scubapro", "G2" },
|
||||
{ "HUD", "Scubapro", "G2 HUD" },
|
||||
{ "G3", "Scubapro", "G3" },
|
||||
{ "Aladin", "Scubapro", "Aladin Sport Matrix" },
|
||||
{ "A1", "Scubapro", "Aladin A1" },
|
||||
{ "A2", "Scubapro", "Aladin A2" },
|
||||
{ "Luna 2.0 AI", "Scubapro", "Luna 2.0 AI" },
|
||||
{ "Luna 2.0", "Scubapro", "Luna 2.0" },
|
||||
// Mares dive computers
|
||||
{ "Mares Genius", "Mares", "Genius" },
|
||||
{ "Mares", "Mares", "Quad" }, // we actually don't know and just pick a common one - user needs to fix in UI
|
||||
@ -100,19 +106,20 @@ static dc_descriptor_t *getDeviceType(QString btName)
|
||||
else if (btName.mid(4,2) == "2-") product = "OSTC 2N";
|
||||
else if (btName.mid(4,2) == "+ ") product = "OSTC 2";
|
||||
// all BT/BLE enabled OSTCs are HW_FAMILY_OSTC_3, so when we do not know,
|
||||
// just use a default product that allows the codoe to download from the
|
||||
// just use a default product that allows the code to download from the
|
||||
// user's dive computer
|
||||
else product = "OSTC 2";
|
||||
} else if (btName.contains(QRegularExpression("^DS\\d{6}"))) {
|
||||
// The Ratio bluetooth name looks like the Pelagic ones,
|
||||
// but that seems to be just happenstance.
|
||||
vendor = "Ratio";
|
||||
product = "iX3M GPS Easy"; // we don't know which of the GPS models, so set one
|
||||
} else if (btName.contains(QRegularExpression("^IX5M\\d{6}"))) {
|
||||
product = "iX3M 2021 GPS Easy"; // we don't know which of the Bluetooth models, so set one that supports BLE
|
||||
} else if (btName.contains(QRegularExpression("^IX5M\\d{6}")) ||
|
||||
btName.contains(QRegularExpression("^RATIO-\\d{6}"))) {
|
||||
// The 2021 iX3M models (square buttons) report as iX5M,
|
||||
// eventhough the physical model states iX3M.
|
||||
vendor = "Ratio";
|
||||
product = "iX3M GPS Easy"; // we don't know which of the GPS models, so set one
|
||||
product = "iX3M 2021 GPS Easy"; // we don't know which of the Bluetooth models, so set one that supports BLE
|
||||
} else if (btName.contains(QRegularExpression("^[A-Z]{2}\\d{6}"))) {
|
||||
// try the Pelagic/Aqualung name patterns
|
||||
// the source of truth for this data is in libdivecomputer/src/descriptor.c
|
||||
@ -142,11 +149,21 @@ static dc_descriptor_t *getDeviceType(QString btName)
|
||||
// check if we found a known dive computer
|
||||
if (!vendor.isEmpty() && !product.isEmpty()) {
|
||||
dc_descriptor_t *lookup = descriptorLookup.value(vendor.toLower() + product.toLower());
|
||||
if (!lookup)
|
||||
qWarning("known dive computer %s not found in descriptorLookup", qPrintable(QString(vendor + product)));
|
||||
if (!lookup) {
|
||||
// the Ratio dive computers come in BT only or BLE only and we can't tell
|
||||
// which just from the name; so while this is fairly unlikely, the user
|
||||
// could be on an older computer / device that only supports BT and no BLE
|
||||
// and giving the BLE only name might therefore not work, so try the other
|
||||
// one just in case
|
||||
if (vendor == "Ratio" && product == "iX3M 2021 GPS Easy") {
|
||||
product = "iX3M GPS Easy"; // this one is BT only
|
||||
lookup = descriptorLookup.value(vendor.toLower() + product.toLower());
|
||||
}
|
||||
if (!lookup) // still nothing?
|
||||
qWarning("known dive computer %s not found in descriptorLookup", qPrintable(QString(vendor + product)));
|
||||
}
|
||||
return lookup;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -160,7 +177,7 @@ BTDiscovery::BTDiscovery(QObject*) : m_btValid(false),
|
||||
discoveryAgent(nullptr)
|
||||
{
|
||||
if (m_instance) {
|
||||
qDebug() << "trying to create an additional BTDiscovery object";
|
||||
report_info("trying to create an additional BTDiscovery object");
|
||||
return;
|
||||
}
|
||||
m_instance = this;
|
||||
@ -178,11 +195,11 @@ void BTDiscovery::showNonDiveComputers(bool show)
|
||||
void BTDiscovery::BTDiscoveryReDiscover()
|
||||
{
|
||||
#if !defined(Q_OS_IOS)
|
||||
qDebug() << "BTDiscoveryReDiscover: localBtDevice.isValid()" << localBtDevice.isValid();
|
||||
report_info("BTDiscoveryReDiscover: localBtDevice.isValid() %d", localBtDevice.isValid());
|
||||
if (localBtDevice.isValid() &&
|
||||
localBtDevice.hostMode() != QBluetoothLocalDevice::HostPoweredOff) {
|
||||
btPairedDevices.clear();
|
||||
qDebug() << "BTDiscoveryReDiscover: localDevice " + localBtDevice.name() + " is powered on, starting discovery";
|
||||
report_info("BTDiscoveryReDiscover: localDevice %s is powered on, starting discovery", qPrintable(localBtDevice.name()));
|
||||
#else
|
||||
// for iOS we can't use the localBtDevice as iOS is BLE only
|
||||
// we need to find some other way to test if Bluetooth is enabled, though
|
||||
@ -203,13 +220,13 @@ void BTDiscovery::BTDiscoveryReDiscover()
|
||||
connect(discoveryAgent, QOverload<QBluetoothDeviceDiscoveryAgent::Error>::of(&QBluetoothDeviceDiscoveryAgent::error),
|
||||
#endif
|
||||
[this](QBluetoothDeviceDiscoveryAgent::Error error){
|
||||
qDebug() << "device discovery received error" << discoveryAgent->errorString();
|
||||
report_info("device discovery received error %s", qPrintable(discoveryAgent->errorString()));
|
||||
});
|
||||
qDebug() << "discovery methods" << (int)QBluetoothDeviceDiscoveryAgent::supportedDiscoveryMethods();
|
||||
report_info("discovery methods %d", (int)QBluetoothDeviceDiscoveryAgent::supportedDiscoveryMethods());
|
||||
}
|
||||
#if defined(Q_OS_ANDROID)
|
||||
// on Android, we cannot scan for classic devices - we just get the paired ones
|
||||
qDebug() << "starting BLE discovery";
|
||||
report_info("starting BLE discovery");
|
||||
discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
|
||||
getBluetoothDevices();
|
||||
// and add the paired devices to the internal data
|
||||
@ -218,10 +235,10 @@ void BTDiscovery::BTDiscoveryReDiscover()
|
||||
for (int i = 0; i < btPairedDevices.length(); i++)
|
||||
btDeviceDiscoveredMain(btPairedDevices[i], true);
|
||||
#else
|
||||
qDebug() << "starting BT/BLE discovery";
|
||||
report_info("starting BT/BLE discovery");
|
||||
discoveryAgent->start();
|
||||
for (int i = 0; i < btPairedDevices.length(); i++)
|
||||
qDebug() << "Paired =" << btPairedDevices[i].name << btPairedDevices[i].address;
|
||||
report_info("Paired = %s %s", qPrintable( btPairedDevices[i].name), qPrintable(btPairedDevices[i].address));
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_IOS) || (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID))
|
||||
@ -231,7 +248,7 @@ void BTDiscovery::BTDiscoveryReDiscover()
|
||||
timer.start(3000);
|
||||
#endif
|
||||
} else {
|
||||
qDebug() << "localBtDevice isn't valid or not connectable";
|
||||
report_info("localBtDevice isn't valid or not connectable");
|
||||
m_btValid = false;
|
||||
}
|
||||
}
|
||||
@ -274,10 +291,10 @@ QString markBLEAddress(const QBluetoothDeviceInfo *device)
|
||||
|
||||
void BTDiscovery::btDeviceDiscoveryFinished()
|
||||
{
|
||||
qDebug() << "BT/BLE finished discovery";
|
||||
report_info("BT/BLE finished discovery");
|
||||
QList<QBluetoothDeviceInfo> devList = discoveryAgent->discoveredDevices();
|
||||
for (QBluetoothDeviceInfo device: devList) {
|
||||
qDebug() << device.name() << device.address().toString();
|
||||
report_info("%s %s", qPrintable(device.name()), qPrintable(device.address().toString()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,7 +308,7 @@ void BTDiscovery::btDeviceDiscovered(const QBluetoothDeviceInfo &device)
|
||||
const auto serviceUuids = device.serviceUuids();
|
||||
for (QBluetoothUuid id: serviceUuids) {
|
||||
addBtUuid(id);
|
||||
qDebug() << id.toByteArray();
|
||||
report_info("%s", qPrintable(id.toByteArray()));
|
||||
}
|
||||
|
||||
#if defined(Q_OS_IOS) || defined(Q_OS_MACOS) || defined(Q_OS_WIN)
|
||||
@ -320,7 +337,7 @@ void BTDiscovery::btDeviceDiscoveredMain(const btPairedDevice &device, bool from
|
||||
msg = QString("%1 device: '%2' [%3]: ").arg(fromPaired ? "Paired" : "Discovered new").arg(newDevice).arg(device.address);
|
||||
if (newDC) {
|
||||
QString vendor = dc_descriptor_get_vendor(newDC);
|
||||
qDebug() << msg << "this could be a " + vendor;
|
||||
report_info("%s this could be a %s", qPrintable(msg), qPrintable(vendor));
|
||||
btVP.btpdi = device;
|
||||
btVP.dcDescriptor = newDC;
|
||||
btVP.vendorIdx = vendorList.indexOf(vendor);
|
||||
@ -335,7 +352,7 @@ void BTDiscovery::btDeviceDiscoveredMain(const btPairedDevice &device, bool from
|
||||
newDevice += " ";
|
||||
connectionListModel.addAddress(newDevice + device.address);
|
||||
}
|
||||
qDebug() << msg << "not recognized as dive computer";
|
||||
report_info("%s not recognized as dive computer", qPrintable(msg));
|
||||
}
|
||||
|
||||
QList<BTDiscovery::btVendorProduct> BTDiscovery::getBtDcs()
|
||||
@ -390,12 +407,12 @@ void BTDiscovery::getBluetoothDevices()
|
||||
result.address = dev.callObjectMethod("getAddress","()Ljava/lang/String;").toString();
|
||||
result.name = dev.callObjectMethod("getName", "()Ljava/lang/String;").toString();
|
||||
if (btType & 1) { // DEVICE_TYPE_CLASSIC
|
||||
qDebug() << "paired BT classic device type" << btType << "with address" << result.address;
|
||||
report_info("paired BT classic device type %d with address %s", btType, qPrintable(result.address));
|
||||
btPairedDevices.append(result);
|
||||
}
|
||||
if (btType & 2) { // DEVICE_TYPE_LE
|
||||
result.address = QString("LE:%1").arg(result.address);
|
||||
qDebug() << "paired BLE device type" << btType << "with address" << result.address;
|
||||
report_info("paired BLE device type %d with address %s", btType, qPrintable(result.address));
|
||||
btPairedDevices.append(result);
|
||||
}
|
||||
}
|
||||
@ -434,7 +451,7 @@ void BTDiscovery::discoverAddress(QString address)
|
||||
btAddress = extractBluetoothAddress(address);
|
||||
|
||||
if (!btDeviceInfo.keys().contains(address) && !discoveryAgent->isActive()) {
|
||||
qDebug() << "restarting discovery agent";
|
||||
report_info("restarting discovery agent");
|
||||
discoveryAgent->start();
|
||||
}
|
||||
}
|
||||
@ -443,7 +460,7 @@ void BTDiscovery::stopAgent()
|
||||
{
|
||||
if (!discoveryAgent)
|
||||
return;
|
||||
qDebug() << "---> stopping the discovery agent";
|
||||
report_info("---> stopping the discovery agent");
|
||||
discoveryAgent->stop();
|
||||
}
|
||||
|
||||
@ -474,7 +491,7 @@ QString extractBluetoothNameAddress(const QString &address, QString &name)
|
||||
name = m.captured(1).trimmed();
|
||||
return extractedAddress;
|
||||
}
|
||||
qDebug() << "can't parse address" << address;
|
||||
report_info("can't parse address %s", qPrintable(address));
|
||||
return QString();
|
||||
}
|
||||
|
||||
@ -490,7 +507,7 @@ QBluetoothDeviceInfo getBtDeviceInfo(const QString &devaddr)
|
||||
return btDeviceInfo[devaddr];
|
||||
}
|
||||
if(!btDeviceInfo.keys().contains(devaddr)) {
|
||||
qDebug() << "still looking scan is still running, we should just wait for a few moments";
|
||||
report_info("still looking scan is still running, we should just wait for a few moments");
|
||||
// wait for a maximum of 30 more seconds
|
||||
// yes, that seems crazy, but on my Mac I see this take more than 20 seconds
|
||||
QElapsedTimer timer;
|
||||
@ -504,7 +521,7 @@ QBluetoothDeviceInfo getBtDeviceInfo(const QString &devaddr)
|
||||
QThread::msleep(100);
|
||||
} while (timer.elapsed() < 30000);
|
||||
}
|
||||
qDebug() << "notify user that we can't find" << devaddr;
|
||||
report_info("notify user that we can't find %s", qPrintable(devaddr));
|
||||
return QBluetoothDeviceInfo();
|
||||
}
|
||||
#endif // BT_SUPPORT
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
#include "qthelper.h"
|
||||
#include "git-access.h"
|
||||
#include "errorhelper.h"
|
||||
#include "core/format.h"
|
||||
#include "core/subsurface-string.h"
|
||||
#include "core/membuffer.h"
|
||||
#include "core/settings/qPrefCloudStorage.h"
|
||||
@ -34,7 +35,7 @@ CheckCloudConnection::CheckCloudConnection(QObject *parent) :
|
||||
bool CheckCloudConnection::checkServer()
|
||||
{
|
||||
if (verbose)
|
||||
fprintf(stderr, "Checking cloud connection...\n");
|
||||
report_info("Checking cloud connection...");
|
||||
|
||||
QEventLoop loop;
|
||||
QNetworkAccessManager *mgr = new QNetworkAccessManager();
|
||||
@ -42,7 +43,6 @@ bool CheckCloudConnection::checkServer()
|
||||
QNetworkRequest request;
|
||||
request.setRawHeader("Accept", "text/plain");
|
||||
request.setRawHeader("User-Agent", getUserAgent().toUtf8());
|
||||
request.setRawHeader("Client-Id", getUUID().toUtf8());
|
||||
request.setUrl(QString(prefs.cloud_base_url) + TEAPOT);
|
||||
reply = mgr->get(request);
|
||||
QTimer timer;
|
||||
@ -73,10 +73,10 @@ bool CheckCloudConnection::checkServer()
|
||||
}
|
||||
}
|
||||
if (verbose)
|
||||
qDebug() << "connection test to cloud server" << prefs.cloud_base_url << "failed" <<
|
||||
reply->error() << reply->errorString() <<
|
||||
reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() <<
|
||||
reply->readAll();
|
||||
report_info("connection test to cloud server %s failed %d %s %d %s", prefs.cloud_base_url,
|
||||
static_cast<int>(reply->error()), qPrintable(reply->errorString()),
|
||||
reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(),
|
||||
qPrintable(reply->readAll()));
|
||||
} while (nextServer());
|
||||
// if none of the servers was reachable, update the user and switch to git_local_only
|
||||
git_storage_update_progress(qPrintable(tr("Cloud connection failed")));
|
||||
@ -90,9 +90,9 @@ bool CheckCloudConnection::checkServer()
|
||||
|
||||
void CheckCloudConnection::sslErrors(const QList<QSslError> &errorList)
|
||||
{
|
||||
qDebug() << "Received error response trying to set up https connection with cloud storage backend:";
|
||||
report_info("Received error response trying to set up https connection with cloud storage backend:");
|
||||
for (QSslError err: errorList)
|
||||
qDebug() << err.errorString();
|
||||
report_info("%s", qPrintable(err.errorString()));
|
||||
}
|
||||
|
||||
bool CheckCloudConnection::nextServer()
|
||||
@ -103,14 +103,16 @@ bool CheckCloudConnection::nextServer()
|
||||
};
|
||||
static struct serverTried cloudServers[] = {
|
||||
{ CLOUD_HOST_EU, false },
|
||||
{ CLOUD_HOST_US, false }
|
||||
{ CLOUD_HOST_US, false },
|
||||
{ CLOUD_HOST_E2, false },
|
||||
{ CLOUD_HOST_U2, false }
|
||||
};
|
||||
const char *server = nullptr;
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(cloudServers); i++) {
|
||||
if (strstr(prefs.cloud_base_url, cloudServers[i].server))
|
||||
cloudServers[i].tried = true;
|
||||
else if (cloudServers[i].tried == false)
|
||||
server = cloudServers[i].server;
|
||||
for (serverTried &item: cloudServers) {
|
||||
if (strstr(prefs.cloud_base_url, item.server))
|
||||
item.tried = true;
|
||||
else if (item.tried == false)
|
||||
server = item.server;
|
||||
}
|
||||
if (server) {
|
||||
int s = strlen(server);
|
||||
@ -118,12 +120,12 @@ bool CheckCloudConnection::nextServer()
|
||||
strcpy(baseurl, "https://");
|
||||
strncat(baseurl, server, s);
|
||||
strcat(baseurl, "/");
|
||||
qDebug() << "failed to connect to" << prefs.cloud_base_url << "next server to try: " << baseurl;
|
||||
report_info("failed to connect to %s next server to try: %s", prefs.cloud_base_url, baseurl);
|
||||
prefs.cloud_base_url = baseurl;
|
||||
git_storage_update_progress(qPrintable(tr("Trying different cloud server...")));
|
||||
return true;
|
||||
}
|
||||
qDebug() << "failed to connect to any of the Subsurface cloud servers, giving up";
|
||||
report_info("failed to connect to any of the Subsurface cloud servers, giving up");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -142,7 +144,7 @@ void CheckCloudConnection::gotIP(QNetworkReply *reply)
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
// whatever, just use the default host
|
||||
if (verbose)
|
||||
qDebug() << __FUNCTION__ << "got error reply from ip webservice - not changing cloud host";
|
||||
report_info("%s got error reply from ip webservice - not changing cloud host", __func__);
|
||||
return;
|
||||
}
|
||||
QString addressString = reply->readAll();
|
||||
@ -152,11 +154,11 @@ void CheckCloudConnection::gotIP(QNetworkReply *reply)
|
||||
if (addr.isNull()) {
|
||||
// this isn't an address, don't try to update the cloud host
|
||||
if (verbose)
|
||||
qDebug() << __FUNCTION__ << "returned address doesn't appear to be valid (" << addressString << ") - not changing cloud host";
|
||||
report_info("%s returned address doesn't appear to be valid (%s) - not changing cloud host", __func__, qPrintable(addressString));
|
||||
return;
|
||||
}
|
||||
if (verbose)
|
||||
qDebug() << "IP used for cloud server access" << addressString;
|
||||
report_info("IP used for cloud server access %s", qPrintable(addressString));
|
||||
// now figure out which continent we are on
|
||||
QNetworkRequest request(QString(GET_CONTINENT_API).arg(addressString));
|
||||
request.setRawHeader("Accept", "text/plain");
|
||||
@ -171,7 +173,7 @@ void CheckCloudConnection::gotContinent(QNetworkReply *reply)
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
// whatever, just use the default host
|
||||
if (verbose)
|
||||
qDebug() << __FUNCTION__ << "got error reply from ip location webservice - not changing cloud host";
|
||||
report_info("%s got error reply from ip location webservice - not changing cloud host", __func__);
|
||||
return;
|
||||
}
|
||||
QString continentString = reply->readAll();
|
||||
@ -192,7 +194,7 @@ void CheckCloudConnection::gotContinent(QNetworkReply *reply)
|
||||
base_url = "https://" CLOUD_HOST_EU "/";
|
||||
if (!same_string(base_url, prefs.cloud_base_url)) {
|
||||
if (verbose)
|
||||
qDebug() << "remember cloud server" << base_url << "based on IP location in " << continentString;
|
||||
report_info("remember cloud server %s based on IP location in %s", base_url, qPrintable(continentString));
|
||||
qPrefCloudStorage::instance()->store_cloud_base_url(base_url);
|
||||
}
|
||||
}
|
||||
@ -201,17 +203,18 @@ void CheckCloudConnection::gotContinent(QNetworkReply *reply)
|
||||
extern "C" bool canReachCloudServer(struct git_info *info)
|
||||
{
|
||||
if (verbose)
|
||||
qWarning() << "Cloud storage: checking connection to cloud server" << info->url;
|
||||
qWarning() << "Cloud storage: checking connection to cloud server" << info->url.c_str();
|
||||
bool connection = CheckCloudConnection().checkServer();
|
||||
if (strstr(info->url, prefs.cloud_base_url) == nullptr) {
|
||||
if (info->url.find(prefs.cloud_base_url) == std::string::npos) {
|
||||
// we switched the cloud URL - likely because we couldn't reach the server passed in
|
||||
// the strstr with the offset is designed so we match the right component in the name;
|
||||
// the cloud_base_url ends with a '/', so we need the text starting at "git/..."
|
||||
char *newremote = format_string("%s%s", prefs.cloud_base_url, strstr(info->url, "org/git/") + 4);
|
||||
if (verbose)
|
||||
qDebug() << "updating remote to: " << newremote;
|
||||
free((void*)info->url);
|
||||
info->url = newremote;
|
||||
size_t pos = info->url.find("org/git/");
|
||||
if (pos != std::string::npos) {
|
||||
info->url = format_string_std("%s%s", prefs.cloud_base_url, info->url.c_str() + pos + 4);
|
||||
if (verbose)
|
||||
report_info("updating remote to: %s", info->url.c_str());
|
||||
}
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@ CloudStorageAuthenticate::CloudStorageAuthenticate(QObject *parent) :
|
||||
#define CLOUDBACKENDSTORAGE CLOUDURL + "/storage"
|
||||
#define CLOUDBACKENDVERIFY CLOUDURL + "/verify"
|
||||
#define CLOUDBACKENDUPDATE CLOUDURL + "/update"
|
||||
#define CLOUDBACKENDDELETE CLOUDURL + "/delete-account"
|
||||
|
||||
QNetworkReply* CloudStorageAuthenticate::backend(const QString& email,const QString& password,const QString& pin,const QString& newpasswd)
|
||||
{
|
||||
@ -50,26 +51,53 @@ QNetworkReply* CloudStorageAuthenticate::backend(const QString& email,const QStr
|
||||
return reply;
|
||||
}
|
||||
|
||||
QNetworkReply* CloudStorageAuthenticate::deleteAccount(const QString& email, const QString& password)
|
||||
{
|
||||
QString payload(email + QChar(' ') + password);
|
||||
QNetworkRequest *request = new QNetworkRequest(QUrl(CLOUDBACKENDDELETE));
|
||||
request->setRawHeader("Accept", "text/xml, text/plain");
|
||||
request->setRawHeader("User-Agent", userAgent.toUtf8());
|
||||
request->setHeader(QNetworkRequest::ContentTypeHeader, "text/plain");
|
||||
reply = manager()->post(*request, qPrintable(payload));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
connect(reply, &QNetworkReply::finished, this, &CloudStorageAuthenticate::deleteFinished);
|
||||
connect(reply, &QNetworkReply::sslErrors, this, &CloudStorageAuthenticate::sslErrors);
|
||||
connect(reply, &QNetworkReply::errorOccurred, this, &CloudStorageAuthenticate::uploadError);
|
||||
#else
|
||||
connect(reply, SIGNAL(finished()), this, SLOT(deleteFinished()));
|
||||
connect(reply, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(sslErrors(QList<QSslError>)));
|
||||
connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this,
|
||||
SLOT(uploadError(QNetworkReply::NetworkError)));
|
||||
#endif
|
||||
return reply;
|
||||
}
|
||||
|
||||
void CloudStorageAuthenticate::deleteFinished()
|
||||
{
|
||||
std::string cloudAuthReply = reply->readAll().toStdString();
|
||||
report_info("Completed connection with cloud storage backend, response %s", cloudAuthReply.c_str());
|
||||
emit finishedDelete();
|
||||
}
|
||||
|
||||
void CloudStorageAuthenticate::uploadFinished()
|
||||
{
|
||||
static QString myLastError;
|
||||
static std::string myLastError;
|
||||
|
||||
QString cloudAuthReply(reply->readAll());
|
||||
qDebug() << "Completed connection with cloud storage backend, response" << cloudAuthReply;
|
||||
std::string cloudAuthReply = reply->readAll().toStdString();
|
||||
report_info("Completed connection with cloud storage backend, response %s", cloudAuthReply.c_str());
|
||||
|
||||
if (cloudAuthReply == QLatin1String("[VERIFIED]") || cloudAuthReply == QLatin1String("[OK]")) {
|
||||
if (cloudAuthReply == "[VERIFIED]" || cloudAuthReply == "[OK]") {
|
||||
qPrefCloudStorage::set_cloud_verification_status(qPrefCloudStorage::CS_VERIFIED);
|
||||
/* TODO: Move this to a correct place
|
||||
NotificationWidget *nw = MainWindow::instance()->getNotificationWidget();
|
||||
if (nw->getNotificationText() == myLastError)
|
||||
if (nw->getNotificationText().toStdString() == myLastError)
|
||||
nw->hideNotification();
|
||||
*/
|
||||
myLastError.clear();
|
||||
} else if (cloudAuthReply == QLatin1String("[VERIFY]") ||
|
||||
cloudAuthReply == QLatin1String("Invalid PIN")) {
|
||||
} else if (cloudAuthReply == "[VERIFY]" || cloudAuthReply == "Invalid PIN") {
|
||||
qPrefCloudStorage::set_cloud_verification_status(qPrefCloudStorage::CS_NEED_TO_VERIFY);
|
||||
report_error(qPrintable(tr("Cloud account verification required, enter PIN in preferences")));
|
||||
} else if (cloudAuthReply == QLatin1String("[PASSWDCHANGED]")) {
|
||||
report_error("%s", qPrintable(tr("Cloud account verification required, enter PIN in preferences")));
|
||||
} else if (cloudAuthReply == "[PASSWDCHANGED]") {
|
||||
qPrefCloudStorage::set_cloud_storage_password(cloudNewPassword);
|
||||
cloudNewPassword.clear();
|
||||
emit passwordChangeSuccessful();
|
||||
@ -77,28 +105,28 @@ void CloudStorageAuthenticate::uploadFinished()
|
||||
} else {
|
||||
qPrefCloudStorage::set_cloud_verification_status(qPrefCloudStorage::CS_INCORRECT_USER_PASSWD);
|
||||
myLastError = cloudAuthReply;
|
||||
report_error("%s", qPrintable(cloudAuthReply));
|
||||
report_error("%s", cloudAuthReply.c_str());
|
||||
}
|
||||
emit finishedAuthenticate();
|
||||
}
|
||||
|
||||
void CloudStorageAuthenticate::uploadError(QNetworkReply::NetworkError)
|
||||
{
|
||||
qDebug() << "Received error response from cloud storage backend:" << reply->errorString();
|
||||
report_info("Received error response from cloud storage backend: %s", qPrintable(reply->errorString()));
|
||||
}
|
||||
|
||||
void CloudStorageAuthenticate::sslErrors(const QList<QSslError> &errorList)
|
||||
{
|
||||
if (verbose) {
|
||||
qDebug() << "Received error response trying to set up https connection with cloud storage backend:";
|
||||
report_info("Received error response trying to set up https connection with cloud storage backend:");
|
||||
for (QSslError err: errorList) {
|
||||
qDebug() << err.errorString();
|
||||
report_info("%s", qPrintable(err.errorString()));
|
||||
}
|
||||
}
|
||||
QSslConfiguration conf = reply->sslConfiguration();
|
||||
QSslCertificate cert = conf.peerCertificate();
|
||||
QByteArray hexDigest = cert.digest().toHex();
|
||||
qDebug() << "got invalid SSL certificate with hex digest" << hexDigest;
|
||||
report_info("got invalid SSL certificate with hex digest %s", qPrintable(hexDigest));
|
||||
}
|
||||
|
||||
QNetworkAccessManager *manager()
|
||||
|
||||
@ -9,15 +9,18 @@ class CloudStorageAuthenticate : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QNetworkReply* backend(const QString& email,const QString& password,const QString& pin = QString(),const QString& newpasswd = QString());
|
||||
QNetworkReply* deleteAccount(const QString& email, const QString &passwd);
|
||||
explicit CloudStorageAuthenticate(QObject *parent);
|
||||
signals:
|
||||
void finishedAuthenticate();
|
||||
void finishedDelete();
|
||||
void passwordChangeSuccessful();
|
||||
private
|
||||
slots:
|
||||
void uploadError(QNetworkReply::NetworkError error);
|
||||
void sslErrors(const QList<QSslError> &errorList);
|
||||
void uploadFinished();
|
||||
void deleteFinished();
|
||||
private:
|
||||
QNetworkReply *reply;
|
||||
QString userAgent;
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include "gettext.h"
|
||||
#include "cochran.h"
|
||||
#include "divelist.h"
|
||||
#include "divelog.h"
|
||||
|
||||
#include <libdivecomputer/parser.h>
|
||||
|
||||
@ -206,7 +207,7 @@ static void cochran_debug_sample(const char *s, unsigned int sample_cnt)
|
||||
static void cochran_parse_header(const unsigned char *decode, unsigned mod,
|
||||
const unsigned char *in, unsigned size)
|
||||
{
|
||||
unsigned char *buf = malloc(size);
|
||||
unsigned char *buf = (unsigned char *)malloc(size);
|
||||
|
||||
/* Do the "null decode" using a one-byte decode array of '\0' */
|
||||
/* Copies in plaintext, will be overwritten later */
|
||||
@ -440,7 +441,7 @@ static void cochran_parse_samples(struct dive *dive, const unsigned char *log,
|
||||
const unsigned char *s;
|
||||
unsigned int offset = 0, profile_period = 1, sample_cnt = 0;
|
||||
double depth = 0, temp = 0, depth_sample = 0, psi = 0, sgc_rate = 0;
|
||||
int ascent_rate = 0;
|
||||
//int ascent_rate = 0;
|
||||
unsigned int ndl = 0;
|
||||
unsigned int in_deco = 0, deco_ceiling = 0, deco_time = 0;
|
||||
|
||||
@ -516,8 +517,8 @@ static void cochran_parse_samples(struct dive *dive, const unsigned char *log,
|
||||
switch (config.type) {
|
||||
case TYPE_COMMANDER:
|
||||
switch (sample_cnt % 2) {
|
||||
case 0: // Ascent rate
|
||||
ascent_rate = (s[1] & 0x7f) * (s[1] & 0x80 ? 1: -1);
|
||||
case 0: // Ascent rate (unused)
|
||||
//ascent_rate = (s[1] & 0x7f) * (s[1] & 0x80 ? 1: -1);
|
||||
break;
|
||||
case 1: // Temperature
|
||||
temp = s[1] / 2 + 20;
|
||||
@ -527,8 +528,8 @@ static void cochran_parse_samples(struct dive *dive, const unsigned char *log,
|
||||
case TYPE_GEMINI:
|
||||
// Gemini with tank pressure and SAC rate.
|
||||
switch (sample_cnt % 4) {
|
||||
case 0: // Ascent rate
|
||||
ascent_rate = (s[1] & 0x7f) * (s[1] & 0x80 ? 1 : -1);
|
||||
case 0: // Ascent rate (unused)
|
||||
//ascent_rate = (s[1] & 0x7f) * (s[1] & 0x80 ? 1 : -1);
|
||||
break;
|
||||
case 2: // PSI change
|
||||
psi -= (double)(s[1] & 0x7f) * (s[1] & 0x80 ? 1 : -1) / 4;
|
||||
@ -543,8 +544,8 @@ static void cochran_parse_samples(struct dive *dive, const unsigned char *log,
|
||||
break;
|
||||
case TYPE_EMC:
|
||||
switch (sample_cnt % 2) {
|
||||
case 0: // Ascent rate
|
||||
ascent_rate = (s[1] & 0x7f) * (s[1] & 0x80 ? 1: -1);
|
||||
case 0: // Ascent rate (unused)
|
||||
//ascent_rate = (s[1] & 0x7f) * (s[1] & 0x80 ? 1: -1);
|
||||
break;
|
||||
case 1: // Temperature
|
||||
temp = (double)s[1] / 2 + 20;
|
||||
@ -596,7 +597,6 @@ static void cochran_parse_samples(struct dive *dive, const unsigned char *log,
|
||||
offset += config.sample_size;
|
||||
sample_cnt++;
|
||||
}
|
||||
UNUSED(ascent_rate); // mark the variable as unused
|
||||
|
||||
if (sample_cnt > 0)
|
||||
*duration = sample_cnt * profile_period - 1;
|
||||
@ -606,7 +606,7 @@ static void cochran_parse_dive(const unsigned char *decode, unsigned mod,
|
||||
const unsigned char *in, unsigned size,
|
||||
struct dive_table *table)
|
||||
{
|
||||
unsigned char *buf = malloc(size);
|
||||
unsigned char *buf = (unsigned char *)malloc(size);
|
||||
struct dive *dive;
|
||||
struct divecomputer *dc;
|
||||
struct tm tm = {0};
|
||||
@ -711,9 +711,9 @@ static void cochran_parse_dive(const unsigned char *decode, unsigned mod,
|
||||
dc->duration.seconds = (log[CMD_BT] + log[CMD_BT + 1] * 256) * 60;
|
||||
dc->surfacetime.seconds = (log[CMD_SIT] + log[CMD_SIT + 1] * 256) * 60;
|
||||
dc->maxdepth.mm = lrint((log[CMD_MAX_DEPTH] +
|
||||
log[CMD_MAX_DEPTH + 1] * 256) / 4 * FEET * 1000);
|
||||
log[CMD_MAX_DEPTH + 1] * 256) / 4.0 * FEET * 1000);
|
||||
dc->meandepth.mm = lrint((log[CMD_AVG_DEPTH] +
|
||||
log[CMD_AVG_DEPTH + 1] * 256) / 4 * FEET * 1000);
|
||||
log[CMD_AVG_DEPTH + 1] * 256) / 4.0 * FEET * 1000);
|
||||
dc->watertemp.mkelvin = F_to_mkelvin(log[CMD_MIN_TEMP]);
|
||||
dc->surface_pressure.mbar = lrint(ATM / BAR * pow(1 - 0.0000225577
|
||||
* (double) log[CMD_ALTITUDE] * 250 * FEET, 5.25588) * 1000);
|
||||
@ -757,9 +757,9 @@ static void cochran_parse_dive(const unsigned char *decode, unsigned mod,
|
||||
dc->duration.seconds = (log[EMC_BT] + log[EMC_BT + 1] * 256) * 60;
|
||||
dc->surfacetime.seconds = (log[EMC_SIT] + log[EMC_SIT + 1] * 256) * 60;
|
||||
dc->maxdepth.mm = lrint((log[EMC_MAX_DEPTH] +
|
||||
log[EMC_MAX_DEPTH + 1] * 256) / 4 * FEET * 1000);
|
||||
log[EMC_MAX_DEPTH + 1] * 256) / 4.0 * FEET * 1000);
|
||||
dc->meandepth.mm = lrint((log[EMC_AVG_DEPTH] +
|
||||
log[EMC_AVG_DEPTH + 1] * 256) / 4 * FEET * 1000);
|
||||
log[EMC_AVG_DEPTH + 1] * 256) / 4.0 * FEET * 1000);
|
||||
dc->watertemp.mkelvin = F_to_mkelvin(log[EMC_MIN_TEMP]);
|
||||
dc->surface_pressure.mbar = lrint(ATM / BAR * pow(1 - 0.0000225577
|
||||
* (double) log[EMC_ALTITUDE] * 250 * FEET, 5.25588) * 1000);
|
||||
@ -799,28 +799,25 @@ static void cochran_parse_dive(const unsigned char *decode, unsigned mod,
|
||||
free(buf);
|
||||
}
|
||||
|
||||
int try_to_open_cochran(const char *filename, struct memblock *mem, struct dive_table *table, struct trip_table *trips, struct dive_site_table *sites)
|
||||
int try_to_open_cochran(const char *, std::string &mem, struct divelog *log)
|
||||
{
|
||||
UNUSED(filename);
|
||||
UNUSED(trips);
|
||||
UNUSED(sites);
|
||||
unsigned int i;
|
||||
unsigned int mod;
|
||||
unsigned int *offsets, dive1, dive2;
|
||||
unsigned char *decode = mem->buffer + 0x40001;
|
||||
unsigned char *decode = (unsigned char *)mem.data() + 0x40001;
|
||||
|
||||
if (mem->size < 0x40000)
|
||||
if (mem.size() < 0x40000)
|
||||
return 0;
|
||||
|
||||
offsets = (unsigned int *) mem->buffer;
|
||||
offsets = (unsigned int *) mem.data();
|
||||
dive1 = offsets[0];
|
||||
dive2 = offsets[1];
|
||||
|
||||
if (dive1 < 0x40000 || dive2 < dive1 || dive2 > mem->size)
|
||||
if (dive1 < 0x40000 || dive2 < dive1 || dive2 > mem.size())
|
||||
return 0;
|
||||
|
||||
mod = decode[0x100] + 1;
|
||||
cochran_parse_header(decode, mod, mem->buffer + 0x40000, dive1 - 0x40000);
|
||||
cochran_parse_header(decode, mod, (unsigned char *)mem.data() + 0x40000, dive1 - 0x40000);
|
||||
|
||||
// Decode each dive
|
||||
for (i = 0; i < 65534; i++) {
|
||||
@ -828,11 +825,11 @@ int try_to_open_cochran(const char *filename, struct memblock *mem, struct dive_
|
||||
dive2 = offsets[i + 1];
|
||||
if (dive2 < dive1)
|
||||
break;
|
||||
if (dive2 > mem->size)
|
||||
if (dive2 > mem.size())
|
||||
break;
|
||||
|
||||
cochran_parse_dive(decode, mod, mem->buffer + dive1,
|
||||
dive2 - dive1, table);
|
||||
cochran_parse_dive(decode, mod, (unsigned char *)mem.data() + dive1,
|
||||
dive2 - dive1, log->dives);
|
||||
}
|
||||
|
||||
return 1; // no further processing needed
|
||||
@ -41,7 +41,7 @@ void ConfigureDiveComputer::readSettings(device_data_t *data)
|
||||
readThread->start();
|
||||
}
|
||||
|
||||
void ConfigureDiveComputer::saveDeviceDetails(DeviceDetails *details, device_data_t *data)
|
||||
void ConfigureDiveComputer::saveDeviceDetails(const DeviceDetails &details, device_data_t *data)
|
||||
{
|
||||
setState(WRITING);
|
||||
|
||||
@ -65,7 +65,7 @@ static QString writeGasDetails(gas g)
|
||||
}).join(QLatin1Char(','));
|
||||
}
|
||||
|
||||
bool ConfigureDiveComputer::saveXMLBackup(QString fileName, DeviceDetails *details, device_data_t *data)
|
||||
bool ConfigureDiveComputer::saveXMLBackup(const QString &fileName, const DeviceDetails &details, device_data_t *data)
|
||||
{
|
||||
QString xml = "";
|
||||
QString vendor = data->vendor;
|
||||
@ -80,37 +80,37 @@ bool ConfigureDiveComputer::saveXMLBackup(QString fileName, DeviceDetails *detai
|
||||
writer.writeTextElement("Product", product);
|
||||
writer.writeEndElement();
|
||||
writer.writeStartElement("Settings");
|
||||
writer.writeTextElement("CustomText", details->customText);
|
||||
writer.writeTextElement("CustomText", details.customText);
|
||||
//Add gasses
|
||||
writer.writeTextElement("Gas1", writeGasDetails(details->gas1));
|
||||
writer.writeTextElement("Gas2", writeGasDetails(details->gas2));
|
||||
writer.writeTextElement("Gas3", writeGasDetails(details->gas3));
|
||||
writer.writeTextElement("Gas4", writeGasDetails(details->gas4));
|
||||
writer.writeTextElement("Gas5", writeGasDetails(details->gas5));
|
||||
writer.writeTextElement("Gas1", writeGasDetails(details.gas1));
|
||||
writer.writeTextElement("Gas2", writeGasDetails(details.gas2));
|
||||
writer.writeTextElement("Gas3", writeGasDetails(details.gas3));
|
||||
writer.writeTextElement("Gas4", writeGasDetails(details.gas4));
|
||||
writer.writeTextElement("Gas5", writeGasDetails(details.gas5));
|
||||
//
|
||||
//Add dil values
|
||||
writer.writeTextElement("Dil1", writeGasDetails(details->dil1));
|
||||
writer.writeTextElement("Dil2", writeGasDetails(details->dil2));
|
||||
writer.writeTextElement("Dil3", writeGasDetails(details->dil3));
|
||||
writer.writeTextElement("Dil4", writeGasDetails(details->dil4));
|
||||
writer.writeTextElement("Dil5", writeGasDetails(details->dil5));
|
||||
writer.writeTextElement("Dil1", writeGasDetails(details.dil1));
|
||||
writer.writeTextElement("Dil2", writeGasDetails(details.dil2));
|
||||
writer.writeTextElement("Dil3", writeGasDetails(details.dil3));
|
||||
writer.writeTextElement("Dil4", writeGasDetails(details.dil4));
|
||||
writer.writeTextElement("Dil5", writeGasDetails(details.dil5));
|
||||
|
||||
//Add setpoint values
|
||||
QString sp1 = QString("%1,%2")
|
||||
.arg(QString::number(details->sp1.sp),
|
||||
QString::number(details->sp1.depth));
|
||||
.arg(QString::number(details.sp1.sp),
|
||||
QString::number(details.sp1.depth));
|
||||
QString sp2 = QString("%1,%2")
|
||||
.arg(QString::number(details->sp2.sp),
|
||||
QString::number(details->sp2.depth));
|
||||
.arg(QString::number(details.sp2.sp),
|
||||
QString::number(details.sp2.depth));
|
||||
QString sp3 = QString("%1,%2")
|
||||
.arg(QString::number(details->sp3.sp),
|
||||
QString::number(details->sp3.depth));
|
||||
.arg(QString::number(details.sp3.sp),
|
||||
QString::number(details.sp3.depth));
|
||||
QString sp4 = QString("%1,%2")
|
||||
.arg(QString::number(details->sp4.sp),
|
||||
QString::number(details->sp4.depth));
|
||||
.arg(QString::number(details.sp4.sp),
|
||||
QString::number(details.sp4.depth));
|
||||
QString sp5 = QString("%1,%2")
|
||||
.arg(QString::number(details->sp5.sp),
|
||||
QString::number(details->sp5.depth));
|
||||
.arg(QString::number(details.sp5.sp),
|
||||
QString::number(details.sp5.depth));
|
||||
writer.writeTextElement("SetPoint1", sp1);
|
||||
writer.writeTextElement("SetPoint2", sp2);
|
||||
writer.writeTextElement("SetPoint3", sp3);
|
||||
@ -118,60 +118,60 @@ bool ConfigureDiveComputer::saveXMLBackup(QString fileName, DeviceDetails *detai
|
||||
writer.writeTextElement("SetPoint5", sp5);
|
||||
|
||||
//Other Settings
|
||||
writer.writeTextElement("DiveMode", QString::number(details->diveMode));
|
||||
writer.writeTextElement("Saturation", QString::number(details->saturation));
|
||||
writer.writeTextElement("Desaturation", QString::number(details->desaturation));
|
||||
writer.writeTextElement("LastDeco", QString::number(details->lastDeco));
|
||||
writer.writeTextElement("Brightness", QString::number(details->brightness));
|
||||
writer.writeTextElement("Units", QString::number(details->units));
|
||||
writer.writeTextElement("SamplingRate", QString::number(details->samplingRate));
|
||||
writer.writeTextElement("Salinity", QString::number(details->salinity));
|
||||
writer.writeTextElement("DiveModeColor", QString::number(details->diveModeColor));
|
||||
writer.writeTextElement("Language", QString::number(details->language));
|
||||
writer.writeTextElement("DateFormat", QString::number(details->dateFormat));
|
||||
writer.writeTextElement("CompassGain", QString::number(details->compassGain));
|
||||
writer.writeTextElement("SafetyStop", QString::number(details->safetyStop));
|
||||
writer.writeTextElement("GfHigh", QString::number(details->gfHigh));
|
||||
writer.writeTextElement("GfLow", QString::number(details->gfLow));
|
||||
writer.writeTextElement("PressureSensorOffset", QString::number(details->pressureSensorOffset));
|
||||
writer.writeTextElement("PpO2Min", QString::number(details->ppO2Min));
|
||||
writer.writeTextElement("PpO2Max", QString::number(details->ppO2Max));
|
||||
writer.writeTextElement("FutureTTS", QString::number(details->futureTTS));
|
||||
writer.writeTextElement("CcrMode", QString::number(details->ccrMode));
|
||||
writer.writeTextElement("DecoType", QString::number(details->decoType));
|
||||
writer.writeTextElement("AGFSelectable", QString::number(details->aGFSelectable));
|
||||
writer.writeTextElement("AGFHigh", QString::number(details->aGFHigh));
|
||||
writer.writeTextElement("AGFLow", QString::number(details->aGFLow));
|
||||
writer.writeTextElement("CalibrationGas", QString::number(details->calibrationGas));
|
||||
writer.writeTextElement("FlipScreen", QString::number(details->flipScreen));
|
||||
writer.writeTextElement("SetPointFallback", QString::number(details->setPointFallback));
|
||||
writer.writeTextElement("LeftButtonSensitivity", QString::number(details->leftButtonSensitivity));
|
||||
writer.writeTextElement("RightButtonSensitivity", QString::number(details->rightButtonSensitivity));
|
||||
writer.writeTextElement("BottomGasConsumption", QString::number(details->bottomGasConsumption));
|
||||
writer.writeTextElement("DecoGasConsumption", QString::number(details->decoGasConsumption));
|
||||
writer.writeTextElement("ModWarning", QString::number(details->modWarning));
|
||||
writer.writeTextElement("DynamicAscendRate", QString::number(details->dynamicAscendRate));
|
||||
writer.writeTextElement("GraphicalSpeedIndicator", QString::number(details->graphicalSpeedIndicator));
|
||||
writer.writeTextElement("AlwaysShowppO2", QString::number(details->alwaysShowppO2));
|
||||
writer.writeTextElement("DiveMode", QString::number(details.diveMode));
|
||||
writer.writeTextElement("Saturation", QString::number(details.saturation));
|
||||
writer.writeTextElement("Desaturation", QString::number(details.desaturation));
|
||||
writer.writeTextElement("LastDeco", QString::number(details.lastDeco));
|
||||
writer.writeTextElement("Brightness", QString::number(details.brightness));
|
||||
writer.writeTextElement("Units", QString::number(details.units));
|
||||
writer.writeTextElement("SamplingRate", QString::number(details.samplingRate));
|
||||
writer.writeTextElement("Salinity", QString::number(details.salinity));
|
||||
writer.writeTextElement("DiveModeColor", QString::number(details.diveModeColor));
|
||||
writer.writeTextElement("Language", QString::number(details.language));
|
||||
writer.writeTextElement("DateFormat", QString::number(details.dateFormat));
|
||||
writer.writeTextElement("CompassGain", QString::number(details.compassGain));
|
||||
writer.writeTextElement("SafetyStop", QString::number(details.safetyStop));
|
||||
writer.writeTextElement("GfHigh", QString::number(details.gfHigh));
|
||||
writer.writeTextElement("GfLow", QString::number(details.gfLow));
|
||||
writer.writeTextElement("PressureSensorOffset", QString::number(details.pressureSensorOffset));
|
||||
writer.writeTextElement("PpO2Min", QString::number(details.ppO2Min));
|
||||
writer.writeTextElement("PpO2Max", QString::number(details.ppO2Max));
|
||||
writer.writeTextElement("FutureTTS", QString::number(details.futureTTS));
|
||||
writer.writeTextElement("CcrMode", QString::number(details.ccrMode));
|
||||
writer.writeTextElement("DecoType", QString::number(details.decoType));
|
||||
writer.writeTextElement("AGFSelectable", QString::number(details.aGFSelectable));
|
||||
writer.writeTextElement("AGFHigh", QString::number(details.aGFHigh));
|
||||
writer.writeTextElement("AGFLow", QString::number(details.aGFLow));
|
||||
writer.writeTextElement("CalibrationGas", QString::number(details.calibrationGas));
|
||||
writer.writeTextElement("FlipScreen", QString::number(details.flipScreen));
|
||||
writer.writeTextElement("SetPointFallback", QString::number(details.setPointFallback));
|
||||
writer.writeTextElement("LeftButtonSensitivity", QString::number(details.leftButtonSensitivity));
|
||||
writer.writeTextElement("RightButtonSensitivity", QString::number(details.rightButtonSensitivity));
|
||||
writer.writeTextElement("BottomGasConsumption", QString::number(details.bottomGasConsumption));
|
||||
writer.writeTextElement("DecoGasConsumption", QString::number(details.decoGasConsumption));
|
||||
writer.writeTextElement("ModWarning", QString::number(details.modWarning));
|
||||
writer.writeTextElement("DynamicAscendRate", QString::number(details.dynamicAscendRate));
|
||||
writer.writeTextElement("GraphicalSpeedIndicator", QString::number(details.graphicalSpeedIndicator));
|
||||
writer.writeTextElement("AlwaysShowppO2", QString::number(details.alwaysShowppO2));
|
||||
|
||||
// Suunto vyper settings.
|
||||
writer.writeTextElement("Altitude", QString::number(details->altitude));
|
||||
writer.writeTextElement("PersonalSafety", QString::number(details->personalSafety));
|
||||
writer.writeTextElement("TimeFormat", QString::number(details->timeFormat));
|
||||
writer.writeTextElement("Altitude", QString::number(details.altitude));
|
||||
writer.writeTextElement("PersonalSafety", QString::number(details.personalSafety));
|
||||
writer.writeTextElement("TimeFormat", QString::number(details.timeFormat));
|
||||
|
||||
writer.writeStartElement("Light");
|
||||
writer.writeAttribute("enabled", QString::number(details->lightEnabled));
|
||||
writer.writeCharacters(QString::number(details->light));
|
||||
writer.writeAttribute("enabled", QString::number(details.lightEnabled));
|
||||
writer.writeCharacters(QString::number(details.light));
|
||||
writer.writeEndElement();
|
||||
|
||||
writer.writeStartElement("AlarmTime");
|
||||
writer.writeAttribute("enabled", QString::number(details->alarmTimeEnabled));
|
||||
writer.writeCharacters(QString::number(details->alarmTime));
|
||||
writer.writeAttribute("enabled", QString::number(details.alarmTimeEnabled));
|
||||
writer.writeCharacters(QString::number(details.alarmTime));
|
||||
writer.writeEndElement();
|
||||
|
||||
writer.writeStartElement("AlarmDepth");
|
||||
writer.writeAttribute("enabled", QString::number(details->alarmDepthEnabled));
|
||||
writer.writeCharacters(QString::number(details->alarmDepth));
|
||||
writer.writeAttribute("enabled", QString::number(details.alarmDepthEnabled));
|
||||
writer.writeCharacters(QString::number(details.alarmDepth));
|
||||
writer.writeEndElement();
|
||||
|
||||
writer.writeEndElement();
|
||||
@ -192,7 +192,7 @@ bool ConfigureDiveComputer::saveXMLBackup(QString fileName, DeviceDetails *detai
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *details)
|
||||
bool ConfigureDiveComputer::restoreXMLBackup(const QString &fileName, DeviceDetails &details)
|
||||
{
|
||||
QFile file(fileName);
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
@ -211,7 +211,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
QString keyString = reader.text().toString();
|
||||
|
||||
if (settingName == "CustomText")
|
||||
details->customText = keyString;
|
||||
details.customText = keyString;
|
||||
|
||||
if (settingName == "Gas1") {
|
||||
QStringList gasData = keyString.split(",");
|
||||
@ -220,7 +220,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
gas1.helium = gasData.at(1).toInt();
|
||||
gas1.type = gasData.at(2).toInt();
|
||||
gas1.depth = gasData.at(3).toInt();
|
||||
details->gas1 = gas1;
|
||||
details.gas1 = gas1;
|
||||
}
|
||||
|
||||
if (settingName == "Gas2") {
|
||||
@ -230,7 +230,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
gas2.helium = gasData.at(1).toInt();
|
||||
gas2.type = gasData.at(2).toInt();
|
||||
gas2.depth = gasData.at(3).toInt();
|
||||
details->gas2 = gas2;
|
||||
details.gas2 = gas2;
|
||||
}
|
||||
|
||||
if (settingName == "Gas3") {
|
||||
@ -240,7 +240,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
gas3.helium = gasData.at(1).toInt();
|
||||
gas3.type = gasData.at(2).toInt();
|
||||
gas3.depth = gasData.at(3).toInt();
|
||||
details->gas3 = gas3;
|
||||
details.gas3 = gas3;
|
||||
}
|
||||
|
||||
if (settingName == "Gas4") {
|
||||
@ -250,7 +250,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
gas4.helium = gasData.at(1).toInt();
|
||||
gas4.type = gasData.at(2).toInt();
|
||||
gas4.depth = gasData.at(3).toInt();
|
||||
details->gas4 = gas4;
|
||||
details.gas4 = gas4;
|
||||
}
|
||||
|
||||
if (settingName == "Gas5") {
|
||||
@ -260,7 +260,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
gas5.helium = gasData.at(1).toInt();
|
||||
gas5.type = gasData.at(2).toInt();
|
||||
gas5.depth = gasData.at(3).toInt();
|
||||
details->gas5 = gas5;
|
||||
details.gas5 = gas5;
|
||||
}
|
||||
|
||||
if (settingName == "Dil1") {
|
||||
@ -270,7 +270,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
dil1.helium = dilData.at(1).toInt();
|
||||
dil1.type = dilData.at(2).toInt();
|
||||
dil1.depth = dilData.at(3).toInt();
|
||||
details->dil1 = dil1;
|
||||
details.dil1 = dil1;
|
||||
}
|
||||
|
||||
if (settingName == "Dil2") {
|
||||
@ -280,7 +280,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
dil2.helium = dilData.at(1).toInt();
|
||||
dil2.type = dilData.at(2).toInt();
|
||||
dil2.depth = dilData.at(3).toInt();
|
||||
details->dil1 = dil2;
|
||||
details.dil1 = dil2;
|
||||
}
|
||||
|
||||
if (settingName == "Dil3") {
|
||||
@ -290,7 +290,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
dil3.helium = dilData.at(1).toInt();
|
||||
dil3.type = dilData.at(2).toInt();
|
||||
dil3.depth = dilData.at(3).toInt();
|
||||
details->dil3 = dil3;
|
||||
details.dil3 = dil3;
|
||||
}
|
||||
|
||||
if (settingName == "Dil4") {
|
||||
@ -300,7 +300,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
dil4.helium = dilData.at(1).toInt();
|
||||
dil4.type = dilData.at(2).toInt();
|
||||
dil4.depth = dilData.at(3).toInt();
|
||||
details->dil4 = dil4;
|
||||
details.dil4 = dil4;
|
||||
}
|
||||
|
||||
if (settingName == "Dil5") {
|
||||
@ -310,7 +310,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
dil5.helium = dilData.at(1).toInt();
|
||||
dil5.type = dilData.at(2).toInt();
|
||||
dil5.depth = dilData.at(3).toInt();
|
||||
details->dil5 = dil5;
|
||||
details.dil5 = dil5;
|
||||
}
|
||||
|
||||
if (settingName == "SetPoint1") {
|
||||
@ -318,7 +318,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
setpoint sp1;
|
||||
sp1.sp = spData.at(0).toInt();
|
||||
sp1.depth = spData.at(1).toInt();
|
||||
details->sp1 = sp1;
|
||||
details.sp1 = sp1;
|
||||
}
|
||||
|
||||
if (settingName == "SetPoint2") {
|
||||
@ -326,7 +326,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
setpoint sp2;
|
||||
sp2.sp = spData.at(0).toInt();
|
||||
sp2.depth = spData.at(1).toInt();
|
||||
details->sp2 = sp2;
|
||||
details.sp2 = sp2;
|
||||
}
|
||||
|
||||
if (settingName == "SetPoint3") {
|
||||
@ -334,7 +334,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
setpoint sp3;
|
||||
sp3.sp = spData.at(0).toInt();
|
||||
sp3.depth = spData.at(1).toInt();
|
||||
details->sp3 = sp3;
|
||||
details.sp3 = sp3;
|
||||
}
|
||||
|
||||
if (settingName == "SetPoint4") {
|
||||
@ -342,7 +342,7 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
setpoint sp4;
|
||||
sp4.sp = spData.at(0).toInt();
|
||||
sp4.depth = spData.at(1).toInt();
|
||||
details->sp4 = sp4;
|
||||
details.sp4 = sp4;
|
||||
}
|
||||
|
||||
if (settingName == "SetPoint5") {
|
||||
@ -350,139 +350,139 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
setpoint sp5;
|
||||
sp5.sp = spData.at(0).toInt();
|
||||
sp5.depth = spData.at(1).toInt();
|
||||
details->sp5 = sp5;
|
||||
details.sp5 = sp5;
|
||||
}
|
||||
|
||||
if (settingName == "Saturation")
|
||||
details->saturation = keyString.toInt();
|
||||
details.saturation = keyString.toInt();
|
||||
|
||||
if (settingName == "Desaturation")
|
||||
details->desaturation = keyString.toInt();
|
||||
details.desaturation = keyString.toInt();
|
||||
|
||||
if (settingName == "DiveMode")
|
||||
details->diveMode = keyString.toInt();
|
||||
details.diveMode = keyString.toInt();
|
||||
|
||||
if (settingName == "LastDeco")
|
||||
details->lastDeco = keyString.toInt();
|
||||
details.lastDeco = keyString.toInt();
|
||||
|
||||
if (settingName == "Brightness")
|
||||
details->brightness = keyString.toInt();
|
||||
details.brightness = keyString.toInt();
|
||||
|
||||
if (settingName == "Units")
|
||||
details->units = keyString.toInt();
|
||||
details.units = keyString.toInt();
|
||||
|
||||
if (settingName == "SamplingRate")
|
||||
details->samplingRate = keyString.toInt();
|
||||
details.samplingRate = keyString.toInt();
|
||||
|
||||
if (settingName == "Salinity")
|
||||
details->salinity = keyString.toInt();
|
||||
details.salinity = keyString.toInt();
|
||||
|
||||
if (settingName == "DiveModeColour")
|
||||
details->diveModeColor = keyString.toInt();
|
||||
details.diveModeColor = keyString.toInt();
|
||||
|
||||
if (settingName == "Language")
|
||||
details->language = keyString.toInt();
|
||||
details.language = keyString.toInt();
|
||||
|
||||
if (settingName == "DateFormat")
|
||||
details->dateFormat = keyString.toInt();
|
||||
details.dateFormat = keyString.toInt();
|
||||
|
||||
if (settingName == "CompassGain")
|
||||
details->compassGain = keyString.toInt();
|
||||
details.compassGain = keyString.toInt();
|
||||
|
||||
if (settingName == "SafetyStop")
|
||||
details->safetyStop = keyString.toInt();
|
||||
details.safetyStop = keyString.toInt();
|
||||
|
||||
if (settingName == "GfHigh")
|
||||
details->gfHigh = keyString.toInt();
|
||||
details.gfHigh = keyString.toInt();
|
||||
|
||||
if (settingName == "GfLow")
|
||||
details->gfLow = keyString.toInt();
|
||||
details.gfLow = keyString.toInt();
|
||||
|
||||
if (settingName == "PressureSensorOffset")
|
||||
details->pressureSensorOffset = keyString.toInt();
|
||||
details.pressureSensorOffset = keyString.toInt();
|
||||
|
||||
if (settingName == "PpO2Min")
|
||||
details->ppO2Min = keyString.toInt();
|
||||
details.ppO2Min = keyString.toInt();
|
||||
|
||||
if (settingName == "PpO2Max")
|
||||
details->ppO2Max = keyString.toInt();
|
||||
details.ppO2Max = keyString.toInt();
|
||||
|
||||
if (settingName == "FutureTTS")
|
||||
details->futureTTS = keyString.toInt();
|
||||
details.futureTTS = keyString.toInt();
|
||||
|
||||
if (settingName == "CcrMode")
|
||||
details->ccrMode = keyString.toInt();
|
||||
details.ccrMode = keyString.toInt();
|
||||
|
||||
if (settingName == "DecoType")
|
||||
details->decoType = keyString.toInt();
|
||||
details.decoType = keyString.toInt();
|
||||
|
||||
if (settingName == "AGFSelectable")
|
||||
details->aGFSelectable = keyString.toInt();
|
||||
details.aGFSelectable = keyString.toInt();
|
||||
|
||||
if (settingName == "AGFHigh")
|
||||
details->aGFHigh = keyString.toInt();
|
||||
details.aGFHigh = keyString.toInt();
|
||||
|
||||
if (settingName == "AGFLow")
|
||||
details->aGFLow = keyString.toInt();
|
||||
details.aGFLow = keyString.toInt();
|
||||
|
||||
if (settingName == "CalibrationGas")
|
||||
details->calibrationGas = keyString.toInt();
|
||||
details.calibrationGas = keyString.toInt();
|
||||
|
||||
if (settingName == "FlipScreen")
|
||||
details->flipScreen = keyString.toInt();
|
||||
details.flipScreen = keyString.toInt();
|
||||
|
||||
if (settingName == "SetPointFallback")
|
||||
details->setPointFallback = keyString.toInt();
|
||||
details.setPointFallback = keyString.toInt();
|
||||
|
||||
if (settingName == "LeftButtonSensitivity")
|
||||
details->leftButtonSensitivity = keyString.toInt();
|
||||
details.leftButtonSensitivity = keyString.toInt();
|
||||
|
||||
if (settingName == "RightButtonSensitivity")
|
||||
details->rightButtonSensitivity = keyString.toInt();
|
||||
details.rightButtonSensitivity = keyString.toInt();
|
||||
|
||||
if (settingName == "BottomGasConsumption")
|
||||
details->bottomGasConsumption = keyString.toInt();
|
||||
details.bottomGasConsumption = keyString.toInt();
|
||||
|
||||
if (settingName == "DecoGasConsumption")
|
||||
details->decoGasConsumption = keyString.toInt();
|
||||
details.decoGasConsumption = keyString.toInt();
|
||||
|
||||
if (settingName == "ModWarning")
|
||||
details->modWarning = keyString.toInt();
|
||||
details.modWarning = keyString.toInt();
|
||||
|
||||
if (settingName == "DynamicAscendRate")
|
||||
details->dynamicAscendRate = keyString.toInt();
|
||||
details.dynamicAscendRate = keyString.toInt();
|
||||
|
||||
if (settingName == "GraphicalSpeedIndicator")
|
||||
details->graphicalSpeedIndicator = keyString.toInt();
|
||||
details.graphicalSpeedIndicator = keyString.toInt();
|
||||
|
||||
if (settingName == "AlwaysShowppO2")
|
||||
details->alwaysShowppO2 = keyString.toInt();
|
||||
details.alwaysShowppO2 = keyString.toInt();
|
||||
|
||||
if (settingName == "Altitude")
|
||||
details->altitude = keyString.toInt();
|
||||
details.altitude = keyString.toInt();
|
||||
|
||||
if (settingName == "PersonalSafety")
|
||||
details->personalSafety = keyString.toInt();
|
||||
details.personalSafety = keyString.toInt();
|
||||
|
||||
if (settingName == "TimeFormat")
|
||||
details->timeFormat = keyString.toInt();
|
||||
details.timeFormat = keyString.toInt();
|
||||
|
||||
if (settingName == "Light") {
|
||||
if (attributes.hasAttribute("enabled"))
|
||||
details->lightEnabled = attributes.value("enabled").toString().toInt();
|
||||
details->light = keyString.toInt();
|
||||
details.lightEnabled = attributes.value("enabled").toString().toInt();
|
||||
details.light = keyString.toInt();
|
||||
}
|
||||
|
||||
if (settingName == "AlarmDepth") {
|
||||
if (attributes.hasAttribute("enabled"))
|
||||
details->alarmDepthEnabled = attributes.value("enabled").toString().toInt();
|
||||
details->alarmDepth = keyString.toInt();
|
||||
details.alarmDepthEnabled = attributes.value("enabled").toString().toInt();
|
||||
details.alarmDepth = keyString.toInt();
|
||||
}
|
||||
|
||||
if (settingName == "AlarmTime") {
|
||||
if (attributes.hasAttribute("enabled"))
|
||||
details->alarmTimeEnabled = attributes.value("enabled").toString().toInt();
|
||||
details->alarmTime = keyString.toInt();
|
||||
details.alarmTimeEnabled = attributes.value("enabled").toString().toInt();
|
||||
details.alarmTime = keyString.toInt();
|
||||
}
|
||||
}
|
||||
reader.readNext();
|
||||
@ -491,13 +491,13 @@ bool ConfigureDiveComputer::restoreXMLBackup(QString fileName, DeviceDetails *de
|
||||
return true;
|
||||
}
|
||||
|
||||
void ConfigureDiveComputer::startFirmwareUpdate(QString fileName, device_data_t *data)
|
||||
void ConfigureDiveComputer::startFirmwareUpdate(const QString &fileName, device_data_t *data, bool forceUpdate)
|
||||
{
|
||||
setState(FWUPDATE);
|
||||
if (firmwareThread)
|
||||
firmwareThread->deleteLater();
|
||||
|
||||
firmwareThread = new FirmwareUpdateThread(this, data, fileName);
|
||||
firmwareThread = new FirmwareUpdateThread(this, data, fileName, forceUpdate);
|
||||
connectThreadSignals(firmwareThread);
|
||||
|
||||
firmwareThread->start();
|
||||
@ -530,7 +530,7 @@ void ConfigureDiveComputer::setState(ConfigureDiveComputer::states newState)
|
||||
void ConfigureDiveComputer::setError(QString err)
|
||||
{
|
||||
lastError = err;
|
||||
emit error(err);
|
||||
emit error(std::move(err));
|
||||
}
|
||||
|
||||
void ConfigureDiveComputer::readThreadFinished()
|
||||
@ -574,8 +574,8 @@ QString ConfigureDiveComputer::dc_open(device_data_t *data)
|
||||
FILE *fp = NULL;
|
||||
dc_status_t rc;
|
||||
|
||||
if (data->libdc_log)
|
||||
fp = subsurface_fopen(logfile_name, "w");
|
||||
if (data->libdc_log && !logfile_name.empty())
|
||||
fp = subsurface_fopen(logfile_name.c_str(), "w");
|
||||
|
||||
data->libdc_logfile = fp;
|
||||
|
||||
@ -594,7 +594,7 @@ QString ConfigureDiveComputer::dc_open(device_data_t *data)
|
||||
rc = divecomputer_device_open(data);
|
||||
|
||||
if (rc != DC_STATUS_SUCCESS) {
|
||||
report_error(errmsg(rc));
|
||||
report_error("%s", errmsg(rc));
|
||||
} else {
|
||||
rc = dc_device_open(&data->device, data->context, data->descriptor, data->iostream);
|
||||
}
|
||||
|
||||
@ -32,11 +32,11 @@ public:
|
||||
|
||||
QString lastError;
|
||||
states currentState;
|
||||
void saveDeviceDetails(DeviceDetails *details, device_data_t *data);
|
||||
void saveDeviceDetails(const DeviceDetails &details, device_data_t *data);
|
||||
void fetchDeviceDetails();
|
||||
bool saveXMLBackup(QString fileName, DeviceDetails *details, device_data_t *data);
|
||||
bool restoreXMLBackup(QString fileName, DeviceDetails *details);
|
||||
void startFirmwareUpdate(QString fileName, device_data_t *data);
|
||||
bool saveXMLBackup(const QString &fileName, const DeviceDetails &details, device_data_t *data);
|
||||
bool restoreXMLBackup(const QString &fileName, DeviceDetails &details);
|
||||
void startFirmwareUpdate(const QString &fileName, device_data_t *data, bool forceUpdate);
|
||||
void resetSettings(device_data_t *data);
|
||||
|
||||
QString dc_open(device_data_t *data);
|
||||
@ -48,7 +48,7 @@ signals:
|
||||
void message(QString msg);
|
||||
void error(QString err);
|
||||
void stateChanged(states newState);
|
||||
void deviceDetailsChanged(DeviceDetails *newDetails);
|
||||
void deviceDetailsChanged(DeviceDetails newDetails);
|
||||
|
||||
private:
|
||||
ReadSettingsThread *readThread;
|
||||
|
||||
@ -27,28 +27,29 @@ public:
|
||||
ReadSettingsThread(QObject *parent, device_data_t *data);
|
||||
void run();
|
||||
signals:
|
||||
void devicedetails(DeviceDetails *newDeviceDetails);
|
||||
void devicedetails(DeviceDetails newDeviceDetails);
|
||||
};
|
||||
|
||||
class WriteSettingsThread : public DeviceThread {
|
||||
Q_OBJECT
|
||||
public:
|
||||
WriteSettingsThread(QObject *parent, device_data_t *data);
|
||||
void setDeviceDetails(DeviceDetails *details);
|
||||
void setDeviceDetails(const DeviceDetails &details);
|
||||
void run();
|
||||
|
||||
private:
|
||||
DeviceDetails *m_deviceDetails;
|
||||
DeviceDetails m_deviceDetails;
|
||||
};
|
||||
|
||||
class FirmwareUpdateThread : public DeviceThread {
|
||||
Q_OBJECT
|
||||
public:
|
||||
FirmwareUpdateThread(QObject *parent, device_data_t *data, QString fileName);
|
||||
FirmwareUpdateThread(QObject *parent, device_data_t *data, QString fileName, bool forceUpdate);
|
||||
void run();
|
||||
|
||||
private:
|
||||
QString m_fileName;
|
||||
bool m_forceUpdate;
|
||||
};
|
||||
|
||||
class ResetSettingsThread : public DeviceThread {
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include "file.h"
|
||||
#include "divesite.h"
|
||||
#include "dive.h"
|
||||
#include "divelog.h"
|
||||
#include "errorhelper.h"
|
||||
#include "ssrf.h"
|
||||
#include "tag.h"
|
||||
@ -66,7 +67,7 @@ static char *to_utf8(unsigned char *in_string)
|
||||
inlen = strlen((char *)in_string);
|
||||
outlen = inlen * 2 + 1;
|
||||
|
||||
char *out_string = calloc(outlen, 1);
|
||||
char *out_string = (char *)calloc(outlen, 1);
|
||||
for (i = 0; i < inlen; i++) {
|
||||
if (in_string[i] < 127) {
|
||||
out_string[j] = in_string[i];
|
||||
@ -157,8 +158,7 @@ static dc_status_t dt_libdc_buffer(unsigned char *ptr, int prf_length, int dc_mo
|
||||
* Parses a mem buffer extracting its data and filling a subsurface's dive structure.
|
||||
* Returns a pointer to last position in buffer, or NULL on failure.
|
||||
*/
|
||||
static unsigned char *dt_dive_parser(unsigned char *runner, struct dive *dt_dive, struct dive_site_table *sites,
|
||||
struct device_table *devices, long maxbuf)
|
||||
static char *dt_dive_parser(unsigned char *runner, struct dive *dt_dive, struct divelog *log, char *maxbuf)
|
||||
{
|
||||
int rc, profile_length, libdc_model;
|
||||
char *tmp_notes_str = NULL;
|
||||
@ -174,9 +174,8 @@ static unsigned char *dt_dive_parser(unsigned char *runner, struct dive *dt_dive
|
||||
struct dive_site *ds;
|
||||
char is_nitrox = 0, is_O2 = 0, is_SCR = 0;
|
||||
|
||||
device_data_t *devdata = calloc(1, sizeof(device_data_t));
|
||||
devdata->sites = sites;
|
||||
devdata->devices = devices;
|
||||
device_data_t *devdata = (device_data_t *)calloc(1, sizeof(device_data_t));
|
||||
devdata->log = log;
|
||||
|
||||
/*
|
||||
* Parse byte to byte till next dive entry
|
||||
@ -215,9 +214,9 @@ static unsigned char *dt_dive_parser(unsigned char *runner, struct dive *dt_dive
|
||||
* Locality and Dive points.
|
||||
*/
|
||||
snprintf(buffer, sizeof(buffer), "%s, %s", locality, dive_point);
|
||||
ds = get_dive_site_by_name(buffer, sites);
|
||||
ds = get_dive_site_by_name(buffer, log->sites);
|
||||
if (!ds)
|
||||
ds = create_dive_site(buffer, sites);
|
||||
ds = create_dive_site(buffer, log->sites);
|
||||
add_dive_to_dive_site(dt_dive, ds);
|
||||
free(locality);
|
||||
locality = NULL;
|
||||
@ -479,8 +478,8 @@ static unsigned char *dt_dive_parser(unsigned char *runner, struct dive *dt_dive
|
||||
tmp_notes_str ? tmp_notes_str : "",
|
||||
QT_TRANSLATE_NOOP("gettextFromC", "Datatrak/Wlog notes"),
|
||||
tmp_string1);
|
||||
dt_dive->notes = calloc((len +1), 1);
|
||||
dt_dive->notes = memcpy(dt_dive->notes, buffer, len);
|
||||
dt_dive->notes = (char *)calloc((len +1), 1);
|
||||
memcpy(dt_dive->notes, buffer, len);
|
||||
free(tmp_string1);
|
||||
}
|
||||
free(tmp_notes_str);
|
||||
@ -572,7 +571,7 @@ static unsigned char *dt_dive_parser(unsigned char *runner, struct dive *dt_dive
|
||||
((get_cylinder(dt_dive, 0)->gas_used.mliter / get_cylinder(dt_dive, 0)->type.size.mliter) * 1000);
|
||||
}
|
||||
free(devdata);
|
||||
return membuf;
|
||||
return (char *)membuf;
|
||||
bail:
|
||||
free(locality);
|
||||
free(devdata);
|
||||
@ -583,10 +582,10 @@ bail:
|
||||
* Parses the header of the .add file, returns the number of dives in
|
||||
* the archive (must be the same than number of dives in .log file).
|
||||
*/
|
||||
static int wlog_header_parser (struct memblock *mem)
|
||||
static int wlog_header_parser (std::string &mem)
|
||||
{
|
||||
int tmp;
|
||||
unsigned char *runner = (unsigned char *) mem->buffer;
|
||||
unsigned char *runner = (unsigned char *) mem.data();
|
||||
if (!runner)
|
||||
return -1;
|
||||
if (!memcmp(runner, "\x52\x02", 2)) {
|
||||
@ -601,7 +600,7 @@ static int wlog_header_parser (struct memblock *mem)
|
||||
|
||||
#define NOTES_LENGTH 256
|
||||
#define SUIT_LENGTH 26
|
||||
static void wlog_compl_parser(struct memblock *wl_mem, struct dive *dt_dive, int dcount)
|
||||
static void wlog_compl_parser(std::string &wl_mem, struct dive *dt_dive, int dcount)
|
||||
{
|
||||
int tmp = 0, offset = 12 + (dcount * 850),
|
||||
pos_weight = offset + 256,
|
||||
@ -609,7 +608,7 @@ static void wlog_compl_parser(struct memblock *wl_mem, struct dive *dt_dive, int
|
||||
pos_tank_init = offset + 266,
|
||||
pos_suit = offset + 268;
|
||||
char *wlog_notes = NULL, *wlog_suit = NULL, *buffer = NULL;
|
||||
unsigned char *runner = (unsigned char *) wl_mem->buffer;
|
||||
unsigned char *runner = (unsigned char *) wl_mem.data();
|
||||
|
||||
/*
|
||||
* Extended notes string. Fixed length 256 bytes. 0 padded if not complete
|
||||
@ -621,7 +620,7 @@ static void wlog_compl_parser(struct memblock *wl_mem, struct dive *dt_dive, int
|
||||
wlog_notes = to_utf8((unsigned char *) wlog_notes_temp);
|
||||
}
|
||||
if (dt_dive->notes && wlog_notes) {
|
||||
buffer = calloc (strlen(dt_dive->notes) + strlen(wlog_notes) + 1, 1);
|
||||
buffer = (char *)calloc (strlen(dt_dive->notes) + strlen(wlog_notes) + 1, 1);
|
||||
sprintf(buffer, "%s%s", dt_dive->notes, wlog_notes);
|
||||
free(dt_dive->notes);
|
||||
dt_dive->notes = copy_string(buffer);
|
||||
@ -636,7 +635,7 @@ static void wlog_compl_parser(struct memblock *wl_mem, struct dive *dt_dive, int
|
||||
*/
|
||||
tmp = (int) two_bytes_to_int(runner[pos_weight + 1], runner[pos_weight]);
|
||||
if (tmp != 0x7fff) {
|
||||
weightsystem_t ws = { {lrint(tmp * 10)}, QT_TRANSLATE_NOOP("gettextFromC", "unknown"), false };
|
||||
weightsystem_t ws = { {tmp * 10}, QT_TRANSLATE_NOOP("gettextFromC", "unknown"), false };
|
||||
add_cloned_weightsystem(&dt_dive->weightsystems, ws);
|
||||
}
|
||||
|
||||
@ -676,58 +675,53 @@ static void wlog_compl_parser(struct memblock *wl_mem, struct dive *dt_dive, int
|
||||
}
|
||||
|
||||
/*
|
||||
* Main function call from file.c memblock is allocated (and freed) there.
|
||||
* Main function call from file.c data is allocated (and freed) there.
|
||||
* If parsing is aborted due to errors, stores correctly parsed dives.
|
||||
*/
|
||||
int datatrak_import(struct memblock *mem, struct memblock *wl_mem, struct dive_table *table, struct trip_table *trips,
|
||||
struct dive_site_table *sites, struct device_table *devices)
|
||||
int datatrak_import(std::string &mem, std::string &wl_mem, struct divelog *log)
|
||||
{
|
||||
UNUSED(trips);
|
||||
unsigned char *runner;
|
||||
char *runner;
|
||||
int i = 0, numdives = 0, rc = 0;
|
||||
|
||||
long maxbuf = (long) mem->buffer + mem->size;
|
||||
char *maxbuf = mem.data() + mem.size();
|
||||
|
||||
// Verify fileheader, get number of dives in datatrak divelog, zero on error
|
||||
numdives = read_file_header((unsigned char *)mem->buffer);
|
||||
numdives = read_file_header((unsigned char *)mem.data());
|
||||
if (!numdives) {
|
||||
report_error(translate("gettextFromC", "[Error] File is not a DataTrak file. Aborted"));
|
||||
report_error("%s", translate("gettextFromC", "[Error] File is not a DataTrak file. Aborted"));
|
||||
goto bail;
|
||||
}
|
||||
// Verify WLog .add file, Beginning sequence and Nº dives
|
||||
if(wl_mem) {
|
||||
if(!wl_mem.empty()) {
|
||||
int compl_dives_n = wlog_header_parser(wl_mem);
|
||||
if (compl_dives_n != numdives) {
|
||||
report_error("ERROR: Not the same number of dives in .log %d and .add file %d.\nWill not parse .add file", numdives , compl_dives_n);
|
||||
free(wl_mem->buffer);
|
||||
wl_mem->buffer = NULL;
|
||||
wl_mem = NULL;
|
||||
wl_mem.clear();
|
||||
}
|
||||
}
|
||||
// Point to the expected begining of 1st. dive data
|
||||
runner = (unsigned char *)mem->buffer;
|
||||
runner = mem.data();
|
||||
JUMP(runner, 12);
|
||||
|
||||
// Secuential parsing. Abort if received NULL from dt_dive_parser.
|
||||
while ((i < numdives) && ((long) runner < maxbuf)) {
|
||||
while ((i < numdives) && (runner < maxbuf)) {
|
||||
struct dive *ptdive = alloc_dive();
|
||||
|
||||
runner = dt_dive_parser(runner, ptdive, sites, devices, maxbuf);
|
||||
if (wl_mem)
|
||||
runner = dt_dive_parser((unsigned char *)runner, ptdive, log, maxbuf);
|
||||
if (!wl_mem.empty())
|
||||
wlog_compl_parser(wl_mem, ptdive, i);
|
||||
if (runner == NULL) {
|
||||
report_error(translate("gettextFromC", "Error: no dive"));
|
||||
report_error("%s", translate("gettextFromC", "Error: no dive"));
|
||||
free(ptdive);
|
||||
rc = 1;
|
||||
goto out;
|
||||
} else {
|
||||
record_dive_to_table(ptdive, table);
|
||||
record_dive_to_table(ptdive, log->dives);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
out:
|
||||
taglist_cleanup(&g_tag_list);
|
||||
sort_dive_table(table);
|
||||
sort_dive_table(log->dives);
|
||||
return rc;
|
||||
bail:
|
||||
return 1;
|
||||