Hi,
I have been working on a new api for gas changes. The idea is that old gas change events (SAMPLE_EVENT_GASCHANGE and SAMPLE_EVENT_GASCHANGE2) will be replaced with a new DC_SAMPLE_GASMIX sample. The corresponding sample data is an integer with the index of the gas mix. The actual oxygen and helium percentages can be retrieved with the DC_FIELD_GASMIX api. The main advantage over the old events, is that the gas mix index allows to distinguish two identical gas mixes.
I have attached two patches. The first patch contains the new api, and with the second patch all backends are ported to the new api.
Please note that applying these patches will break existing applications. They will still build, but they will no longer get any gas change events. In order to maintain backwards compatibility, I'm planning to introduce the new api as follows: The old events will get marked as deprecated, but not removed yet. That ensures existing applications will continue to work with no changes. In the meantime, applications can start to use the new api. And once v0.5 is out, the old events will be removed.
Comments are welcome!
PS: I'm leaving tonight for a diving trip, so I probably won't be able to respond to questions or comments during the next week.
Jef