From db4d7ed27750ecb4fc9152056d0b46991ebe2bc2 Mon Sep 17 00:00:00 2001 From: eeak <39026644+eeak@users.noreply.github.com> Date: Thu, 1 Nov 2018 17:36:22 +0200 Subject: [PATCH] Add ConvertPress() --- sonoff/support.ino | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sonoff/support.ino b/sonoff/support.ino index bdce971bc..ef16b0bbc 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -475,6 +475,16 @@ char TempUnit() return (Settings.flag.temperature_conversion) ? 'F' : 'C'; } +float ConvertPress(float p) +{ + float result = p; + + if (!isnan(p)) { + result = p * 0.75006375541921; // mmHg + } + return result; +} + void SetGlobalValues(float temperature, float humidity) { global_update = uptime;