mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move gas_volume() to cylinder_t
Feels natural in a C++ code base. The commit is somewhat complex, because it also changes the return type to volume_t. The units system really needs some work. :( Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4cb3db2548
commit
9c726d8d6f
7 changed files with 27 additions and 21 deletions
|
@ -246,8 +246,8 @@ static dc_status_t parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_
|
|||
cyl.type.workingpressure.mbar = lrint(
|
||||
cyl.type.workingpressure.mbar * 206.843 / 206.7 );
|
||||
char name_buffer[17];
|
||||
int rounded_size = lrint(ml_to_cuft(gas_volume(&cyl,
|
||||
cyl.type.workingpressure)));
|
||||
int rounded_size = lrint(ml_to_cuft(cyl.gas_volume(
|
||||
cyl.type.workingpressure).mliter));
|
||||
rounded_size = (int)((rounded_size + 5) / 10) * 10;
|
||||
switch (cyl.type.workingpressure.mbar) {
|
||||
case 206843:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue