Add basic support for Emerson Netsure Controllers (#12091)

This commit is contained in:
craig-nokia
2020-09-14 07:03:35 +10:00
committed by GitHub
parent fde6ef5f3f
commit dda6377424
7 changed files with 3667 additions and 0 deletions

View File

@@ -1183,6 +1183,7 @@ function fahrenheit_to_celsius($value, $scale = 'fahrenheit')
* @param string $scale fahrenheit or celsius
* @return string (containing a float)
*/
function celsius_to_fahrenheit($value, $scale = 'celsius')
{
if ($scale === 'celsius') {
@@ -1191,6 +1192,15 @@ function celsius_to_fahrenheit($value, $scale = 'celsius')
return sprintf('%.02f', $value);
}
/**
* Converts string to float
*
*/
function string_to_float($value)
{
return sprintf('%.02f', $value);
}
/**
* Converts uW to dBm
* $value must be positive