- on_all_new_record: function(n) {
- // format is : [name, x, y, z, uid, state]
- // state = "Busy", "Alive" or "Suspected"
- if (n.x == null || n.y == null || n.z == null) {
- console.log("Warning: no coord for " + n.hrn);
- return;
+ on_all_new_record: function(node) {
+ Senslab.normalize(node);
+ if (node.normalized) {
+ var site = node.site;
+ if ($.inArray(site, this.sites) == -1) {
+ this.sites.push(site);
+ this.nodes[site] = [];
+ }
+ this.nodes[site].push(node);
+ } else {
+// xxx would need a smarter way to report these only on nodes that deserve it
+// these messages are all over the place in a PL setup and tend to hide helpful signal
+// console.warn("node has no site:");
+// console.warn(node);