HTML: fix SAC units

Sac units is in l/min and not mm/min.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Gehad elrobey 2014-07-19 05:26:07 +02:00 committed by Dirk Hohndel
parent feb3d6e476
commit bbe3440612

View file

@ -792,8 +792,8 @@ function get_dive_HTML(dive)
*/
function get_status_HTML(dive)
{
return '<h2 class="det_hed">Dive Status</h2><table><tr><td class="words">Sac: </td><td>' + dive.sac +
'</td><td class="words">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Otu: </td><td>' + dive.otu +
return '<h2 class="det_hed">Dive Status</h2><table><tr><td class="words">Sac: </td><td>' + ml_to_litre(dive.sac) +
' l/min' + '</td><td class="words">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Otu: </td><td>' + dive.otu +
'</td><td class="words">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cns: </td><td>' + dive.cns +
'</td></tr></table>';
};
@ -850,6 +850,11 @@ function mm_to_meter(mm)
return mm / (1000);
}
function ml_to_litre(ml)
{
return ml / (1000);
}
function format_two_digit(n)
{
return n > 9 ? "" + n : "0" + n;