mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Use user preferred units on worldmap export
We should use the temperature units preferred by the user when exporting dive info on Worldmap. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8f17caeedc
commit
ae5c947460
1 changed files with 8 additions and 2 deletions
|
@ -23,8 +23,14 @@ void put_HTML_date(struct membuffer *b, struct dive *dive)
|
|||
|
||||
void put_HTML_temp(struct membuffer *b, struct dive *dive)
|
||||
{
|
||||
put_temperature(b, dive->airtemp, "<p>Air Temp: ", "°C</p>");
|
||||
put_temperature(b, dive->watertemp, "<p>Water Temp: ", "°C</p>");
|
||||
const char *unit;
|
||||
double value;
|
||||
|
||||
value = get_temp_units(dive->airtemp.mkelvin, &unit);
|
||||
put_format(b, "<p>Air Temp: %.1f %s</p>", value, unit);
|
||||
|
||||
value = get_temp_units(dive->watertemp.mkelvin, &unit);
|
||||
put_format(b, "<p>Water Temp: %.1f %s</p>", value, unit);
|
||||
}
|
||||
|
||||
char *replace_char(char *str, char replace, char *replace_by)
|
||||
|
|
Loading…
Reference in a new issue