Grantlee: Add salinity and water type to grantlee variables

These can be useful in a printed divelog, especially if the
log entry is also showing weight and exposure suit.

Signed-off-by: Monty Taylor <mordred@inaugust.com>
This commit is contained in:
Monty Taylor 2020-05-04 08:54:58 -05:00 committed by Lubomir I. Ivanov
parent b3270222fd
commit 95e6792c4f
9 changed files with 56 additions and 20 deletions

View file

@ -1196,6 +1196,11 @@ static void fixup_water_salinity(struct dive *dive)
dive->salinity = (sum + nr / 2) / nr;
}
int get_dive_salinity(const struct dive *dive)
{
return dive->user_salinity ? dive->user_salinity : dive->salinity;
}
static void fixup_meandepth(struct dive *dive)
{
struct divecomputer *dc;