mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
b3270222fd
commit
95e6792c4f
9 changed files with 56 additions and 20 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue