Fwd: Setting primary computer

Dirk Hohndel dirk at hohndel.org
Sat Apr 2 14:17:53 PDT 2022


moving this to the developer mailing list.

There's something odd here. And I can't figure out what's going wrong.

Contrary to the comments in the code (oh how I love that), it seems that both desktop and mobile call into the same routine:

// Note: this function is only used from mobile - perhaps move it there or unify.
void DiveImportedModel::recordDives(int flags)

And both the QML code (through the default argument to this call) and the code in DownloadFromDCWidget::on_ok_clicked() call recordDives with effectively the same flags.

Yet on the desktop it appears that the first dive computer from which we download stays the first one, but on mobile apparently the last dive computer we download from becomes the first one.

I've been staring at this code for a while and I can't figure out what's going wrong.

I'd appreciate some other eyeballs on this :)

Thanks

/D


> Begin forwarded message:
> 
> That's so odd. I'll have to go through that code path one more time. It uses the same backend infrastructure to merge the dives, but admittedly calls it "slightly" differently. My guess is that something there causes things to flip around.
> 
> Great data point. Thanks
> 
> /D
> 
> 
>> On Apr 2, 2022, at 9:55 AM, Michael Andreen wrote:
>> 
>> I noticed the same behavior on my most recent dives. I downloaded the dives from my two normal dive computers on my desktop machine and synced that to the cloud. I then synced my Android phone to get the latest cloud save and downloaded the dives from a third computer, the mobile version then set the newly downloaded dive computer as the first dive computer.
>> 
>> /Michael
>> 
>> On Thursday, March 31, 2022 at 2:34:58 AM UTC+2 erenb... at gmail.com <http://gmail.com/> wrote:
>> The original imports were probably done on multiple devices, desktop (Mac), iPhone, and iPad. this was 2 different computers but both of those were not used on the same dive ever. The recent download was all done on an iPhone so iOS app. As of today it shows as version 3.4.3(5.0.6.83). it was a download of something like 84 dives at once, that computer had previously not been supported so I was not dumping those dives into subsurface. 
>> 
>> If you can't find anything I'll play around the next few times I get out and see if I can replicate it 
>> 
>> On Wednesday, March 30, 2022 at 6:56:01 PM UTC-5 Dirk wrote:
>> Hmm. I tried a few different scenarios of how one would import from a second (or n-th) dive computer and how that could end up being the first dive computer... and I can't figure it out. In all of my tests I get the expected outcome (which shouldn't surprise me because I ALWAYS have more than one dive computer with me on a dive and so I test this particular feature literally every time I dive...).
>> 
>> So. Err. I do likely need some more information on how exactly this happens for you.
>> 
>> Are you importing on the same system? Or is one imported on the PC, one on a mobile device? Is there something else about the way you do this that is unusual?
>> 
>> /D
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20220402/968a00cf/attachment.htm>


More information about the subsurface mailing list