mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move *_to_depth() functions into struct dive
Seems logical in a C++ code base. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
bf84d66df2
commit
bdd5527005
6 changed files with 29 additions and 29 deletions
|
@ -248,7 +248,7 @@ void uemis::event(struct dive *dive, struct divecomputer *dc, struct sample *sam
|
|||
* flags[3].bit0 | flags[5].bit1 != 0 ==> in deco
|
||||
* flags[0].bit7 == 1 ==> Safety Stop
|
||||
* otherwise NDL */
|
||||
stopdepth = rel_mbar_to_depth(u_sample->hold_depth, dive);
|
||||
stopdepth = dive->rel_mbar_to_depth(u_sample->hold_depth);
|
||||
if ((flags[3] & 1) | (flags[5] & 2)) {
|
||||
/* deco */
|
||||
sample->in_deco = true;
|
||||
|
@ -344,7 +344,7 @@ void uemis::parse_divelog_binary(std::string_view base64, struct dive *dive)
|
|||
}
|
||||
sample = prepare_sample(dc);
|
||||
sample->time.seconds = u_sample->dive_time;
|
||||
sample->depth.mm = rel_mbar_to_depth(u_sample->water_pressure, dive);
|
||||
sample->depth.mm = dive->rel_mbar_to_depth(u_sample->water_pressure);
|
||||
sample->temperature.mkelvin = C_to_mkelvin(u_sample->dive_temperature / 10.0);
|
||||
add_sample_pressure(sample, active, (u_sample->tank_pressure_high * 256 + u_sample->tank_pressure_low) * 10);
|
||||
sample->cns = u_sample->cns;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue