core: pass depth_t to depth_to_* functions

This is a drop in the ocean. Make the usage of the unit-types a
bit more consistent throughout the code base.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-12-13 18:20:05 +01:00 committed by Michael Keller
parent 661ce3f9c7
commit da17f6a08c
13 changed files with 216 additions and 212 deletions

View file

@ -144,7 +144,8 @@ void TabDiveInformation::updateProfile()
continue;
volumes.append(get_volume_string(gases[i], true));
if (duration[i]) {
sac.mliter = lrint(gases[i].mliter / (currentDive->depth_to_atm(mean[i]) * duration[i] / 60));
depth_t mean_depth = { .mm = mean[i] }; // Will be removed in upcoming commit
sac.mliter = lrint(gases[i].mliter / (currentDive->depth_to_atm(mean_depth) * duration[i] / 60));
SACs.append(get_volume_string(sac, true).append(tr("/min")));
}
}