mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 19:23:24 +00:00
HTML export: corretly show weird imperial tank sizes
It's not enough to convert the wet volume - you need to multiply in the working pressure. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9f5207fc0d
commit
b39e478c57
1 changed files with 4 additions and 1 deletions
|
@ -121,7 +121,10 @@ static void put_cylinder_HTML(struct membuffer *b, struct dive *dive)
|
|||
separator = ", ";
|
||||
write_attribute(b, "Type", cylinder->type.description, ", ");
|
||||
if (cylinder->type.size.mliter) {
|
||||
put_HTML_volume_units(b, cylinder->type.size.mliter, "\"Size\":\"", " \", ");
|
||||
int volume = cylinder->type.size.mliter;
|
||||
if (prefs.units.volume == CUFT && cylinder->type.workingpressure.mbar)
|
||||
volume *= bar_to_atm(cylinder->type.workingpressure.mbar / 1000.0);
|
||||
put_HTML_volume_units(b, volume, "\"Size\":\"", " \", ");
|
||||
} else {
|
||||
write_attribute(b, "Size", "--", ", ");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue