Commit d6c042f
committed
feat(uddf): persist MacDive waypoint gas switches via existing gasSwitches pipe
MacDive marks gas changes using <switchmix ref="gas-UUID"/> inside
individual waypoint samples. The parser previously recorded this on
the sample map (point['gasMixRef']) but it went nowhere; the importer
resolves gas switches via tankRef, but MacDive's switchmix ref is a
gas-mix UUID, not a tank UUID.
Parser now emits gas switches into diveData['gasSwitches'] with
gasMixRef (alongside the existing tankRef-from-top-level-<gasswitches>
path), deduping timestamp|gasMixRef|tankRef so both sources feed one
consumer. Tanks also record uddfGasMixRef so the downstream importer
can resolve gas-mix UUID -> tank id.
Importer now resolves both tankRef and gasMixRef to tankId, so
single-pipe persistence works for both source-level and waypoint-level
switch markers.
Adds unit test for parser emission, integration test verifying
gas_switches rows land on the correct dive_tanks rows, and updates
the MacDive real-sample regression to assert gasSwitches entries
rather than the now-removed sample-level gasMixRef. Closes the
parser-to-DB gap noted as a known limitation in M1.1 parent d59d043 commit d6c042f
5 files changed
Lines changed: 309 additions & 33 deletions
File tree
- lib
- core/services/export/uddf
- features/dive_import/data/services
- test
- core/services/export/uddf
- features/dive_import
Lines changed: 49 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1373 | 1373 | | |
1374 | 1374 | | |
1375 | 1375 | | |
1376 | | - | |
1377 | | - | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
1378 | 1386 | | |
1379 | 1387 | | |
1380 | 1388 | | |
| |||
1528 | 1536 | | |
1529 | 1537 | | |
1530 | 1538 | | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
1531 | 1544 | | |
1532 | 1545 | | |
1533 | 1546 | | |
| |||
1565 | 1578 | | |
1566 | 1579 | | |
1567 | 1580 | | |
1568 | | - | |
1569 | | - | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
1570 | 1597 | | |
1571 | 1598 | | |
1572 | 1599 | | |
| |||
1733 | 1760 | | |
1734 | 1761 | | |
1735 | 1762 | | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
1736 | 1781 | | |
1737 | 1782 | | |
1738 | 1783 | | |
| |||
Lines changed: 24 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1236 | 1236 | | |
1237 | 1237 | | |
1238 | 1238 | | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
1239 | 1243 | | |
| 1244 | + | |
1240 | 1245 | | |
1241 | 1246 | | |
1242 | 1247 | | |
| |||
1246 | 1251 | | |
1247 | 1252 | | |
1248 | 1253 | | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
1249 | 1263 | | |
1250 | 1264 | | |
1251 | 1265 | | |
| |||
1254 | 1268 | | |
1255 | 1269 | | |
1256 | 1270 | | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
1260 | 1281 | | |
1261 | 1282 | | |
1262 | 1283 | | |
| |||
Lines changed: 29 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
766 | | - | |
| 766 | + | |
767 | 767 | | |
| 768 | + | |
| 769 | + | |
768 | 770 | | |
769 | 771 | | |
770 | 772 | | |
771 | | - | |
772 | | - | |
| 773 | + | |
| 774 | + | |
773 | 775 | | |
774 | 776 | | |
775 | 777 | | |
776 | 778 | | |
777 | | - | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
778 | 791 | | |
779 | 792 | | |
780 | 793 | | |
| |||
784 | 797 | | |
785 | 798 | | |
786 | 799 | | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
793 | 804 | | |
794 | | - | |
795 | | - | |
796 | | - | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
797 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
798 | 814 | | |
799 | 815 | | |
800 | 816 | | |
| |||
Lines changed: 17 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
0 commit comments