diff --git a/src/usr/local/www/widgets/javascript/thermal_sensors.js b/src/usr/local/www/widgets/javascript/thermal_sensors.js index 7d40c857eb..52ac153e67 100644 --- a/src/usr/local/www/widgets/javascript/thermal_sensors.js +++ b/src/usr/local/www/widgets/javascript/thermal_sensors.js @@ -164,7 +164,11 @@ function getThermalSensorValue(stringValue) { } function getFahrenheitValue(celc) { - return parseInt((celc * 1.8) + 32, 10); + return Math.ceil((celc * 1.8) + 32); +} + +function getCelciusValue(fahr) { + return Math.floor((fahr - 32) / 1.8); } // Update the progress indicator