fixed issue #26

This commit is contained in:
Dipesh Acharya
2012-05-15 04:02:16 +05:45
parent 85abf8521f
commit 4f9cbde882

View File

@@ -54,7 +54,7 @@ CpuTemperature.prototype = {
_detectSensors: function(){
//detect if sensors is installed
let ret = GLib.spawn_command_line_sync("which sensor");
let ret = GLib.spawn_command_line_sync("which sensors");
if ( (ret[0]) && (ret[3] == 0) ) {//if yes
return ret[1].toString().split("\n", 1)[0];//find the path of the sensors
}
@@ -349,7 +349,7 @@ CpuTemperature.prototype = {
_formatTemp: function(t) {
//uncomment the next line to display temperature in Fahrenheit
//return this._toFahrenheit(t).toString()+"\u1d3cF";
return (Math.round(t*10)/10).toString()+"\u1d3cC";
return (Math.round(t*10)/10).toFixed(1).toString()+"\u1d3cC";
}
}