diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-01-10 17:00:39 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-01-19 13:48:17 -0800 |
commit | 11d19abc7412b76c9ee1be39ffe992afb02b710b (patch) | |
tree | e487a21e6d194174423ed7301d7e6d3455e88012 /core/downloadfromdcthread.cpp | |
parent | 239e6f237f356eb2bf31105b7a7b86712344d075 (diff) | |
download | subsurface-11d19abc7412b76c9ee1be39ffe992afb02b710b.tar.gz |
Dive download: add trip_table to device_data_t
Since recent commits, dive-trips are not added directly to the core,
but into separate trip tables (see ec37c71f5eeb7d4b0c4b8719b52583fadb0b8f4c).
These commits did not finish the work for the download-from-dc
case.
Add an extra trip_table field to device_data_t. If trips are created
(user selected "Download into new trip"), the trip will be created
in that table.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/downloadfromdcthread.cpp')
-rw-r--r-- | core/downloadfromdcthread.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp index 4e72f5b16..0774c5e8b 100644 --- a/core/downloadfromdcthread.cpp +++ b/core/downloadfromdcthread.cpp @@ -70,6 +70,7 @@ void DownloadThread::run() auto internalData = m_data->internalData(); internalData->descriptor = descriptorLookup[m_data->vendor() + m_data->product()]; internalData->download_table = &downloadTable; + internalData->trip_table = &tripTable; internalData->btname = strdup(m_data->devBluetoothName().toUtf8()); if (!internalData->descriptor) { qDebug() << "No download possible when DC type is unknown"; @@ -264,6 +265,7 @@ DCDeviceData::DCDeviceData() memset(&data, 0, sizeof(data)); data.trip = nullptr; data.download_table = nullptr; + data.trip_table = nullptr; data.diveid = 0; data.deviceid = 0; #if defined(BT_SUPPORT) |