Setting primary computer

Dirk Hohndel dirk at hohndel.org
Sun Apr 3 08:34:24 PDT 2022



> On Apr 3, 2022, at 2:11 AM, Berthold wrote:
> Your analysis sounds very plausible. This seems to work as intended, or at 
> least how it worked before.

I don't remember that this was what we intended, but as you say... plausible for sure.

> Generally, I'm not a fan of default parameters and prefer things explicit. In 
> this case I probably was too lazy to figure out how to get the constants into 
> QML.

That's always painful and risks getting out of sync.
Doing multiple true/false arguments is far easier when calling from QML

> Since I am one of those normies with only one divecomputer and don't use 
> mobile, I really cannot say what the right thing to do is. My guess would be 
> implementing switching of the DC on mobile? The profile-code doesn't use the 
> global dc_number anymore (with one exception that should be fixed), so that 
> should not be hard.

Yes, ultimately that's the correct answer. It's a frequently requested feature, it makes
sense to have, and it allows us to use the same, consistent behavior in both places
to have the dive computer that was downloaded first be the first in the list.

I KNOW that this will lead to the request to be able to reorder dive computers on
mobile, but so be it.

/D


More information about the subsurface mailing list