update convenience functions

This commit is contained in:
Michael Newton 2017-12-12 14:43:55 -08:00 committed by GitHub
parent b807b8cced
commit 34d4ffe9a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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