@@ -139,7 +139,6 @@ typedef struct hw_ostc_parser_t {
139
139
unsigned int initial_setpoint ;
140
140
unsigned int initial_cns ;
141
141
hw_ostc_gasmix_t gasmix [NGASMIXES ];
142
- unsigned int current_divemode_ccr ;
143
142
} hw_ostc_parser_t ;
144
143
145
144
static dc_status_t hw_ostc_parser_get_datetime (dc_parser_t * abstract , dc_datetime_t * datetime );
@@ -814,28 +813,6 @@ hw_ostc_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsigned
814
813
return DC_STATUS_SUCCESS ;
815
814
}
816
815
817
-
818
- static void hw_ostc_notify_bailout (hw_ostc_parser_t * parser , const unsigned char * data , unsigned int index , dc_sample_callback_t callback , void * userdata )
819
- {
820
- if (parser -> current_divemode_ccr != parser -> gasmix [index ].diluent ) {
821
- dc_sample_value_t sample = {
822
- .event .type = SAMPLE_EVENT_STRING ,
823
- .event .flags = SAMPLE_FLAGS_SEVERITY_INFO ,
824
- };
825
- if (parser -> gasmix [index ].diluent ) {
826
- sample .event .name = "Switched to closed circuit" ;
827
- } else {
828
- sample .event .name = "Switched to open circuit bailout" ;
829
- }
830
-
831
- if (callback ) {
832
- callback (DC_SAMPLE_EVENT , & sample , userdata );
833
- }
834
-
835
- parser -> current_divemode_ccr = parser -> gasmix [index ].diluent ;
836
- }
837
- }
838
-
839
816
static dc_status_t
840
817
hw_ostc_parser_internal_foreach (hw_ostc_parser_t * parser , dc_sample_callback_t callback , void * userdata )
841
818
{
@@ -945,7 +922,6 @@ hw_ostc_parser_internal_foreach (hw_ostc_parser_t *parser, dc_sample_callback_t
945
922
946
923
// Get the CCR mode.
947
924
unsigned int ccr = hw_ostc_is_ccr (divemode , version );
948
- parser -> current_divemode_ccr = ccr ;
949
925
950
926
unsigned int time = 0 ;
951
927
unsigned int nsamples = 0 ;
@@ -991,7 +967,7 @@ hw_ostc_parser_internal_foreach (hw_ostc_parser_t *parser, dc_sample_callback_t
991
967
offset += 2 ;
992
968
993
969
// Extended sample info.
994
- unsigned int length = data [offset ] & 0x7F ;
970
+ unsigned int length = data [offset ] & 0x7F ;
995
971
offset += 1 ;
996
972
997
973
// Check for buffer overflows.
@@ -1082,8 +1058,6 @@ hw_ostc_parser_internal_foreach (hw_ostc_parser_t *parser, dc_sample_callback_t
1082
1058
sample .gasmix = idx ;
1083
1059
if (callback ) callback (DC_SAMPLE_GASMIX , & sample , userdata );
1084
1060
1085
- hw_ostc_notify_bailout (parser , data , idx , callback , userdata );
1086
-
1087
1061
offset += 2 ;
1088
1062
length -= 2 ;
1089
1063
}
@@ -1109,8 +1083,6 @@ hw_ostc_parser_internal_foreach (hw_ostc_parser_t *parser, dc_sample_callback_t
1109
1083
if (callback ) callback (DC_SAMPLE_GASMIX , & sample , userdata );
1110
1084
tank = id - 1 ;
1111
1085
1112
- hw_ostc_notify_bailout (parser , data , idx , callback , userdata );
1113
-
1114
1086
offset ++ ;
1115
1087
length -- ;
1116
1088
}
@@ -1156,8 +1128,6 @@ hw_ostc_parser_internal_foreach (hw_ostc_parser_t *parser, dc_sample_callback_t
1156
1128
sample .gasmix = idx ;
1157
1129
if (callback ) callback (DC_SAMPLE_GASMIX , & sample , userdata );
1158
1130
1159
- hw_ostc_notify_bailout (parser , data , idx , callback , userdata );
1160
-
1161
1131
offset += 2 ;
1162
1132
length -= 2 ;
1163
1133
}
@@ -1178,7 +1148,8 @@ hw_ostc_parser_internal_foreach (hw_ostc_parser_t *parser, dc_sample_callback_t
1178
1148
info [i ].divisor = 0 ;
1179
1149
continue ;
1180
1150
}
1181
- ERROR (abstract -> context , "Buffer overflow detected!" );
1151
+
1152
+ ERROR (abstract -> context , "Buffer overflow detected!" );
1182
1153
return DC_STATUS_DATAFORMAT ;
1183
1154
}
1184
1155
@@ -1296,8 +1267,6 @@ hw_ostc_parser_internal_foreach (hw_ostc_parser_t *parser, dc_sample_callback_t
1296
1267
sample .gasmix = idx ;
1297
1268
if (callback ) callback (DC_SAMPLE_GASMIX , & sample , userdata );
1298
1269
1299
- hw_ostc_notify_bailout (parser , data , idx , callback , userdata );
1300
-
1301
1270
offset += 2 ;
1302
1271
length -= 2 ;
1303
1272
}
0 commit comments