|
37 | 37 |
|
38 | 38 | #define UNDEFINED 0xFFFFFFFF |
39 | 39 |
|
40 | | -#define ALL 0 |
41 | | -#define FIXED 1 |
42 | | -#define MANUAL 2 |
43 | | - |
44 | 40 | #define HEADER 1 |
45 | 41 | #define PROFILE 2 |
46 | 42 |
|
@@ -194,15 +190,10 @@ static const hw_ostc_layout_t hw_ostc_layout_ostc3 = { |
194 | 190 | }; |
195 | 191 |
|
196 | 192 | static unsigned int |
197 | | -hw_ostc_find_gasmix (hw_ostc_parser_t *parser, unsigned int o2, unsigned int he, unsigned int dil, unsigned int type) |
| 193 | +hw_ostc_find_gasmix_manual (hw_ostc_parser_t *parser, unsigned int o2, unsigned int he, unsigned int dil) |
198 | 194 | { |
199 | | - unsigned int offset = 0; |
| 195 | + unsigned int offset = parser->nfixed; |
200 | 196 | unsigned int count = parser->ngasmixes; |
201 | | - if (type == FIXED) { |
202 | | - count = parser->nfixed; |
203 | | - } else if (type == MANUAL) { |
204 | | - offset = parser->nfixed; |
205 | | - } |
206 | 197 |
|
207 | 198 | unsigned int i = offset; |
208 | 199 | while (i < count) { |
@@ -899,7 +890,7 @@ hw_ostc_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t call |
899 | 890 | } |
900 | 891 | unsigned int o2 = data[offset]; |
901 | 892 | unsigned int he = data[offset + 1]; |
902 | | - unsigned int idx = hw_ostc_find_gasmix (parser, o2, he, ccr, MANUAL); |
| 893 | + unsigned int idx = hw_ostc_find_gasmix_manual (parser, o2, he, ccr); |
903 | 894 | if (idx >= parser->ngasmixes) { |
904 | 895 | if (idx >= NGASMIXES) { |
905 | 896 | ERROR (abstract->context, "Maximum number of gas mixes reached."); |
@@ -964,7 +955,7 @@ hw_ostc_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t call |
964 | 955 |
|
965 | 956 | unsigned int o2 = data[offset]; |
966 | 957 | unsigned int he = data[offset + 1]; |
967 | | - unsigned int idx = hw_ostc_find_gasmix (parser, o2, he, 0, MANUAL); |
| 958 | + unsigned int idx = hw_ostc_find_gasmix_manual (parser, o2, he, 0); |
968 | 959 | if (idx >= parser->ngasmixes) { |
969 | 960 | if (idx >= NGASMIXES) { |
970 | 961 | ERROR (abstract->context, "Maximum number of gas mixes reached."); |
@@ -1099,7 +1090,7 @@ hw_ostc_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callback_t call |
1099 | 1090 |
|
1100 | 1091 | unsigned int o2 = data[offset]; |
1101 | 1092 | unsigned int he = data[offset + 1]; |
1102 | | - unsigned int idx = hw_ostc_find_gasmix (parser, o2, he, 0, MANUAL); |
| 1093 | + unsigned int idx = hw_ostc_find_gasmix_manual (parser, o2, he, 0); |
1103 | 1094 | if (idx >= parser->ngasmixes) { |
1104 | 1095 | if (idx >= NGASMIXES) { |
1105 | 1096 | ERROR (abstract->context, "Maximum number of gas mixes reached."); |
|
0 commit comments