test-ecs_firk_1


This macro converts and displays a stream of environmental sensors data sets obtained using the _protocol_set_ feature.
// Define the output object here
var output = {};

// Check if the key time exists in json
if (json.time !== undefined){
  var I0 = json.data_raw[30];
  output.I0=I0;

var delta_A=[];
for (var I in json.data_raw){
	delta_A.push(MathLOG(I0/json.data_raw[I]));
}
  output.delta_A=delta_A;
  output.good_slice=delta_A.slice(90,150);
}
return output;
{
  "time": "1499435214029",
  "device_name": "MultispeQ",
  "device_version": "1",
  "device_id": "01:12:38:34",
  "device_battery": 30,
  "device_firmware": 1.2,
  "sample": [
    [
      {
        "time": "1499435214040",
        "protocol_id": 1,
        "data_raw": [
          48559,
          48531,
          48525,
          48511,
          48511,
          48514,
          48513,
          48509,
          48503,
          48503,
          48503,
          48498,
          48500,
          48493,
          48495,
          48495,
          48495,
          48492,
          48487,
          48481,
          48488,
          48491,
          48489,
          48482,
          48479,
          48485,
          48490,
          48487,
          48480,
          48482,
          48483,
          48483,
          48483,
          48478,
          48479,
          48482,
          48484,
          48486,
          48477,
          48479,
          48478,
          48474,
          48478,
          48469,
          48471,
          48475,
          48472,
          48473,
          48471,
          48464,
          48472,
          48473,
          48473,
          48467,
          48466,
          48470,
          48468,
          48470,
          48467,
          48461,
          48471,
          48466,
          48467,
          48462,
          48463,
          48468,
          48471,
          48471,
          48462,
          48465,
          48467,
          48465,
          48463,
          48461,
          48457,
          48465,
          48464,
          48462,
          48454,
          48454,
          48461,
          48461,
          48462,
          48455,
          48455,
          48458,
          48457,
          48461,
          48455,
          48459,
          48459,
          48461,
          48463,
          48459,
          48455,
          48461,
          48459,
          48463,
          48455,
          48456,
          48410,
          48127,
          48229,
          48243,
          48266,
          48286,
          48294,
          48310,
          48313,
          48317,
          48328,
          48332,
          48347,
          48349,
          48349,
          48359,
          48363,
          48369,
          48366,
          48371,
          48381,
          48384,
          48391,
          48386,
          48385,
          48397,
          48403,
          48405,
          48403,
          48401,
          48406,
          48415,
          48417,
          48414,
          48414,
          48415,
          48423,
          48422,
          48419,
          48417,
          48420,
          48423,
          48425,
          48423,
          48422,
          48422,
          48430,
          48435,
          48430,
          48425,
          48433,
          48435,
          48439,
          48433,
          48432,
          48438,
          48442,
          48446,
          48441,
          48435,
          48440,
          48445,
          48443,
          48443,
          48441,
          48443,
          48446,
          48450,
          48447,
          48439,
          48448,
          48448,
          48449,
          48447,
          48443,
          48449,
          48453,
          48455,
          48451,
          48451,
          48450,
          48451,
          48455,
          48454,
          48444,
          48447,
          48454,
          48455,
          48460,
          48450,
          48451,
          48456,
          48455,
          48456,
          48454,
          48449,
          48454,
          48459,
          48455,
          48448,
          48455
        ]
      }
    ]
  ],
  "app_os": "darwin-15.6.0",
  "app_name": "PhotosynQ",
  "app_version": "0.0.15",
  "app_device": "x64",
  "location": false,
  "time_offset": "Europe/Amsterdam"
}
Dave in cap img 4615
Created by

David M. Kramer


Protocol connections:
0
Latest Update:
Jul 2017