mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Saves default sea water salinity in log
Some DCs only report water type, without salinity level. Subsurface fixes most of these cases using default levels, but when the type of water is Sea/Salt, this fix was not saved. This causes a bit confusion, mainly if the user defines own salinity level. Signed-off-by: Rafael M. Salvioni <rafael.salvioni@gmail.com>
This commit is contained in:
parent
9da7ec4828
commit
2f4b415e91
3 changed files with 3 additions and 4 deletions
|
@ -1,3 +1,4 @@
|
|||
core: fix bug when save sea water salinity given by DC
|
||||
desktop: add column for dive notes to the dive list table
|
||||
desktop: fix bug when printing a dive plan with multiple segments
|
||||
desktop: fix remembering of bluetooth address for remembered dive computers (not MacOS)
|
||||
|
|
|
@ -211,8 +211,7 @@ static void save_airpressure(struct membuffer *b, struct divecomputer *dc)
|
|||
|
||||
static void save_salinity(struct membuffer *b, struct divecomputer *dc)
|
||||
{
|
||||
/* only save if we have a value that isn't the default of sea water */
|
||||
if (!dc->salinity || dc->salinity == SEAWATER_SALINITY)
|
||||
if (!dc->salinity)
|
||||
return;
|
||||
put_salinity(b, dc->salinity, "salinity ", "g/l\n");
|
||||
}
|
||||
|
|
|
@ -152,8 +152,7 @@ static void save_airpressure(struct membuffer *b, struct divecomputer *dc)
|
|||
|
||||
static void save_salinity(struct membuffer *b, struct divecomputer *dc)
|
||||
{
|
||||
/* only save if we have a value that isn't the default of sea water */
|
||||
if (!dc->salinity || dc->salinity == SEAWATER_SALINITY)
|
||||
if (!dc->salinity)
|
||||
return;
|
||||
put_string(b, " <water");
|
||||
put_salinity(b, dc->salinity, " salinity='", " g/l'");
|
||||
|
|
Loading…
Add table
Reference in a new issue