Skip to content

Commit

Permalink
Update pebble.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ELUTE committed Mar 12, 2015
1 parent 2dc7536 commit 6357212
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/pebble.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ function pebble (req, res) {
req.entries.list(cq, function (err, results) {
results.forEach(function (element) {
if (element) {
calData.push({
x: element.date, d: element.dateString, scale: element.scale, intercept: element.intercept, slope: element.slope
});
var calobj = {};
calobj.slope = Math.round(element.slope).toFixed(0);
calobj.intercept = Math.round(element.intercept).toFixed(0);
calobj.scale = Math.round(element.scale).toFixed(0);
calData.push(calobj);
}
});
callback();
Expand Down Expand Up @@ -132,7 +134,7 @@ function pebble (req, res) {
obj.filtered = element.filtered;
obj.unfiltered = element.unfiltered;
obj.noise = element.noise;
obj.rssi = element.rssi;
//obj.rssi = element.rssi;
}
// obj.date = element.date.toString( );
sgvData.push(obj);
Expand Down

0 comments on commit 6357212

Please sign in to comment.