Ok, this is a re-done set of patches that uses DC_FIELD_STRING instead of DC_FIELD_DEVINFO.
I've also changed "eon_steel" to "eonsteel" throughout (unless I missed something) as per Jef.
Also, to show how DC_FIELD_STRING allows other things, I added "Deco algorithm", "Battery before dive" and "Battery after dive" parsing to the EON Steel backend, although right now my subsurface patch just simply ignores that extra data. We'll need a way to show it, or at least save/restore it sanely, so that will take a bit of effort. But it's there, and it works (tested by printing the values out to stderr - that "debugging" is not in this series of patches, though).
Anyway, I think Dirk was right, the DC_FIELD_STRING model is nicer than showing it as samples, although it did make the subsurface interface a bit different: since we don't get all the version and dive ID data together as one "devinfo", we actually need to save them off individually and then at the end add it to our dive computer database. But that's probably a good idea anyway, since we very likely *should* save at least fw version per-dive rather than per divecomputer (since the same dive computer can have multiple firmware versions over time).
Whatever. The subsurface patch is still pretty small and straightforward, although to save/show generic strings will definitely take more effort. But battery information is apparently something people have been asking for, so I think it's all good.
I could have done inter-diffs from the previous version, but with the big renames of "eon_steel" to "eonsteel", that diff wouldn't really have been very useful anyway, and it's not like the previous version was applied, so this is an all-new series. Three patches for libdivecomputer, and one patch for subsurface.
Linus