@@ -75,6 +75,7 @@ typedef struct halcyon_symbios_tank_t {
75
75
unsigned int id ;
76
76
unsigned int beginpressure ;
77
77
unsigned int endpressure ;
78
+ unsigned int gasmix ;
78
79
dc_usage_t usage ;
79
80
} halcyon_symbios_tank_t ;
80
81
@@ -150,6 +151,7 @@ halcyon_symbios_parser_create (dc_parser_t **out, dc_context_t *context, const u
150
151
parser -> tank [i ].id = 0 ;
151
152
parser -> tank [i ].beginpressure = 0 ;
152
153
parser -> tank [i ].endpressure = 0 ;
154
+ parser -> tank [i ].gasmix = DC_GASMIX_UNKNOWN ;
153
155
parser -> tank [i ].usage = DC_USAGE_NONE ;
154
156
}
155
157
@@ -251,8 +253,8 @@ halcyon_symbios_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, u
251
253
tank -> workpressure = 0.0 ;
252
254
tank -> beginpressure = parser -> tank [flags ].beginpressure / 10.0 ;
253
255
tank -> endpressure = parser -> tank [flags ].endpressure / 10.0 ;
256
+ tank -> gasmix = parser -> tank [flags ].gasmix ;
254
257
tank -> usage = parser -> tank [flags ].usage ;
255
- tank -> gasmix = DC_GASMIX_UNKNOWN ;
256
258
break ;
257
259
case DC_FIELD_DECOMODEL :
258
260
if (parser -> gf_lo == UNDEFINED || parser -> gf_hi == UNDEFINED )
@@ -318,6 +320,7 @@ halcyon_symbios_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callbac
318
320
halcyon_symbios_gasmix_t gasmix [NGASMIXES ] = {0 };
319
321
halcyon_symbios_tank_t tank [NTANKS ] = {0 };
320
322
unsigned int gasmix_id_previous = UNDEFINED ;
323
+ unsigned int gasmix_idx = DC_GASMIX_UNKNOWN ;
321
324
unsigned int tank_id_previous = UNDEFINED ;
322
325
unsigned int tank_usage_previous = UNDEFINED ;
323
326
unsigned int tank_idx = UNDEFINED ;
@@ -447,6 +450,7 @@ halcyon_symbios_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callbac
447
450
sample .gasmix = idx ;
448
451
if (callback ) callback (DC_SAMPLE_GASMIX , & sample , userdata );
449
452
gasmix_id_previous = gas_id ;
453
+ gasmix_idx = idx ;
450
454
}
451
455
452
456
if (tank_id_previous != transmitter ||
@@ -469,6 +473,7 @@ halcyon_symbios_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callbac
469
473
tank [ntanks ].id = transmitter ;
470
474
tank [ntanks ].beginpressure = pressure ;
471
475
tank [ntanks ].endpressure = pressure ;
476
+ tank [ntanks ].gasmix = gasmix_idx ;
472
477
tank [ntanks ].usage = usage ;
473
478
ntanks ++ ;
474
479
}
@@ -572,6 +577,7 @@ halcyon_symbios_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callbac
572
577
tank [ntanks ].id = serial ;
573
578
tank [ntanks ].beginpressure = pressure ;
574
579
tank [ntanks ].endpressure = pressure ;
580
+ tank [ntanks ].gasmix = DC_GASMIX_UNKNOWN ;
575
581
tank [ntanks ].usage = usage ;
576
582
ntanks ++ ;
577
583
}
0 commit comments