core: make round_to parameter of gas_mod() and gas_mnd() a depth_t

Simplifies practically all the callers.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-12-14 10:35:56 +01:00
parent e9c14c523c
commit c46579c006
6 changed files with 34 additions and 34 deletions

View file

@ -1131,7 +1131,7 @@ static void calculate_gas_information_new(const struct dive *dive, const struct
* END takes O + N (air) into account ("Narcotic" for trimix dives)
* EAD just uses N ("Air" for nitrox dives) */
pressure_t modpO2 = { .mbar = (int)(prefs.modpO2 * 1000) };
entry.mod = dive->gas_mod(gasmix, modpO2, 1).mm;
entry.mod = dive->gas_mod(gasmix, modpO2, 1_mm).mm;
entry.end = dive->mbar_to_depth(lrint(dive->depth_to_mbarf(depth) * (1000 - fhe) / 1000.0)).mm;
entry.ead = dive->mbar_to_depth(lrint(dive->depth_to_mbarf(depth) * fn2 / (double)N2_IN_AIR)).mm;
entry.eadd = dive->mbar_to_depth(lrint(dive->depth_to_mbarf(depth) *