profile: make plotdata::depth depth_t

A small drop in the bucket: more conversion to our unit types.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-12-14 17:09:05 +01:00
parent 20bb11cd03
commit c9cb83d6b0
9 changed files with 97 additions and 104 deletions

View file

@ -280,7 +280,7 @@ static void fill_missing_tank_pressures(const struct dive *dive, struct plot_inf
static inline int calc_pressure_time(const struct dive *dive, const struct plot_data &a, const struct plot_data &b)
{
int time = b.sec - a.sec;
depth_t depth { .mm = (a.depth + b.depth) / 2 };
depth_t depth = (a.depth + b.depth) / 2;
if (depth.mm <= SURFACE_THRESHOLD)
return 0;