Commit c1c2d20
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 e3af9fd commit c1c2d20
5 files changed
Lines changed: 310 additions & 34 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 | |
|---|---|---|---|
| |||
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
1253 | 1257 | | |
| 1258 | + | |
1254 | 1259 | | |
1255 | 1260 | | |
1256 | 1261 | | |
| |||
1260 | 1265 | | |
1261 | 1266 | | |
1262 | 1267 | | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
1263 | 1277 | | |
1264 | 1278 | | |
1265 | 1279 | | |
| |||
1268 | 1282 | | |
1269 | 1283 | | |
1270 | 1284 | | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1274 | 1295 | | |
1275 | 1296 | | |
1276 | 1297 | | |
| |||
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: 18 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
0 commit comments