diff --git a/1Wire.js b/1Wire.js index 4a16173..a2b3225 100644 --- a/1Wire.js +++ b/1Wire.js @@ -32,7 +32,7 @@ module.exports = function(RED) { if ( this.format == 1 ) { msg.payload = test[1]/1000; } else { - msg.payload = (test[1]/1000 - 32) * (5/9) ; + msg.payload = test[1] / 1000 * 9 / 5 + 32; } } // Read the sensor and update message