diff --git a/src/Makefile.am b/src/Makefile.am index f3305a4..12908f0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CFLAGS = $(LIBUSB_CFLAGS) $(HIDAPI_CFLAGS) -DENABLE_DEPRECATED +AM_CFLAGS = $(LIBUSB_CFLAGS) $(HIDAPI_CFLAGS) lib_LTLIBRARIES = libdivecomputer.la diff --git a/src/atomics_cobalt_parser.c b/src/atomics_cobalt_parser.c index 4bfbcbb..aacfb77 100644 --- a/src/atomics_cobalt_parser.c +++ b/src/atomics_cobalt_parser.c @@ -297,15 +297,6 @@ atomics_cobalt_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback } sample.gasmix = idx; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - unsigned int o2 = data[SZ_HEADER + SZ_GASMIX * idx + 4]; - unsigned int he = data[SZ_HEADER + SZ_GASMIX * idx + 5]; - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif gasmix_previous = gasmix; } diff --git a/src/cressi_edy_parser.c b/src/cressi_edy_parser.c index 06296f7..2856c3c 100644 --- a/src/cressi_edy_parser.c +++ b/src/cressi_edy_parser.c @@ -218,13 +218,6 @@ cressi_edy_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t c if (idx != gasmix) { sample.gasmix = idx; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - sample.event.type = SAMPLE_EVENT_GASCHANGE; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = bcd2dec(data[0x17 - idx]); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif gasmix = idx; } } diff --git a/src/diverite_nitekq_parser.c b/src/diverite_nitekq_parser.c index 460dcbf..6cbd4dc 100644 --- a/src/diverite_nitekq_parser.c +++ b/src/diverite_nitekq_parser.c @@ -261,13 +261,6 @@ diverite_nitekq_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callbac if (gasmix != gasmix_previous) { sample.gasmix = gasmix; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = oxygen[gasmix] | (helium[gasmix] << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif gasmix_previous = gasmix; } diff --git a/src/divesystem_idive_parser.c b/src/divesystem_idive_parser.c index 64454a8..deba7d4 100644 --- a/src/divesystem_idive_parser.c +++ b/src/divesystem_idive_parser.c @@ -266,13 +266,6 @@ divesystem_idive_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callba sample.gasmix = i; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif o2_previous = o2; he_previous = he; } diff --git a/src/hw_ostc_parser.c b/src/hw_ostc_parser.c index 2a43dee..6d88139 100644 --- a/src/hw_ostc_parser.c +++ b/src/hw_ostc_parser.c @@ -638,16 +638,6 @@ hw_ostc_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t call if (time == samplerate && parser->initial != UNDEFINED) { sample.gasmix = parser->initial; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - unsigned int idx = parser->initial; - unsigned int o2 = parser->gasmix[idx].oxygen; - unsigned int he = parser->gasmix[idx].helium; - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif } // Depth (mbar). @@ -735,13 +725,6 @@ hw_ostc_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t call sample.gasmix = idx; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif offset += 2; length -= 2; } @@ -760,15 +743,6 @@ hw_ostc_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t call idx--; /* Convert to a zero based index. */ sample.gasmix = idx; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - unsigned int o2 = parser->gasmix[idx].oxygen; - unsigned int he = parser->gasmix[idx].helium; - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif offset++; length--; } @@ -808,13 +782,6 @@ hw_ostc_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t call sample.gasmix = idx; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif offset += 2; length -= 2; } @@ -920,13 +887,6 @@ hw_ostc_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t call sample.gasmix = idx; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif offset += 2; length -= 2; } diff --git a/src/mares_iconhd_parser.c b/src/mares_iconhd_parser.c index 8789a71..0c4fea5 100644 --- a/src/mares_iconhd_parser.c +++ b/src/mares_iconhd_parser.c @@ -501,12 +501,6 @@ mares_iconhd_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t if (gasmix != gasmix_previous) { sample.gasmix = gasmix; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - sample.event.type = SAMPLE_EVENT_GASCHANGE; - sample.event.time = 0; - sample.event.value = parser->oxygen[gasmix]; - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif gasmix_previous = gasmix; } } diff --git a/src/oceanic_atom2_parser.c b/src/oceanic_atom2_parser.c index 201b387..dfe4a56 100644 --- a/src/oceanic_atom2_parser.c +++ b/src/oceanic_atom2_parser.c @@ -841,15 +841,6 @@ oceanic_atom2_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_ } sample.gasmix = gasmix - 1; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - unsigned int o2 = parser->oxygen[gasmix - 1]; - unsigned int he = parser->helium[gasmix - 1]; - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif gasmix_previous = gasmix; } diff --git a/src/shearwater_predator_parser.c b/src/shearwater_predator_parser.c index f46b6af..2635457 100644 --- a/src/shearwater_predator_parser.c +++ b/src/shearwater_predator_parser.c @@ -458,13 +458,6 @@ shearwater_predator_parser_samples_foreach (dc_parser_t *abstract, dc_sample_cal sample.gasmix = idx; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif o2_previous = o2; he_previous = he; } diff --git a/src/suunto_d9_parser.c b/src/suunto_d9_parser.c index 427fd3d..19b3218 100644 --- a/src/suunto_d9_parser.c +++ b/src/suunto_d9_parser.c @@ -525,14 +525,6 @@ suunto_d9_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t ca } sample.gasmix = parser->gasmix; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - unsigned int he = parser->helium[parser->gasmix]; - unsigned int o2 = parser->oxygen[parser->gasmix]; - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif } // Events @@ -715,12 +707,6 @@ suunto_d9_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t ca } sample.gasmix = idx; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - sample.event.type = SAMPLE_EVENT_GASCHANGE; - sample.event.time = seconds; - sample.event.value = o2; - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif offset += 2; break; case 0x06: // Gas Change @@ -747,12 +733,6 @@ suunto_d9_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t ca } sample.gasmix = idx; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = seconds; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif offset += length; break; default: diff --git a/src/suunto_eonsteel_parser.c b/src/suunto_eonsteel_parser.c index a2fa3ee..72c0dd5 100644 --- a/src/suunto_eonsteel_parser.c +++ b/src/suunto_eonsteel_parser.c @@ -613,16 +613,6 @@ static void sample_gas_switch_event(struct sample_data *info, unsigned short idx sample.gasmix = idx - 1; if (info->callback) info->callback(DC_SAMPLE_GASMIX, sample, info->userdata); - -#ifdef ENABLE_DEPRECATED - unsigned int o2 = 100 * eon->cache.gasmix[idx-1].oxygen; - unsigned int he = 100 * eon->cache.gasmix[idx-1].helium; - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = o2 | (he << 16); - if (info->callback) info->callback(DC_SAMPLE_EVENT, sample, info->userdata); -#endif } /* diff --git a/src/suunto_vyper_parser.c b/src/suunto_vyper_parser.c index 7eee580..6bcd3ac 100644 --- a/src/suunto_vyper_parser.c +++ b/src/suunto_vyper_parser.c @@ -394,12 +394,7 @@ suunto_vyper_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t sample.gasmix = idx; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - sample.event.type = SAMPLE_EVENT_GASCHANGE; - sample.event.value = o2; -#else sample.event.type = SAMPLE_EVENT_NONE; -#endif break; default: // Unknown WARNING (abstract->context, "Unknown event"); diff --git a/src/uwatec_smart_parser.c b/src/uwatec_smart_parser.c index 5b0453f..71d69a0 100644 --- a/src/uwatec_smart_parser.c +++ b/src/uwatec_smart_parser.c @@ -1153,15 +1153,6 @@ uwatec_smart_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t } sample.gasmix = idx; if (callback) callback (DC_SAMPLE_GASMIX, sample, userdata); -#ifdef ENABLE_DEPRECATED - unsigned int o2 = parser->gasmix[idx].oxygen; - unsigned int he = parser->gasmix[idx].helium; - sample.event.type = SAMPLE_EVENT_GASCHANGE2; - sample.event.time = 0; - sample.event.flags = 0; - sample.event.value = o2 | (he << 16); - if (callback) callback (DC_SAMPLE_EVENT, sample, userdata); -#endif gasmix_previous = gasmix; }