setting aside SAMPLE_EVENT_xxx ranges for applications

Jef Driesen jef at libdivecomputer.org
Tue May 6 10:44:41 PDT 2014


On 06-05-14 18:13, Linus Torvalds wrote:
> On Tue, May 6, 2014 at 6:21 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>> Maybe you are right - we need to rip out the libdivecomputer event model
>> and create our own and simply populate it from the data libdivecomputer
>> provides us. That way we can deal with some of the other annoyances that we
>> have inherited from libdivecomputer as well
>
> I'm the last to think that the libdivecomputer event model is good, but I
> think translating it to some saner internal format is likely even worse.
> Because then you have the "new version of libdivecomputer, new event number,
> now we need to add more translation, and in the meantime we lose data".

How is that different from what we have today? If libdivecomputer gets some new 
event today, then subsurface will not be able to use it, until some code is 
added to handle it properly. How else will it know the interpretation for the 
new value? Without the correct interpretation, it's just some meaningless number.

I don't see much difference between adding an extra translation or some extra 
code to handle the new event directly.

(The exception here is when you just store the new number as-is, and then an 
more recent subsurface version, which does know about the new event, will be 
able to interpret it correctly afterwards. But, correct me if I'm wrong, I don't 
think subsurface does that right now. Subsurface stores the event name in the 
xml and not the event number, if I remember correctly?)

Jef


More information about the devel mailing list