Permalink
Browse files

fixed bug at large data in bl-net

improved performance
changed table structure
  • Loading branch information...
1 parent 1dc4a22 commit fcb4de97fb53be7938e585e9a9b25c2556b1dc0f @berwinter committed Mar 5, 2013
View
@@ -7,4 +7,9 @@ database = uvr1611
[uvr1611]
address = 10.0.0.100
port = 40000
-reset = false
+reset = false
+
+[app]
+chartcache = 600
+latestcache = 60
+reduction = 2
View
@@ -205,7 +205,7 @@ var actualValues =
case "MWH":
return converter.mwh(data[value.frame][value.type]).toFixed(fractions.length);
case "KWH":
- return converter.kwh(data[value.frame][value.type]).toFixed(fractions.length);
+ return converter.kwh(data[value.frame][value.type]);
default:
return data[value.frame][value.type].toFixed(fractions.length);
}
@@ -227,7 +227,7 @@ var converter = {
},
mwh: function(value)
{
- return value/1000;
+ return Math.floor(value/1000);
},
kwh: function(value)
{
View
@@ -5,7 +5,7 @@
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Content-type: application/json; charset=utf-8');
-$data = load_cache("uvr1611_latest", 60);
+$data = load_cache("uvr1611_latest", Config::getInstance()->app->latestcache);
if(!$data)
{
Oops, something went wrong.

0 comments on commit fcb4de9

Please sign in to comment.